blob: ecc0dc565755b767201feed0be60d23f477f9c4f [file] [log] [blame]
Daniel Hellstrom9d7c6b22008-03-28 09:47:00 +01001/* page.h: Various defines and such for MMU operations on the Sparc for
2 * the Linux kernel.
3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
5 * Copyright (C) 2007 Daniel Hellstrom (daniel@gaisler.com)
6 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Daniel Hellstrom9d7c6b22008-03-28 09:47:00 +01008 */
9
10#ifndef _SPARC_PAGE_H
11#define _SPARC_PAGE_H
12
13#include <linux/config.h>
14#ifdef CONFIG_SUN4
15#define PAGE_SHIFT 13
16#else
17#define PAGE_SHIFT 12
18#endif
19
20#ifndef __ASSEMBLY__
21/* I have my suspicions... -DaveM */
22#define PAGE_SIZE (1UL << PAGE_SHIFT)
23#else
24#define PAGE_SIZE (1 << PAGE_SHIFT)
25#endif
26
27#define PAGE_MASK (~(PAGE_SIZE-1))
28
29#endif /* _SPARC_PAGE_H */