Skip to content

Commit 5c49985

Browse files
committed
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King. * 'fixes' of git://git.linaro.org/people/rmk/linux-arm: ARM: 7616/1: cache-l2x0: aurora: Use writel_relaxed instead of writel ARM: 7615/1: cache-l2x0: aurora: Invalidate during clean operation with WT enable ARM: 7614/1: mm: fix wrong branch from Cortex-A9 to PJ4b ARM: 7612/1: imx: Do not select some errata that depends on !ARCH_MULTIPLATFORM ARM: 7611/1: VIC: fix bug in VIC irqdomain code ARM: 7610/1: versatile: bump IRQ numbers ARM: 7609/1: disable errata work-arounds which access secure registers ARM: 7608/1: l2x0: Only set .set_debug on PL310 r3p0 and earlier
2 parents 57a0c1e + 8a3a180 commit 5c49985

File tree

7 files changed

+40
-22
lines changed

7 files changed

+40
-22
lines changed

arch/arm/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,6 +1229,7 @@ config ARM_ERRATA_430973
12291229
config ARM_ERRATA_458693
12301230
bool "ARM errata: Processor deadlock when a false hazard is created"
12311231
depends on CPU_V7
1232+
depends on !ARCH_MULTIPLATFORM
12321233
help
12331234
This option enables the workaround for the 458693 Cortex-A8 (r2p0)
12341235
erratum. For very specific sequences of memory operations, it is
@@ -1242,6 +1243,7 @@ config ARM_ERRATA_458693
12421243
config ARM_ERRATA_460075
12431244
bool "ARM errata: Data written to the L2 cache can be overwritten with stale data"
12441245
depends on CPU_V7
1246+
depends on !ARCH_MULTIPLATFORM
12451247
help
12461248
This option enables the workaround for the 460075 Cortex-A8 (r2p0)
12471249
erratum. Any asynchronous access to the L2 cache may encounter a
@@ -1254,6 +1256,7 @@ config ARM_ERRATA_460075
12541256
config ARM_ERRATA_742230
12551257
bool "ARM errata: DMB operation may be faulty"
12561258
depends on CPU_V7 && SMP
1259+
depends on !ARCH_MULTIPLATFORM
12571260
help
12581261
This option enables the workaround for the 742230 Cortex-A9
12591262
(r1p0..r2p2) erratum. Under rare circumstances, a DMB instruction
@@ -1266,6 +1269,7 @@ config ARM_ERRATA_742230
12661269
config ARM_ERRATA_742231
12671270
bool "ARM errata: Incorrect hazard handling in the SCU may lead to data corruption"
12681271
depends on CPU_V7 && SMP
1272+
depends on !ARCH_MULTIPLATFORM
12691273
help
12701274
This option enables the workaround for the 742231 Cortex-A9
12711275
(r2p0..r2p2) erratum. Under certain conditions, specific to the
@@ -1316,6 +1320,7 @@ config PL310_ERRATA_727915
13161320
config ARM_ERRATA_743622
13171321
bool "ARM errata: Faulty hazard checking in the Store Buffer may lead to data corruption"
13181322
depends on CPU_V7
1323+
depends on !ARCH_MULTIPLATFORM
13191324
help
13201325
This option enables the workaround for the 743622 Cortex-A9
13211326
(r2p*) erratum. Under very rare conditions, a faulty
@@ -1329,6 +1334,7 @@ config ARM_ERRATA_743622
13291334
config ARM_ERRATA_751472
13301335
bool "ARM errata: Interrupted ICIALLUIS may prevent completion of broadcasted operation"
13311336
depends on CPU_V7
1337+
depends on !ARCH_MULTIPLATFORM
13321338
help
13331339
This option enables the workaround for the 751472 Cortex-A9 (prior
13341340
to r3p0) erratum. An interrupted ICIALLUIS operation may prevent the

