File: cache.h

package info (click to toggle)
vdo 8.3.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,536 kB
  • sloc: ansic: 21,023; sh: 349; makefile: 314; perl: 242
file content (24 lines) | stat: -rw-r--r-- 577 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * User space definitions for things in linux/cache.h
 *
 * Copyright 2023 Red Hat
 */

#ifndef __LINUX_CACHE_H
#define __LINUX_CACHE_H

#include <linux/compiler_attributes.h>

#if defined(__PPC__)
/* N.B.: Some PPC processors have smaller cache lines. */
#define L1_CACHE_BYTES 128
#elif defined(__s390x__)
#define L1_CACHE_BYTES 256
#elif defined(__x86_64__) || defined(__aarch64__) || defined(__riscv) || defined (__loongarch64)
#define L1_CACHE_BYTES 64
#else
#error "unknown cache line size"
#endif

#endif  /* __LINUX_CACHE_H */