aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2006-01-13 07:35:49 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-13 19:12:16 -0500
commit7a45fb19cef93574230827e6e2c97ad5760ddecd (patch)
tree89c4d2628f7d8acea2e7c315097bb4488a7e8070
parent80f15dc703b3677d0b025bafd215f1f3664c8978 (diff)
[PATCH] powerpc: oprofile cpu type names clash with other code
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. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/kernel/cputable.c52
-rw-r--r--arch/powerpc/oprofile/common.c8
-rw-r--r--include/asm-powerpc/cputable.h10
3 files changed, 35 insertions, 35 deletions
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index cf1eea1a2299..10696456a4c6 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -80,7 +80,7 @@ struct cpu_spec cpu_specs[] = {
80 .num_pmcs = 8, 80 .num_pmcs = 8,
81 .cpu_setup = __setup_cpu_power3, 81 .cpu_setup = __setup_cpu_power3,
82 .oprofile_cpu_type = "ppc64/power3", 82 .oprofile_cpu_type = "ppc64/power3",
83 .oprofile_type = RS64, 83 .oprofile_type = PPC_OPROFILE_RS64,
84 .platform = "power3", 84 .platform = "power3",
85 }, 85 },
86 { /* Power3+ */ 86 { /* Power3+ */
@@ -94,7 +94,7 @@ struct cpu_spec cpu_specs[] = {
94 .num_pmcs = 8, 94 .num_pmcs = 8,
95 .cpu_setup = __setup_cpu_power3, 95 .cpu_setup = __setup_cpu_power3,
96 .oprofile_cpu_type = "ppc64/power3", 96 .oprofile_cpu_type = "ppc64/power3",
97 .oprofile_type = RS64, 97 .oprofile_type = PPC_OPROFILE_RS64,
98 .platform = "power3", 98 .platform = "power3",
99 }, 99 },
100 { /* Northstar */ 100 { /* Northstar */
@@ -108,7 +108,7 @@ struct cpu_spec cpu_specs[] = {
108 .num_pmcs = 8, 108 .num_pmcs = 8,
109 .cpu_setup = __setup_cpu_power3, 109 .cpu_setup = __setup_cpu_power3,
110 .oprofile_cpu_type = "ppc64/rs64", 110 .oprofile_cpu_type = "ppc64/rs64",
111 .oprofile_type = RS64, 111 .oprofile_type = PPC_OPROFILE_RS64,
112 .platform = "rs64", 112 .platform = "rs64",
113 }, 113 },
114 { /* Pulsar */ 114 { /* Pulsar */
@@ -122,7 +122,7 @@ struct cpu_spec cpu_specs[] = {
122 .num_pmcs = 8, 122 .num_pmcs = 8,
123 .cpu_setup = __setup_cpu_power3, 123 .cpu_setup = __setup_cpu_power3,
124 .oprofile_cpu_type = "ppc64/rs64", 124 .oprofile_cpu_type = "ppc64/rs64",
125 .oprofile_type = RS64, 125 .oprofile_type = PPC_OPROFILE_RS64,
126 .platform = "rs64", 126 .platform = "rs64",
127 }, 127 },
128 { /* I-star */ 128 { /* I-star */
@@ -136,7 +136,7 @@ struct cpu_spec cpu_specs[] = {
136 .num_pmcs = 8, 136 .num_pmcs = 8,
137 .cpu_setup = __setup_cpu_power3, 137 .cpu_setup = __setup_cpu_power3,
138 .oprofile_cpu_type = "ppc64/rs64", 138 .oprofile_cpu_type = "ppc64/rs64",
139 .oprofile_type = RS64, 139 .oprofile_type = PPC_OPROFILE_RS64,
140 .platform = "rs64", 140 .platform = "rs64",
141 }, 141 },
142 { /* S-star */ 142 { /* S-star */
@@ -150,7 +150,7 @@ struct cpu_spec cpu_specs[] = {
150 .num_pmcs = 8, 150 .num_pmcs = 8,
151 .cpu_setup = __setup_cpu_power3, 151 .cpu_setup = __setup_cpu_power3,
152 .oprofile_cpu_type = "ppc64/rs64", 152 .oprofile_cpu_type = "ppc64/rs64",
153 .oprofile_type = RS64, 153 .oprofile_type = PPC_OPROFILE_RS64,
154 .platform = "rs64", 154 .platform = "rs64",
155 }, 155 },
156 { /* Power4 */ 156 { /* Power4 */
@@ -164,7 +164,7 @@ struct cpu_spec cpu_specs[] = {
164 .num_pmcs = 8, 164 .num_pmcs = 8,
165 .cpu_setup = __setup_cpu_power4, 165 .cpu_setup = __setup_cpu_power4,
166 .oprofile_cpu_type = "ppc64/power4", 166 .oprofile_cpu_type = "ppc64/power4",
167 .oprofile_type = POWER4, 167 .oprofile_type = PPC_OPROFILE_POWER4,
168 .platform = "power4", 168 .platform = "power4",
169 }, 169 },
170 { /* Power4+ */ 170 { /* Power4+ */
@@ -178,7 +178,7 @@ struct cpu_spec cpu_specs[] = {
178 .num_pmcs = 8, 178 .num_pmcs = 8,
179 .cpu_setup = __setup_cpu_power4, 179 .cpu_setup = __setup_cpu_power4,
180 .oprofile_cpu_type = "ppc64/power4", 180 .oprofile_cpu_type = "ppc64/power4",
181 .oprofile_type = POWER4, 181 .oprofile_type = PPC_OPROFILE_POWER4,
182 .platform = "power4", 182 .platform = "power4",
183 }, 183 },
184 { /* PPC970 */ 184 { /* PPC970 */
@@ -193,7 +193,7 @@ struct cpu_spec cpu_specs[] = {
193 .num_pmcs = 8, 193 .num_pmcs = 8,
194 .cpu_setup = __setup_cpu_ppc970, 194 .cpu_setup = __setup_cpu_ppc970,
195 .oprofile_cpu_type = "ppc64/970", 195 .oprofile_cpu_type = "ppc64/970",
196 .oprofile_type = POWER4, 196 .oprofile_type = PPC_OPROFILE_POWER4,
197 .platform = "ppc970", 197 .platform = "ppc970",
198 }, 198 },
199#endif /* CONFIG_PPC64 */ 199#endif /* CONFIG_PPC64 */
@@ -214,7 +214,7 @@ struct cpu_spec cpu_specs[] = {
214 .num_pmcs = 8, 214 .num_pmcs = 8,
215 .cpu_setup = __setup_cpu_ppc970, 215 .cpu_setup = __setup_cpu_ppc970,
216 .oprofile_cpu_type = "ppc64/970", 216 .oprofile_cpu_type = "ppc64/970",
217 .oprofile_type = POWER4, 217 .oprofile_type = PPC_OPROFILE_POWER4,
218 .platform = "ppc970", 218 .platform = "ppc970",
219 }, 219 },
220#endif /* defined(CONFIG_PPC64) || defined(CONFIG_POWER4) */ 220#endif /* defined(CONFIG_PPC64) || defined(CONFIG_POWER4) */
@@ -230,7 +230,7 @@ struct cpu_spec cpu_specs[] = {
230 .dcache_bsize = 128, 230 .dcache_bsize = 128,
231 .cpu_setup = __setup_cpu_ppc970, 231 .cpu_setup = __setup_cpu_ppc970,
232 .oprofile_cpu_type = "ppc64/970", 232 .oprofile_cpu_type = "ppc64/970",
233 .oprofile_type = POWER4, 233 .oprofile_type = PPC_OPROFILE_POWER4,
234 .platform = "ppc970", 234 .platform = "ppc970",
235 }, 235 },
236 { /* Power5 GR */ 236 { /* Power5 GR */
@@ -244,7 +244,7 @@ struct cpu_spec cpu_specs[] = {
244 .num_pmcs = 6, 244 .num_pmcs = 6,
245 .cpu_setup = __setup_cpu_power4, 245 .cpu_setup = __setup_cpu_power4,
246 .oprofile_cpu_type = "ppc64/power5", 246 .oprofile_cpu_type = "ppc64/power5",
247 .oprofile_type = POWER4, 247 .oprofile_type = PPC_OPROFILE_POWER4,
248 .platform = "power5", 248 .platform = "power5",
249 }, 249 },
250 { /* Power5 GS */ 250 { /* Power5 GS */
@@ -258,7 +258,7 @@ struct cpu_spec cpu_specs[] = {
258 .num_pmcs = 6, 258 .num_pmcs = 6,
259 .cpu_setup = __setup_cpu_power4, 259 .cpu_setup = __setup_cpu_power4,
260 .oprofile_cpu_type = "ppc64/power5+", 260 .oprofile_cpu_type = "ppc64/power5+",
261 .oprofile_type = POWER4, 261 .oprofile_type = PPC_OPROFILE_POWER4,
262 .platform = "power5+", 262 .platform = "power5+",
263 }, 263 },
264 { /* Cell Broadband Engine */ 264 { /* Cell Broadband Engine */
@@ -559,7 +559,7 @@ struct cpu_spec cpu_specs[] = {
559 .num_pmcs = 6, 559 .num_pmcs = 6,
560 .cpu_setup = __setup_cpu_745x, 560 .cpu_setup = __setup_cpu_745x,
561 .oprofile_cpu_type = "ppc/7450", 561 .oprofile_cpu_type = "ppc/7450",
562 .oprofile_type = G4, 562 .oprofile_type = PPC_OPROFILE_G4,
563 .platform = "ppc7450", 563 .platform = "ppc7450",
564 }, 564 },
565 { /* 7450 2.1 */ 565 { /* 7450 2.1 */
@@ -573,7 +573,7 @@ struct cpu_spec cpu_specs[] = {
573 .num_pmcs = 6, 573 .num_pmcs = 6,
574 .cpu_setup = __setup_cpu_745x, 574 .cpu_setup = __setup_cpu_745x,
575 .oprofile_cpu_type = "ppc/7450", 575 .oprofile_cpu_type = "ppc/7450",
576 .oprofile_type = G4, 576 .oprofile_type = PPC_OPROFILE_G4,
577 .platform = "ppc7450", 577 .platform = "ppc7450",
578 }, 578 },
579 { /* 7450 2.3 and newer */ 579 { /* 7450 2.3 and newer */
@@ -587,7 +587,7 @@ struct cpu_spec cpu_specs[] = {
587 .num_pmcs = 6, 587 .num_pmcs = 6,
588 .cpu_setup = __setup_cpu_745x, 588 .cpu_setup = __setup_cpu_745x,
589 .oprofile_cpu_type = "ppc/7450", 589 .oprofile_cpu_type = "ppc/7450",
590 .oprofile_type = G4, 590 .oprofile_type = PPC_OPROFILE_G4,
591 .platform = "ppc7450", 591 .platform = "ppc7450",
592 }, 592 },
593 { /* 7455 rev 1.x */ 593 { /* 7455 rev 1.x */
@@ -601,7 +601,7 @@ struct cpu_spec cpu_specs[] = {
601 .num_pmcs = 6, 601 .num_pmcs = 6,
602 .cpu_setup = __setup_cpu_745x, 602 .cpu_setup = __setup_cpu_745x,
603 .oprofile_cpu_type = "ppc/7450", 603 .oprofile_cpu_type = "ppc/7450",
604 .oprofile_type = G4, 604 .oprofile_type = PPC_OPROFILE_G4,
605 .platform = "ppc7450", 605 .platform = "ppc7450",
606 }, 606 },
607 { /* 7455 rev 2.0 */ 607 { /* 7455 rev 2.0 */
@@ -615,7 +615,7 @@ struct cpu_spec cpu_specs[] = {
615 .num_pmcs = 6, 615 .num_pmcs = 6,
616 .cpu_setup = __setup_cpu_745x, 616 .cpu_setup = __setup_cpu_745x,
617 .oprofile_cpu_type = "ppc/7450", 617 .oprofile_cpu_type = "ppc/7450",
618 .oprofile_type = G4, 618 .oprofile_type = PPC_OPROFILE_G4,
619 .platform = "ppc7450", 619 .platform = "ppc7450",
620 }, 620 },
621 { /* 7455 others */ 621 { /* 7455 others */
@@ -629,7 +629,7 @@ struct cpu_spec cpu_specs[] = {
629 .num_pmcs = 6, 629 .num_pmcs = 6,
630 .cpu_setup = __setup_cpu_745x, 630 .cpu_setup = __setup_cpu_745x,
631 .oprofile_cpu_type = "ppc/7450", 631 .oprofile_cpu_type = "ppc/7450",
632 .oprofile_type = G4, 632 .oprofile_type = PPC_OPROFILE_G4,
633 .platform = "ppc7450", 633 .platform = "ppc7450",
634 }, 634 },
635 { /* 7447/7457 Rev 1.0 */ 635 { /* 7447/7457 Rev 1.0 */
@@ -643,7 +643,7 @@ struct cpu_spec cpu_specs[] = {
643 .num_pmcs = 6, 643 .num_pmcs = 6,
644 .cpu_setup = __setup_cpu_745x, 644 .cpu_setup = __setup_cpu_745x,
645 .oprofile_cpu_type = "ppc/7450", 645 .oprofile_cpu_type = "ppc/7450",
646 .oprofile_type = G4, 646 .oprofile_type = PPC_OPROFILE_G4,
647 .platform = "ppc7450", 647 .platform = "ppc7450",
648 }, 648 },
649 { /* 7447/7457 Rev 1.1 */ 649 { /* 7447/7457 Rev 1.1 */
@@ -657,7 +657,7 @@ struct cpu_spec cpu_specs[] = {
657 .num_pmcs = 6, 657 .num_pmcs = 6,
658 .cpu_setup = __setup_cpu_745x, 658 .cpu_setup = __setup_cpu_745x,
659 .oprofile_cpu_type = "ppc/7450", 659 .oprofile_cpu_type = "ppc/7450",
660 .oprofile_type = G4, 660 .oprofile_type = PPC_OPROFILE_G4,
661 .platform = "ppc7450", 661 .platform = "ppc7450",
662 }, 662 },
663 { /* 7447/7457 Rev 1.2 and later */ 663 { /* 7447/7457 Rev 1.2 and later */
@@ -671,7 +671,7 @@ struct cpu_spec cpu_specs[] = {
671 .num_pmcs = 6, 671 .num_pmcs = 6,
672 .cpu_setup = __setup_cpu_745x, 672 .cpu_setup = __setup_cpu_745x,
673 .oprofile_cpu_type = "ppc/7450", 673 .oprofile_cpu_type = "ppc/7450",
674 .oprofile_type = G4, 674 .oprofile_type = PPC_OPROFILE_G4,
675 .platform = "ppc7450", 675 .platform = "ppc7450",
676 }, 676 },
677 { /* 7447A */ 677 { /* 7447A */
@@ -685,7 +685,7 @@ struct cpu_spec cpu_specs[] = {
685 .num_pmcs = 6, 685 .num_pmcs = 6,
686 .cpu_setup = __setup_cpu_745x, 686 .cpu_setup = __setup_cpu_745x,
687 .oprofile_cpu_type = "ppc/7450", 687 .oprofile_cpu_type = "ppc/7450",
688 .oprofile_type = G4, 688 .oprofile_type = PPC_OPROFILE_G4,
689 .platform = "ppc7450", 689 .platform = "ppc7450",
690 }, 690 },
691 { /* 7448 */ 691 { /* 7448 */
@@ -699,7 +699,7 @@ struct cpu_spec cpu_specs[] = {
699 .num_pmcs = 6, 699 .num_pmcs = 6,
700 .cpu_setup = __setup_cpu_745x, 700 .cpu_setup = __setup_cpu_745x,
701 .oprofile_cpu_type = "ppc/7450", 701 .oprofile_cpu_type = "ppc/7450",
702 .oprofile_type = G4, 702 .oprofile_type = PPC_OPROFILE_G4,
703 .platform = "ppc7450", 703 .platform = "ppc7450",
704 }, 704 },
705 { /* 82xx (8240, 8245, 8260 are all 603e cores) */ 705 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
@@ -1056,7 +1056,7 @@ struct cpu_spec cpu_specs[] = {
1056 .dcache_bsize = 32, 1056 .dcache_bsize = 32,
1057 .num_pmcs = 4, 1057 .num_pmcs = 4,
1058 .oprofile_cpu_type = "ppc/e500", 1058 .oprofile_cpu_type = "ppc/e500",
1059 .oprofile_type = BOOKE, 1059 .oprofile_type = PPC_OPROFILE_BOOKE,
1060 .platform = "ppc8540", 1060 .platform = "ppc8540",
1061 }, 1061 },
1062 { /* e500v2 */ 1062 { /* e500v2 */
@@ -1073,7 +1073,7 @@ struct cpu_spec cpu_specs[] = {
1073 .dcache_bsize = 32, 1073 .dcache_bsize = 32,
1074 .num_pmcs = 4, 1074 .num_pmcs = 4,
1075 .oprofile_cpu_type = "ppc/e500", 1075 .oprofile_cpu_type = "ppc/e500",
1076 .oprofile_type = BOOKE, 1076 .oprofile_type = PPC_OPROFILE_BOOKE,
1077 .platform = "ppc8548", 1077 .platform = "ppc8548",
1078 }, 1078 },
1079#endif 1079#endif
diff --git a/arch/powerpc/oprofile/common.c b/arch/powerpc/oprofile/common.c
index 71615eb70b2b..cc2535be3a73 100644
--- a/arch/powerpc/oprofile/common.c
+++ b/arch/powerpc/oprofile/common.c
@@ -140,19 +140,19 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
140 140
141 switch (cur_cpu_spec->oprofile_type) { 141 switch (cur_cpu_spec->oprofile_type) {
142#ifdef CONFIG_PPC64 142#ifdef CONFIG_PPC64
143 case RS64: 143 case PPC_OPROFILE_RS64:
144 model = &op_model_rs64; 144 model = &op_model_rs64;
145 break; 145 break;
146 case POWER4: 146 case PPC_OPROFILE_POWER4:
147 model = &op_model_power4; 147 model = &op_model_power4;
148 break; 148 break;
149#else 149#else
150 case G4: 150 case PPC_OPROFILE_G4:
151 model = &op_model_7450; 151 model = &op_model_7450;
152 break; 152 break;
153#endif 153#endif
154#ifdef CONFIG_FSL_BOOKE 154#ifdef CONFIG_FSL_BOOKE
155 case BOOKE: 155 case PPC_OPROFILE_BOOKE:
156 model = &op_model_fsl_booke; 156 model = &op_model_fsl_booke;
157 break; 157 break;
158#endif 158#endif
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h
index 03017d905704..64210549f56b 100644
--- a/include/asm-powerpc/cputable.h
+++ b/include/asm-powerpc/cputable.h
@@ -32,11 +32,11 @@ struct cpu_spec;
32typedef void (*cpu_setup_t)(unsigned long offset, struct cpu_spec* spec); 32typedef void (*cpu_setup_t)(unsigned long offset, struct cpu_spec* spec);
33 33
34enum powerpc_oprofile_type { 34enum powerpc_oprofile_type {
35 INVALID = 0, 35 PPC_OPROFILE_INVALID = 0,
36 RS64 = 1, 36 PPC_OPROFILE_RS64 = 1,
37 POWER4 = 2, 37 PPC_OPROFILE_POWER4 = 2,
38 G4 = 3, 38 PPC_OPROFILE_G4 = 3,
39 BOOKE = 4, 39 PPC_OPROFILE_BOOKE = 4,
40}; 40};
41 41
42struct cpu_spec { 42struct cpu_spec {