aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64/mmu_context.h
diff options
context:
space:
mode:
authorPeter Chubb <peterc@gelato.unsw.edu.au>2005-08-16 22:54:00 -0400
committerTony Luck <tony.luck@intel.com>2005-08-24 18:35:41 -0400
commit0a41e2501160587eb8f66cef3bdf1c6f2cb86997 (patch)
tree9f5b0288c3101344acd22f7e901fe909a8f98df6 /include/asm-ia64/mmu_context.h
parent0572e3da3ff5c3744b2f606ecf296d5f89a4bbdf (diff)
[IA64] Rationalise Region Definitions
Currently, region numbers are defined in several files, with several names. For example, we have REGION_KERNEL in asm/page.h and RGN_KERNEL in pgtable.h We also have address definitions that should depend on the RGN_XXX macros, but are currently just long constants. The following patch reorganises all the definitions so that they have the same form (RGN_XXX), are in one place, and that addresses that depend on RGN_XXX are derived from them. (This is a necessary but not sufficient patch to allow UML-like operation on IA64). Thanks to David Mosberger for catching the change I missed in mmu_context.h. Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64/mmu_context.h')
-rw-r--r--include/asm-ia64/mmu_context.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/asm-ia64/mmu_context.h b/include/asm-ia64/mmu_context.h
index e3e5fededb04..ab60a6a26911 100644
--- a/include/asm-ia64/mmu_context.h
+++ b/include/asm-ia64/mmu_context.h
@@ -19,6 +19,7 @@
19 19
20#define ia64_rid(ctx,addr) (((ctx) << 3) | (addr >> 61)) 20#define ia64_rid(ctx,addr) (((ctx) << 3) | (addr >> 61))
21 21
22# include <asm/page.h>
22# ifndef __ASSEMBLY__ 23# ifndef __ASSEMBLY__
23 24
24#include <linux/compiler.h> 25#include <linux/compiler.h>
@@ -110,7 +111,7 @@ reload_context (mm_context_t context)
110 unsigned long rid_incr = 0; 111 unsigned long rid_incr = 0;
111 unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4; 112 unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
112 113
113 old_rr4 = ia64_get_rr(0x8000000000000000UL); 114 old_rr4 = ia64_get_rr(RGN_BASE(RGN_HPAGE));
114 rid = context << 3; /* make space for encoding the region number */ 115 rid = context << 3; /* make space for encoding the region number */
115 rid_incr = 1 << 8; 116 rid_incr = 1 << 8;
116 117
@@ -122,6 +123,10 @@ reload_context (mm_context_t context)
122 rr4 = rr0 + 4*rid_incr; 123 rr4 = rr0 + 4*rid_incr;
123#ifdef CONFIG_HUGETLB_PAGE 124#ifdef CONFIG_HUGETLB_PAGE
124 rr4 = (rr4 & (~(0xfcUL))) | (old_rr4 & 0xfc); 125 rr4 = (rr4 & (~(0xfcUL))) | (old_rr4 & 0xfc);
126
127# if RGN_HPAGE != 4
128# error "reload_context assumes RGN_HPAGE is 4"
129# endif
125#endif 130#endif
126 131
127 ia64_set_rr(0x0000000000000000UL, rr0); 132 ia64_set_rr(0x0000000000000000UL, rr0);