ARM7: Kconfig: cache: fix cacheline size based on arm type
RFC PATCH 1/1 ARM7: Kconfig: cache: fix cacheline size based on arm type
The CONFIG_SYS_CACHELINE_SIZE is not defined for some of the platforms due to which buildman iill fail for these platforms.
Fixing this issue in generic way in Kconfig by selecting cacheline size based on arm processor type.
This patch is based on linux kernel commit 5637a126
--- arch/arm/Kconfig | 11 +++++++++++ arch/arm/include/asm/armv7.h | 1 + arch/arm/include/asm/cache.h | 5 +++++ 3 files changed, 17 insertions(+)
arch/arm/Kconfig +11 -0
@@ -42,6 +42,17 @@ config CPU_V7 select HAS_VBAR select HAS_THUMB2 +config ARM_L1_CACHE_SHIFT_6 + bool + default y if CPU_V7 + help + Setting ARM L1 cache line size to 64 Bytes. + +config ARM_L1_CACHE_SHIFT + int + default 6 if ARM_L1_CACHE_SHIFT_6 + default 5 + config CPU_V7M bool select HAS_THUMB2
arch/arm/include/asm/armv7.h +1 -0
@@ -60,6 +60,7 @@#include <linux/types.h> #include <asm/io.h> #include <asm/barriers.h> +#include <asm/cache.h> /* * Workaround for ARM errata # 798870
arch/arm/include/asm/cache.h +5 -0
@@ -47,6 +47,11 @@ void dram_bank_mmu_setup(int bank);* use that value for aligning DMA buffers unless the board config has specified * an alternate cache line size. */ +#define L1_CACHE_SHIFT CONFIG_ARM_L1_CACHE_SHIFT +#ifndef CONFIG_SYS_CACHELINE_SIZE +#define CONFIG_SYS_CACHELINE_SIZE (1 << L1_CACHE_SHIFT) +#endif +#ifdef CONFIG_SYS_CACHELINE_SIZE #define ARCH_DMA_MINALIGN CONFIG_SYS_CACHELINE_SIZE#else
Signature · 1 line
1.7.9.5
RFC PATCH 1/1 ARM7: Kconfig: cache: fix cacheline size based on arm type
Quoted 11 lines · Ravi Babu
The
CONFIG_SYS_CACHELINE_SIZEis not defined for some of the platforms due to which buildman iill fail for these platforms.Fixing this issue in generic way in
Kconfigby selecting cacheline size based on arm processor type.This patch is based on linux kernel commit
5637a126Signed-off-by Ravi Babu <[email protected]>Reviewed-by Lukasz Majewski <[email protected]>
Please see https://patchwork.ozlabs.org/patch/661424/ thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160825/4d7f751f/attachment.sig>
RFC PATCH 1/1 ARM7: Kconfig: cache: fix cacheline size based on arm type
Hi Tom,
Quoted 9 lines · Ravi Babu
Quoted 8 lines
The
CONFIG_SYS_CACHELINE_SIZEis not defined for some of the platforms due to which buildman iill fail for these platforms.Fixing this issue in generic way in
Kconfigby selecting cacheline size based on arm processor type.
Quoted 7 lines
Quoted 4 lines
This patch is based on linux kernel commit
5637a126Signed-off-by Ravi Babu <[email protected]>Reviewed-by Lukasz Majewski <[email protected]>Please see https://patchwork.ozlabs.org/patch/661424/ thanks!
Seems OK :-).
Thanks for providing the patch.
Signature · 5 lines
Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
B
RFC PATCH 1/1 ARM7: Kconfig: cache: fix cacheline size based on arm type
Hi Tom
Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
The
CONFIG_SYS_CACHELINE_SIZEis not defined for some of the platforms due to which buildman iill fail for these platforms.Fixing this issue in generic way in
Kconfigby selecting cacheline size based on arm processor type.This patch is based on linux kernel commit
5637a126Signed-off-by Ravi Babu <[email protected]>Reviewed-by Lukasz Majewski <[email protected]>
Quoted 6 lines
Quoted 2 lines
Please see https://patchwork.ozlabs.org/patch/661424/ thanks!
Seems OK :-).
Thanks for providing the patch.
I missed this patch https://patchwork.ozlabs.org/patch/661424/
I checked with this patch running buildman on SPL-DFU patches, it succeeded.
Thanks.
Regards
Ravi