File: cache.h

package info (click to toggle)
linux-tools 3.16-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 73,776 kB
  • sloc: ansic: 962,256; perl: 14,061; makefile: 6,629; sh: 5,629; cpp: 5,599; python: 4,547; asm: 4,106; yacc: 2,566; lex: 1,436; pascal: 80; awk: 6
file content (23 lines) | stat: -rw-r--r-- 565 bytes parent folder | download | duplicates (24)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef __ASM_METAG_CACHE_H
#define __ASM_METAG_CACHE_H

/* L1 cache line size (64 bytes) */
#define L1_CACHE_SHIFT		6
#define L1_CACHE_BYTES		(1 << L1_CACHE_SHIFT)

/* Meta requires large data items to be 8 byte aligned. */
#define ARCH_SLAB_MINALIGN	8

/*
 * With an L2 cache, we may invalidate dirty lines, so we need to ensure DMA
 * buffers have cache line alignment.
 */
#ifdef CONFIG_METAG_L2C
#define ARCH_DMA_MINALIGN	L1_CACHE_BYTES
#else
#define ARCH_DMA_MINALIGN	8
#endif

#define __read_mostly __attribute__((__section__(".data..read_mostly")))

#endif