diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-08-13 04:43:19 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-08-13 04:43:19 -0400 |
commit | e426f8e39bb612bfdd38fa7a75d10ba95787d1af (patch) | |
tree | 37bb57051eabb390ea19bcd5ddfaebb8675e24fe | |
parent | 73e0881d31406acc09eb11fa073108b43c89124e (diff) | |
parent | 72dc53acd50db066a5a5ebe1f39fae73d7e62aa8 (diff) |
Merge branch '3.1-fixes-for-rmk' of git://linux-arm.org/linux-2.6-wd into fixes
-rw-r--r-- | arch/arm/include/asm/pmu.h | 10 | ||||
-rw-r--r-- | arch/arm/kernel/pmu.c | 26 | ||||
-rw-r--r-- | arch/arm/kernel/setup.c | 15 | ||||
-rw-r--r-- | arch/arm/kernel/smp_twd.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/system.h | 1 | ||||
-rw-r--r-- | tools/perf/arch/arm/util/dwarf-regs.c | 3 |
6 files changed, 32 insertions, 27 deletions
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h index 67c70a31a1be..b7e82c4aced6 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h | |||
@@ -41,7 +41,7 @@ struct arm_pmu_platdata { | |||
41 | * encoded error on failure. | 41 | * encoded error on failure. |
42 | */ | 42 | */ |
43 | extern struct platform_device * | 43 | extern struct platform_device * |
44 | reserve_pmu(enum arm_pmu_type device); | 44 | reserve_pmu(enum arm_pmu_type type); |
45 | 45 | ||
46 | /** | 46 | /** |
47 | * release_pmu() - Relinquish control of the performance counters | 47 | * release_pmu() - Relinquish control of the performance counters |
@@ -62,26 +62,26 @@ release_pmu(enum arm_pmu_type type); | |||
62 | * the actual hardware initialisation. | 62 | * the actual hardware initialisation. |
63 | */ | 63 | */ |
64 | extern int | 64 | extern int |
65 | init_pmu(enum arm_pmu_type device); | 65 | init_pmu(enum arm_pmu_type type); |
66 | 66 | ||
67 | #else /* CONFIG_CPU_HAS_PMU */ | 67 | #else /* CONFIG_CPU_HAS_PMU */ |
68 | 68 | ||
69 | #include <linux/err.h> | 69 | #include <linux/err.h> |
70 | 70 | ||
71 | static inline struct platform_device * | 71 | static inline struct platform_device * |
72 | reserve_pmu(enum arm_pmu_type device) | 72 | reserve_pmu(enum arm_pmu_type type) |
73 | { | 73 | { |
74 | return ERR_PTR(-ENODEV); | 74 | return ERR_PTR(-ENODEV); |
75 | } | 75 | } |
76 | 76 | ||
77 | static inline int | 77 | static inline int |
78 | release_pmu(struct platform_device *pdev) | 78 | release_pmu(enum arm_pmu_type type) |
79 | { | 79 | { |
80 | return -ENODEV; | 80 | return -ENODEV; |
81 | } | 81 | } |
82 | 82 | ||
83 | static inline int | 83 | static inline int |
84 | init_pmu(enum arm_pmu_type device) | 84 | init_pmu(enum arm_pmu_type type) |
85 | { | 85 | { |
86 | return -ENODEV; | 86 | return -ENODEV; |
87 | } | 87 | } |
diff --git a/arch/arm/kernel/pmu.c b/arch/arm/kernel/pmu.c index 2b70709376c3..c53474fe84df 100644 --- a/arch/arm/kernel/pmu.c +++ b/arch/arm/kernel/pmu.c | |||
@@ -31,7 +31,7 @@ static int __devinit pmu_register(struct platform_device *pdev, | |||
31 | { | 31 | { |
32 | if (type < 0 || type >= ARM_NUM_PMU_DEVICES) { | 32 | if (type < 0 || type >= ARM_NUM_PMU_DEVICES) { |
33 | pr_warning("received registration request for unknown " | 33 | pr_warning("received registration request for unknown " |
34 | "device %d\n", type); | 34 | "PMU device type %d\n", type); |
35 | return -EINVAL; | 35 | return -EINVAL; |
36 | } | 36 | } |
37 | 37 | ||
@@ -112,17 +112,17 @@ static int __init register_pmu_driver(void) | |||
112 | device_initcall(register_pmu_driver); | 112 | device_initcall(register_pmu_driver); |
113 | 113 | ||
114 | struct platform_device * | 114 | struct platform_device * |
115 | reserve_pmu(enum arm_pmu_type device) | 115 | reserve_pmu(enum arm_pmu_type type) |
116 | { | 116 | { |
117 | struct platform_device *pdev; | 117 | struct platform_device *pdev; |
118 | 118 | ||
119 | if (test_and_set_bit_lock(device, &pmu_lock)) { | 119 | if (test_and_set_bit_lock(type, &pmu_lock)) { |
120 | pdev = ERR_PTR(-EBUSY); | 120 | pdev = ERR_PTR(-EBUSY); |
121 | } else if (pmu_devices[device] == NULL) { | 121 | } else if (pmu_devices[type] == NULL) { |
122 | clear_bit_unlock(device, &pmu_lock); | 122 | clear_bit_unlock(type, &pmu_lock); |
123 | pdev = ERR_PTR(-ENODEV); | 123 | pdev = ERR_PTR(-ENODEV); |
124 | } else { | 124 | } else { |
125 | pdev = pmu_devices[device]; | 125 | pdev = pmu_devices[type]; |
126 | } | 126 | } |
127 | 127 | ||
128 | return pdev; | 128 | return pdev; |
@@ -130,11 +130,11 @@ reserve_pmu(enum arm_pmu_type device) | |||
130 | EXPORT_SYMBOL_GPL(reserve_pmu); | 130 | EXPORT_SYMBOL_GPL(reserve_pmu); |
131 | 131 | ||
132 | int | 132 | int |
133 | release_pmu(enum arm_pmu_type device) | 133 | release_pmu(enum arm_pmu_type type) |
134 | { | 134 | { |
135 | if (WARN_ON(!pmu_devices[device])) | 135 | if (WARN_ON(!pmu_devices[type])) |
136 | return -EINVAL; | 136 | return -EINVAL; |
137 | clear_bit_unlock(device, &pmu_lock); | 137 | clear_bit_unlock(type, &pmu_lock); |
138 | return 0; | 138 | return 0; |
139 | } | 139 | } |
140 | EXPORT_SYMBOL_GPL(release_pmu); | 140 | EXPORT_SYMBOL_GPL(release_pmu); |
@@ -182,17 +182,17 @@ init_cpu_pmu(void) | |||
182 | } | 182 | } |
183 | 183 | ||
184 | int | 184 | int |
185 | init_pmu(enum arm_pmu_type device) | 185 | init_pmu(enum arm_pmu_type type) |
186 | { | 186 | { |
187 | int err = 0; | 187 | int err = 0; |
188 | 188 | ||
189 | switch (device) { | 189 | switch (type) { |
190 | case ARM_PMU_DEVICE_CPU: | 190 | case ARM_PMU_DEVICE_CPU: |
191 | err = init_cpu_pmu(); | 191 | err = init_cpu_pmu(); |
192 | break; | 192 | break; |
193 | default: | 193 | default: |
194 | pr_warning("attempt to initialise unknown device %d\n", | 194 | pr_warning("attempt to initialise PMU of unknown " |
195 | device); | 195 | "type %d\n", type); |
196 | err = -EINVAL; | 196 | err = -EINVAL; |
197 | } | 197 | } |
198 | 198 | ||
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 70bca649e925..e514c76043b4 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -280,18 +280,19 @@ static void __init cacheid_init(void) | |||
280 | if (arch >= CPU_ARCH_ARMv6) { | 280 | if (arch >= CPU_ARCH_ARMv6) { |
281 | if ((cachetype & (7 << 29)) == 4 << 29) { | 281 | if ((cachetype & (7 << 29)) == 4 << 29) { |
282 | /* ARMv7 register format */ | 282 | /* ARMv7 register format */ |
283 | arch = CPU_ARCH_ARMv7; | ||
283 | cacheid = CACHEID_VIPT_NONALIASING; | 284 | cacheid = CACHEID_VIPT_NONALIASING; |
284 | if ((cachetype & (3 << 14)) == 1 << 14) | 285 | if ((cachetype & (3 << 14)) == 1 << 14) |
285 | cacheid |= CACHEID_ASID_TAGGED; | 286 | cacheid |= CACHEID_ASID_TAGGED; |
286 | else if (cpu_has_aliasing_icache(CPU_ARCH_ARMv7)) | ||
287 | cacheid |= CACHEID_VIPT_I_ALIASING; | ||
288 | } else if (cachetype & (1 << 23)) { | ||
289 | cacheid = CACHEID_VIPT_ALIASING; | ||
290 | } else { | 287 | } else { |
291 | cacheid = CACHEID_VIPT_NONALIASING; | 288 | arch = CPU_ARCH_ARMv6; |
292 | if (cpu_has_aliasing_icache(CPU_ARCH_ARMv6)) | 289 | if (cachetype & (1 << 23)) |
293 | cacheid |= CACHEID_VIPT_I_ALIASING; | 290 | cacheid = CACHEID_VIPT_ALIASING; |
291 | else | ||
292 | cacheid = CACHEID_VIPT_NONALIASING; | ||
294 | } | 293 | } |
294 | if (cpu_has_aliasing_icache(arch)) | ||
295 | cacheid |= CACHEID_VIPT_I_ALIASING; | ||
295 | } else { | 296 | } else { |
296 | cacheid = CACHEID_VIVT; | 297 | cacheid = CACHEID_VIVT; |
297 | } | 298 | } |
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index 2c277d40cee6..01c186222f3b 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -137,8 +137,8 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk) | |||
137 | clk->max_delta_ns = clockevent_delta2ns(0xffffffff, clk); | 137 | clk->max_delta_ns = clockevent_delta2ns(0xffffffff, clk); |
138 | clk->min_delta_ns = clockevent_delta2ns(0xf, clk); | 138 | clk->min_delta_ns = clockevent_delta2ns(0xf, clk); |
139 | 139 | ||
140 | clockevents_register_device(clk); | ||
141 | |||
140 | /* Make sure our local interrupt controller has this enabled */ | 142 | /* Make sure our local interrupt controller has this enabled */ |
141 | gic_enable_ppi(clk->irq); | 143 | gic_enable_ppi(clk->irq); |
142 | |||
143 | clockevents_register_device(clk); | ||
144 | } | 144 | } |
diff --git a/arch/arm/mach-realview/include/mach/system.h b/arch/arm/mach-realview/include/mach/system.h index a30f2e3ec178..6657ff231161 100644 --- a/arch/arm/mach-realview/include/mach/system.h +++ b/arch/arm/mach-realview/include/mach/system.h | |||
@@ -44,6 +44,7 @@ static inline void arch_reset(char mode, const char *cmd) | |||
44 | */ | 44 | */ |
45 | if (realview_reset) | 45 | if (realview_reset) |
46 | realview_reset(mode); | 46 | realview_reset(mode); |
47 | dsb(); | ||
47 | } | 48 | } |
48 | 49 | ||
49 | #endif | 50 | #endif |
diff --git a/tools/perf/arch/arm/util/dwarf-regs.c b/tools/perf/arch/arm/util/dwarf-regs.c index fff6450c8c99..e8d5c551c69c 100644 --- a/tools/perf/arch/arm/util/dwarf-regs.c +++ b/tools/perf/arch/arm/util/dwarf-regs.c | |||
@@ -8,7 +8,10 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <stdlib.h> | ||
12 | #ifndef __UCLIBC__ | ||
11 | #include <libio.h> | 13 | #include <libio.h> |
14 | #endif | ||
12 | #include <dwarf-regs.h> | 15 | #include <dwarf-regs.h> |
13 | 16 | ||
14 | struct pt_regs_dwarfnum { | 17 | struct pt_regs_dwarfnum { |