Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 90e9364

Browse files
committed
Merge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm: ARM: pm: avoid writing the auxillary control register for ARMv7 ARM: pm: some ARMv7 requires a dsb in resume to ensure correctness ARM: pm: arm920/926: fix number of registers saved ARM: pm: CPU specific code should not overwrite r1 (v:p offset) ARM: 7066/1: proc-v7: disable SCTLR.TE when disabling MMU ARM: 7065/1: kexec: ensure new kernel is entered in ARM state ARM: 7003/1: vexpress: Add clock definition for the SP805. ARM: 7051/1: cpuimx* boards: fix mach-types errors ARM: 7019/1: Footbridge: select CLKEVT_I8253 for ARCH_NETWINDER ARM: 7015/1: ARM errata: Possible cache data corruption with hit-under-miss enabled ARM: 7014/1: cache-l2x0: Fix L2 Cache size calculation. ARM: 6967/1: ep93xx: ts72xx: fix board model detection ARM: 6965/1: ep93xx: add model detection for ts-7300 and ts-7400 boards ARM: cache: detect VIPT aliasing I-cache on ARMv6 ARM: twd: register clockevents device before enabling PPI ARM: realview: ensure visibility of writes during reset ARM: perf: make name of arm_pmu_type consistent ARM: perf: fix prototype of release_pmu ARM: fix perf build with uclibc toolchains
2 parents 3ae627b + 2590415 commit 90e9364

File tree

22 files changed

+114
-50
lines changed

22 files changed

+114
-50
lines changed

arch/arm/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,6 +1271,18 @@ config ARM_ERRATA_754327
12711271
This workaround defines cpu_relax() as smp_mb(), preventing correctly
12721272
written polling loops from denying visibility of updates to memory.
12731273

1274+
config ARM_ERRATA_364296
1275+
bool "ARM errata: Possible cache data corruption with hit-under-miss enabled"
1276+
depends on CPU_V6 && !SMP
1277+
help
1278+
This options enables the workaround for the 364296 ARM1136
1279+
r0p2 erratum (possible cache data corruption with
1280+
hit-under-miss enabled). It sets the undocumented bit 31 in
1281+
the auxiliary control register and the FI bit in the control
1282+
register, thus disabling hit-under-miss without putting the
1283+
processor into full low interrupt latency mode. ARM11MPCore
1284+
is not affected.
1285+
12741286
endmenu
12751287

12761288
source "arch/arm/common/Kconfig"

arch/arm/include/asm/hardware/cache-l2x0.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
#define L2X0_AUX_CTRL_MASK 0xc0000fff
6565
#define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16
6666
#define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17
67-
#define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x3 << 17)
67+
#define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x7 << 17)
6868
#define L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT 22
6969
#define L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT 26
7070
#define L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT 27

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/relocate_kernel.S

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ relocate_new_kernel:
5757
mov r0,#0
5858
ldr r1,kexec_mach_type
5959
ldr r2,kexec_boot_atags
60-
mov pc,lr
60+
ARM( mov pc, lr )
61+
THUMB( bx lr )
6162

6263
.align
6364

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-ep93xx/include/mach/ts72xx.h

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* TS72xx memory map:
77
*
88
* virt phys size
9-
* febff000 22000000 4K model number register
9+
* febff000 22000000 4K model number register (bits 0-2)
1010
* febfe000 22400000 4K options register
1111
* febfd000 22800000 4K options register #2
1212
* febf9000 10800000 4K TS-5620 RTC index register
@@ -20,6 +20,9 @@
2020
#define TS72XX_MODEL_TS7200 0x00
2121
#define TS72XX_MODEL_TS7250 0x01
2222
#define TS72XX_MODEL_TS7260 0x02
23+
#define TS72XX_MODEL_TS7300 0x03
24+
#define TS72XX_MODEL_TS7400 0x04
25+
#define TS72XX_MODEL_MASK 0x07
2326

2427

2528
#define TS72XX_OPTIONS_PHYS_BASE 0x22400000
@@ -51,19 +54,34 @@
5154

5255
#ifndef __ASSEMBLY__
5356

57+
static inline int ts72xx_model(void)
58+
{
59+
return __raw_readb(TS72XX_MODEL_VIRT_BASE) & TS72XX_MODEL_MASK;
60+
}
61+
5462
static inline int board_is_ts7200(void)
5563
{
56-
return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7200;
64+
return ts72xx_model() == TS72XX_MODEL_TS7200;
5765
}
5866

5967
static inline int board_is_ts7250(void)
6068
{
61-
return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7250;
69+
return ts72xx_model() == TS72XX_MODEL_TS7250;
6270
}
6371

6472
static inline int board_is_ts7260(void)
6573
{
66-
return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7260;
74+
return ts72xx_model() == TS72XX_MODEL_TS7260;
75+
}
76+
77+
static inline int board_is_ts7300(void)
78+
{
79+
return ts72xx_model() == TS72XX_MODEL_TS7300;
80+
}
81+
82+
static inline int board_is_ts7400(void)
83+
{
84+
return ts72xx_model() == TS72XX_MODEL_TS7400;
6785
}
6886

6987
static inline int is_max197_installed(void)

arch/arm/mach-footbridge/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ config ARCH_EBSA285_HOST
6262
config ARCH_NETWINDER
6363
bool "NetWinder"
6464
select CLKSRC_I8253
65+
select CLKEVT_I8253
6566
select FOOTBRIDGE_HOST
6667
select ISA
6768
select ISA_DMA

arch/arm/mach-imx/mach-cpuimx27.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ static struct sys_timer eukrea_cpuimx27_timer = {
310310
.init = eukrea_cpuimx27_timer_init,
311311
};
312312

313-
MACHINE_START(CPUIMX27, "EUKREA CPUIMX27")
313+
MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27")
314314
.boot_params = MX27_PHYS_OFFSET + 0x100,
315315
.map_io = mx27_map_io,
316316
.init_early = imx27_init_early,

0 commit comments

Comments
 (0)