diff options
author | Peter Chubb <peterc@gelato.unsw.edu.au> | 2005-08-16 22:54:00 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-08-24 18:35:41 -0400 |
commit | 0a41e2501160587eb8f66cef3bdf1c6f2cb86997 (patch) | |
tree | 9f5b0288c3101344acd22f7e901fe909a8f98df6 /arch/ia64 | |
parent | 0572e3da3ff5c3744b2f606ecf296d5f89a4bbdf (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 'arch/ia64')
-rw-r--r-- | arch/ia64/kernel/sys_ia64.c | 2 | ||||
-rw-r--r-- | arch/ia64/mm/hugetlbpage.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c index 770fab37928e..f2dbcd1db0d4 100644 --- a/arch/ia64/kernel/sys_ia64.c +++ b/arch/ia64/kernel/sys_ia64.c | |||
@@ -35,7 +35,7 @@ arch_get_unmapped_area (struct file *filp, unsigned long addr, unsigned long len | |||
35 | return -ENOMEM; | 35 | return -ENOMEM; |
36 | 36 | ||
37 | #ifdef CONFIG_HUGETLB_PAGE | 37 | #ifdef CONFIG_HUGETLB_PAGE |
38 | if (REGION_NUMBER(addr) == REGION_HPAGE) | 38 | if (REGION_NUMBER(addr) == RGN_HPAGE) |
39 | addr = 0; | 39 | addr = 0; |
40 | #endif | 40 | #endif |
41 | if (!addr) | 41 | if (!addr) |
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index e0a776a3044c..2d13889d0a99 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c | |||
@@ -76,7 +76,7 @@ int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | |||
76 | return -EINVAL; | 76 | return -EINVAL; |
77 | if (addr & ~HPAGE_MASK) | 77 | if (addr & ~HPAGE_MASK) |
78 | return -EINVAL; | 78 | return -EINVAL; |
79 | if (REGION_NUMBER(addr) != REGION_HPAGE) | 79 | if (REGION_NUMBER(addr) != RGN_HPAGE) |
80 | return -EINVAL; | 80 | return -EINVAL; |
81 | 81 | ||
82 | return 0; | 82 | return 0; |
@@ -87,7 +87,7 @@ struct page *follow_huge_addr(struct mm_struct *mm, unsigned long addr, int writ | |||
87 | struct page *page; | 87 | struct page *page; |
88 | pte_t *ptep; | 88 | pte_t *ptep; |
89 | 89 | ||
90 | if (REGION_NUMBER(addr) != REGION_HPAGE) | 90 | if (REGION_NUMBER(addr) != RGN_HPAGE) |
91 | return ERR_PTR(-EINVAL); | 91 | return ERR_PTR(-EINVAL); |
92 | 92 | ||
93 | ptep = huge_pte_offset(mm, addr); | 93 | ptep = huge_pte_offset(mm, addr); |
@@ -142,8 +142,8 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, u | |||
142 | return -ENOMEM; | 142 | return -ENOMEM; |
143 | if (len & ~HPAGE_MASK) | 143 | if (len & ~HPAGE_MASK) |
144 | return -EINVAL; | 144 | return -EINVAL; |
145 | /* This code assumes that REGION_HPAGE != 0. */ | 145 | /* This code assumes that RGN_HPAGE != 0. */ |
146 | if ((REGION_NUMBER(addr) != REGION_HPAGE) || (addr & (HPAGE_SIZE - 1))) | 146 | if ((REGION_NUMBER(addr) != RGN_HPAGE) || (addr & (HPAGE_SIZE - 1))) |
147 | addr = HPAGE_REGION_BASE; | 147 | addr = HPAGE_REGION_BASE; |
148 | else | 148 | else |
149 | addr = ALIGN(addr, HPAGE_SIZE); | 149 | addr = ALIGN(addr, HPAGE_SIZE); |