Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch x86 Move VA_SIGN_POS/NEG to machine/pte.h.



details:   https://anonhg.NetBSD.org/src/rev/3a1aaadccf27
branches:  trunk
changeset: 369546:3a1aaadccf27
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Aug 21 09:12:43 2022 +0000

description:
x86 Move VA_SIGN_POS/NEG to machine/pte.h.

It's used by pl[1-4]_pi, also defined in machine/pte.h, and used in
libkvm without pmap_private.h.

diffstat:

 sys/arch/amd64/include/pmap_private.h |  10 +---------
 sys/arch/amd64/include/pte.h          |  10 +++++++++-
 sys/arch/i386/include/pmap_private.h  |  12 +-----------
 sys/arch/i386/include/pte.h           |  12 +++++++++++-
 4 files changed, 22 insertions(+), 22 deletions(-)

diffs (100 lines):

diff -r 02682046aeca -r 3a1aaadccf27 sys/arch/amd64/include/pmap_private.h
--- a/sys/arch/amd64/include/pmap_private.h     Sun Aug 21 07:57:50 2022 +0000
+++ b/sys/arch/amd64/include/pmap_private.h     Sun Aug 21 09:12:43 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap_private.h,v 1.3 2022/08/20 23:49:48 riastradh Exp $       */
+/*     $NetBSD: pmap_private.h,v 1.4 2022/08/21 09:12:43 riastradh Exp $       */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -86,14 +86,6 @@
 #include <xen/xenpmap.h>
 #endif
 
-/*
- * Mask to get rid of the sign-extended part of addresses.
- */
-#define VA_SIGN_MASK           0xffff000000000000
-#define VA_SIGN_NEG(va)                ((va) | VA_SIGN_MASK)
-/* XXXfvdl this one's not right. */
-#define VA_SIGN_POS(va)                ((va) & ~VA_SIGN_MASK)
-
 #ifdef KASAN
 #define L4_SLOT_KASAN          256
 #define NL4_SLOT_KASAN         32
diff -r 02682046aeca -r 3a1aaadccf27 sys/arch/amd64/include/pte.h
--- a/sys/arch/amd64/include/pte.h      Sun Aug 21 07:57:50 2022 +0000
+++ b/sys/arch/amd64/include/pte.h      Sun Aug 21 09:12:43 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pte.h,v 1.16 2022/08/20 23:19:08 riastradh Exp $       */
+/*     $NetBSD: pte.h,v 1.17 2022/08/21 09:12:43 riastradh Exp $       */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -74,6 +74,14 @@
 #endif
 
 /*
+ * Mask to get rid of the sign-extended part of addresses.
+ */
+#define VA_SIGN_MASK           0xffff000000000000
+#define VA_SIGN_NEG(va)                ((va) | VA_SIGN_MASK)
+/* XXXfvdl this one's not right. */
+#define VA_SIGN_POS(va)                ((va) & ~VA_SIGN_MASK)
+
+/*
  * Now we define various constants for playing with virtual addresses.
  */
 #define L1_SHIFT       12
diff -r 02682046aeca -r 3a1aaadccf27 sys/arch/i386/include/pmap_private.h
--- a/sys/arch/i386/include/pmap_private.h      Sun Aug 21 07:57:50 2022 +0000
+++ b/sys/arch/i386/include/pmap_private.h      Sun Aug 21 09:12:43 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap_private.h,v 1.3 2022/08/20 23:49:48 riastradh Exp $       */
+/*     $NetBSD: pmap_private.h,v 1.4 2022/08/21 09:12:43 riastradh Exp $       */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -204,16 +204,6 @@
  */
 
 /*
- * Mask to get rid of the sign-extended part of addresses.
- */
-#define VA_SIGN_MASK           0
-#define VA_SIGN_NEG(va)                ((va) | VA_SIGN_MASK)
-/*
- * XXXfvdl this one's not right.
- */
-#define VA_SIGN_POS(va)                ((va) & ~VA_SIGN_MASK)
-
-/*
  * the following defines give the virtual addresses of various MMU
  * data structures:
  * PTE_BASE: the base VA of the linear PTE mappings
diff -r 02682046aeca -r 3a1aaadccf27 sys/arch/i386/include/pte.h
--- a/sys/arch/i386/include/pte.h       Sun Aug 21 07:57:50 2022 +0000
+++ b/sys/arch/i386/include/pte.h       Sun Aug 21 09:12:43 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pte.h,v 1.35 2022/08/20 23:19:08 riastradh Exp $       */
+/*     $NetBSD: pte.h,v 1.36 2022/08/21 09:12:43 riastradh Exp $       */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -97,6 +97,16 @@
 
 #endif
 
+/*
+ * Mask to get rid of the sign-extended part of addresses.
+ */
+#define VA_SIGN_MASK           0
+#define VA_SIGN_NEG(va)                ((va) | VA_SIGN_MASK)
+/*
+ * XXXfvdl this one's not right.
+ */
+#define VA_SIGN_POS(va)                ((va) & ~VA_SIGN_MASK)
+
 #ifdef PAE
 #define L1_SHIFT       12
 #define L2_SHIFT       21



Home | Main Index | Thread Index | Old Index