lkml.org 
[lkml]   [2009]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[RFC][PATCH 17/35] sparc: create ptemap.h
From
Date


Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
---

linux-2.6.git-dave/arch/sparc/include/asm/pgtable_32.h | 15 --------
linux-2.6.git-dave/arch/sparc/include/asm/pgtable_64.h | 5 --
linux-2.6.git-dave/arch/sparc/include/asm/ptemap.h | 29 +++++++++++++++++
3 files changed, 31 insertions(+), 18 deletions(-)

diff -puN arch/sparc/include/asm/pgtable_32.h~sparc-ptemaph arch/sparc/include/asm/pgtable_32.h
--- linux-2.6.git/arch/sparc/include/asm/pgtable_32.h~sparc-ptemaph 2009-04-30 15:11:02.000000000 -0700
+++ linux-2.6.git-dave/arch/sparc/include/asm/pgtable_32.h 2009-04-30 15:11:02.000000000 -0700
@@ -300,20 +300,7 @@ BTFIXUPDEF_CALL(pmd_t *, pmd_offset, pgd
BTFIXUPDEF_CALL(pte_t *, pte_offset_kernel, pmd_t *, unsigned long)
#define pte_offset_kernel(dir,addr) BTFIXUP_CALL(pte_offset_kernel)(dir,addr)

-/*
- * This shortcut works on sun4m (and sun4d) because the nocache area is static,
- * and sun4c is guaranteed to have no highmem anyway.
- */
-#define pte_offset_map(d, a) pte_offset_kernel(d,a)
-#define pte_offset_map_nested(d, a) pte_offset_kernel(d,a)
-
-#define pte_unmap(pte) do{}while(0)
-#define pte_unmap_nested(pte) do{}while(0)
-
-/* Certain architectures need to do special things when pte's
- * within a page table are directly modified. Thus, the following
- * hook is made available.
- */
+#include <asm/ptemap.h>

BTFIXUPDEF_CALL(void, set_pte, pte_t *, pte_t)

diff -puN arch/sparc/include/asm/pgtable_64.h~sparc-ptemaph arch/sparc/include/asm/pgtable_64.h
--- linux-2.6.git/arch/sparc/include/asm/pgtable_64.h~sparc-ptemaph 2009-04-30 15:11:02.000000000 -0700
+++ linux-2.6.git-dave/arch/sparc/include/asm/pgtable_64.h 2009-04-30 15:11:02.000000000 -0700
@@ -652,10 +652,7 @@ static inline int pte_special(pte_t pte)
/* Find an entry in the third-level page table.. */
#define pte_offset_kernel(dir, address) \
((pte_t *)pmd_page_vaddr(*(dir)) + pte_index(address))
-#define pte_offset_map(dir, address) pte_offset_kernel((dir), (address))
-#define pte_offset_map_nested(dir, address) pte_offset_kernel((dir), (address))
-#define pte_unmap(pte) do { } while (0)
-#define pte_unmap_nested(pte) do { } while (0)
+#include <asm/ptemap.h>

/* Actual page table PTE updates. */
extern void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, pte_t *ptep, pte_t orig);
diff -puN /dev/null arch/sparc/include/asm/ptemap.h
--- /dev/null 2008-09-02 09:40:19.000000000 -0700
+++ linux-2.6.git-dave/arch/sparc/include/asm/ptemap.h 2009-04-30 15:11:02.000000000 -0700
@@ -0,0 +1,29 @@
+#ifndef _SPARC_ASM_PTEMAP_H
+#define _SPARC_ASM_PTEMAP_H
+
+#if defined(__sparc__) && defined(__arch64__)
+
+/* Certain architectures need to do special things when pte's
+ * within a page table are directly modified. Thus, the following
+ * hook is made available.
+ */
+
+#define pte_offset_map(dir, address) pte_offset_kernel((dir), (address))
+#define pte_offset_map_nested(dir, address) pte_offset_kernel((dir), (address))
+#define pte_unmap(pte) do { } while (0)
+#define pte_unmap_nested(pte) do { } while (0)
+
+#else
+
+ * This shortcut works on sun4m (and sun4d) because the nocache area is static,
+ * and sun4c is guaranteed to have no highmem anyway.
+ */
+#define pte_offset_map(d, a) pte_offset_kernel(d,a)
+#define pte_offset_map_nested(d, a) pte_offset_kernel(d,a)
+
+#define pte_unmap(pte) do{}while(0)
+#define pte_unmap_nested(pte) do{}while(0)
+
+#endif
+
+#endif /* _SPARC_ASM_PTEMAP_H *//*
_

\
 
 \ /
  Last update: 2009-05-01 16:51    [W:0.142 / U:0.692 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site