arch/arm/common/vic.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ static void __init vic_register(void __iomem *base, unsigned int irq,
206206
struct device_node *node)
207207
{
208208
struct vic_device *v;
209+
int i;
209210

210211
if (vic_id >= ARRAY_SIZE(vic_devices)) {
211212
printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__);
@@ -220,6 +221,10 @@ static void __init vic_register(void __iomem *base, unsigned int irq,
220221
vic_id++;
221222
v->domain = irq_domain_add_simple(node, fls(valid_sources), irq,
222223
&vic_irqdomain_ops, v);
224+
/* create an IRQ mapping for each valid IRQ */
225+
for (i = 0; i < fls(valid_sources); i++)
226+
if (valid_sources & (1 << i))
227+
irq_create_mapping(v->domain, i);
223228
}
224229

225230
static void vic_ack_irq(struct irq_data *d)
@@ -416,9 +421,9 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent)
416421
return -EIO;
417422

418423
/*
419-
* Passing -1 as first IRQ makes the simple domain allocate descriptors
424+
* Passing 0 as first IRQ makes the simple domain allocate descriptors
420425
*/
421-
__vic_init(regs, -1, ~0, ~0, node);
426+
__vic_init(regs, 0, ~0, ~0, node);
422427

423428
return 0;
424429
}

arch/arm/mach-imx/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,8 +841,6 @@ config SOC_IMX6Q
841841
select ARCH_HAS_CPUFREQ
842842
select ARCH_HAS_OPP
843843
select ARM_CPU_SUSPEND if PM
844-
select ARM_ERRATA_743622
845-
select ARM_ERRATA_751472
846844
select ARM_ERRATA_754322
847845
select ARM_ERRATA_764369 if SMP
848846
select ARM_ERRATA_775420

arch/arm/mach-versatile/include/mach/irqs.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* IRQ interrupts definitions are the same as the INT definitions
2626
* held within platform.h
2727
*/
28-
#define IRQ_VIC_START 0
28+
#define IRQ_VIC_START 32
2929
#define IRQ_WDOGINT (IRQ_VIC_START + INT_WDOGINT)
3030
#define IRQ_SOFTINT (IRQ_VIC_START + INT_SOFTINT)
3131
#define IRQ_COMMRx (IRQ_VIC_START + INT_COMMRx)
@@ -100,7 +100,7 @@
100100
/*
101101
* Secondary interrupt controller
102102
*/
103-
#define IRQ_SIC_START 32
103+
#define IRQ_SIC_START 64
104104
#define IRQ_SIC_MMCI0B (IRQ_SIC_START + SIC_INT_MMCI0B)
105105
#define IRQ_SIC_MMCI1B (IRQ_SIC_START + SIC_INT_MMCI1B)
106106
#define IRQ_SIC_KMI0 (IRQ_SIC_START + SIC_INT_KMI0)
@@ -120,7 +120,7 @@
120120
#define IRQ_SIC_PCI1 (IRQ_SIC_START + SIC_INT_PCI1)
121121
#define IRQ_SIC_PCI2 (IRQ_SIC_START + SIC_INT_PCI2)
122122
#define IRQ_SIC_PCI3 (IRQ_SIC_START + SIC_INT_PCI3)
123-
#define IRQ_SIC_END 63
123+
#define IRQ_SIC_END 95
124124

125125
#define IRQ_GPIO0_START (IRQ_SIC_END + 1)
126126
#define IRQ_GPIO0_END (IRQ_GPIO0_START + 31)

arch/arm/mach-vexpress/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA
4242
bool "Enable A5 and A9 only errata work-arounds"
4343
default y
4444
select ARM_ERRATA_720789
45-
select ARM_ERRATA_751472
4645
select PL310_ERRATA_753970 if CACHE_PL310
4746
help
4847
Provides common dependencies for Versatile Express platforms

