From owner-cvs-src@FreeBSD.ORG Wed Dec 5 01:36:09 2007 Return-Path: Delivered-To: cvs-src@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B871E16A417; Wed, 5 Dec 2007 01:36:09 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.freebsd.org (Postfix) with ESMTP id 2B9E613C4DB; Wed, 5 Dec 2007 01:36:09 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id 488A4EC3971; Wed, 5 Dec 2007 09:36:44 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id 2C4IPwsS2qkn; Wed, 5 Dec 2007 09:36:38 +0800 (CST) Received: from charlie.delphij.net (71.5.7.139.ptr.us.xo.net [71.5.7.139]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 382F2EB3A8D; Wed, 5 Dec 2007 09:36:37 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:content-type; b=iot2EySkqSZYJ9nmnMhdzaUTtdensY7essjiyRm885vEHzohR8vtRqhfExFr8C/rl TUv6Ty1Omh8okJiZSPstQ== Message-ID: <4756007F.7090706@delphij.net> Date: Tue, 04 Dec 2007 17:35:59 -0800 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Kostik Belousov References: <200712041233.lB4CX3E0041915@repoman.freebsd.org> <200712041436.lB4EafSA039456@post.frank-behrens.de> <20071204150053.GY83121@deviant.kiev.zoral.com.ua> In-Reply-To: <20071204150053.GY83121@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 0.95.5 Content-Type: multipart/mixed; boundary="------------040106010705070008080704" Cc: Frank Behrens , 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 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Dec 2007 01:36:09 -0000 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 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--