Skip to content

Commit 2560cff

Browse files
Linus Walleijarndb
authored andcommitted
ARM: Delete ARM11MPCore (ARM11 ARMv6K SMP) support
This ARM11 SMP configuration was one of the first SMP configurations the ARM kernel supported, but it has the downside of odd DMA handling, odd cache tagging, and often (as of recent) completely broken cache handling on the ARM RealView PB11MPCore test chips. To boot the platform it was necessary to completely disable the cache. When it comes to the EB 11MPCore it is unclear if this ever worked. These reference designs are now the only ARMv6K SMP platforms. As only reference designs of purely academic interest remain, and since the special-cased DMA and PMU code is hard to maintain and doesn't really work, it is not really worth our time. Delete the ARM11MPCore support along with: - The special DMA quirk CONFIG_DMA_CACHE_RWFO that is only used on ARMv6K SMP, and we are the last ARMV6K system leaving the building and the cache handling is awkward, so good-bye. - The special PMU handling that was only used by ARM11MPCore. The following is left behind: - TIMER_OF_DECLARE(arm_twd_11mp, "arm,arm11mp-twd-timer", ...) in arch/arm/kernel/smp_twd.c, this is still in use by Marvell MMP3 arch/arm/boot/dts/marvell/mmp3.dtsi - IRQCHIP_DECLARE(arm11mp_gic, "arm,arm11mp-gic", ...) in drivers/irqchip/irq-gic.c, this is still in use by Marvell MMP3 arch/arm/boot/dts/marvell/mmp3.dtsi - A compatible for the arm11mpcore SCU, since this was mistakedly used for the Cortex-A9 version of RealView EB. These are unfortunate but will need to be kept around for compatibility. New Marvell-specific compatibles should however probably be added. Acked-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Liviu Dudau <liviu.dudau@arm.com> Link: https://lore.kernel.org/r/20231207-drop-11mpcore-v2-1-560b396f3bf5@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent 64704ef commit 2560cff

6 files changed

Lines changed: 5 additions & 102 deletions

File tree

arch/arm/kernel/perf_event_v6.c

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -525,40 +525,7 @@ static int armv6_1176_pmu_init(struct arm_pmu *cpu_pmu)
525525
return 0;
526526
}
527527

