Skip to contentSkip to conversation

x86: cache.h: Add default for CONFIG_SYS_CACHELINE_SIZE

PATCH New Stefan Roese 2 participants 3 messages Jul 18, 2016 – Aug 1, 2016 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: cache.h: Add default for CONFIG_SYS_CACHELINE_SIZE

Don't just define ARCH_DMA_MINALIGN but also CONFIG_SYS_CACHELINE_SIZE if its undefined. This is needed for the xhci driver to compile.

---
 arch/x86/include/asm/cache.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/x86/include/asm/cache.h +4 -4
index 508b63f..4ff63c3 100644
@@ -11,12 +11,12 @@
  * If CONFIG_SYS_CACHELINE_SIZE is defined use it for DMA alignment.  Otherwise
  * use 64-bytes, a safe default for x86.
  */
-#ifdef CONFIG_SYS_CACHELINE_SIZE
-#define ARCH_DMA_MINALIGN	CONFIG_SYS_CACHELINE_SIZE
-#else
-#define ARCH_DMA_MINALIGN	64
+#ifndef CONFIG_SYS_CACHELINE_SIZE
+#define CONFIG_SYS_CACHELINE_SIZE	64
 #endif
 
+#define ARCH_DMA_MINALIGN		CONFIG_SYS_CACHELINE_SIZE
+
 static inline void wbinvd(void)
 {
 	asm volatile ("wbinvd" : : : "memory");
Signature · 1 line
2.9.2
#1 lore raw

PATCH 1/1 x86: cache.h: Add default for CONFIG_SYS_CACHELINE_SIZE

Quoted 2 lines · Stefan Roese

Don't just define ARCH_DMA_MINALIGN but also CONFIG_SYS_CACHELINE_SIZE if its undefined. This is needed for the xhci driver to compile.

nits: it's

I can fix this when applying.

Quoted 8 lines
---
 arch/x86/include/asm/cache.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
#2 lore raw

PATCH 1/1 x86: cache.h: Add default for CONFIG_SYS_CACHELINE_SIZE

Quoted 7 lines · Bin Meng
Quoted 2 lines · Stefan Roese

Don't just define ARCH_DMA_MINALIGN but also CONFIG_SYS_CACHELINE_SIZE if its undefined. This is needed for the xhci driver to compile.

nits: it's

I can fix this when applying.

Fixed this, and

Quoted 11 lines
Quoted 9 lines
---
 arch/x86/include/asm/cache.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

applied to u-boot-x86, thanks!