xref: /kernel/linux/linux-6.6/arch/x86/include/asm/cache.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-6.6/arch/x86/include/asm/
162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef _ASM_X86_CACHE_H
362306a36Sopenharmony_ci#define _ASM_X86_CACHE_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#include <linux/linkage.h>
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci/* L1 cache line size */
862306a36Sopenharmony_ci#define L1_CACHE_SHIFT	(CONFIG_X86_L1_CACHE_SHIFT)
962306a36Sopenharmony_ci#define L1_CACHE_BYTES	(1 << L1_CACHE_SHIFT)
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#define __read_mostly __section(".data..read_mostly")
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#define INTERNODE_CACHE_SHIFT CONFIG_X86_INTERNODE_CACHE_SHIFT
1462306a36Sopenharmony_ci#define INTERNODE_CACHE_BYTES (1 << INTERNODE_CACHE_SHIFT)
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci#ifdef CONFIG_X86_VSMP
1762306a36Sopenharmony_ci#ifdef CONFIG_SMP
1862306a36Sopenharmony_ci#define __cacheline_aligned_in_smp					\
1962306a36Sopenharmony_ci	__attribute__((__aligned__(INTERNODE_CACHE_BYTES)))		\
2062306a36Sopenharmony_ci	__page_aligned_data
2162306a36Sopenharmony_ci#endif
2262306a36Sopenharmony_ci#endif
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci#endif /* _ASM_X86_CACHE_H */
25

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