Skip to content

Commit e426f8e

Browse files
author
Russell King
committed
Merge branch '3.1-fixes-for-rmk' of git://linux-arm.org/linux-2.6-wd into fixes
2 parents 73e0881 + 72dc53a commit e426f8e

6 files changed

Lines changed: 32 additions & 27 deletions

File tree

‎arch/arm/include/asm/pmu.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct arm_pmu_platdata {
4141
* encoded error on failure.
4242
*/
4343
extern struct platform_device *
44-
reserve_pmu(enum arm_pmu_type device);
44+
reserve_pmu(enum arm_pmu_type type);
4545

4646
/**
4747
* release_pmu() - Relinquish control of the performance counters
@@ -62,26 +62,26 @@ release_pmu(enum arm_pmu_type type);
6262
* the actual hardware initialisation.
6363
*/
6464
extern int
65-
init_pmu(enum arm_pmu_type device);
65+
init_pmu(enum arm_pmu_type type);
6666

6767
#else /* CONFIG_CPU_HAS_PMU */
6868

6969
#include <linux/err.h>
7070

7171
static inline struct platform_device *
72-
reserve_pmu(enum arm_pmu_type device)
72+
reserve_pmu(enum arm_pmu_type type)
7373
{
7474
return ERR_PTR(-ENODEV);
7575
}
7676

7777
static inline int
78-
release_pmu(struct platform_device *pdev)
78+
release_pmu(enum arm_pmu_type type)
7979
{
8080
return -ENODEV;
8181
}
8282

8383
static inline int
84-
init_pmu(enum arm_pmu_type device)
84+
init_pmu(enum arm_pmu_type type)
8585
{
8686
return -ENODEV;
8787
}

‎arch/arm/kernel/pmu.c‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static int __devinit pmu_register(struct platform_device *pdev,
3131
{
3232
if (type < 0 || type >= ARM_NUM_PMU_DEVICES) {
3333
pr_warning("received registration request for unknown "
34-
"device %d\n", type);
34+
"PMU device type %d\n", type);
3535
return -EINVAL;
3636
}
3737

@@ -112,29 +112,29 @@ static int __init register_pmu_driver(void)
112112
device_initcall(register_pmu_driver);
113113

114114
struct platform_device *
115-
reserve_pmu(enum arm_pmu_type device)
115+
reserve_pmu(enum arm_pmu_type type)
116116
{
117117
struct platform_device *pdev;
118118

119-
if (test_and_set_bit_lock(device, &pmu_lock)) {
119+
if (test_and_set_bit_lock(type, &pmu_lock)) {
120120
pdev = ERR_PTR(-EBUSY);
121-
} else if (pmu_devices[device] == NULL) {
122-
clear_bit_unlock(device, &pmu_lock);
121+
} else if (pmu_devices[type] == NULL) {
122+
clear_bit_unlock(type, &pmu_lock);
123123
pdev = ERR_PTR(-ENODEV);
124124
} else {
125-
pdev = pmu_devices[device];
125+
pdev = pmu_devices[type];
126126
}
127127

128128
return pdev;
129129
}
130130
EXPORT_SYMBOL_GPL(reserve_pmu);
131131

132132
int
133-
release_pmu(enum arm_pmu_type device)
133+
release_pmu(enum arm_pmu_type type)
134134
{
135-
if (WARN_ON(!pmu_devices[device]))
135+
if (WARN_ON(!pmu_devices[type]))
136136
return -EINVAL;
137-
clear_bit_unlock(device, &pmu_lock);
137+
clear_bit_unlock(type, &pmu_lock);
138138
return 0;
139139
}
140140
EXPORT_SYMBOL_GPL(release_pmu);
@@ -182,17 +182,17 @@ init_cpu_pmu(void)
182182
}
183183

184184
int
185-
init_pmu(enum arm_pmu_type device)
185+
init_pmu(enum arm_pmu_type type)
186186
{
187187
int err = 0;
188188

189-
switch (device) {
189+
switch (type) {
190190
case ARM_PMU_DEVICE_CPU:
191191
err = init_cpu_pmu();
192192
break;
193193
default:
194-
pr_warning("attempt to initialise unknown device %d\n",
195-
device);
194+
pr_warning("attempt to initialise PMU of unknown "
195+
"type %d\n", type);
196196
err = -EINVAL;
197197
}
198198

‎arch/arm/kernel/setup.c‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -280,18 +280,19 @@ static void __init cacheid_init(void)
280280
if (arch >= CPU_ARCH_ARMv6) {
281281
if ((cachetype & (7 << 29)) == 4 << 29) {
282282
/* ARMv7 register format */
283+
arch = CPU_ARCH_ARMv7;
283284
cacheid = CACHEID_VIPT_NONALIASING;
284285
if ((cachetype & (3 << 14)) == 1 << 14)
285286
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;
290287
} else {
291-
cacheid = CACHEID_VIPT_NONALIASING;
292-
if (cpu_has_aliasing_icache(CPU_ARCH_ARMv6))
293-
cacheid |= CACHEID_VIPT_I_ALIASING;
288+
arch = CPU_ARCH_ARMv6;
289+
if (cachetype & (1 << 23))
290+
cacheid = CACHEID_VIPT_ALIASING;
291+
else
292+
cacheid = CACHEID_VIPT_NONALIASING;
294293
}
294+
if (cpu_has_aliasing_icache(arch))
295+
cacheid |= CACHEID_VIPT_I_ALIASING;
295296
} else {
296297
cacheid = CACHEID_VIVT;
297298
}

‎arch/arm/kernel/smp_twd.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk)
137137
clk->max_delta_ns = clockevent_delta2ns(0xffffffff, clk);
138138
clk->min_delta_ns = clockevent_delta2ns(0xf, clk);
139139

140+
clockevents_register_device(clk);
141+
140142
/* Make sure our local interrupt controller has this enabled */
141143
gic_enable_ppi(clk->irq);
142-
143-
clockevents_register_device(clk);
144144
}

‎arch/arm/mach-realview/include/mach/system.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ static inline void arch_reset(char mode, const char *cmd)
4444
*/
4545
if (realview_reset)
4646
realview_reset(mode);
47+
dsb();
4748
}
4849

4950
#endif

‎tools/perf/arch/arm/util/dwarf-regs.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
* published by the Free Software Foundation.
99
*/
1010

11+
#include <stdlib.h>
12+
#ifndef __UCLIBC__
1113
#include <libio.h>
14+
#endif
1215
#include <dwarf-regs.h>
1316

1417
struct pt_regs_dwarfnum {

0 commit comments

Comments
 (0)