ARM: no longer force unbuffered DMA for realview
Subsystems (2)
PATCH 4/10 ARM: no longer force unbuffered DMA for realview
Commit 42c4dafe803dca ("ARM: 6202/1: Do not ARM_DMA_MEM_BUFFERABLE on RealView boards with L210/L220") changed the generic setting for ARM_DMA_MEM_BUFFERABLE to be disabled on any Realview kernel that includes support for any of the ARM11 variations. Doing this was required to allow doing DMA without a lockup in the l2x0 cache controller on the Realview platform.
Unfortunately, in a kernel that also contains support for any ARMv7 based machine, the same change makes it impossible to do DMA on ARMv7, which gets in the way of enabling multiplatform support on Realview.
As confirmed by Catalin Marinas and Linus Walleij, the current code for Realview that we have in the kernel does not actually perform any DMA, and this is unlikely to change in the future. Therefore we can revert 42c4dafe803dca without introducing regressions, but we must never start using DMA on this platform in the future.
--- arch/arm/mm/Kconfig | 2 -- 1 file changed, 2 deletions(-)
arch/arm/mm/Kconfig +0 -2
@@ -972,8 +972,6 @@ config ARM_L1_CACHE_SHIFT config ARM_DMA_MEM_BUFFERABLE bool "Use non-cacheable memory for DMA" if (CPU_V6 || CPU_V6K) && !CPU_V7 - depends on !(MACH_REALVIEW_PB1176 || REALVIEW_EB_ARM11MP || \ - MACH_REALVIEW_PB11MP) default y if CPU_V6 || CPU_V6K || CPU_V7 help Historically, the kernel has used strongly ordered mappings to
Signature · 1 line
2.1.0.rc2
PATCH 5/10 ARM: realview: remove private barrier implementation
The realview barrier implementation tries to avoid calling outer_sync in order to not lock up as a result of a bug in the l220 cache controller.
This gets in the way of the multiplatform support, but we can still remove it if we make sure that the outer_sync function never gets called, by replacing the function pointer with NULL, right after initialization.
--- arch/arm/mach-realview/Kconfig | 2 -- arch/arm/mach-realview/include/mach/barriers.h | 8 -------- arch/arm/mach-realview/realview_eb.c | 6 ++++++ arch/arm/mach-realview/realview_pb11mp.c | 5 +++++ 4 files changed, 11 insertions(+), 10 deletions(-) delete mode 100644 arch/arm/mach-realview/include/mach/barriers.h
arch/arm/mach-realview/Kconfig +0 -2
@@ -36,7 +36,6 @@ config REALVIEW_EB_A9MP config REALVIEW_EB_ARM11MP bool "Support ARM11MPCore Tile" depends on MACH_REALVIEW_EB - select ARCH_HAS_BARRIERS if SMP select CPU_V6K select HAVE_ARM_SCU if SMP select HAVE_ARM_TWD if SMP
@@ -57,7 +56,6 @@ config REALVIEW_EB_ARM11MP_REVB config MACH_REALVIEW_PB11MP bool "Support RealView(R) Platform Baseboard for ARM11MPCore" - select ARCH_HAS_BARRIERS if SMP select ARM_GIC select CPU_V6K select HAVE_ARM_SCU if SMP
arch/arm/mach-realview/include/mach/barriers.h deleted +0 -8
@@ -1,8 +0,0 @@ -/* -* Barriers redefined for RealView ARM11MPCore platforms with L220 cache -* controller to work around hardware errata causing the outer_sync() -* operation to deadlock the system. -*/ -#define mb () dsb() -#define rmb () dsb() -#define wmb () mb()
arch/arm/mach-realview/realview_eb.c +6 -0
@@ -450,6 +450,12 @@ static void __init realview_eb_init(void)* Bits: .... ...0 0111 1001 0000 .... .... .... */ l2x0_init (__io_address (REALVIEW_EB11MP_L220_BASE ),0x00790000 ,0xfe000fff ); + +/* +* due to a bug in the l220 cache controller, we must not call +* the sync function. stub it out here instead! +*/ + outer_cache.sync =NULL ;#endif pmu_device.name =core_tile_a9mp () ?"armv7-pmu" :"armv6-pmu" ;platform_device_register (&pmu_device);
arch/arm/mach-realview/realview_pb11mp.c +5 -0
@@ -345,6 +345,11 @@ static void __init realview_pb11mp_init(void)* Bits: .... ...0 0111 1001 0000 .... .... .... */ l2x0_init (__io_address (REALVIEW_TC11MP_L220_BASE ),0x00790000 ,0xfe000fff ); +/* +* due to a bug in the l220 cache controller, we must not call +* the sync function. stub it out here instead! +*/ + outer_cache.sync =NULL ;#endif realview_flash_register(realview_pb11mp_flash_resource,
Signature · 1 line
2.1.0.rc2
PATCH 5/10 ARM: realview: remove private barrier implementation
Quoted 8 lines · Arnd Bergmann
The realview barrier implementation tries to avoid calling
outer_syncin order to not lock up as a result of a bug in the l220 cache controller.This gets in the way of the multiplatform support, but we can still remove it if we make sure that the
outer_syncfunction never gets called, by replacing the function pointer with NULL, right after initialization.Signed-off-by Arnd Bergmann <[email protected]>
Yours,
Linus Walleij
PATCH 6/10 ARM: realview: enable multiplatform
In reply to Arnd BergmannAll obstacles are out of the way by now, so we can finally move realview to multiplatform.
--- arch/arm/Kconfig | 14 ---------- arch/arm/mach-realview/Kconfig | 58 ++++++++++++++++++++++++++++++++--------- arch/arm/mach-realview/Makefile | 7 ++++- 3 files changed, 52 insertions(+), 27 deletions(-)
arch/arm/Kconfig +0 -14
@@ -322,20 +322,6 @@ config ARCH_MULTIPLATFORM select SPARSE_IRQ select USE_OF -config ARCH_REALVIEW - bool "ARM Ltd. RealView family" - select ARCH_WANT_OPTIONAL_GPIOLIB - select ARM_AMBA - select ARM_TIMER_SP804 - select COMMON_CLK - select COMMON_CLK_VERSATILE - select GENERIC_CLOCKEVENTS - select GPIO_PL061 if GPIOLIB - select ICST - select PLAT_VERSATILE - select PLAT_VERSATILE_SCHED_CLOCK - help - This enables support for ARM Ltd RealView boards. config ARCH_VERSATILE bool "ARM Ltd. Versatile family"
arch/arm/mach-realview/Kconfig +43 -12
114 lines not on this page · raw message
arch/arm/mach-realview/Makefile +6 -1
@@ -1,13 +1,18 @@ # # Makefile for the linux kernel. # +ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ + -I$(srctree)/arch/arm/plat-versatile/include + -obj-y := core.o obj-$(CONFIG_REALVIEW_DT) += realview-dt.o +ifdef $(CONFIG_ATAGS) +obj-y := core.o obj-$(CONFIG_MACH_REALVIEW_EB) += realview_eb.o obj-$(CONFIG_MACH_REALVIEW_PB11MP) += realview_pb11mp.o obj-$(CONFIG_MACH_REALVIEW_PB1176) += realview_pb1176.o obj-$(CONFIG_MACH_REALVIEW_PBA8) += realview_pba8.o obj-$(CONFIG_MACH_REALVIEW_PBX) += realview_pbx.o +endif obj-$(CONFIG_SMP) += platsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
Signature · 1 line
2.1.0.rc2
PATCH 6/10 ARM: realview: enable multiplatform
Quoted 6 lines · Arnd Bergmann
All obstacles are out of the way by now, so we can finally move realview to multiplatform.
Signed-off-by Arnd Bergmann <[email protected]>Cc Linus Walleij <[email protected]>Cc Russell King <[email protected]>
Yours,
Linus Walleij
PATCH 4/10 ARM: no longer force unbuffered DMA for realview
In reply to Arnd BergmannQuoted 17 lines · Arnd Bergmann
Commit
42c4dafe803dca("ARM: 6202/1: Do notARM_DMA_MEM_BUFFERABLEon RealView boards with L210/L220") changed the generic setting forARM_DMA_MEM_BUFFERABLEto be disabled on any Realview kernel that includes support for any of the ARM11 variations. Doing this was required to allow doing DMA without a lockup in the l2x0 cache controller on the Realview platform.Unfortunately, in a kernel that also contains support for any ARMv7 based machine, the same change makes it impossible to do DMA on ARMv7, which gets in the way of enabling multiplatform support on Realview.
As confirmed by Catalin Marinas and Linus Walleij, the current code for Realview that we have in the kernel does not actually perform any DMA, and this is unlikely to change in the future. Therefore we can revert
42c4dafe803dcawithout introducing regressions, but we must never start using DMA on this platform in the future.
Quoted 3 lines
Signed-off-by Arnd Bergmann <[email protected]>Cc Linus Walleij <[email protected]>Cc Russell King <[email protected]>
The only platform that I actually got it working on was ARM PB11MPCore, and only for the PL011 serial port (MMC for example will never work). Maybe AACI works, maybe. But it's not worth the effort, so:
Yours,
Linus Walleij