Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Dec 2007 17:35:59 -0800
From:      Xin LI <delphij@delphij.net>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        Frank Behrens <frank@pinky.sax.de>, cvs-src@FreeBSD.ORG, src-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/i386/i386 trap.c src/sys/amd64/amd64 trap.c
Message-ID:  <4756007F.7090706@delphij.net>
In-Reply-To: <20071204150053.GY83121@deviant.kiev.zoral.com.ua>
References:  <200712041233.lB4CX3E0041915@repoman.freebsd.org> <200712041436.lB4EafSA039456@post.frank-behrens.de> <20071204150053.GY83121@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------040106010705070008080704
Content-Type: text/plain; charset=GB2312
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Do anyone have objection for this?

Cheers,
- --
Xin LI <delphij@delphij.net>	http://www.delphij.net/
FreeBSD - The Power to Serve!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHVgB+hcUczkLqiksRAjkIAKDeOcPFqjNHCl8eMfML5z/m0frekQCeNpEd
mw3CclAX/cLBx2H0LAUlN6c=
=5/eg
-----END PGP SIGNATURE-----

--------------040106010705070008080704
Content-Type: text/x-patch;
 name="trap-onlycompat.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="trap-onlycompat.diff"

Index: i386/i386/trap.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/i386/trap.c,v
retrieving revision 1.310
diff -u -p -u -r1.310 trap.c
--- i386/i386/trap.c	4 Dec 2007 12:33:02 -0000	1.310
+++ i386/i386/trap.c	5 Dec 2007 01:31:19 -0000
@@ -158,9 +158,11 @@ SYSCTL_INT(_machdep, OID_AUTO, kdb_on_nm
 static int panic_on_nmi = 1;
 SYSCTL_INT(_machdep, OID_AUTO, panic_on_nmi, CTLFLAG_RW,
 	&panic_on_nmi, 0, "Panic on NMI");
+#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || defined(COMPAT_FREEBSD6)
 static int prot_fault_translation = 0;
 SYSCTL_INT(_machdep, OID_AUTO, prot_fault_translation, CTLFLAG_RW,
 	&prot_fault_translation, 0, "Select signal to deliver on protection fault");
+#endif
 
 extern char *syscallnames[];
 
@@ -378,6 +380,7 @@ trap(struct trapframe *frame)
 			if (i == SIGSEGV)
 				ucode = SEGV_MAPERR;
 			else {
+#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || defined(COMPAT_FREEBSD6)
 				if (prot_fault_translation == 0) {
 					/*
 					 * Autodetect.
@@ -397,7 +400,9 @@ trap(struct trapframe *frame)
 					 */
 					i = SIGBUS;
 					ucode = BUS_PAGE_FAULT;
-				} else {
+				} else
+#endif
+				{
 					/*
 					 * Always SIGSEGV mode.
 					 */
Index: amd64/amd64/trap.c
===================================================================
RCS file: /home/ncvs/src/sys/amd64/amd64/trap.c,v
retrieving revision 1.323
diff -u -p -u -r1.323 trap.c
--- amd64/amd64/trap.c	4 Dec 2007 12:33:03 -0000	1.323
+++ amd64/amd64/trap.c	5 Dec 2007 01:33:13 -0000
@@ -144,9 +144,11 @@ SYSCTL_INT(_machdep, OID_AUTO, kdb_on_nm
 static int panic_on_nmi = 1;
 SYSCTL_INT(_machdep, OID_AUTO, panic_on_nmi, CTLFLAG_RW,
 	&panic_on_nmi, 0, "Panic on NMI");
+#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || defined(COMPAT_FREEBSD6)
 static int prot_fault_translation = 0;
 SYSCTL_INT(_machdep, OID_AUTO, prot_fault_translation, CTLFLAG_RW,
 	&prot_fault_translation, 0, "Select signal to deliver on protection fault");
+#endif
 
 extern char *syscallnames[];
 
@@ -315,6 +317,7 @@ trap(struct trapframe *frame)
 			if (i == SIGSEGV)
 				ucode = SEGV_MAPERR;
 			else {
+#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || defined(COMPAT_FREEBSD6)
 				if (prot_fault_translation == 0) {
 					/*
 					 * Autodetect.
@@ -334,7 +337,9 @@ trap(struct trapframe *frame)
 					 */
 					i = SIGBUS;
 					ucode = BUS_PAGE_FAULT;
-				} else {
+				} else
+#endif
+				{
 					/*
 					 * Always SIGSEGV mode.
 					 */

--------------040106010705070008080704--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4756007F.7090706>