blob: dcfd58118c11fda23e0921b5b2e1f75bf8dc59e1 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
David S. Millerd113fcd2007-11-16 03:06:07 -08002/* cache.h: Cache specific code for the Sparc. These include flushing
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 * and direct tag/data line access.
4 *
David S. Millerd113fcd2007-11-16 03:06:07 -08005 * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)
Linus Torvalds1da177e2005-04-16 15:20:36 -07006 */
7
8#ifndef _SPARC_CACHE_H
9#define _SPARC_CACHE_H
10
David S. Miller273fca02010-05-18 15:23:58 -070011#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)
12
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#define L1_CACHE_SHIFT 5
14#define L1_CACHE_BYTES 32
Linus Torvalds1da177e2005-04-16 15:20:36 -070015
David S. Millerd113fcd2007-11-16 03:06:07 -080016#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 Vlasenko54cb27a2010-02-20 01:03:44 +010024#define __read_mostly __attribute__((__section__(".data..read_mostly")))
David S. Millerd113fcd2007-11-16 03:06:07 -080025
Linus Torvalds1da177e2005-04-16 15:20:36 -070026#endif /* !(_SPARC_CACHE_H) */