android_kernel_xiaomi_sm8350/include/asm-s390/cache.h
Christian Borntraeger 58268b97f6 [PATCH] s390: add read_mostly optimization
Add a read_mostly section and define __read_mostly to prevent cache line
pollution due to writes for mostly read variables.  In addition fix the
incorrect alignment of the cache_line_aligned data section.  s390 has a
cacheline size of 256 bytes.

Signed-off-by: Christian Borntraeger <cborntra@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-28 08:33:48 -07:00

22 lines
451 B
C

/*
* include/asm-s390/cache.h
*
* S390 version
* Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
*
* Derived from "include/asm-i386/cache.h"
* Copyright (C) 1992, Linus Torvalds
*/
#ifndef __ARCH_S390_CACHE_H
#define __ARCH_S390_CACHE_H
#define L1_CACHE_BYTES 256
#define L1_CACHE_SHIFT 8
#define ARCH_KMALLOC_MINALIGN 8
#define __read_mostly __attribute__((__section__(".data.read_mostly")))
#endif