Patchwork [2/3] sparc32: remove CONFIG_HAVE_PERF_EVENTS option

login
register
mail settings
Submitter Namhyung Kim
Date Oct. 25, 2010, 3:52 p.m.
Message ID <1288021958-3130-2-git-send-email-namhyung@gmail.com>
Download mbox | patch
Permalink /patch/69112/
State Accepted
Delegated to: David Miller
Headers show

Comments

Namhyung Kim - Oct. 25, 2010, 3:52 p.m.
Remove HAVE_PERF_EVENTS and PERF_USE_VMALLOC under config
SPARC because they're under SPARC64 too. Supporting
perf_event needs atomic64 operations but AFAIK sparc32
doesn't provide them, CMIIW. ;-) Also removes redundant
HAVE_IRQ_WORK line.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
 arch/sparc/Kconfig |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
David Miller - Oct. 25, 2010, 3:59 p.m.
From: Namhyung Kim <namhyung@gmail.com>
Date: Tue, 26 Oct 2010 00:52:37 +0900

> Remove HAVE_PERF_EVENTS and PERF_USE_VMALLOC under config
> SPARC because they're under SPARC64 too. Supporting
> perf_event needs atomic64 operations but AFAIK sparc32
> doesn't provide them, CMIIW. ;-) Also removes redundant
> HAVE_IRQ_WORK line.
> 
> Signed-off-by: Namhyung Kim <namhyung@gmail.com>

The generic non-hw perf event stuff builds fine on sparc32,
please don't remove this unless you have a legitimate build
failure to report and fix.

Even if sparc32 doesn't provide atomic64_t support, it very
easily could do so using include/asm-generic/atomic64.h which
implements them using spinlocks.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Namhyung Kim - Oct. 25, 2010, 4:31 p.m.
2010-10-25 (월), 08:59 -0700, David Miller:
> From: Namhyung Kim <namhyung@gmail.com>
> Date: Tue, 26 Oct 2010 00:52:37 +0900
> 
> > Remove HAVE_PERF_EVENTS and PERF_USE_VMALLOC under config
> > SPARC because they're under SPARC64 too. Supporting
> > perf_event needs atomic64 operations but AFAIK sparc32
> > doesn't provide them, CMIIW. ;-) Also removes redundant
> > HAVE_IRQ_WORK line.
> > 
> > Signed-off-by: Namhyung Kim <namhyung@gmail.com>
> 
> The generic non-hw perf event stuff builds fine on sparc32,
> please don't remove this unless you have a legitimate build
> failure to report and fix.
> 
> Even if sparc32 doesn't provide atomic64_t support, it very
> easily could do so using include/asm-generic/atomic64.h which
> implements them using spinlocks.

Now I see following build failure without this patch. Maybe some work is
needed to deal with atomic64_t. I'll try to prepare for it soon. Thanks.


  CC      arch/sparc/kernel/setup_32.o
In file included from arch/sparc/include/asm/local64.h:1:0,
                 from include/linux/perf_event.h:465,
                 from include/linux/ftrace_event.h:8,
                 from include/trace/syscall.h:6,
                 from include/linux/syscalls.h:76,
                 from arch/sparc/kernel/setup_32.c:23:
include/asm-generic/local64.h:62:2: error: expected
                            specifier-qualifier-list before 'atomic64_t'
In file included from include/linux/ftrace_event.h:8:0,
                 from include/trace/syscall.h:6,
                 from include/linux/syscalls.h:76,
                 from arch/sparc/kernel/setup_32.c:23:
include/linux/perf_event.h:722:2: error: expected
                            specifier-qualifier-list before 'atomic64_t'
include/linux/perf_event.h: In function 'perf_fetch_caller_regs':
include/linux/perf_event.h:1004:2: error: 'struct pt_regs' has no member
                                           named 'tstate'
include/linux/perf_event.h:1004:2: error: 'struct pt_regs' has no member
                                           named 'tpc'
include/linux/perf_event.h:1004:2: error: 'struct pt_regs' has no member
                                           named 'tnpc'
include/linux/perf_event.h:1004:2: error: 'struct pt_regs' has no member
                                           named 'tpc'
make[3]: *** [arch/sparc/kernel/setup_32.o] Error 1
make[2]: *** [arch/sparc/kernel] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
David Miller - Oct. 25, 2010, 6:55 p.m.
From: Namhyung Kim <namhyung@gmail.com>
Date: Tue, 26 Oct 2010 01:31:19 +0900

> 2010-10-25 (월), 08:59 -0700, David Miller:
>> From: Namhyung Kim <namhyung@gmail.com>
>> Date: Tue, 26 Oct 2010 00:52:37 +0900
>> 
>> > Remove HAVE_PERF_EVENTS and PERF_USE_VMALLOC under config
>> > SPARC because they're under SPARC64 too. Supporting
>> > perf_event needs atomic64 operations but AFAIK sparc32
>> > doesn't provide them, CMIIW. ;-) Also removes redundant
>> > HAVE_IRQ_WORK line.
>> > 
>> > Signed-off-by: Namhyung Kim <namhyung@gmail.com>
>> 
>> The generic non-hw perf event stuff builds fine on sparc32,
>> please don't remove this unless you have a legitimate build
>> failure to report and fix.
>> 
>> Even if sparc32 doesn't provide atomic64_t support, it very
>> easily could do so using include/asm-generic/atomic64.h which
>> implements them using spinlocks.
> 
> Now I see following build failure without this patch. Maybe some work is
> needed to deal with atomic64_t. I'll try to prepare for it soon. Thanks.

Nevermind, I see the issue.  Ok, your patch is fine:

Acked-by: David S. Miller <davem@davemloft.net>
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 3e9d314..4db8bc0 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -27,8 +27,6 @@  config SPARC
 	select RTC_CLASS
 	select RTC_DRV_M48T59
 	select HAVE_IRQ_WORK
-	select HAVE_PERF_EVENTS
-	select PERF_USE_VMALLOC
 	select HAVE_DMA_ATTRS
 	select HAVE_DMA_API_DEBUG
 	select HAVE_ARCH_JUMP_LABEL
@@ -55,7 +53,6 @@  config SPARC64
 	select RTC_DRV_BQ4802
 	select RTC_DRV_SUN4V
 	select RTC_DRV_STARFIRE
-	select HAVE_IRQ_WORK
 	select HAVE_PERF_EVENTS
 	select PERF_USE_VMALLOC