cache.h 622 B

123456789101112131415161718192021222324
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_X86_CACHE_H
  3. #define _ASM_X86_CACHE_H
  4. #include <linux/linkage.h>
  5. /* L1 cache line size */
  6. #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
  7. #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
  8. #define __read_mostly __section(".data..read_mostly")
  9. #define INTERNODE_CACHE_SHIFT CONFIG_X86_INTERNODE_CACHE_SHIFT
  10. #define INTERNODE_CACHE_BYTES (1 << INTERNODE_CACHE_SHIFT)
  11. #ifdef CONFIG_X86_VSMP
  12. #ifdef CONFIG_SMP
  13. #define __cacheline_aligned_in_smp \
  14. __attribute__((__aligned__(INTERNODE_CACHE_BYTES))) \
  15. __page_aligned_data
  16. #endif
  17. #endif
  18. #endif /* _ASM_X86_CACHE_H */