Daniel Hellstrom | c2f02da | 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 | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | * SPDX-License-Identifier: GPL-2.0+ |
Daniel Hellstrom | c2f02da | 2008-03-28 09:47:00 +0100 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef _SPARC_PAGE_H |
| 11 | #define _SPARC_PAGE_H |
| 12 | |
Daniel Hellstrom | c2f02da | 2008-03-28 09:47:00 +0100 | [diff] [blame] | 13 | #ifdef CONFIG_SUN4 |
| 14 | #define PAGE_SHIFT 13 |
| 15 | #else |
| 16 | #define PAGE_SHIFT 12 |
| 17 | #endif |
| 18 | |
| 19 | #ifndef __ASSEMBLY__ |
| 20 | /* I have my suspicions... -DaveM */ |
| 21 | #define PAGE_SIZE (1UL << PAGE_SHIFT) |
| 22 | #else |
| 23 | #define PAGE_SIZE (1 << PAGE_SHIFT) |
| 24 | #endif |
| 25 | |
| 26 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
| 27 | |
| 28 | #endif /* _SPARC_PAGE_H */ |