aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-parisc/page.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-04-23 09:44:10 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-23 09:44:10 -0700
commit6b426e785cb81e53dc2fc4dcf997661472b470ef (patch)
tree3dbde895f120e78f66b32ddd9c9cbe3d83a59637 /include/asm-parisc/page.h
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6 (diff)
parent[PARISC] MAINTAINERS (diff)
downloadlinux-dev-6b426e785cb81e53dc2fc4dcf997661472b470ef.tar.xz
linux-dev-6b426e785cb81e53dc2fc4dcf997661472b470ef.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6: [PARISC] MAINTAINERS [PARISC] Make ioremap default to _nocache [PARISC] Add new entries to the syscall table [PARISC] Further work for multiple page sizes [PARISC] Fix up hil_kbd.c mismerge [PARISC] defconfig updates [PARISC] Document that we tolerate "Relaxed Ordering" [PARISC] Misc. janitorial work [PARISC] EISA regions must be mapped NO_CACHE [PARISC] OSS ad1889: Match register names with ALSA driver
Diffstat (limited to 'include/asm-parisc/page.h')
-rw-r--r--include/asm-parisc/page.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h
index 45e02aa5bf4b..c0dd461fb8f1 100644
--- a/include/asm-parisc/page.h
+++ b/include/asm-parisc/page.h
@@ -1,13 +1,30 @@
#ifndef _PARISC_PAGE_H
#define _PARISC_PAGE_H
-/* PAGE_SHIFT determines the page size */
-#define PAGE_SHIFT 12
-#define PAGE_SIZE (1UL << PAGE_SHIFT)
-#define PAGE_MASK (~(PAGE_SIZE-1))
+#if !defined(__KERNEL__)
+/* this is for userspace applications (4k page size) */
+# define PAGE_SHIFT 12 /* 4k */
+# define PAGE_SIZE (1UL << PAGE_SHIFT)
+# define PAGE_MASK (~(PAGE_SIZE-1))
+#endif
+
#ifdef __KERNEL__
#include <linux/config.h>
+
+#if defined(CONFIG_PARISC_PAGE_SIZE_4KB)
+# define PAGE_SHIFT 12 /* 4k */
+#elif defined(CONFIG_PARISC_PAGE_SIZE_16KB)
+# define PAGE_SHIFT 14 /* 16k */
+#elif defined(CONFIG_PARISC_PAGE_SIZE_64KB)
+# define PAGE_SHIFT 16 /* 64k */
+#else
+# error "unknown default kernel page size"
+#endif
+#define PAGE_SIZE (1UL << PAGE_SHIFT)
+#define PAGE_MASK (~(PAGE_SIZE-1))
+
+
#ifndef __ASSEMBLY__
#include <asm/types.h>