Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
David S. Miller | d113fcd | 2007-11-16 03:06:07 -0800 | [diff] [blame] | 2 | /* cache.h: Cache specific code for the Sparc. These include flushing |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | * and direct tag/data line access. |
| 4 | * |
David S. Miller | d113fcd | 2007-11-16 03:06:07 -0800 | [diff] [blame] | 5 | * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef _SPARC_CACHE_H |
| 9 | #define _SPARC_CACHE_H |
| 10 | |
David S. Miller | 273fca0 | 2010-05-18 15:23:58 -0700 | [diff] [blame] | 11 | #define ARCH_SLAB_MINALIGN __alignof__(unsigned long long) |
| 12 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | #define L1_CACHE_SHIFT 5 |
| 14 | #define L1_CACHE_BYTES 32 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | |
David S. Miller | d113fcd | 2007-11-16 03:06:07 -0800 | [diff] [blame] | 16 | #ifdef CONFIG_SPARC32 |
| 17 | #define SMP_CACHE_BYTES_SHIFT 5 |
| 18 | #else |
| 19 | #define SMP_CACHE_BYTES_SHIFT 6 |
| 20 | #endif |
| 21 | |
| 22 | #define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) |
| 23 | |
Denys Vlasenko | 54cb27a | 2010-02-20 01:03:44 +0100 | [diff] [blame] | 24 | #define __read_mostly __attribute__((__section__(".data..read_mostly"))) |
David S. Miller | d113fcd | 2007-11-16 03:06:07 -0800 | [diff] [blame] | 25 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | #endif /* !(_SPARC_CACHE_H) */ |