cache.h 604 B

1234567891011121314151617181920212223242526
  1. /*
  2. * include/asm-x86_64/cache.h
  3. */
  4. #ifndef __ARCH_X8664_CACHE_H
  5. #define __ARCH_X8664_CACHE_H
  6. /* L1 cache line size */
  7. #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
  8. #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
  9. #ifdef CONFIG_X86_VSMP
  10. /* vSMP Internode cacheline shift */
  11. #define INTERNODE_CACHE_SHIFT (12)
  12. #ifdef CONFIG_SMP
  13. #define __cacheline_aligned_in_smp \
  14. __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) \
  15. __attribute__((__section__(".data.page_aligned")))
  16. #endif
  17. #endif
  18. #define __read_mostly __attribute__((__section__(".data.read_mostly")))
  19. #endif