lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090520182512.B53B8D2E@kernel>
Date:	Wed, 20 May 2009 11:25:12 -0700
From:	Dave Hansen <dave@...ux.vnet.ibm.com>
To:	linux-arch@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, Dave Hansen <dave@...ux.vnet.ibm.com>
Subject: [RFC v2][PATCH 17/35] sparc: create ptemap.h



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

 linux-2.6.git-dave/arch/sparc/include/asm/pgtable_32.h |   10 -------
 linux-2.6.git-dave/arch/sparc/include/asm/pgtable_64.h |    5 ---
 linux-2.6.git-dave/arch/sparc/include/asm/ptemap.h     |   24 +++++++++++++++++
 3 files changed, 26 insertions(+), 13 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-05-02 14:39:54.000000000 -0700
+++ linux-2.6.git-dave/arch/sparc/include/asm/pgtable_32.h	2009-05-02 14:40:38.000000000 -0700
@@ -300,15 +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)
+#include <asm/ptemap.h>
 
 /* Certain architectures need to do special things when pte's
  * within a page table are directly modified.  Thus, the following
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-05-02 14:39:54.000000000 -0700
+++ linux-2.6.git-dave/arch/sparc/include/asm/pgtable_64.h	2009-05-02 14:39:54.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-05-02 14:41:35.000000000 -0700
@@ -0,0 +1,24 @@
+#ifndef _SPARC_ASM_PTEMAP_H
+#define _SPARC_ASM_PTEMAP_H
+
+#if defined(__sparc__) && defined(__arch64__)
+
+#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 */
_
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