diff options
-rw-r--r-- | arch/arm/boot/dts/tegra20.dtsi | 17 | ||||
-rw-r--r-- | arch/arm/boot/dts/tegra30.dtsi | 29 | ||||
-rw-r--r-- | arch/arm/include/asm/cputype.h | 33 | ||||
-rw-r--r-- | arch/arm/include/asm/smp_scu.h | 17 | ||||
-rw-r--r-- | arch/arm/kernel/perf_event.c | 16 | ||||
-rw-r--r-- | arch/arm/kernel/perf_event_cpu.c | 51 | ||||
-rw-r--r-- | arch/arm/kernel/perf_event_v6.c | 4 | ||||
-rw-r--r-- | arch/arm/kernel/perf_event_v7.c | 18 | ||||
-rw-r--r-- | arch/arm/kernel/perf_event_xscale.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap-smp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap44xx.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/platsmp.c | 19 |
12 files changed, 141 insertions, 68 deletions
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index 649391579871..2e7c83c7253b 100644 --- a/arch/arm/boot/dts/tegra20.dtsi +++ b/arch/arm/boot/dts/tegra20.dtsi | |||
@@ -489,6 +489,23 @@ | |||
489 | status = "disabled"; | 489 | status = "disabled"; |
490 | }; | 490 | }; |
491 | 491 | ||
492 | cpus { | ||
493 | #address-cells = <1>; | ||
494 | #size-cells = <0>; | ||
495 | |||
496 | cpu@0 { | ||
497 | device_type = "cpu"; | ||
498 | compatible = "arm,cortex-a9"; | ||
499 | reg = <0>; | ||
500 | }; | ||
501 | |||
502 | cpu@1 { | ||
503 | device_type = "cpu"; | ||
504 | compatible = "arm,cortex-a9"; | ||
505 | reg = <1>; | ||
506 | }; | ||
507 | }; | ||
508 | |||
492 | pmu { | 509 | pmu { |
493 | compatible = "arm,cortex-a9-pmu"; | 510 | compatible = "arm,cortex-a9-pmu"; |
494 | interrupts = <0 56 0x04 | 511 | interrupts = <0 56 0x04 |
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi index b1483d925878..2de8b919d78c 100644 --- a/arch/arm/boot/dts/tegra30.dtsi +++ b/arch/arm/boot/dts/tegra30.dtsi | |||
@@ -506,6 +506,35 @@ | |||
506 | status = "disabled"; | 506 | status = "disabled"; |
507 | }; | 507 | }; |
508 | 508 | ||
509 | cpus { | ||
510 | #address-cells = <1>; | ||
511 | #size-cells = <0>; | ||
512 | |||
513 | cpu@0 { | ||
514 | device_type = "cpu"; | ||
515 | compatible = "arm,cortex-a9"; | ||
516 | reg = <0>; | ||
517 | }; | ||
518 | |||
519 | cpu@1 { | ||
520 | device_type = "cpu"; | ||
521 | compatible = "arm,cortex-a9"; | ||
522 | reg = <1>; | ||
523 | }; | ||
524 | |||
525 | cpu@2 { | ||
526 | device_type = "cpu"; | ||
527 | compatible = "arm,cortex-a9"; | ||
528 | reg = <2>; | ||
529 | }; | ||
530 | |||
531 | cpu@3 { | ||
532 | device_type = "cpu"; | ||
533 | compatible = "arm,cortex-a9"; | ||
534 | reg = <3>; | ||
535 | }; | ||
536 | }; | ||
537 | |||
509 | pmu { | 538 | pmu { |
510 | compatible = "arm,cortex-a9-pmu"; | 539 | compatible = "arm,cortex-a9-pmu"; |
511 | interrupts = <0 144 0x04 | 540 | interrupts = <0 144 0x04 |
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h index a59dcb5ab5fc..ad41ec2471e8 100644 --- a/arch/arm/include/asm/cputype.h +++ b/arch/arm/include/asm/cputype.h | |||
@@ -64,6 +64,24 @@ extern unsigned int processor_id; | |||
64 | #define read_cpuid_ext(reg) 0 | 64 | #define read_cpuid_ext(reg) 0 |
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | #define ARM_CPU_IMP_ARM 0x41 | ||
68 | #define ARM_CPU_IMP_INTEL 0x69 | ||
69 | |||
70 | #define ARM_CPU_PART_ARM1136 0xB360 | ||
71 | #define ARM_CPU_PART_ARM1156 0xB560 | ||
72 | #define ARM_CPU_PART_ARM1176 0xB760 | ||
73 | #define ARM_CPU_PART_ARM11MPCORE 0xB020 | ||
74 | #define ARM_CPU_PART_CORTEX_A8 0xC080 | ||
75 | #define ARM_CPU_PART_CORTEX_A9 0xC090 | ||
76 | #define ARM_CPU_PART_CORTEX_A5 0xC050 | ||
77 | #define ARM_CPU_PART_CORTEX_A15 0xC0F0 | ||
78 | #define ARM_CPU_PART_CORTEX_A7 0xC070 | ||
79 | |||
80 | #define ARM_CPU_XSCALE_ARCH_MASK 0xe000 | ||
81 | #define ARM_CPU_XSCALE_ARCH_V1 0x2000 | ||
82 | #define ARM_CPU_XSCALE_ARCH_V2 0x4000 | ||
83 | #define ARM_CPU_XSCALE_ARCH_V3 0x6000 | ||
84 | |||
67 | /* | 85 | /* |
68 | * The CPU ID never changes at run time, so we might as well tell the | 86 | * The CPU ID never changes at run time, so we might as well tell the |
69 | * compiler that it's constant. Use this function to read the CPU ID | 87 | * compiler that it's constant. Use this function to read the CPU ID |
@@ -74,6 +92,21 @@ static inline unsigned int __attribute_const__ read_cpuid_id(void) | |||
74 | return read_cpuid(CPUID_ID); | 92 | return read_cpuid(CPUID_ID); |
75 | } | 93 | } |
76 | 94 | ||
95 | static inline unsigned int __attribute_const__ read_cpuid_implementor(void) | ||
96 | { | ||
97 | return (read_cpuid_id() & 0xFF000000) >> 24; | ||
98 | } | ||
99 | |||
100 | static inline unsigned int __attribute_const__ read_cpuid_part_number(void) | ||
101 | { | ||
102 | return read_cpuid_id() & 0xFFF0; | ||
103 | } | ||
104 | |||
105 | static inline unsigned int __attribute_const__ xscale_cpu_arch_version(void) | ||
106 | { | ||
107 | return read_cpuid_part_number() & ARM_CPU_XSCALE_ARCH_MASK; | ||
108 | } | ||
109 | |||
77 | static inline unsigned int __attribute_const__ read_cpuid_cachetype(void) | 110 | static inline unsigned int __attribute_const__ read_cpuid_cachetype(void) |
78 | { | 111 | { |
79 | return read_cpuid(CPUID_CACHETYPE); | 112 | return read_cpuid(CPUID_CACHETYPE); |
diff --git a/arch/arm/include/asm/smp_scu.h b/arch/arm/include/asm/smp_scu.h index 4eb6d005ffaa..006f02681cd8 100644 --- a/arch/arm/include/asm/smp_scu.h +++ b/arch/arm/include/asm/smp_scu.h | |||
@@ -6,6 +6,23 @@ | |||
6 | #define SCU_PM_POWEROFF 3 | 6 | #define SCU_PM_POWEROFF 3 |
7 | 7 | ||
8 | #ifndef __ASSEMBLER__ | 8 | #ifndef __ASSEMBLER__ |
9 | |||
10 | #include <asm/cputype.h> | ||
11 | |||
12 | static inline bool scu_a9_has_base(void) | ||
13 | { | ||
14 | return read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9; | ||
15 | } | ||
16 | |||
17 | static inline unsigned long scu_a9_get_base(void) | ||
18 | { | ||
19 | unsigned long pa; | ||
20 | |||
21 | asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (pa)); | ||
22 | |||
23 | return pa; | ||
24 | } | ||
25 | |||
9 | unsigned int scu_get_core_count(void __iomem *); | 26 | unsigned int scu_get_core_count(void __iomem *); |
10 | void scu_enable(void __iomem *); | 27 | void scu_enable(void __iomem *); |
11 | int scu_power_mode(void __iomem *, unsigned int); | 28 | int scu_power_mode(void __iomem *, unsigned int); |
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index f9e8657dd241..31e0eb353cd8 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -149,12 +149,6 @@ again: | |||
149 | static void | 149 | static void |
150 | armpmu_read(struct perf_event *event) | 150 | armpmu_read(struct perf_event *event) |
151 | { | 151 | { |
152 | struct hw_perf_event *hwc = &event->hw; | ||
153 | |||
154 | /* Don't read disabled counters! */ | ||
155 | if (hwc->idx < 0) | ||
156 | return; | ||
157 | |||
158 | armpmu_event_update(event); | 152 | armpmu_event_update(event); |
159 | } | 153 | } |
160 | 154 | ||
@@ -207,8 +201,6 @@ armpmu_del(struct perf_event *event, int flags) | |||
207 | struct hw_perf_event *hwc = &event->hw; | 201 | struct hw_perf_event *hwc = &event->hw; |
208 | int idx = hwc->idx; | 202 | int idx = hwc->idx; |
209 | 203 | ||
210 | WARN_ON(idx < 0); | ||
211 | |||
212 | armpmu_stop(event, PERF_EF_UPDATE); | 204 | armpmu_stop(event, PERF_EF_UPDATE); |
213 | hw_events->events[idx] = NULL; | 205 | hw_events->events[idx] = NULL; |
214 | clear_bit(idx, hw_events->used_mask); | 206 | clear_bit(idx, hw_events->used_mask); |
@@ -358,7 +350,7 @@ __hw_perf_event_init(struct perf_event *event) | |||
358 | { | 350 | { |
359 | struct arm_pmu *armpmu = to_arm_pmu(event->pmu); | 351 | struct arm_pmu *armpmu = to_arm_pmu(event->pmu); |
360 | struct hw_perf_event *hwc = &event->hw; | 352 | struct hw_perf_event *hwc = &event->hw; |
361 | int mapping, err; | 353 | int mapping; |
362 | 354 | ||
363 | mapping = armpmu->map_event(event); | 355 | mapping = armpmu->map_event(event); |
364 | 356 | ||
@@ -407,14 +399,12 @@ __hw_perf_event_init(struct perf_event *event) | |||
407 | local64_set(&hwc->period_left, hwc->sample_period); | 399 | local64_set(&hwc->period_left, hwc->sample_period); |
408 | } | 400 | } |
409 | 401 | ||
410 | err = 0; | ||
411 | if (event->group_leader != event) { | 402 | if (event->group_leader != event) { |
412 | err = validate_group(event); | 403 | if (validate_group(event) != 0); |
413 | if (err) | ||
414 | return -EINVAL; | 404 | return -EINVAL; |
415 | } | 405 | } |
416 | 406 | ||
417 | return err; | 407 | return 0; |
418 | } | 408 | } |
419 | 409 | ||
420 | static int armpmu_event_init(struct perf_event *event) | 410 | static int armpmu_event_init(struct perf_event *event) |
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c index 5f6620684e25..1f2740e3dbc0 100644 --- a/arch/arm/kernel/perf_event_cpu.c +++ b/arch/arm/kernel/perf_event_cpu.c | |||
@@ -147,7 +147,7 @@ static void cpu_pmu_init(struct arm_pmu *cpu_pmu) | |||
147 | cpu_pmu->free_irq = cpu_pmu_free_irq; | 147 | cpu_pmu->free_irq = cpu_pmu_free_irq; |
148 | 148 | ||
149 | /* Ensure the PMU has sane values out of reset. */ | 149 | /* Ensure the PMU has sane values out of reset. */ |
150 | if (cpu_pmu && cpu_pmu->reset) | 150 | if (cpu_pmu->reset) |
151 | on_each_cpu(cpu_pmu->reset, cpu_pmu, 1); | 151 | on_each_cpu(cpu_pmu->reset, cpu_pmu, 1); |
152 | } | 152 | } |
153 | 153 | ||
@@ -201,48 +201,46 @@ static struct platform_device_id cpu_pmu_plat_device_ids[] = { | |||
201 | static int probe_current_pmu(struct arm_pmu *pmu) | 201 | static int probe_current_pmu(struct arm_pmu *pmu) |
202 | { | 202 | { |
203 | int cpu = get_cpu(); | 203 | int cpu = get_cpu(); |
204 | unsigned long cpuid = read_cpuid_id(); | 204 | unsigned long implementor = read_cpuid_implementor(); |
205 | unsigned long implementor = (cpuid & 0xFF000000) >> 24; | 205 | unsigned long part_number = read_cpuid_part_number(); |
206 | unsigned long part_number = (cpuid & 0xFFF0); | ||
207 | int ret = -ENODEV; | 206 | int ret = -ENODEV; |
208 | 207 | ||
209 | pr_info("probing PMU on CPU %d\n", cpu); | 208 | pr_info("probing PMU on CPU %d\n", cpu); |
210 | 209 | ||
211 | /* ARM Ltd CPUs. */ | 210 | /* ARM Ltd CPUs. */ |
212 | if (0x41 == implementor) { | 211 | if (implementor == ARM_CPU_IMP_ARM) { |
213 | switch (part_number) { | 212 | switch (part_number) { |
214 | case 0xB360: /* ARM1136 */ | 213 | case ARM_CPU_PART_ARM1136: |
215 | case 0xB560: /* ARM1156 */ | 214 | case ARM_CPU_PART_ARM1156: |
216 | case 0xB760: /* ARM1176 */ | 215 | case ARM_CPU_PART_ARM1176: |
217 | ret = armv6pmu_init(pmu); | 216 | ret = armv6pmu_init(pmu); |
218 | break; | 217 | break; |
219 | case 0xB020: /* ARM11mpcore */ | 218 | case ARM_CPU_PART_ARM11MPCORE: |
220 | ret = armv6mpcore_pmu_init(pmu); | 219 | ret = armv6mpcore_pmu_init(pmu); |
221 | break; | 220 | break; |
222 | case 0xC080: /* Cortex-A8 */ | 221 | case ARM_CPU_PART_CORTEX_A8: |
223 | ret = armv7_a8_pmu_init(pmu); | 222 | ret = armv7_a8_pmu_init(pmu); |
224 | break; | 223 | break; |
225 | case 0xC090: /* Cortex-A9 */ | 224 | case ARM_CPU_PART_CORTEX_A9: |
226 | ret = armv7_a9_pmu_init(pmu); | 225 | ret = armv7_a9_pmu_init(pmu); |
227 | break; | 226 | break; |
228 | case 0xC050: /* Cortex-A5 */ | 227 | case ARM_CPU_PART_CORTEX_A5: |
229 | ret = armv7_a5_pmu_init(pmu); | 228 | ret = armv7_a5_pmu_init(pmu); |
230 | break; | 229 | break; |
231 | case 0xC0F0: /* Cortex-A15 */ | 230 | case ARM_CPU_PART_CORTEX_A15: |
232 | ret = armv7_a15_pmu_init(pmu); | 231 | ret = armv7_a15_pmu_init(pmu); |
233 | break; | 232 | break; |
234 | case 0xC070: /* Cortex-A7 */ | 233 | case ARM_CPU_PART_CORTEX_A7: |
235 | ret = armv7_a7_pmu_init(pmu); | 234 | ret = armv7_a7_pmu_init(pmu); |
236 | break; | 235 | break; |
237 | } | 236 | } |
238 | /* Intel CPUs [xscale]. */ | 237 | /* Intel CPUs [xscale]. */ |
239 | } else if (0x69 == implementor) { | 238 | } else if (implementor == ARM_CPU_IMP_INTEL) { |
240 | part_number = (cpuid >> 13) & 0x7; | 239 | switch (xscale_cpu_arch_version()) { |
241 | switch (part_number) { | 240 | case ARM_CPU_XSCALE_ARCH_V1: |
242 | case 1: | ||
243 | ret = xscale1pmu_init(pmu); | 241 | ret = xscale1pmu_init(pmu); |
244 | break; | 242 | break; |
245 | case 2: | 243 | case ARM_CPU_XSCALE_ARCH_V2: |
246 | ret = xscale2pmu_init(pmu); | 244 | ret = xscale2pmu_init(pmu); |
247 | break; | 245 | break; |
248 | } | 246 | } |
@@ -279,17 +277,22 @@ static int cpu_pmu_device_probe(struct platform_device *pdev) | |||
279 | } | 277 | } |
280 | 278 | ||
281 | if (ret) { | 279 | if (ret) { |
282 | pr_info("failed to register PMU devices!"); | 280 | pr_info("failed to probe PMU!"); |
283 | kfree(pmu); | 281 | goto out_free; |
284 | return ret; | ||
285 | } | 282 | } |
286 | 283 | ||
287 | cpu_pmu = pmu; | 284 | cpu_pmu = pmu; |
288 | cpu_pmu->plat_device = pdev; | 285 | cpu_pmu->plat_device = pdev; |
289 | cpu_pmu_init(cpu_pmu); | 286 | cpu_pmu_init(cpu_pmu); |
290 | armpmu_register(cpu_pmu, PERF_TYPE_RAW); | 287 | ret = armpmu_register(cpu_pmu, PERF_TYPE_RAW); |
291 | 288 | ||
292 | return 0; | 289 | if (!ret) |
290 | return 0; | ||
291 | |||
292 | out_free: | ||
293 | pr_info("failed to register PMU devices!"); | ||
294 | kfree(pmu); | ||
295 | return ret; | ||
293 | } | 296 | } |
294 | 297 | ||
295 | static struct platform_driver cpu_pmu_driver = { | 298 | static struct platform_driver cpu_pmu_driver = { |
diff --git a/arch/arm/kernel/perf_event_v6.c b/arch/arm/kernel/perf_event_v6.c index 041d0526a288..03664b0e8fa4 100644 --- a/arch/arm/kernel/perf_event_v6.c +++ b/arch/arm/kernel/perf_event_v6.c | |||
@@ -106,7 +106,7 @@ static const unsigned armv6_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
106 | }, | 106 | }, |
107 | [C(OP_WRITE)] = { | 107 | [C(OP_WRITE)] = { |
108 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 108 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
109 | [C(RESULT_MISS)] = ARMV6_PERFCTR_ICACHE_MISS, | 109 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, |
110 | }, | 110 | }, |
111 | [C(OP_PREFETCH)] = { | 111 | [C(OP_PREFETCH)] = { |
112 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 112 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -259,7 +259,7 @@ static const unsigned armv6mpcore_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
259 | }, | 259 | }, |
260 | [C(OP_WRITE)] = { | 260 | [C(OP_WRITE)] = { |
261 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 261 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
262 | [C(RESULT_MISS)] = ARMV6MPCORE_PERFCTR_ICACHE_MISS, | 262 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, |
263 | }, | 263 | }, |
264 | [C(OP_PREFETCH)] = { | 264 | [C(OP_PREFETCH)] = { |
265 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 265 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index 4fbc757d9cff..8c79a9e70b83 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c | |||
@@ -157,8 +157,8 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
157 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, | 157 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
158 | }, | 158 | }, |
159 | [C(OP_WRITE)] = { | 159 | [C(OP_WRITE)] = { |
160 | [C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L1_ICACHE_ACCESS, | 160 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
161 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, | 161 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, |
162 | }, | 162 | }, |
163 | [C(OP_PREFETCH)] = { | 163 | [C(OP_PREFETCH)] = { |
164 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 164 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -282,7 +282,7 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
282 | }, | 282 | }, |
283 | [C(OP_WRITE)] = { | 283 | [C(OP_WRITE)] = { |
284 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 284 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
285 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, | 285 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, |
286 | }, | 286 | }, |
287 | [C(OP_PREFETCH)] = { | 287 | [C(OP_PREFETCH)] = { |
288 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 288 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -399,8 +399,8 @@ static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
399 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, | 399 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
400 | }, | 400 | }, |
401 | [C(OP_WRITE)] = { | 401 | [C(OP_WRITE)] = { |
402 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, | 402 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
403 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, | 403 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, |
404 | }, | 404 | }, |
405 | /* | 405 | /* |
406 | * The prefetch counters don't differentiate between the I | 406 | * The prefetch counters don't differentiate between the I |
@@ -527,8 +527,8 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
527 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, | 527 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
528 | }, | 528 | }, |
529 | [C(OP_WRITE)] = { | 529 | [C(OP_WRITE)] = { |
530 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, | 530 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
531 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, | 531 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, |
532 | }, | 532 | }, |
533 | [C(OP_PREFETCH)] = { | 533 | [C(OP_PREFETCH)] = { |
534 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 534 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
@@ -651,8 +651,8 @@ static const unsigned armv7_a7_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
651 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, | 651 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, |
652 | }, | 652 | }, |
653 | [C(OP_WRITE)] = { | 653 | [C(OP_WRITE)] = { |
654 | [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, | 654 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
655 | [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, | 655 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, |
656 | }, | 656 | }, |
657 | [C(OP_PREFETCH)] = { | 657 | [C(OP_PREFETCH)] = { |
658 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 658 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
diff --git a/arch/arm/kernel/perf_event_xscale.c b/arch/arm/kernel/perf_event_xscale.c index 2b0fe30ec12e..63990c42fac9 100644 --- a/arch/arm/kernel/perf_event_xscale.c +++ b/arch/arm/kernel/perf_event_xscale.c | |||
@@ -83,7 +83,7 @@ static const unsigned xscale_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
83 | }, | 83 | }, |
84 | [C(OP_WRITE)] = { | 84 | [C(OP_WRITE)] = { |
85 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 85 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
86 | [C(RESULT_MISS)] = XSCALE_PERFCTR_ICACHE_MISS, | 86 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, |
87 | }, | 87 | }, |
88 | [C(OP_PREFETCH)] = { | 88 | [C(OP_PREFETCH)] = { |
89 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | 89 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, |
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c index cd42d921940d..e683d0dcef6b 100644 --- a/arch/arm/mach-omap2/omap-smp.c +++ b/arch/arm/mach-omap2/omap-smp.c | |||
@@ -215,7 +215,7 @@ static void __init omap4_smp_init_cpus(void) | |||
215 | * Currently we can't call ioremap here because | 215 | * Currently we can't call ioremap here because |
216 | * SoC detection won't work until after init_early. | 216 | * SoC detection won't work until after init_early. |
217 | */ | 217 | */ |
218 | scu_base = OMAP2_L4_IO_ADDRESS(OMAP44XX_SCU_BASE); | 218 | scu_base = OMAP2_L4_IO_ADDRESS(scu_a9_get_base()); |
219 | BUG_ON(!scu_base); | 219 | BUG_ON(!scu_base); |
220 | ncores = scu_get_core_count(scu_base); | 220 | ncores = scu_get_core_count(scu_base); |
221 | } else if (cpu_id == CPU_CORTEX_A15) { | 221 | } else if (cpu_id == CPU_CORTEX_A15) { |
diff --git a/arch/arm/mach-omap2/omap44xx.h b/arch/arm/mach-omap2/omap44xx.h index 43b927b2e2e8..8a515bb74639 100644 --- a/arch/arm/mach-omap2/omap44xx.h +++ b/arch/arm/mach-omap2/omap44xx.h | |||
@@ -40,7 +40,6 @@ | |||
40 | #define OMAP44XX_GIC_DIST_BASE 0x48241000 | 40 | #define OMAP44XX_GIC_DIST_BASE 0x48241000 |
41 | #define OMAP44XX_GIC_CPU_BASE 0x48240100 | 41 | #define OMAP44XX_GIC_CPU_BASE 0x48240100 |
42 | #define OMAP44XX_IRQ_GIC_START 32 | 42 | #define OMAP44XX_IRQ_GIC_START 32 |
43 | #define OMAP44XX_SCU_BASE 0x48240000 | ||
44 | #define OMAP44XX_LOCAL_TWD_BASE 0x48240600 | 43 | #define OMAP44XX_LOCAL_TWD_BASE 0x48240600 |
45 | #define OMAP44XX_L2CACHE_BASE 0x48242000 | 44 | #define OMAP44XX_L2CACHE_BASE 0x48242000 |
46 | #define OMAP44XX_WKUPGEN_BASE 0x48281000 | 45 | #define OMAP44XX_WKUPGEN_BASE 0x48281000 |
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c index 3ec7fc487857..2ff68a47099d 100644 --- a/arch/arm/mach-tegra/platsmp.c +++ b/arch/arm/mach-tegra/platsmp.c | |||
@@ -38,7 +38,6 @@ | |||
38 | extern void tegra_secondary_startup(void); | 38 | extern void tegra_secondary_startup(void); |
39 | 39 | ||
40 | static cpumask_t tegra_cpu_init_mask; | 40 | static cpumask_t tegra_cpu_init_mask; |
41 | static void __iomem *scu_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE); | ||
42 | 41 | ||
43 | #define EVP_CPU_RESET_VECTOR \ | 42 | #define EVP_CPU_RESET_VECTOR \ |
44 | (IO_ADDRESS(TEGRA_EXCEPTION_VECTORS_BASE) + 0x100) | 43 | (IO_ADDRESS(TEGRA_EXCEPTION_VECTORS_BASE) + 0x100) |
@@ -177,23 +176,8 @@ done: | |||
177 | return status; | 176 | return status; |
178 | } | 177 | } |
179 | 178 | ||
180 | /* | ||
181 | * Initialise the CPU possible map early - this describes the CPUs | ||
182 | * which may be present or become present in the system. | ||
183 | */ | ||
184 | static void __init tegra_smp_init_cpus(void) | 179 | static void __init tegra_smp_init_cpus(void) |
185 | { | 180 | { |
186 | unsigned int i, ncores = scu_get_core_count(scu_base); | ||
187 | |||
188 | if (ncores > nr_cpu_ids) { | ||
189 | pr_warn("SMP: %u cores greater than maximum (%u), clipping\n", | ||
190 | ncores, nr_cpu_ids); | ||
191 | ncores = nr_cpu_ids; | ||
192 | } | ||
193 | |||
194 | for (i = 0; i < ncores; i++) | ||
195 | set_cpu_possible(i, true); | ||
196 | |||
197 | set_smp_cross_call(gic_raise_softirq); | 181 | set_smp_cross_call(gic_raise_softirq); |
198 | } | 182 | } |
199 | 183 | ||
@@ -202,7 +186,8 @@ static void __init tegra_smp_prepare_cpus(unsigned int max_cpus) | |||
202 | /* Always mark the boot CPU (CPU0) as initialized. */ | 186 | /* Always mark the boot CPU (CPU0) as initialized. */ |
203 | cpumask_set_cpu(0, &tegra_cpu_init_mask); | 187 | cpumask_set_cpu(0, &tegra_cpu_init_mask); |
204 | 188 | ||
205 | scu_enable(scu_base); | 189 | if (scu_a9_has_base()) |
190 | scu_enable(IO_ADDRESS(scu_a9_get_base())); | ||
206 | } | 191 | } |
207 | 192 | ||
208 | struct smp_operations tegra_smp_ops __initdata = { | 193 | struct smp_operations tegra_smp_ops __initdata = { |