Daniel Hellstrom | 9d7c6b2 | 2008-03-28 09:47:00 +0100 | [diff] [blame] | 1 | /* 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 Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame^] | 7 | * SPDX-License-Identifier: GPL-2.0+ |
Daniel Hellstrom | 9d7c6b2 | 2008-03-28 09:47:00 +0100 | [diff] [blame] | 8 | */ |
| 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 */ |