arch/arm/mm/cache-l2x0.c

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask)
352352
/* Unmapped register. */
353353
sync_reg_offset = L2X0_DUMMY_REG;
354354
#endif
355-
outer_cache.set_debug = pl310_set_debug;
355+
if ((cache_id & L2X0_CACHE_ID_RTL_MASK) <= L2X0_CACHE_ID_RTL_R3P0)
356+
outer_cache.set_debug = pl310_set_debug;
356357
break;
357358
case L2X0_CACHE_ID_PART_L210:
358359
ways = (aux >> 13) & 0xf;
@@ -459,8 +460,8 @@ static void aurora_pa_range(unsigned long start, unsigned long end,
459460
unsigned long flags;
460461

461462
raw_spin_lock_irqsave(&l2x0_lock, flags);
462-
writel(start, l2x0_base + AURORA_RANGE_BASE_ADDR_REG);
463-
writel(end, l2x0_base + offset);
463+
writel_relaxed(start, l2x0_base + AURORA_RANGE_BASE_ADDR_REG);
464+
writel_relaxed(end, l2x0_base + offset);
464465
raw_spin_unlock_irqrestore(&l2x0_lock, flags);
465466

466467
cache_sync();
@@ -505,15 +506,21 @@ static void aurora_clean_range(unsigned long start, unsigned long end)
505506

506507
static void aurora_flush_range(unsigned long start, unsigned long end)
507508
{
508-
if (!l2_wt_override) {
509-
start &= ~(CACHE_LINE_SIZE - 1);
510-
end = ALIGN(end, CACHE_LINE_SIZE);
511-
while (start != end) {
512-
unsigned long range_end = calc_range_end(start, end);
509+
start &= ~(CACHE_LINE_SIZE - 1);
510+
end = ALIGN(end, CACHE_LINE_SIZE);
511+
while (start != end) {
512+
unsigned long range_end = calc_range_end(start, end);
513+
/*
514+
* If L2 is forced to WT, the L2 will always be clean and we
515+
* just need to invalidate.
516+
*/
517+
if (l2_wt_override)
513518
aurora_pa_range(start, range_end - CACHE_LINE_SIZE,
514-
AURORA_FLUSH_RANGE_REG);
515-
start = range_end;
516-
}
519+
AURORA_INVAL_RANGE_REG);
520+
else
521+
aurora_pa_range(start, range_end - CACHE_LINE_SIZE,
522+
AURORA_FLUSH_RANGE_REG);
523+
start = range_end;
517524
}
518525
}
519526

@@ -668,8 +675,9 @@ static void pl310_resume(void)
668675
static void aurora_resume(void)
669676
{
670677
if (!(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
671-
writel(l2x0_saved_regs.aux_ctrl, l2x0_base + L2X0_AUX_CTRL);
672-
writel(l2x0_saved_regs.ctrl, l2x0_base + L2X0_CTRL);
678+
writel_relaxed(l2x0_saved_regs.aux_ctrl,
679+
l2x0_base + L2X0_AUX_CTRL);
680+
writel_relaxed(l2x0_saved_regs.ctrl, l2x0_base + L2X0_CTRL);
673681
}
674682
}
675683

arch/arm/mm/proc-v7.S

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ __v7_ca15mp_setup:
169169
orreq r0, r0, r10 @ Enable CPU-specific SMP bits
170170
mcreq p15, 0, r0, c1, c0, 1
171171
#endif
172+
b __v7_setup
172173

173174
__v7_pj4b_setup:
174175
#ifdef CONFIG_CPU_PJ4B
@@ -245,7 +246,8 @@ __v7_setup:
245246
ldr r10, =0x00000c08 @ Cortex-A8 primary part number
246247
teq r0, r10
247248
bne 2f
248-
#ifdef CONFIG_ARM_ERRATA_430973
249+
#if defined(CONFIG_ARM_ERRATA_430973) && !defined(CONFIG_ARCH_MULTIPLATFORM)
250+
249251
teq r5, #0x00100000 @ only present in r1p*
250252
mrceq p15, 0, r10, c1, c0, 1 @ read aux control register
251253
orreq r10, r10, #(1 << 6) @ set IBE to 1

0 commit comments

Comments
 (0)