Skip to contentSkip to conversation

Load cache_aligned sections, cache aligned (VIA, some Intel, others?)

RFC New Michael S. Zick 1 participant 1 message Jun 15, 2009 x86

lore
Share & tools
lore
#0 lore raw

RFC 1/1 Load cache_aligned sections, cache aligned (VIA, some Intel, others?)

The expected size of the processor cache line size is set in the Kbuild menu by selection of the processor (sort-of).

How about telling the loader to cache-line align the cache_aligned sections? This define comes in via (no pun intended): arch/x86/include/asm/cache.h

arch/x86/kernel/vmlinux_32.lds.S +1 -1
index 62ad500..26f68a5 100644
@@ -82,7 +82,7 @@ SECTIONS
        *(.data.idt)
   }
 
-  . = ALIGN(32);
+  . = ALIGN(L1_CACHE_BYTES);
   .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
        *(.data.cacheline_aligned)
   }

Mike