aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/init.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-11-20 00:30:26 -0500
committerPaul Mundt <lethal@linux-sh.org>2006-12-05 20:45:37 -0500
commit21440cf04a64cd1b1209c12a6e1a3afba2a28709 (patch)
tree9af7a89c4c711b8433b3b1e23e2ba0c95f82fbf7 /arch/sh/mm/init.c
parentb552c7e8bceae8a04ae79ecee6fa369c1ba4f8e4 (diff)
sh: Preliminary support for SH-X2 MMU.
This adds some preliminary support for the SH-X2 MMU, used by newer SH-4A parts (particularly SH7785). This MMU implements a 'compat' mode with SH-X MMUs and an 'extended' mode for SH-X2 extended features. Extended features include additional page sizes (8kB, 4MB, 64MB), as well as the addition of page execute permissions. The extended mode attributes are placed in a second data array, which requires us to switch to 64-bit PTEs when in X2 mode. With the addition of the exec perms, we also overhaul the mmap prots somewhat, now that it's possible to handle them more intelligently. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm/init.c')
-rw-r--r--arch/sh/mm/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 7154d1ce9785..8b275166f400 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -93,7 +93,7 @@ static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot)
93 pud = pud_offset(pgd, addr); 93 pud = pud_offset(pgd, addr);
94 if (pud_none(*pud)) { 94 if (pud_none(*pud)) {
95 pmd = (pmd_t *)get_zeroed_page(GFP_ATOMIC); 95 pmd = (pmd_t *)get_zeroed_page(GFP_ATOMIC);
96 set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE | _PAGE_USER)); 96 set_pud(pud, __pud(__pa(pmd) | _PAGE_TABLE));
97 if (pmd != pmd_offset(pud, 0)) { 97 if (pmd != pmd_offset(pud, 0)) {
98 pud_ERROR(*pud); 98 pud_ERROR(*pud);
99 return; 99 return;
@@ -103,7 +103,7 @@ static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot)
103 pmd = pmd_offset(pud, addr); 103 pmd = pmd_offset(pud, addr);
104 if (pmd_none(*pmd)) { 104 if (pmd_none(*pmd)) {
105 pte = (pte_t *)get_zeroed_page(GFP_ATOMIC); 105 pte = (pte_t *)get_zeroed_page(GFP_ATOMIC);
106 set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE | _PAGE_USER)); 106 set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE));
107 if (pte != pte_offset_kernel(pmd, 0)) { 107 if (pte != pte_offset_kernel(pmd, 0)) {
108 pmd_ERROR(*pmd); 108 pmd_ERROR(*pmd);
109 return; 109 return;