powerpc oprofile G4 clashes with wacom driver
PATCH 1/1 powerpc oprofile G4 clashes with wacom driver
powerpc: oprofile G4 clashes with wacom driver
In 2.6.15-git6 a change was commited in the oprofile support in the powerpc architecture. It introduced the powerpc_oprofile_type which contains the define G4. This causes a name clash with the existing wacom usb tablet driver.
CC [M] drivers/usb/input/wacom.o
drivers/usb/input/wacom.c:98: error: conflicting types for G4' include/asm/cputable.h:37: error: previous declaration of G4'
CC [M] drivers/usb/mon/mon_text.o
make[3]: *** [drivers/usb/input/wacom.o] Error 1 make[2]: *** [drivers/usb/input] Error 2
The elements of an enum declared in global scope are effectivly global identifiers themselves. As such we need to ensure the names are unique. This patch updates the later oprofile support to use unique names.
--- arch/powerpc/kernel/cputable.c | 52 ++++++++++++++++++++--------------------- arch/powerpc/oprofile/common.c | 8 +++--- include/asm-powerpc/cputable.h | 10 +++---- 3 files changed, 35 insertions(+), 35 deletions(-)
arch/powerpc/kernel/cputable.c +26 -26
@@ -79,7 +79,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/power3", - .oprofile_type = RS64, + .oprofile_type = POT_RS64, }, {/* Power3+ */ .pvr_mask = 0xffff0000,
@@ -92,7 +92,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/power3", - .oprofile_type = RS64, + .oprofile_type = POT_RS64, }, {/* Northstar */ .pvr_mask = 0xffff0000,
@@ -105,7 +105,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", - .oprofile_type = RS64, + .oprofile_type = POT_RS64, }, {/* Pulsar */ .pvr_mask = 0xffff0000,
@@ -118,7 +118,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", - .oprofile_type = RS64, + .oprofile_type = POT_RS64, }, {/* I-star */ .pvr_mask = 0xffff0000,
@@ -131,7 +131,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", - .oprofile_type = RS64, + .oprofile_type = POT_RS64, }, {/* S-star */ .pvr_mask = 0xffff0000,
@@ -144,7 +144,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", - .oprofile_type = RS64, + .oprofile_type = POT_RS64, }, {/* Power4 */ .pvr_mask = 0xffff0000,
@@ -157,7 +157,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power4", - .oprofile_type = POWER4, + .oprofile_type = POT_POWER4, }, {/* Power4+ */ .pvr_mask = 0xffff0000,
@@ -170,7 +170,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power4", - .oprofile_type = POWER4, + .oprofile_type = POT_POWER4, }, {/* PPC970 */ .pvr_mask = 0xffff0000,
@@ -184,7 +184,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_ppc970, .oprofile_cpu_type = "ppc64/970", - .oprofile_type = POWER4, + .oprofile_type = POT_POWER4, },#endif /* CONFIG_PPC64 */ #if defined(CONFIG_PPC64 ) || defined(CONFIG_POWER4 )
@@ -204,7 +204,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_ppc970, .oprofile_cpu_type = "ppc64/970", - .oprofile_type = POWER4, + .oprofile_type = POT_POWER4, },#endif /* defined(CONFIG_PPC64) || defined(CONFIG_POWER4) */ #ifdef CONFIG_PPC64
@@ -219,7 +219,7 @@ struct cpu_spec cpu_specs[] = { .dcache_bsize = 128, .cpu_setup = __setup_cpu_ppc970, .oprofile_cpu_type = "ppc64/970", - .oprofile_type = POWER4, + .oprofile_type = POT_POWER4, }, {/* Power5 GR */ .pvr_mask = 0xffff0000,
@@ -232,7 +232,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power5", - .oprofile_type = POWER4, + .oprofile_type = POT_POWER4, }, {/* Power5 GS */ .pvr_mask = 0xffff0000,
@@ -245,7 +245,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power5+", - .oprofile_type = POWER4, + .oprofile_type = POT_POWER4, }, {/* Cell Broadband Engine */ .pvr_mask = 0xffff0000,
@@ -521,7 +521,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7450 2.1 */ .pvr_mask = 0xffffffff,
@@ -534,7 +534,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7450 2.3 and newer */ .pvr_mask = 0xffff0000,
@@ -547,7 +547,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7455 rev 1.x */ .pvr_mask = 0xffffff00,
@@ -560,7 +560,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7455 rev 2.0 */ .pvr_mask = 0xffffffff,
@@ -573,7 +573,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7455 others */ .pvr_mask = 0xffff0000,
@@ -586,7 +586,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7447/7457 Rev 1.0 */ .pvr_mask = 0xffffffff,
@@ -599,7 +599,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7447/7457 Rev 1.1 */ .pvr_mask = 0xffffffff,
@@ -612,7 +612,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7447/7457 Rev 1.2 and later */ .pvr_mask = 0xffff0000,
@@ -625,7 +625,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7447A */ .pvr_mask = 0xffff0000,
@@ -638,7 +638,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7448 */ .pvr_mask = 0xffff0000,
@@ -651,7 +651,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 82xx (8240, 8245, 8260 are all 603e cores) */ .pvr_mask = 0x7fff0000,
@@ -976,7 +976,7 @@ struct cpu_spec cpu_specs[] = { .dcache_bsize = 32, .num_pmcs = 4, .oprofile_cpu_type = "ppc/e500", - .oprofile_type = BOOKE, + .oprofile_type = POT_BOOKE, }, {/* e500v2 */ .pvr_mask = 0xffff0000,
@@ -991,7 +991,7 @@ struct cpu_spec cpu_specs[] = { .dcache_bsize = 32, .num_pmcs = 4, .oprofile_cpu_type = "ppc/e500", - .oprofile_type = BOOKE, + .oprofile_type = POT_BOOKE, },#endif #if !CLASSIC_PPC
arch/powerpc/oprofile/common.c +4 -4
@@ -140,19 +140,19 @@ int __init oprofile_arch_init(struct oprswitch (cur_cpu_spec->oprofile_type) {#ifdef CONFIG_PPC64 -case RS64 : +case POT_RS64 : model = &op_model_rs64;break ; -case POWER4 : +case POT_POWER4 : model = &op_model_power4;break ;#else -case G4 : +case POT_G4 : model = &op_model_7450;break ;#endif #ifdef CONFIG_FSL_BOOKE -case BOOKE : +case POT_BOOKE : model = &op_model_fsl_booke;break ;#endif
include/asm-powerpc/cputable.h +5 -5
@@ -31,11 +31,11 @@ struct cpu_spec;typedef void (*cpu_setup_t )(unsigned long offset,struct cpu_spec * spec);enum powerpc_oprofile_type { -INVALID =0 , -RS64 =1 , -POWER4 =2 , -G4 =3 , -BOOKE =4 , +POT_INVALID =0 , +POT_RS64 =1 , +POT_POWER4 =2 , +POT_G4 =3 , +POT_BOOKE =4 , };struct cpu_spec {
Quoted 14 lines · Andy Whitcroft
powerpc: oprofile G4 clashes with wacom driver
In 2.6.15-git6 a change was commited in the oprofile support in the powerpc architecture. It introduced the
powerpc_oprofile_typewhich contains the define G4. This causes a name clash with the existing wacom usb tablet driver.CC [M]
drivers/usb/input/wacom.o
drivers/usb/input/wacom.c:98: error: conflicting types forG4' include/asm/cputable.h:37: error: previous declaration ofG4'
CC [M]drivers/usb/mon/mon_text.o
make[3]: *** [drivers/usb/input/wacom.o] Error 1 make[2]: *** [drivers/usb/input] Error 2
Quoted 6 lines
The elements of an enum declared in global scope are effectivly global identifiers themselves. As such we need to ensure the names are unique. This patch updates the later oprofile support to use unique names.
Signed-off-by Andy Whitcroft <[email protected]>
How about a different prefix than POT_. POT_ doesn't make me think of PPC oprofile at all. How about PPC_OPROFILE_ or POWERPC_OPROFILE_
- kumar
Quoted 295 lines
--- arch/powerpc/kernel/cputable.c | 52 +++++++++++++++++++ +--------------------- arch/powerpc/oprofile/common.c | 8 +++--- include/asm-powerpc/cputable.h | 10 +++---- 3 files changed, 35 insertions(+), 35 deletions(-)diff -upN
reference/arch/powerpc/kernel/cputable.ccurrent/arch/powerpc/kernel/cputable.carch/powerpc/kernel/cputable.c +26
-26@@ -79,7 +79,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/power3", - .oprofile_type = RS64, + .oprofile_type = POT_RS64, }, {/* Power3+ */ .pvr_mask = 0xffff0000,@@ -92,7 +92,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/power3", - .oprofile_type = RS64, + .oprofile_type = POT_RS64, }, {/* Northstar */ .pvr_mask = 0xffff0000,@@ -105,7 +105,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", - .oprofile_type = RS64, + .oprofile_type = POT_RS64, }, {/* Pulsar */ .pvr_mask = 0xffff0000,@@ -118,7 +118,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", - .oprofile_type = RS64, + .oprofile_type = POT_RS64, }, {/* I-star */ .pvr_mask = 0xffff0000,@@ -131,7 +131,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", - .oprofile_type = RS64, + .oprofile_type = POT_RS64, }, {/* S-star */ .pvr_mask = 0xffff0000,@@ -144,7 +144,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", - .oprofile_type = RS64, + .oprofile_type = POT_RS64, }, {/* Power4 */ .pvr_mask = 0xffff0000,@@ -157,7 +157,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power4", - .oprofile_type = POWER4, + .oprofile_type = POT_POWER4, }, {/* Power4+ */ .pvr_mask = 0xffff0000,@@ -170,7 +170,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power4", - .oprofile_type = POWER4, + .oprofile_type = POT_POWER4, }, {/* PPC970 */ .pvr_mask = 0xffff0000,@@ -184,7 +184,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_ppc970, .oprofile_cpu_type = "ppc64/970", - .oprofile_type = POWER4, + .oprofile_type = POT_POWER4, },#endif /* CONFIG_PPC64 */ #if defined(CONFIG_PPC64 ) || defined(CONFIG_POWER4 )@@ -204,7 +204,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_ppc970, .oprofile_cpu_type = "ppc64/970", - .oprofile_type = POWER4, + .oprofile_type = POT_POWER4, },#endif /* defined(CONFIG_PPC64) || defined(CONFIG_POWER4) */ #ifdef CONFIG_PPC64 @@ -219,7 +219,7 @@ struct cpu_spec cpu_specs[] = { .dcache_bsize = 128, .cpu_setup = __setup_cpu_ppc970, .oprofile_cpu_type = "ppc64/970", - .oprofile_type = POWER4, + .oprofile_type = POT_POWER4, }, {/* Power5 GR */ .pvr_mask = 0xffff0000,@@ -232,7 +232,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power5", - .oprofile_type = POWER4, + .oprofile_type = POT_POWER4, }, {/* Power5 GS */ .pvr_mask = 0xffff0000,@@ -245,7 +245,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power5+", - .oprofile_type = POWER4, + .oprofile_type = POT_POWER4, }, {/* Cell Broadband Engine */ .pvr_mask = 0xffff0000,@@ -521,7 +521,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7450 2.1 */ .pvr_mask = 0xffffffff,@@ -534,7 +534,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7450 2.3 and newer */ .pvr_mask = 0xffff0000,@@ -547,7 +547,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7455 rev 1.x */ .pvr_mask = 0xffffff00,@@ -560,7 +560,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7455 rev 2.0 */ .pvr_mask = 0xffffffff,@@ -573,7 +573,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7455 others */ .pvr_mask = 0xffff0000,@@ -586,7 +586,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7447/7457 Rev 1.0 */ .pvr_mask = 0xffffffff,@@ -599,7 +599,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7447/7457 Rev 1.1 */ .pvr_mask = 0xffffffff,@@ -612,7 +612,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7447/7457 Rev 1.2 and later */ .pvr_mask = 0xffff0000,@@ -625,7 +625,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7447A */ .pvr_mask = 0xffff0000,@@ -638,7 +638,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 7448 */ .pvr_mask = 0xffff0000,@@ -651,7 +651,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = POT_G4, }, {/* 82xx (8240, 8245, 8260 are all 603e cores) */ .pvr_mask = 0x7fff0000,@@ -976,7 +976,7 @@ struct cpu_spec cpu_specs[] = { .dcache_bsize = 32, .num_pmcs = 4, .oprofile_cpu_type = "ppc/e500", - .oprofile_type = BOOKE, + .oprofile_type = POT_BOOKE, }, {/* e500v2 */ .pvr_mask = 0xffff0000,@@ -991,7 +991,7 @@ struct cpu_spec cpu_specs[] = { .dcache_bsize = 32, .num_pmcs = 4, .oprofile_cpu_type = "ppc/e500", - .oprofile_type = BOOKE, + .oprofile_type = POT_BOOKE, },#endif #if !CLASSIC_PPC diff -upN
reference/arch/powerpc/oprofile/common.ccurrent/arch/powerpc/oprofile/common.carch/powerpc/oprofile/common.c +4
-4@@ -140,19 +140,19 @@ int __init oprofile_arch_init(struct oprswitch (cur_cpu_spec->oprofile_type) {#ifdef CONFIG_PPC64 -case RS64 : +case POT_RS64 : model = &op_model_rs64;break ; -case POWER4 : +case POT_POWER4 : model = &op_model_power4;break ;#else -case G4 : +case POT_G4 : model = &op_model_7450;break ;#endif #ifdef CONFIG_FSL_BOOKE -case BOOKE : +case POT_BOOKE : model = &op_model_fsl_booke;break ;#endif diff -upN
reference/include/asm-powerpc/cputable.hcurrent/include/asm-powerpc/cputable.hinclude/asm-powerpc/cputable.h +5
-5@@ -31,11 +31,11 @@ struct cpu_spec;typedef void (*cpu_setup_t )(unsigned long offset,struct cpu_spec * spec);enum powerpc_oprofile_type { -INVALID =0 , -RS64 =1 , -POWER4 =2 , -G4 =3 , -BOOKE =4 , +POT_INVALID =0 , +POT_RS64 =1 , +POT_POWER4 =2 , +POT_G4 =3 , +POT_BOOKE =4 , };struct
cpu_spec{
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev
Quoted 2 lines · Kumar Gala
How about a different prefix than
POT_.POT_doesn't make me think of PPC oprofile at all. How aboutPPC_OPROFILE_orPOWERPC_OPROFILE_
Paul? I am ambivalent about the prefix, and it can be trivially changed to any that you feel approriate.
-apw
Quoted 2 lines · Andy Whitcroft
Paul? I am ambivalent about the prefix, and it can be trivially changed to any that you feel approriate.
I think there needs to be a prefix, but I have no idea what POT_ would be (oh, I guess it's Powerpc Oprofile Type, I suppose). Something like PPC_OPROFILE_ would be better, if it's not too long.
Paul.
PATCH 1/1 powerpc oprofile G4 clashes with wacom driver
Quoted 4 lines
I think there needs to be a prefix, but I have no idea what
POT_would be (oh, I guess it's Powerpc Oprofile Type, I suppose). Something likePPC_OPROFILE_would be better, if it's not too long.
Makes sense. How does this look? Only built on powerpc-64 so far.
Anton
--
Rename powerpc_oprofile_type enum, the old names were way too generic.
---
arch/powerpc/kernel/cputable.c +26 -26
@@ -79,7 +79,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/power3", - .oprofile_type = RS64, + .oprofile_type = PPC_OPROFILE_RS64, }, {/* Power3+ */ .pvr_mask = 0xffff0000,
@@ -92,7 +92,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/power3", - .oprofile_type = RS64, + .oprofile_type = PPC_OPROFILE_RS64, }, {/* Northstar */ .pvr_mask = 0xffff0000,
@@ -105,7 +105,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", - .oprofile_type = RS64, + .oprofile_type = PPC_OPROFILE_RS64, }, {/* Pulsar */ .pvr_mask = 0xffff0000,
@@ -118,7 +118,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", - .oprofile_type = RS64, + .oprofile_type = PPC_OPROFILE_RS64, }, {/* I-star */ .pvr_mask = 0xffff0000,
@@ -131,7 +131,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", - .oprofile_type = RS64, + .oprofile_type = PPC_OPROFILE_RS64, }, {/* S-star */ .pvr_mask = 0xffff0000,
@@ -144,7 +144,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", - .oprofile_type = RS64, + .oprofile_type = PPC_OPROFILE_RS64, }, {/* Power4 */ .pvr_mask = 0xffff0000,
@@ -157,7 +157,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power4", - .oprofile_type = POWER4, + .oprofile_type = PPC_OPROFILE_POWER4, }, {/* Power4+ */ .pvr_mask = 0xffff0000,
@@ -170,7 +170,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power4", - .oprofile_type = POWER4, + .oprofile_type = PPC_OPROFILE_POWER4, }, {/* PPC970 */ .pvr_mask = 0xffff0000,
@@ -184,7 +184,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_ppc970, .oprofile_cpu_type = "ppc64/970", - .oprofile_type = POWER4, + .oprofile_type = PPC_OPROFILE_POWER4, },#endif /* CONFIG_PPC64 */ #if defined(CONFIG_PPC64 ) || defined(CONFIG_POWER4 )
@@ -204,7 +204,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_ppc970, .oprofile_cpu_type = "ppc64/970", - .oprofile_type = POWER4, + .oprofile_type = PPC_OPROFILE_POWER4, },#endif /* defined(CONFIG_PPC64) || defined(CONFIG_POWER4) */ #ifdef CONFIG_PPC64
@@ -219,7 +219,7 @@ struct cpu_spec cpu_specs[] = { .dcache_bsize = 128, .cpu_setup = __setup_cpu_ppc970, .oprofile_cpu_type = "ppc64/970", - .oprofile_type = POWER4, + .oprofile_type = PPC_OPROFILE_POWER4, }, {/* Power5 GR */ .pvr_mask = 0xffff0000,
@@ -232,7 +232,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power5", - .oprofile_type = POWER4, + .oprofile_type = PPC_OPROFILE_POWER4, }, {/* Power5 GS */ .pvr_mask = 0xffff0000,
@@ -245,7 +245,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power5+", - .oprofile_type = POWER4, + .oprofile_type = PPC_OPROFILE_POWER4, }, {/* Cell Broadband Engine */ .pvr_mask = 0xffff0000,
@@ -521,7 +521,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7450 2.1 */ .pvr_mask = 0xffffffff,
@@ -534,7 +534,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7450 2.3 and newer */ .pvr_mask = 0xffff0000,
@@ -547,7 +547,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7455 rev 1.x */ .pvr_mask = 0xffffff00,
@@ -560,7 +560,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7455 rev 2.0 */ .pvr_mask = 0xffffffff,
@@ -573,7 +573,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7455 others */ .pvr_mask = 0xffff0000,
@@ -586,7 +586,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7447/7457 Rev 1.0 */ .pvr_mask = 0xffffffff,
@@ -599,7 +599,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7447/7457 Rev 1.1 */ .pvr_mask = 0xffffffff,
@@ -612,7 +612,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7447/7457 Rev 1.2 and later */ .pvr_mask = 0xffff0000,
@@ -625,7 +625,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7447A */ .pvr_mask = 0xffff0000,
@@ -638,7 +638,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7448 */ .pvr_mask = 0xffff0000,
@@ -651,7 +651,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 82xx (8240, 8245, 8260 are all 603e cores) */ .pvr_mask = 0x7fff0000,
@@ -976,7 +976,7 @@ struct cpu_spec cpu_specs[] = { .dcache_bsize = 32, .num_pmcs = 4, .oprofile_cpu_type = "ppc/e500", - .oprofile_type = BOOKE, + .oprofile_type = PPC_OPROFILE_BOOKE, }, {/* e500v2 */ .pvr_mask = 0xffff0000,
@@ -991,7 +991,7 @@ struct cpu_spec cpu_specs[] = { .dcache_bsize = 32, .num_pmcs = 4, .oprofile_cpu_type = "ppc/e500", - .oprofile_type = BOOKE, + .oprofile_type = PPC_OPROFILE_BOOKE, },#endif #if !CLASSIC_PPC
arch/powerpc/oprofile/common.c +4 -4
@@ -140,19 +140,19 @@ int __init oprofile_arch_init(struct oprswitch (cur_cpu_spec->oprofile_type) {#ifdef CONFIG_PPC64 -case RS64 : +case PPC_OPROFILE_RS64 : model = &op_model_rs64;break ; -case POWER4 : +case PPC_OPROFILE_POWER4 : model = &op_model_power4;break ;#else -case G4 : +case PPC_OPROFILE_G4 : model = &op_model_7450;break ;#endif #ifdef CONFIG_FSL_BOOKE -case BOOKE : +case PPC_OPROFILE_BOOKE : model = &op_model_fsl_booke;break ;#endif
include/asm-powerpc/cputable.h +5 -5
@@ -31,11 +31,11 @@ struct cpu_spec;typedef void (*cpu_setup_t )(unsigned long offset,struct cpu_spec * spec);enum powerpc_oprofile_type { -INVALID =0 , -RS64 =1 , -POWER4 =2 , -G4 =3 , -BOOKE =4 , +PPC_OPROFILE_INVALID =0 , +PPC_OPROFILE_RS64 =1 , +PPC_OPROFILE_POWER4 =2 , +PPC_OPROFILE_G4 =3 , +PPC_OPROFILE_BOOKE =4 , };struct cpu_spec {
PATCH 1/1 powerpc oprofile G4 clashes with wacom driver
In reply to Paul Mackerraspowerpc: oprofile G4 clashes with wacom driver
In 2.6.15-git6 a change was commited in the oprofile support in the powerpc architecture. It introduced the powerpc_oprofile_type which contains the define G4. This causes a name clash with the existing wacom usb tablet driver.
CC [M] drivers/usb/input/wacom.o
drivers/usb/input/wacom.c:98: error: conflicting types for G4' include/asm/cputable.h:37: error: previous declaration of G4'
CC [M] drivers/usb/mon/mon_text.o
make[3]: *** [drivers/usb/input/wacom.o] Error 1 make[2]: *** [drivers/usb/input] Error 2
The elements of an enum declared in global scope are effectivly global identifiers themselves. As such we need to ensure the names are unique. This patch updates the later oprofile support to use unique names.
--- arch/powerpc/kernel/cputable.c | 52 ++++++++++++++++++++--------------------- arch/powerpc/oprofile/common.c | 8 +++--- include/asm-powerpc/cputable.h | 10 +++---- 3 files changed, 35 insertions(+), 35 deletions(-)
arch/powerpc/kernel/cputable.c +26 -26
@@ -79,7 +79,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/power3", - .oprofile_type = RS64, + .oprofile_type = PPC_OPROFILE_RS64, }, {/* Power3+ */ .pvr_mask = 0xffff0000,
@@ -92,7 +92,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/power3", - .oprofile_type = RS64, + .oprofile_type = PPC_OPROFILE_RS64, }, {/* Northstar */ .pvr_mask = 0xffff0000,
@@ -105,7 +105,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", - .oprofile_type = RS64, + .oprofile_type = PPC_OPROFILE_RS64, }, {/* Pulsar */ .pvr_mask = 0xffff0000,
@@ -118,7 +118,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", - .oprofile_type = RS64, + .oprofile_type = PPC_OPROFILE_RS64, }, {/* I-star */ .pvr_mask = 0xffff0000,
@@ -131,7 +131,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", - .oprofile_type = RS64, + .oprofile_type = PPC_OPROFILE_RS64, }, {/* S-star */ .pvr_mask = 0xffff0000,
@@ -144,7 +144,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", - .oprofile_type = RS64, + .oprofile_type = PPC_OPROFILE_RS64, }, {/* Power4 */ .pvr_mask = 0xffff0000,
@@ -157,7 +157,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power4", - .oprofile_type = POWER4, + .oprofile_type = PPC_OPROFILE_POWER4, }, {/* Power4+ */ .pvr_mask = 0xffff0000,
@@ -170,7 +170,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power4", - .oprofile_type = POWER4, + .oprofile_type = PPC_OPROFILE_POWER4, }, {/* PPC970 */ .pvr_mask = 0xffff0000,
@@ -184,7 +184,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_ppc970, .oprofile_cpu_type = "ppc64/970", - .oprofile_type = POWER4, + .oprofile_type = PPC_OPROFILE_POWER4, },#endif /* CONFIG_PPC64 */ #if defined(CONFIG_PPC64 ) || defined(CONFIG_POWER4 )
@@ -204,7 +204,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 8, .cpu_setup = __setup_cpu_ppc970, .oprofile_cpu_type = "ppc64/970", - .oprofile_type = POWER4, + .oprofile_type = PPC_OPROFILE_POWER4, },#endif /* defined(CONFIG_PPC64) || defined(CONFIG_POWER4) */ #ifdef CONFIG_PPC64
@@ -219,7 +219,7 @@ struct cpu_spec cpu_specs[] = { .dcache_bsize = 128, .cpu_setup = __setup_cpu_ppc970, .oprofile_cpu_type = "ppc64/970", - .oprofile_type = POWER4, + .oprofile_type = PPC_OPROFILE_POWER4, }, {/* Power5 GR */ .pvr_mask = 0xffff0000,
@@ -232,7 +232,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power5", - .oprofile_type = POWER4, + .oprofile_type = PPC_OPROFILE_POWER4, }, {/* Power5 GS */ .pvr_mask = 0xffff0000,
@@ -245,7 +245,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power5+", - .oprofile_type = POWER4, + .oprofile_type = PPC_OPROFILE_POWER4, }, {/* Cell Broadband Engine */ .pvr_mask = 0xffff0000,
@@ -521,7 +521,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7450 2.1 */ .pvr_mask = 0xffffffff,
@@ -534,7 +534,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7450 2.3 and newer */ .pvr_mask = 0xffff0000,
@@ -547,7 +547,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7455 rev 1.x */ .pvr_mask = 0xffffff00,
@@ -560,7 +560,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7455 rev 2.0 */ .pvr_mask = 0xffffffff,
@@ -573,7 +573,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7455 others */ .pvr_mask = 0xffff0000,
@@ -586,7 +586,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7447/7457 Rev 1.0 */ .pvr_mask = 0xffffffff,
@@ -599,7 +599,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7447/7457 Rev 1.1 */ .pvr_mask = 0xffffffff,
@@ -612,7 +612,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7447/7457 Rev 1.2 and later */ .pvr_mask = 0xffff0000,
@@ -625,7 +625,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7447A */ .pvr_mask = 0xffff0000,
@@ -638,7 +638,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 7448 */ .pvr_mask = 0xffff0000,
@@ -651,7 +651,7 @@ struct cpu_spec cpu_specs[] = { .num_pmcs = 6, .cpu_setup = __setup_cpu_745x, .oprofile_cpu_type = "ppc/7450", - .oprofile_type = G4, + .oprofile_type = PPC_OPROFILE_G4, }, {/* 82xx (8240, 8245, 8260 are all 603e cores) */ .pvr_mask = 0x7fff0000,
@@ -976,7 +976,7 @@ struct cpu_spec cpu_specs[] = { .dcache_bsize = 32, .num_pmcs = 4, .oprofile_cpu_type = "ppc/e500", - .oprofile_type = BOOKE, + .oprofile_type = PPC_OPROFILE_BOOKE, }, {/* e500v2 */ .pvr_mask = 0xffff0000,
@@ -991,7 +991,7 @@ struct cpu_spec cpu_specs[] = { .dcache_bsize = 32, .num_pmcs = 4, .oprofile_cpu_type = "ppc/e500", - .oprofile_type = BOOKE, + .oprofile_type = PPC_OPROFILE_BOOKE, },#endif #if !CLASSIC_PPC
arch/powerpc/oprofile/common.c +4 -4
@@ -140,19 +140,19 @@ int __init oprofile_arch_init(struct oprswitch (cur_cpu_spec->oprofile_type) {#ifdef CONFIG_PPC64 -case RS64 : +case PPC_OPROFILE_RS64 : model = &op_model_rs64;break ; -case POWER4 : +case PPC_OPROFILE_POWER4 : model = &op_model_power4;break ;#else -case G4 : +case PPC_OPROFILE_G4 : model = &op_model_7450;break ;#endif #ifdef CONFIG_FSL_BOOKE -case BOOKE : +case PPC_OPROFILE_BOOKE : model = &op_model_fsl_booke;break ;#endif
include/asm-powerpc/cputable.h +5 -5
@@ -31,11 +31,11 @@ struct cpu_spec;typedef void (*cpu_setup_t )(unsigned long offset,struct cpu_spec * spec);enum powerpc_oprofile_type { -INVALID =0 , -RS64 =1 , -POWER4 =2 , -G4 =3 , -BOOKE =4 , +PPC_OPROFILE_INVALID =0 , +PPC_OPROFILE_RS64 =1 , +PPC_OPROFILE_POWER4 =2 , +PPC_OPROFILE_G4 =3 , +PPC_OPROFILE_BOOKE =4 , };struct cpu_spec {