Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Linus Walleij and committed by
Arnd Bergmann
2560cffd 64704ef1

+5 -102
-34
arch/arm/kernel/perf_event_v6.c
··· 525 525 return 0; 526 526 } 527 527 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 - 560 528 static const struct of_device_id armv6_pmu_of_device_ids[] = { 561 - {.compatible = "arm,arm11mpcore-pmu", .data = armv6mpcore_pmu_init}, 562 529 {.compatible = "arm,arm1176-pmu", .data = armv6_1176_pmu_init}, 563 530 {.compatible = "arm,arm1136-pmu", .data = armv6_1136_pmu_init}, 564 531 { /* sentinel value */ } ··· 535 568 ARM_PMU_PROBE(ARM_CPU_PART_ARM1136, armv6_1136_pmu_init), 536 569 ARM_PMU_PROBE(ARM_CPU_PART_ARM1156, armv6_1156_pmu_init), 537 570 ARM_PMU_PROBE(ARM_CPU_PART_ARM1176, armv6_1176_pmu_init), 538 - ARM_PMU_PROBE(ARM_CPU_PART_ARM11MPCORE, armv6mpcore_pmu_init), 539 571 { /* sentinel value */ } 540 572 }; 541 573
-17
arch/arm/mach-versatile/Kconfig
··· 201 201 Enable support for the Cortex-A9MPCore tile fitted to the 202 202 Realview(R) Emulation Baseboard platform. 203 203 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 - 221 204 # ARMv6 CPU without K extensions, but does have the new exclusive ops 222 205 config MACH_REALVIEW_PB1176 223 206 bool "Support RealView(R) Platform Baseboard for ARM1176JZF-S"
+5 -1
arch/arm/mach-versatile/platsmp-realview.c
··· 18 18 #define REALVIEW_SYS_FLAGSSET_OFFSET 0x30 19 19 20 20 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 + */ 21 26 { .compatible = "arm,arm11mp-scu", }, 22 27 { .compatible = "arm,cortex-a9-scu", }, 23 28 { .compatible = "arm,cortex-a5-scu", }, ··· 32 27 static const struct of_device_id realview_syscon_match[] = { 33 28 { .compatible = "arm,core-module-integrator", }, 34 29 { .compatible = "arm,realview-eb-syscon", }, 35 - { .compatible = "arm,realview-pb11mp-syscon", }, 36 30 { .compatible = "arm,realview-pbx-syscon", }, 37 31 { }, 38 32 };
-1
arch/arm/mach-versatile/realview.c
··· 9 9 static const char *const realview_dt_platform_compat[] __initconst = { 10 10 "arm,realview-eb", 11 11 "arm,realview-pb1176", 12 - "arm,realview-pb11mp", 13 12 "arm,realview-pba8", 14 13 "arm,realview-pbx", 15 14 NULL,
-18
arch/arm/mm/Kconfig
··· 937 937 You must have glibc 2.22 or later for programs to seamlessly 938 938 take advantage of this. 939 939 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). 958 940 959 941 config OUTER_CACHE 960 942 bool
-31
arch/arm/mm/cache-v6.S
··· 201 201 * - end - virtual end address of region 202 202 */ 203 203 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 208 204 tst r0, #D_CACHE_LINE_SIZE - 1 209 205 bic r0, r0, #D_CACHE_LINE_SIZE - 1 210 206 #ifdef HARVARD_CACHE ··· 209 213 mcrne p15, 0, r0, c7, c11, 1 @ clean unified line 210 214 #endif 211 215 tst r1, #D_CACHE_LINE_SIZE - 1 212 - #ifdef CONFIG_DMA_CACHE_RWFO 213 - ldrbne r2, [r1, #-1] @ read for ownership 214 - strbne r2, [r1, #-1] @ write for ownership 215 - #endif 216 216 bic r1, r1, #D_CACHE_LINE_SIZE - 1 217 217 #ifdef HARVARD_CACHE 218 218 mcrne p15, 0, r1, c7, c14, 1 @ clean & invalidate D line ··· 223 231 #endif 224 232 add r0, r0, #D_CACHE_LINE_SIZE 225 233 cmp r0, r1 226 - #ifdef CONFIG_DMA_CACHE_RWFO 227 - ldrlo r2, [r0] @ read for ownership 228 - strlo r2, [r0] @ write for ownership 229 - #endif 230 234 blo 1b 231 235 mov r0, #0 232 236 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer ··· 236 248 v6_dma_clean_range: 237 249 bic r0, r0, #D_CACHE_LINE_SIZE - 1 238 250 1: 239 - #ifdef CONFIG_DMA_CACHE_RWFO 240 - ldr r2, [r0] @ read for ownership 241 - #endif 242 251 #ifdef HARVARD_CACHE 243 252 mcr p15, 0, r0, c7, c10, 1 @ clean D line 244 253 #else ··· 254 269 * - end - virtual end address of region 255 270 */ 256 271 ENTRY(v6_dma_flush_range) 257 - #ifdef CONFIG_DMA_CACHE_RWFO 258 - ldrb r2, [r0] @ read for ownership 259 - strb r2, [r0] @ write for ownership 260 - #endif 261 272 bic r0, r0, #D_CACHE_LINE_SIZE - 1 262 273 1: 263 274 #ifdef HARVARD_CACHE ··· 263 282 #endif 264 283 add r0, r0, #D_CACHE_LINE_SIZE 265 284 cmp r0, r1 266 - #ifdef CONFIG_DMA_CACHE_RWFO 267 - ldrblo r2, [r0] @ read for ownership 268 - strblo r2, [r0] @ write for ownership 269 - #endif 270 285 blo 1b 271 286 mov r0, #0 272 287 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer ··· 278 301 add r1, r1, r0 279 302 teq r2, #DMA_FROM_DEVICE 280 303 beq v6_dma_inv_range 281 - #ifndef CONFIG_DMA_CACHE_RWFO 282 304 b v6_dma_clean_range 283 - #else 284 - teq r2, #DMA_TO_DEVICE 285 - beq v6_dma_clean_range 286 - b v6_dma_flush_range 287 - #endif 288 305 ENDPROC(v6_dma_map_area) 289 306 290 307 /* ··· 288 317 * - dir - DMA direction 289 318 */ 290 319 ENTRY(v6_dma_unmap_area) 291 - #ifndef CONFIG_DMA_CACHE_RWFO 292 320 add r1, r1, r0 293 321 teq r2, #DMA_TO_DEVICE 294 322 bne v6_dma_inv_range 295 - #endif 296 323 ret lr 297 324 ENDPROC(v6_dma_unmap_area) 298 325