blob: 5bb6991b48575026134498f743390ba598b20564 [file] [log] [blame]
David S. Millerd113fcd2007-11-16 03:06:07 -08001/* cache.h: Cache specific code for the Sparc. These include flushing
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * and direct tag/data line access.
3 *
David S. Millerd113fcd2007-11-16 03:06:07 -08004 * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)
Linus Torvalds1da177e2005-04-16 15:20:36 -07005 */
6
7#ifndef _SPARC_CACHE_H
8#define _SPARC_CACHE_H
9
David S. Miller273fca02010-05-18 15:23:58 -070010#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)
11
Linus Torvalds1da177e2005-04-16 15:20:36 -070012#define L1_CACHE_SHIFT 5
13#define L1_CACHE_BYTES 32
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
David S. Millerd113fcd2007-11-16 03:06:07 -080015#ifdef CONFIG_SPARC32
16#define SMP_CACHE_BYTES_SHIFT 5
17#else
18#define SMP_CACHE_BYTES_SHIFT 6
19#endif
20
21#define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT)
22
Denys Vlasenko54cb27a2010-02-20 01:03:44 +010023#define __read_mostly __attribute__((__section__(".data..read_mostly")))
David S. Millerd113fcd2007-11-16 03:06:07 -080024
Linus Torvalds1da177e2005-04-16 15:20:36 -070025#endif /* !(_SPARC_CACHE_H) */