xref: /kernel/linux/linux-5.10/arch/x86/include/asm/cache.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/arch/x86/include/asm/
18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _ASM_X86_CACHE_H
38c2ecf20Sopenharmony_ci#define _ASM_X86_CACHE_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <linux/linkage.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci/* L1 cache line size */
88c2ecf20Sopenharmony_ci#define L1_CACHE_SHIFT	(CONFIG_X86_L1_CACHE_SHIFT)
98c2ecf20Sopenharmony_ci#define L1_CACHE_BYTES	(1 << L1_CACHE_SHIFT)
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#define __read_mostly __section(".data..read_mostly")
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#define INTERNODE_CACHE_SHIFT CONFIG_X86_INTERNODE_CACHE_SHIFT
148c2ecf20Sopenharmony_ci#define INTERNODE_CACHE_BYTES (1 << INTERNODE_CACHE_SHIFT)
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#ifdef CONFIG_X86_VSMP
178c2ecf20Sopenharmony_ci#ifdef CONFIG_SMP
188c2ecf20Sopenharmony_ci#define __cacheline_aligned_in_smp					\
198c2ecf20Sopenharmony_ci	__attribute__((__aligned__(INTERNODE_CACHE_BYTES)))		\
208c2ecf20Sopenharmony_ci	__page_aligned_data
218c2ecf20Sopenharmony_ci#endif
228c2ecf20Sopenharmony_ci#endif
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci#endif /* _ASM_X86_CACHE_H */
25

Indexes created Thu Nov 07 10:32:03 CST 2024