528-
/*
529-
* ARMv6mpcore is almost identical to single core ARMv6 with the exception
530-
* that some of the events have different enumerations and that there is no
531-
* *hack* to stop the programmable counters. To stop the counters we simply
532-
* disable the interrupt reporting and update the event. When unthrottling we
533-
* reset the period and enable the interrupt reporting.
534-
*/
535-
536-
static int armv6mpcore_map_event(struct perf_event *event)
537-
{
538-
return armpmu_map_event(event, &armv6mpcore_perf_map,
539-
&armv6mpcore_perf_cache_map, 0xFF);
540-
}
541-
542-
static int armv6mpcore_pmu_init(struct arm_pmu *cpu_pmu)
543-
{
544-
cpu_pmu->name = "armv6_11mpcore";
545-
cpu_pmu->handle_irq = armv6pmu_handle_irq;
546-
cpu_pmu->enable = armv6pmu_enable_event;
547-
cpu_pmu->disable = armv6mpcore_pmu_disable_event;
548-
cpu_pmu->read_counter = armv6pmu_read_counter;
549-
cpu_pmu->write_counter = armv6pmu_write_counter;
550-
cpu_pmu->get_event_idx = armv6pmu_get_event_idx;
551-
cpu_pmu->clear_event_idx = armv6pmu_clear_event_idx;
552-
cpu_pmu->start = armv6pmu_start;
553-
cpu_pmu->stop = armv6pmu_stop;
554-
cpu_pmu->map_event = armv6mpcore_map_event;
555-
cpu_pmu->num_events = 3;
556-
557-
return 0;
558-
}
559-
560528
static const struct of_device_id armv6_pmu_of_device_ids[] = {
561-
{.compatible = "arm,arm11mpcore-pmu", .data = armv6mpcore_pmu_init},
562529
{.compatible = "arm,arm1176-pmu", .data = armv6_1176_pmu_init},
563530
{.compatible = "arm,arm1136-pmu", .data = armv6_1136_pmu_init},
564531
{ /* sentinel value */ }
@@ -568,7 +535,6 @@ static const struct pmu_probe_info armv6_pmu_probe_table[] = {
568535
ARM_PMU_PROBE(ARM_CPU_PART_ARM1136, armv6_1136_pmu_init),
569536
ARM_PMU_PROBE(ARM_CPU_PART_ARM1156, armv6_1156_pmu_init),
570537
ARM_PMU_PROBE(ARM_CPU_PART_ARM1176, armv6_1176_pmu_init),
571-
ARM_PMU_PROBE(ARM_CPU_PART_ARM11MPCORE, armv6mpcore_pmu_init),
572538
{ /* sentinel value */ }
573539
};
574540

arch/arm/mach-versatile/Kconfig

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -201,23 +201,6 @@ config REALVIEW_EB_A9MP
201201
Enable support for the Cortex-A9MPCore tile fitted to the
202202
Realview(R) Emulation Baseboard platform.
203203

204-
config REALVIEW_EB_ARM11MP
205-
bool "Support ARM11MPCore Tile"
206-
depends on MACH_REALVIEW_EB && ARCH_MULTI_V6
207-
select HAVE_SMP
208-
help
209-
Enable support for the ARM11MPCore tile fitted to the Realview(R)
210-
Emulation Baseboard platform.
211-
212-
config MACH_REALVIEW_PB11MP
213-
bool "Support RealView(R) Platform Baseboard for ARM11MPCore"
214-
depends on ARCH_MULTI_V6
215-
select HAVE_SMP
216-
help
217-
Include support for the ARM(R) RealView(R) Platform Baseboard for
218-
the ARM11MPCore. This platform has an on-board ARM11MPCore and has
219-
support for PCI-E and Compact Flash.
220-
221204
# ARMv6 CPU without K extensions, but does have the new exclusive ops
222205
config MACH_REALVIEW_PB1176
223206
bool "Support RealView(R) Platform Baseboard for ARM1176JZF-S"

arch/arm/mach-versatile/platsmp-realview.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
#define REALVIEW_SYS_FLAGSSET_OFFSET 0x30
1919

2020
static const struct of_device_id realview_scu_match[] = {
21+
/*
22+
* The ARM11MP SCU compatible is only provided as fallback for
23+
* old RealView EB Cortex-A9 device trees that were using this
24+
* compatible by mistake.
25+
*/
2126
{ .compatible = "arm,arm11mp-scu", },
2227
{ .compatible = "arm,cortex-a9-scu", },
2328
{ .compatible = "arm,cortex-a5-scu", },
@@ -27,7 +32,6 @@ static const struct of_device_id realview_scu_match[] = {
2732
static const struct of_device_id realview_syscon_match[] = {
2833
{ .compatible = "arm,core-module-integrator", },
2934
{ .compatible = "arm,realview-eb-syscon", },
30-
{ .compatible = "arm,realview-pb11mp-syscon", },
3135
{ .compatible = "arm,realview-pbx-syscon", },
3236
{ },
3337
};

arch/arm/mach-versatile/realview.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
static const char *const realview_dt_platform_compat[] __initconst = {
1010
"arm,realview-eb",
1111
"arm,realview-pb1176",
12-
"arm,realview-pb11mp",
1312
"arm,realview-pba8",
1413
"arm,realview-pbx",
1514
NULL,

arch/arm/mm/Kconfig

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -937,24 +937,6 @@ config VDSO
937937
You must have glibc 2.22 or later for programs to seamlessly
938938
take advantage of this.
939939

940-
config DMA_CACHE_RWFO
941-
bool "Enable read/write for ownership DMA cache maintenance"
942-
depends on CPU_V6K && SMP
943-
default y
944-
help
945-
The Snoop Control Unit on ARM11MPCore does not detect the
946-
cache maintenance operations and the dma_{map,unmap}_area()
947-
functions may leave stale cache entries on other CPUs. By
948-
enabling this option, Read or Write For Ownership in the ARMv6
949-
DMA cache maintenance functions is performed. These LDR/STR
950-
instructions change the cache line state to shared or modified
951-
so that the cache operation has the desired effect.
952-
953-
Note that the workaround is only valid on processors that do
954-
not perform speculative loads into the D-cache. For such
955-
processors, if cache maintenance operations are not broadcast
956-
in hardware, other workarounds are needed (e.g. cache
957-
maintenance broadcasting in software via FIQ).
958940

959941
config OUTER_CACHE
960942
bool

arch/arm/mm/cache-v6.S

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,6 @@ ENTRY(v6_flush_kern_dcache_area)
201201
* - end - virtual end address of region
202202
*/
203203
v6_dma_inv_range:
204-
#ifdef CONFIG_DMA_CACHE_RWFO
205-
ldrb r2, [r0] @ read for ownership
206-
strb r2, [r0] @ write for ownership
207-
#endif
208204
tst r0, #D_CACHE_LINE_SIZE - 1
209205
bic r0, r0, #D_CACHE_LINE_SIZE - 1
210206
#ifdef HARVARD_CACHE
@@ -213,10 +209,6 @@ v6_dma_inv_range:
213209
mcrne p15, 0, r0, c7, c11, 1 @ clean unified line
214210
#endif
215211
tst r1, #D_CACHE_LINE_SIZE - 1
216-
#ifdef CONFIG_DMA_CACHE_RWFO
217-
ldrbne r2, [r1, #-1] @ read for ownership
218-
strbne r2, [r1, #-1] @ write for ownership
219-
#endif
220212
bic r1, r1, #D_CACHE_LINE_SIZE - 1
221213
#ifdef HARVARD_CACHE
222214
mcrne p15, 0, r1, c7, c14, 1 @ clean & invalidate D line
@@ -231,10 +223,6 @@ v6_dma_inv_range:
231223
#endif
232224
add r0, r0, #D_CACHE_LINE_SIZE
233225
cmp r0, r1
234-
#ifdef CONFIG_DMA_CACHE_RWFO
235-
ldrlo r2, [r0] @ read for ownership
236-
strlo r2, [r0] @ write for ownership
237-
#endif
238226
blo 1b
239227
mov r0, #0
240228
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
@@ -248,9 +236,6 @@ v6_dma_inv_range:
248236
v6_dma_clean_range:
249237
bic r0, r0, #D_CACHE_LINE_SIZE - 1
250238
1:
251-
#ifdef CONFIG_DMA_CACHE_RWFO
252-
ldr r2, [r0] @ read for ownership
253-
#endif
254239
#ifdef HARVARD_CACHE
255240
mcr p15, 0, r0, c7, c10, 1 @ clean D line
256241
#else
@@ -269,10 +254,6 @@ v6_dma_clean_range:
269254
* - end - virtual end address of region
270255
*/
271256
ENTRY(v6_dma_flush_range)
272-
#ifdef CONFIG_DMA_CACHE_RWFO
273-
ldrb r2, [r0] @ read for ownership
274-
strb r2, [r0] @ write for ownership
275-
#endif
276257
bic r0, r0, #D_CACHE_LINE_SIZE - 1
277258
1:
278259
#ifdef HARVARD_CACHE
@@ -282,10 +263,6 @@ ENTRY(v6_dma_flush_range)
282263
#endif
283264
add r0, r0, #D_CACHE_LINE_SIZE
284265
cmp r0, r1
285-
#ifdef CONFIG_DMA_CACHE_RWFO
286-
ldrblo r2, [r0] @ read for ownership
287-
strblo r2, [r0] @ write for ownership
288-
#endif
289266
blo 1b
290267
mov r0, #0
291268
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
@@ -301,13 +278,7 @@ ENTRY(v6_dma_map_area)
301278
add r1, r1, r0
302279
teq r2, #DMA_FROM_DEVICE
303280
beq v6_dma_inv_range
304-
#ifndef CONFIG_DMA_CACHE_RWFO
305281
b v6_dma_clean_range
306-
#else
307-
teq r2, #DMA_TO_DEVICE
308-
beq v6_dma_clean_range
309-
b v6_dma_flush_range
310-
#endif
311282
ENDPROC(v6_dma_map_area)
312283

313284
/*
@@ -317,11 +288,9 @@ ENDPROC(v6_dma_map_area)
317288
* - dir - DMA direction
318289
*/
319290
ENTRY(v6_dma_unmap_area)
320-
#ifndef CONFIG_DMA_CACHE_RWFO
321291
add r1, r1, r0
322292
teq r2, #DMA_TO_DEVICE
323293
bne v6_dma_inv_range
324-
#endif
325294
ret lr
326295
ENDPROC(v6_dma_unmap_area)
327296

0 commit comments

Comments
 (0)