summaryrefslogtreecommitdiffstats
path: root/include/asm-sh/page.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-09-21 04:55:03 +0200
committerPaul Mundt <lethal@linux-sh.org>2007-09-21 04:57:55 +0200
commitd04a0f79f502a87bb17b147afc4b3e39e75275c3 (patch)
tree9fcd7244769316e22ce54e11bd0b80f544b30f90 /include/asm-sh/page.h
parentsh: Wire up URAM node on SH7785. (diff)
downloadlinux-d04a0f79f502a87bb17b147afc4b3e39e75275c3.tar.xz
linux-d04a0f79f502a87bb17b147afc4b3e39e75275c3.zip
sh: Fix up extended mode TLB for SH-X2+ cores.
The extended mode TLB requires both 64-bit PTEs and a 64-bit pgprot, correspondingly, the PGD also has to be 64-bits, so fix that up. The kernel and user permission bits really are decoupled in early cuts of the silicon, which means that we also have to set corresponding kernel permissions on user pages or we end up with user pages that the kernel simply can't touch (!). Finally, with those things corrected, really enable MMUCR.ME and correct the PTEA value (this simply needs to be the upper 32-bits of the PTE, with the size and protection bit encoding). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/page.h')
-rw-r--r--include/asm-sh/page.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h
index 48b718e7455c..cb3d46c59eab 100644
--- a/include/asm-sh/page.h
+++ b/include/asm-sh/page.h
@@ -88,6 +88,7 @@ extern void __copy_user_page(void *to, void *from, void *orig_to);
#ifdef CONFIG_X2TLB
typedef struct { unsigned long pte_low, pte_high; } pte_t;
typedef struct { unsigned long long pgprot; } pgprot_t;
+typedef struct { unsigned long long pgd; } pgd_t;
#define pte_val(x) \
((x).pte_low | ((unsigned long long)(x).pte_high << 32))
#define __pte(x) \
@@ -95,12 +96,11 @@ typedef struct { unsigned long long pgprot; } pgprot_t;
#else
typedef struct { unsigned long pte_low; } pte_t;
typedef struct { unsigned long pgprot; } pgprot_t;
+typedef struct { unsigned long pgd; } pgd_t;
#define pte_val(x) ((x).pte_low)
#define __pte(x) ((pte_t) { (x) } )
#endif
-typedef struct { unsigned long pgd; } pgd_t;
-
#define pgd_val(x) ((x).pgd)
#define pgprot_val(x) ((x).pgprot)