From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 03:18:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C09E2106566B; Sun, 11 Jul 2010 03:18:39 +0000 (UTC) (envelope-from pali.gabor@googlemail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 285298FC1D; Sun, 11 Jul 2010 03:18:38 +0000 (UTC) Received: by fxm13 with SMTP id 13so1935549fxm.13 for ; Sat, 10 Jul 2010 20:18:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=8IPtOyNBl/OGR3dedWXxmDFAd+sm06/TkMsU5jQF3dw=; b=G8o42A4OnQ27cmpjCFRRs7FnckuFwwbhAjtiKyraZzugMvJH6MmqtVYQ3qeXX0DYal 9oQ5oiRBsHletr9O2z8/8CVAwUj9hpjT2TjLiGd0am7Nnp6FnohO7lrDz8U7a68CVVwf 1wPHf+RLcPg+80IGqQtDBSfNBeJGrtURKqShk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=A7I612/gu8HwX47eZGpmm38Pkp2ey0NKJI/F4gBx25X5NMd1CHYPtEP1aUmzrzRX6d cJjzdnIpFba+nH9o2gxKIf/Am1iJfT2sbPUe4ldQu4ecyiqzBziYnNoI5OKCyLaIqiEt IIGMUhqybwi2AYcmlpPT0aMjIn6/gM3tGURYM= MIME-Version: 1.0 Received: by 10.223.114.194 with SMTP id f2mr9931031faq.95.1278818317968; Sat, 10 Jul 2010 20:18:37 -0700 (PDT) Sender: pali.gabor@googlemail.com Received: by 10.223.114.77 with HTTP; Sat, 10 Jul 2010 20:18:37 -0700 (PDT) In-Reply-To: <4A28A601-C87F-47C6-8CBE-5F1BF866CA4A@FreeBSD.org> References: <4C376B0E.9050505@FreeBSD.org> <4C37713D.5060202@FreeBSD.org> <4A28A601-C87F-47C6-8CBE-5F1BF866CA4A@FreeBSD.org> Date: Sun, 11 Jul 2010 05:18:37 +0200 X-Google-Sender-Auth: c-FtqU4MwXjA3DuXVKpnNxfWOMI Message-ID: From: Gabor PALI To: "Robert N. M. Watson" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org Subject: Re: svn commit: r209119 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 03:18:39 -0000 On Sat, Jul 10, 2010 at 5:24 PM, Robert N. M. Watson wrote: > If we can do it in one atomic in the common case, and two atomics in an e= dge case, that sounds fine. I think any use of locking(9) would be sufficie= ntly costly as to not be worth the improvements in consistency, given the f= requency of statistics operations. I have tried to use atomic operations for counting (without locking(9)), but they turned out to be significantly slower than the naive case indeed. If consistency is not so important for statistics, whether would it be safe to simply use 64-bit variables for counters everywhere on all architectures? :g From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 05:13:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 769FB106566C; Sun, 11 Jul 2010 05:13:38 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 654438FC16; Sun, 11 Jul 2010 05:13:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6B5Dcqm079814; Sun, 11 Jul 2010 05:13:38 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6B5DcqP079812; Sun, 11 Jul 2010 05:13:38 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007110513.o6B5DcqP079812@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 11 Jul 2010 05:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209893 - in head/lib/libthr/arch/powerpc64: include powerpc powerpc64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 05:13:38 -0000 Author: nwhitehorn Date: Sun Jul 11 05:13:38 2010 New Revision: 209893 URL: http://svn.freebsd.org/changeset/base/209893 Log: Fix SVN mismerge. We somehow ended up with the 32-bit powerpc version in arch/powerpc64 instead of the 64-bit one. Added: head/lib/libthr/arch/powerpc64/powerpc64/ - copied from r209890, head/lib/libthr/arch/powerpc64/powerpc/ Deleted: head/lib/libthr/arch/powerpc64/powerpc/ Modified: head/lib/libthr/arch/powerpc64/include/pthread_md.h Modified: head/lib/libthr/arch/powerpc64/include/pthread_md.h ============================================================================== --- head/lib/libthr/arch/powerpc64/include/pthread_md.h Sat Jul 10 22:37:23 2010 (r209892) +++ head/lib/libthr/arch/powerpc64/include/pthread_md.h Sun Jul 11 05:13:38 2010 (r209893) @@ -39,12 +39,12 @@ #define CPU_SPINWAIT #define DTV_OFFSET offsetof(struct tcb, tcb_dtv) -#define TP_OFFSET 0x7008 +#define TP_OFFSET 0x7010 /* * Variant I tcb. The structure layout is fixed, don't blindly * change it. - * %r2 points to end of the structure. + * %r13 points to end of the structure. */ struct tcb { void *tcb_dtv; @@ -57,7 +57,7 @@ void _tcb_dtor(struct tcb *); static __inline void _tcb_set(struct tcb *tcb) { - register uint8_t *_tp __asm__("%r2"); + register uint8_t *_tp __asm__("%r13"); __asm __volatile("mr %0,%1" : "=r"(_tp) : "r"((uint8_t *)tcb + TP_OFFSET)); @@ -66,7 +66,7 @@ _tcb_set(struct tcb *tcb) static __inline struct tcb * _tcb_get(void) { - register uint8_t *_tp __asm__("%r2"); + register uint8_t *_tp __asm__("%r13"); return ((struct tcb *)(_tp - TP_OFFSET)); } From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 08:25:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5A0D106564A; Sun, 11 Jul 2010 08:24:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 7C98F8FC13; Sun, 11 Jul 2010 08:24:59 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o6B8OsjF064645 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Jul 2010 11:24:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o6B8Os9j075958; Sun, 11 Jul 2010 11:24:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o6B8OseC075957; Sun, 11 Jul 2010 11:24:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 11 Jul 2010 11:24:54 +0300 From: Kostik Belousov To: Lawrence Stewart Message-ID: <20100711082454.GN2408@deviant.kiev.zoral.com.ua> References: <201006130239.o5D2du3m086332@svn.freebsd.org> <20100613101025.GD1320@garage.freebsd.pl> <4C158B71.205@freebsd.org> <20100614085205.GD13238@deviant.kiev.zoral.com.ua> <4C1605A7.2000202@freebsd.org> <20100614104349.GF13238@deviant.kiev.zoral.com.ua> <4C198A90.3060905@freebsd.org> <20100617071300.GX13238@deviant.kiev.zoral.com.ua> <4C1AD292.5070508@freebsd.org> <4C369172.4020700@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dPW7zu3hTOhZvCDO" Content-Disposition: inline In-Reply-To: <4C369172.4020700@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209119 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 08:25:00 -0000 --dPW7zu3hTOhZvCDO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 09, 2010 at 01:03:14PM +1000, Lawrence Stewart wrote: > On 06/18/10 11:57, Lawrence Stewart wrote: > > On 06/17/10 17:13, Kostik Belousov wrote: > >> On Thu, Jun 17, 2010 at 12:38:08PM +1000, Lawrence Stewart wrote: > >>> On 06/14/10 20:43, Kostik Belousov wrote: > > [snip] > >>>> Or, you could ditch the sum at all, indeed using ({}) and returning = the > >>>> result. __typeof is your friend to select proper type of accumulator. > >>> > >>> So, something like this? > >>> > >>> #define DPCPU_SUM(n, var) __extension__ = \ > >>> ({ = \ > >>> u_int > >>> _i; \ > >>> __typeof((DPCPU_PTR(n))->var) > >>> sum; \ > >>> = =20 > >>> \ > >>> sum =3D > >>> 0; \ > >>> CPU_FOREACH(_i) > >>> { \ > >>> sum +=3D (DPCPU_ID_PTR(_i, > >>> n))->var; \ > >>> =20 > >>> } \ > >>> =20 > >>> sum; \ > >>> }) > >>> > >>> Which can be used like this: > >>> > >>> totalss.n_in =3D DPCPU_SUM(ss, n_in); >=20 > [snip] >=20 > > I'll commit the above version of the macro this evening (GMT+10) unless > > I hear any objections. Thanks to all of you for your input. >=20 > Any objections to the following patch going in as a follow up to the > above discussion? >=20 > http://people.freebsd.org/~lstewart/patches/tcp_ffcaia2008/dpcpu_zeromemb= er_9.x.r209745.patch >=20 > Turns out I need DPCPU_ZERO to fix a bug in SIFTR and it occurred to me > that providing variants of the macros which work on the DPCPU variable > itself or a member of a DPCPU struct makes good sense. The new patch > therefore renames my original DPCPU_SUM to DPCPU_MEMBERSUM and includes > DPCPU_MEMBERZERO(). >=20 > Also open to suggestions on a sensible shortening of MEMBER or other > appropriate and descriptive indicator to reduce the macro name lengths. > MBR implies some sort of memory barrier... any other ideas? I suggest changing MEMBER to VAR. Are the macros only believed to be useful, or you already use them ? For the usual reasons, it seems to be better to wrap DCPU_ZERO into do/while (0). --dPW7zu3hTOhZvCDO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkw5f9YACgkQC3+MBN1Mb4h4/ACfagFoqk7I2yAkvp+gu3jGvP0Z HJEAoM+1XFk8J2pHN+29u/mQEtDBdD5p =ZeY9 -----END PGP SIGNATURE----- --dPW7zu3hTOhZvCDO-- From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 09:27:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2563106564A; Sun, 11 Jul 2010 09:27:06 +0000 (UTC) (envelope-from rwatson@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9B1FA8FC12; Sun, 11 Jul 2010 09:27:06 +0000 (UTC) Received: from [192.168.2.105] (host86-162-156-210.range86-162.btcentralplus.com [86.162.156.210]) by cyrus.watson.org (Postfix) with ESMTPSA id BE7C846B06; Sun, 11 Jul 2010 05:27:05 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: "Robert N. M. Watson" In-Reply-To: Date: Sun, 11 Jul 2010 10:27:03 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <001126CD-F68F-46A3-90CE-CA2BE6E36B8E@freebsd.org> References: <4C376B0E.9050505@FreeBSD.org> <4C37713D.5060202@FreeBSD.org> <4A28A601-C87F-47C6-8CBE-5F1BF866CA4A@FreeBSD.org> To: Gabor PALI X-Mailer: Apple Mail (2.1081) Cc: svn-src-head@freebsd.org Subject: Re: svn commit: r209119 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 09:27:06 -0000 On 11 Jul 2010, at 04:18, Gabor PALI wrote: > On Sat, Jul 10, 2010 at 5:24 PM, Robert N. M. Watson > wrote: >> If we can do it in one atomic in the common case, and two atomics in = an edge case, that sounds fine. I think any use of locking(9) would be = sufficiently costly as to not be worth the improvements in consistency, = given the frequency of statistics operations. >=20 > I have tried to use atomic operations for counting (without > locking(9)), but they turned out to be significantly slower than the > naive case indeed. If consistency is not so important for statistics, > whether would it be safe to simply use 64-bit variables for counters > everywhere on all architectures? I think the worry comes down to: an occasional missed packet is OK, but = a duplicated carry(for example) from the lower 32 bits to the upper 32 = bits would put the counter off by 4 billion, which is not really = acceptable. What sort of measurement did you do to show the speed loss, BTW? Robert From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 13:04:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A451F106566C; Sun, 11 Jul 2010 13:04:23 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 31D548FC0C; Sun, 11 Jul 2010 13:04:23 +0000 (UTC) Received: from lawrence1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id 278DE7E84A; Sun, 11 Jul 2010 23:04:21 +1000 (EST) Message-ID: <4C39C154.7090706@freebsd.org> Date: Sun, 11 Jul 2010 23:04:20 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-AU; rv:1.9.1.10) Gecko/20100704 Thunderbird/3.0.5 MIME-Version: 1.0 To: Kostik Belousov References: <201006130239.o5D2du3m086332@svn.freebsd.org> <20100613101025.GD1320@garage.freebsd.pl> <4C158B71.205@freebsd.org> <20100614085205.GD13238@deviant.kiev.zoral.com.ua> <4C1605A7.2000202@freebsd.org> <20100614104349.GF13238@deviant.kiev.zoral.com.ua> <4C198A90.3060905@freebsd.org> <20100617071300.GX13238@deviant.kiev.zoral.com.ua> <4C1AD292.5070508@freebsd.org> <4C369172.4020700@freebsd.org> <20100711082454.GN2408@deviant.kiev.zoral.com.ua> In-Reply-To: <20100711082454.GN2408@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209119 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 13:04:23 -0000 On 07/11/10 18:24, Kostik Belousov wrote: > On Fri, Jul 09, 2010 at 01:03:14PM +1000, Lawrence Stewart wrote: >> On 06/18/10 11:57, Lawrence Stewart wrote: >>> On 06/17/10 17:13, Kostik Belousov wrote: >>>> On Thu, Jun 17, 2010 at 12:38:08PM +1000, Lawrence Stewart wrote: >>>>> On 06/14/10 20:43, Kostik Belousov wrote: >>> [snip] >>>>>> Or, you could ditch the sum at all, indeed using ({}) and returning the >>>>>> result. __typeof is your friend to select proper type of accumulator. >>>>> >>>>> So, something like this? >>>>> >>>>> #define DPCPU_SUM(n, var) __extension__ \ >>>>> ({ \ >>>>> u_int >>>>> _i; \ >>>>> __typeof((DPCPU_PTR(n))->var) >>>>> sum; \ >>>>> >>>>> \ >>>>> sum = >>>>> 0; \ >>>>> CPU_FOREACH(_i) >>>>> { \ >>>>> sum += (DPCPU_ID_PTR(_i, >>>>> n))->var; \ >>>>> >>>>> } \ >>>>> >>>>> sum; \ >>>>> }) >>>>> >>>>> Which can be used like this: >>>>> >>>>> totalss.n_in = DPCPU_SUM(ss, n_in); >> >> [snip] >> >>> I'll commit the above version of the macro this evening (GMT+10) unless >>> I hear any objections. Thanks to all of you for your input. >> >> Any objections to the following patch going in as a follow up to the >> above discussion? >> >> http://people.freebsd.org/~lstewart/patches/tcp_ffcaia2008/dpcpu_zeromember_9.x.r209745.patch >> >> Turns out I need DPCPU_ZERO to fix a bug in SIFTR and it occurred to me >> that providing variants of the macros which work on the DPCPU variable >> itself or a member of a DPCPU struct makes good sense. The new patch >> therefore renames my original DPCPU_SUM to DPCPU_MEMBERSUM and includes >> DPCPU_MEMBERZERO(). >> >> Also open to suggestions on a sensible shortening of MEMBER or other >> appropriate and descriptive indicator to reduce the macro name lengths. >> MBR implies some sort of memory barrier... any other ideas? > > I suggest changing MEMBER to VAR. I'd be happy with that. If I don't get a better suggestion or an objection I'll go with DPCPU_VARZERO and DPCPU_VARSUM. Thanks for the input. > Are the macros only believed to be useful, or you already use them ? DPCPU_ZERO and DPCPU_MEMBERSUM I have an immediate use for in the SIFTR code. I don't have an immediate use for DPCPU_MEMBERZERO and DPCPU_SUM, but I can imagine they will both find use once people start converting stats counters and various other kernel data to DPCPU. > For the usual reasons, it seems to be better to wrap DCPU_ZERO > into do/while (0). Oops, good point. Will do. Cheers, Lawrence From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 15:03:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BC97106566B; Sun, 11 Jul 2010 15:03:01 +0000 (UTC) (envelope-from pali.gabor@googlemail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id C04E08FC14; Sun, 11 Jul 2010 15:03:00 +0000 (UTC) Received: by fxm13 with SMTP id 13so2079221fxm.13 for ; Sun, 11 Jul 2010 08:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=tWs2JGFOb8waicDA/ehwuacr9dVZgiyxk+B8VD0oUxw=; b=iuoySgQro7rxt3HKUQ7zzpNZQPorpaJe61RR+4YDduffsrQKpTU6xCgVVEiChBYXol V0Ql0z+h3E7ER6aGCMcU3DPyRIhu3D6jahQq1dmEwwxiHrDWdDFkC6HtLeNCIfIJQhVk iFqT2CNWVIwzBQJqytdNrnIS2quuyBCO4NgEc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=OsaLpf4oanwYgcqfGypfSQ2hd4YtTd4yYvowKOSR+l9J1fgxm8Ntr0VUs5KN5SLJOn 77CB2xcisEWLymLeZdFnw2lNRgRxMuto4cpbzOjZYYngQi1XNziZ/NDrfw1+pW9hLW3A Iol6Detou4wVEzcEkGaWmJ4vOZ9/2dlgFVz3c= MIME-Version: 1.0 Received: by 10.86.27.5 with SMTP id a5mr8385260fga.32.1278860579658; Sun, 11 Jul 2010 08:02:59 -0700 (PDT) Sender: pali.gabor@googlemail.com Received: by 10.223.114.77 with HTTP; Sun, 11 Jul 2010 08:02:59 -0700 (PDT) In-Reply-To: <001126CD-F68F-46A3-90CE-CA2BE6E36B8E@freebsd.org> References: <4C376B0E.9050505@FreeBSD.org> <4C37713D.5060202@FreeBSD.org> <4A28A601-C87F-47C6-8CBE-5F1BF866CA4A@FreeBSD.org> <001126CD-F68F-46A3-90CE-CA2BE6E36B8E@freebsd.org> Date: Sun, 11 Jul 2010 17:02:59 +0200 X-Google-Sender-Auth: 5SRMEJcDJBGhSHHilNlBmnfA9DU Message-ID: From: Gabor PALI To: "Robert N. M. Watson" Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org Subject: Re: svn commit: r209119 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 15:03:01 -0000 On Sun, Jul 11, 2010 at 11:27 AM, Robert N. M. Watson wrote: > [..] a duplicated carry(for example) [..] is not really acceptable. I see. It would be nice to model such extreme cases somehow, so we could test them against different solutions. > What sort of measurement did you do to show the speed loss, BTW? Here is my test code [1]. Feel free to comment on it and/or suggest improvements, fixes :) :g [1] http://people.freebsd.org/~pgj/patches/2010/07/11/counter_test.c From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 16:47:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E5EA1065677; Sun, 11 Jul 2010 16:47:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43E4D8FC0A; Sun, 11 Jul 2010 16:47:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BGlkW9033553; Sun, 11 Jul 2010 16:47:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BGlk0O033551; Sun, 11 Jul 2010 16:47:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007111647.o6BGlk0O033551@svn.freebsd.org> From: Alexander Motin Date: Sun, 11 Jul 2010 16:47:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209900 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 16:47:46 -0000 Author: mav Date: Sun Jul 11 16:47:45 2010 New Revision: 209900 URL: http://svn.freebsd.org/changeset/base/209900 Log: Remove interval validation from cpu_tick_calibrate(). As I found, check was needed at preliminary version of the patch, where number of CPU ticks was divided strictly on 16 seconds. Final code instead uses real interval duration, so precise interval should not be important. Same time aliasing issues around second boundary causes false positives, periodically logging useless "t_delta ... too long/short" messages when HZ set below 256. Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Sun Jul 11 15:32:20 2010 (r209899) +++ head/sys/kern/kern_tc.c Sun Jul 11 16:47:45 2010 (r209900) @@ -864,43 +864,21 @@ cpu_tick_calibrate(int reset) t_delta = t_this; bintime_sub(&t_delta, &t_last); /* - * Validate that 16 +/- 1/256 seconds passed. - * After division by 16 this gives us a precision of - * roughly 250PPM which is sufficient + * Headroom: + * 2^(64-20) / 16[s] = + * 2^(44) / 16[s] = + * 17.592.186.044.416 / 16 = + * 1.099.511.627.776 [Hz] */ - if (t_delta.sec > 16 || ( - t_delta.sec == 16 && t_delta.frac >= (0x01LL << 56))) { - /* too long */ - if (bootverbose) - printf("t_delta %ju.%016jx too long\n", - (uintmax_t)t_delta.sec, - (uintmax_t)t_delta.frac); - } else if (t_delta.sec < 15 || - (t_delta.sec == 15 && t_delta.frac <= (0xffLL << 56))) { - /* too short */ - if (bootverbose) - printf("t_delta %ju.%016jx too short\n", - (uintmax_t)t_delta.sec, - (uintmax_t)t_delta.frac); - } else { - /* just right */ - /* - * Headroom: - * 2^(64-20) / 16[s] = - * 2^(44) / 16[s] = - * 17.592.186.044.416 / 16 = - * 1.099.511.627.776 [Hz] - */ - divi = t_delta.sec << 20; - divi |= t_delta.frac >> (64 - 20); - c_delta <<= 20; - c_delta /= divi; - if (c_delta > cpu_tick_frequency) { - if (0 && bootverbose) - printf("cpu_tick increased to %ju Hz\n", - c_delta); - cpu_tick_frequency = c_delta; - } + divi = t_delta.sec << 20; + divi |= t_delta.frac >> (64 - 20); + c_delta <<= 20; + c_delta /= divi; + if (c_delta > cpu_tick_frequency) { + if (0 && bootverbose) + printf("cpu_tick increased to %ju Hz\n", + c_delta); + cpu_tick_frequency = c_delta; } } c_last = c_this; From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 17:08:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFBFA1065670; Sun, 11 Jul 2010 17:08:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE5988FC08; Sun, 11 Jul 2010 17:08:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BH8bXc038164; Sun, 11 Jul 2010 17:08:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BH8bRe038162; Sun, 11 Jul 2010 17:08:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007111708.o6BH8bRe038162@svn.freebsd.org> From: Alexander Motin Date: Sun, 11 Jul 2010 17:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209901 - head/sys/x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 17:08:37 -0000 Author: mav Date: Sun Jul 11 17:08:37 2010 New Revision: 209901 URL: http://svn.freebsd.org/changeset/base/209901 Log: Make kernel panic with reasonable message if no usable event timer found. Modified: head/sys/x86/x86/timeevents.c Modified: head/sys/x86/x86/timeevents.c ============================================================================== --- head/sys/x86/x86/timeevents.c Sun Jul 11 16:47:45 2010 (r209900) +++ head/sys/x86/x86/timeevents.c Sun Jul 11 17:08:37 2010 (r209901) @@ -309,6 +309,8 @@ cpu_initclocks_bsp(void) timer[0] = et_find(timername[0], ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); if (timer[0] == NULL) timer[0] = et_find(NULL, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[0] == NULL) + panic("No usable event timer found!"); et_init(timer[0], timer1cb, NULL, NULL); timer[1] = et_find(timername[1][0] ? timername[1] : NULL, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 20:11:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B5EC106564A; Sun, 11 Jul 2010 20:11:45 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2296D8FC1A; Sun, 11 Jul 2010 20:11:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BKBjID078420; Sun, 11 Jul 2010 20:11:45 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BKBjdr078418; Sun, 11 Jul 2010 20:11:45 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201007112011.o6BKBjdr078418@svn.freebsd.org> From: Alan Cox Date: Sun, 11 Jul 2010 20:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209902 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 20:11:45 -0000 Author: alc Date: Sun Jul 11 20:11:44 2010 New Revision: 209902 URL: http://svn.freebsd.org/changeset/base/209902 Log: Change the implementation of vm_hold_free_pages() so that it performs at most one call to pmap_qremove(), and thus one TLB shootdown, instead of one call and TLB shootdown per page. Simplify the interface to vm_hold_free_pages(). MFC after: 3 weeks Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sun Jul 11 17:08:37 2010 (r209901) +++ head/sys/kern/vfs_bio.c Sun Jul 11 20:11:44 2010 (r209902) @@ -95,8 +95,7 @@ struct buf *buf; /* buffer header pool static struct proc *bufdaemonproc; static int inmem(struct vnode *vp, daddr_t blkno); -static void vm_hold_free_pages(struct buf *bp, vm_offset_t from, - vm_offset_t to); +static void vm_hold_free_pages(struct buf *bp, int newbsize); static void vm_hold_load_pages(struct buf *bp, vm_offset_t from, vm_offset_t to); static void vfs_page_set_valid(struct buf *bp, vm_ooffset_t off, vm_page_t m); @@ -2888,10 +2887,7 @@ allocbuf(struct buf *bp, int size) } return 1; } - vm_hold_free_pages( - bp, - (vm_offset_t) bp->b_data + newbsize, - (vm_offset_t) bp->b_data + bp->b_bufsize); + vm_hold_free_pages(bp, newbsize); } else if (newbsize > bp->b_bufsize) { /* * We only use malloced memory on the first allocation. @@ -3766,31 +3762,25 @@ tryagain: /* Return pages associated with this buf to the vm system */ static void -vm_hold_free_pages(struct buf *bp, vm_offset_t from, vm_offset_t to) +vm_hold_free_pages(struct buf *bp, int newbsize) { - vm_offset_t pg; + vm_offset_t from; vm_page_t p; int index, newnpages; - from = round_page(from); - to = round_page(to); - newnpages = index = (from - trunc_page((vm_offset_t)bp->b_data)) >> PAGE_SHIFT; - - for (pg = from; pg < to; pg += PAGE_SIZE, index++) { + from = round_page((vm_offset_t)bp->b_data + newbsize); + newnpages = (from - trunc_page((vm_offset_t)bp->b_data)) >> PAGE_SHIFT; + if (bp->b_npages > newnpages) + pmap_qremove(from, bp->b_npages - newnpages); + for (index = newnpages; index < bp->b_npages; index++) { p = bp->b_pages[index]; - if (p && (index < bp->b_npages)) { - if (p->busy) { - printf( - "vm_hold_free_pages: blkno: %jd, lblkno: %jd\n", - (intmax_t)bp->b_blkno, - (intmax_t)bp->b_lblkno); - } - bp->b_pages[index] = NULL; - pmap_qremove(pg, 1); - p->wire_count--; - vm_page_free(p); - atomic_subtract_int(&cnt.v_wire_count, 1); - } + bp->b_pages[index] = NULL; + if (p->busy != 0) + printf("vm_hold_free_pages: blkno: %jd, lblkno: %jd\n", + (intmax_t)bp->b_blkno, (intmax_t)bp->b_lblkno); + p->wire_count--; + vm_page_free(p); + atomic_subtract_int(&cnt.v_wire_count, 1); } bp->b_npages = newnpages; } From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 20:29:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3D68106566C; Sun, 11 Jul 2010 20:29:34 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 947ED8FC17; Sun, 11 Jul 2010 20:29:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BKTYtF082287; Sun, 11 Jul 2010 20:29:34 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BKTYxM082285; Sun, 11 Jul 2010 20:29:34 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007112029.o6BKTYxM082285@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 11 Jul 2010 20:29:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209903 - head/sys/boot/fdt/dts X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 20:29:34 -0000 Author: raj Date: Sun Jul 11 20:29:34 2010 New Revision: 209903 URL: http://svn.freebsd.org/changeset/base/209903 Log: Provide a missing interrupt-parent for the CPM / QUICC node in the DTS. Modified: head/sys/boot/fdt/dts/mpc8555cds.dts Modified: head/sys/boot/fdt/dts/mpc8555cds.dts ============================================================================== --- head/sys/boot/fdt/dts/mpc8555cds.dts Sun Jul 11 20:11:44 2010 (r209902) +++ head/sys/boot/fdt/dts/mpc8555cds.dts Sun Jul 11 20:29:34 2010 (r209903) @@ -343,6 +343,7 @@ compatible = "fsl,mpc8555-cpm", "fsl,cpm2"; reg = <0x80000 0x20000>; interrupts = <46 2>; + interrupt-parent = <&mpic>; }; }; From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 20:31:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19DCF106566C; Sun, 11 Jul 2010 20:31:00 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0AE588FC1C; Sun, 11 Jul 2010 20:31:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BKUxTB082652; Sun, 11 Jul 2010 20:30:59 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BKUxFs082650; Sun, 11 Jul 2010 20:30:59 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007112030.o6BKUxFs082650@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 11 Jul 2010 20:30:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209904 - head/sys/dev/fdt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 20:31:00 -0000 Author: raj Date: Sun Jul 11 20:30:59 2010 New Revision: 209904 URL: http://svn.freebsd.org/changeset/base/209904 Log: Let simplebus(4) diagnostics be a bit more descriptive. Modified: head/sys/dev/fdt/simplebus.c Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Sun Jul 11 20:29:34 2010 (r209903) +++ head/sys/dev/fdt/simplebus.c Sun Jul 11 20:30:59 2010 (r209904) @@ -187,16 +187,16 @@ simplebus_attach(device_t dev) resource_list_init(&di->di_res); if (fdt_reg_to_rl(dt_child, &di->di_res, sc->sc_start_va)) { - device_printf(dev, "could not process 'reg' " - "property\n"); + device_printf(dev, "%s: could not process 'reg' " + "property\n", di->di_ofw.obd_name); ofw_bus_gen_destroy_devinfo(&di->di_ofw); free(di, M_SIMPLEBUS); continue; } if (fdt_intr_to_rl(dt_child, &di->di_res, di->di_intr_sl)) { - device_printf(dev, "could not process 'interrupts' " - "property\n"); + device_printf(dev, "%s: could not process " + "'interrupts' property\n", di->di_ofw.obd_name); resource_list_free(&di->di_res); ofw_bus_gen_destroy_devinfo(&di->di_ofw); free(di, M_SIMPLEBUS); @@ -213,6 +213,9 @@ simplebus_attach(device_t dev) free(di, M_SIMPLEBUS); continue; } +#ifdef DEBUG + device_printf(dev, "added child: %s\n\n", di->di_ofw.obd_name); +#endif device_set_ivars(dev_child, di); } From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 20:33:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA4691065675; Sun, 11 Jul 2010 20:33:39 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB0AC8FC12; Sun, 11 Jul 2010 20:33:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BKXdWu083256; Sun, 11 Jul 2010 20:33:39 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BKXdej083254; Sun, 11 Jul 2010 20:33:39 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007112033.o6BKXdej083254@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 11 Jul 2010 20:33:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209905 - head/sys/dev/fdt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 20:33:39 -0000 Author: raj Date: Sun Jul 11 20:33:39 2010 New Revision: 209905 URL: http://svn.freebsd.org/changeset/base/209905 Log: Save fdtbus trigger / polarity data at their correct index. Modified: head/sys/dev/fdt/fdt_common.c Modified: head/sys/dev/fdt/fdt_common.c ============================================================================== --- head/sys/dev/fdt/fdt_common.c Sun Jul 11 20:30:59 2010 (r209904) +++ head/sys/dev/fdt/fdt_common.c Sun Jul 11 20:33:39 2010 (r209905) @@ -529,8 +529,8 @@ fdt_intr_to_rl(phandle_t node, struct re debugf("decoded intr = %d, trig = %d, pol = %d\n", interrupt, trig, pol); - intr_sl[intr_num].trig = trig; - intr_sl[intr_num].pol = pol; + intr_sl[i].trig = trig; + intr_sl[i].pol = pol; resource_list_add(rl, SYS_RES_IRQ, i, interrupt, interrupt, 1); } From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 20:49:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE78F1065673; Sun, 11 Jul 2010 20:49:36 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9413D8FC13; Sun, 11 Jul 2010 20:49:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BKna8v086805; Sun, 11 Jul 2010 20:49:36 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BKnaqL086803; Sun, 11 Jul 2010 20:49:36 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007112049.o6BKnaqL086803@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 11 Jul 2010 20:49:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209906 - head/sys/dev/fdt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 20:49:36 -0000 Author: raj Date: Sun Jul 11 20:49:36 2010 New Revision: 209906 URL: http://svn.freebsd.org/changeset/base/209906 Log: Introduce PowerPC-specific helper routines for FDT. Reviewed by: imp Sponsored by: The FreeBSD Foundation Added: head/sys/dev/fdt/fdt_powerpc.c (contents, props changed) Added: head/sys/dev/fdt/fdt_powerpc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/fdt/fdt_powerpc.c Sun Jul 11 20:49:36 2010 (r209906) @@ -0,0 +1,168 @@ +/*- + * Copyright (c) 2009-2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include "ofw_bus_if.h" +#include "fdt_common.h" + +static void +fdt_fixup_busfreq(phandle_t root) +{ + phandle_t sb, cpus, child; + pcell_t freq; + + /* + * Do a strict check so as to skip non-SOC nodes, which also claim + * simple-bus compatibility such as eLBC etc. + */ + if ((sb = fdt_find_compatible(root, "simple-bus", 1)) == 0) + return; + + /* + * This fixup uses /cpus/ bus-frequency prop value to set simple-bus + * bus-frequency property. + */ + if ((cpus = OF_finddevice("/cpus")) == 0) + return; + + if ((child = OF_child(cpus)) == 0) + return; + + if (OF_getprop(child, "bus-frequency", (void *)&freq, + sizeof(freq)) <= 0) + return; + + OF_setprop(sb, "bus-frequency", (void *)&freq, sizeof(freq)); +} + +struct fdt_fixup_entry fdt_fixup_table[] = { + { "fsl,MPC8572DS", &fdt_fixup_busfreq }, + { "MPC8555CDS", &fdt_fixup_busfreq }, + { NULL, NULL } +}; + +static int +fdt_pic_decode_iic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, + int *pol) +{ + if (!fdt_is_compatible(node, "chrp,iic")) + return (ENXIO); + + *interrupt = intr[0]; + + switch (intr[1]) { + case 0: + /* Active L level */ + *trig = INTR_TRIGGER_LEVEL; + *pol = INTR_POLARITY_LOW; + break; + case 1: + /* Active H level */ + *trig = INTR_TRIGGER_LEVEL; + *pol = INTR_POLARITY_HIGH; + break; + case 2: + /* H to L edge */ + *trig = INTR_TRIGGER_EDGE; + *pol = INTR_POLARITY_LOW; + break; + case 3: + /* L to H edge */ + *trig = INTR_TRIGGER_EDGE; + *pol = INTR_POLARITY_HIGH; + break; + default: + *trig = INTR_TRIGGER_CONFORM; + *pol = INTR_POLARITY_CONFORM; + } + return (0); +} + +static int +fdt_pic_decode_openpic(phandle_t node, pcell_t *intr, int *interrupt, + int *trig, int *pol) +{ + + if (!fdt_is_compatible(node, "chrp,open-pic")) + return (ENXIO); + + /* + * XXX The interrupt number read out from the MPC85XX device tree is + * already offset by 16 to reflect the 'internal' IRQ range shift on + * the OpenPIC. + */ + *interrupt = intr[0]; + + switch (intr[1]) { + case 0: + /* L to H edge */ + *trig = INTR_TRIGGER_EDGE; + *pol = INTR_POLARITY_HIGH; + break; + case 1: + /* Active L level */ + *trig = INTR_TRIGGER_LEVEL; + *pol = INTR_POLARITY_LOW; + break; + case 2: + /* Active H level */ + *trig = INTR_TRIGGER_LEVEL; + *pol = INTR_POLARITY_HIGH; + break; + case 3: + /* H to L edge */ + *trig = INTR_TRIGGER_EDGE; + *pol = INTR_POLARITY_LOW; + break; + default: + *trig = INTR_TRIGGER_CONFORM; + *pol = INTR_POLARITY_CONFORM; + } + return (0); +} + +fdt_pic_decode_t fdt_pic_table[] = { + &fdt_pic_decode_iic, + &fdt_pic_decode_openpic, + NULL +}; From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 20:55:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A78A01065672; Sun, 11 Jul 2010 20:55:39 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 982278FC23; Sun, 11 Jul 2010 20:55:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BKtdPf088161; Sun, 11 Jul 2010 20:55:39 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BKtdG7088159; Sun, 11 Jul 2010 20:55:39 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007112055.o6BKtdG7088159@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 11 Jul 2010 20:55:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209907 - head/sys/dev/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 20:55:39 -0000 Author: raj Date: Sun Jul 11 20:55:39 2010 New Revision: 209907 URL: http://svn.freebsd.org/changeset/base/209907 Log: Provide more defines for PCI-Express device ctrl. Modified: head/sys/dev/pci/pcireg.h Modified: head/sys/dev/pci/pcireg.h ============================================================================== --- head/sys/dev/pci/pcireg.h Sun Jul 11 20:49:36 2010 (r209906) +++ head/sys/dev/pci/pcireg.h Sun Jul 11 20:55:39 2010 (r209907) @@ -605,6 +605,9 @@ #define PCIR_EXPRESS_DEVICE_CAP 0x4 #define PCIM_EXP_CAP_MAX_PAYLOAD 0x0007 #define PCIR_EXPRESS_DEVICE_CTL 0x8 +#define PCIM_EXP_CTL_NFER_ENABLE 0x0002 +#define PCIM_EXP_CTL_FER_ENABLE 0x0004 +#define PCIM_EXP_CTL_URR_ENABLE 0x0008 #define PCIM_EXP_CTL_RELAXED_ORD_ENABLE 0x0010 #define PCIM_EXP_CTL_MAX_PAYLOAD 0x00e0 #define PCIM_EXP_CTL_NOSNOOP_ENABLE 0x0800 From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 21:08:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF69D106566B; Sun, 11 Jul 2010 21:08:29 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB9DC8FC21; Sun, 11 Jul 2010 21:08:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BL8Ttf091024; Sun, 11 Jul 2010 21:08:29 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BL8TI9091010; Sun, 11 Jul 2010 21:08:29 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007112108.o6BL8TI9091010@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 11 Jul 2010 21:08:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209908 - in head/sys: conf dev/cfi dev/fdt dev/quicc dev/sec dev/tsec dev/uart powerpc/booke powerpc/conf powerpc/include powerpc/mpc85xx powerpc/powerpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 21:08:29 -0000 Author: raj Date: Sun Jul 11 21:08:29 2010 New Revision: 209908 URL: http://svn.freebsd.org/changeset/base/209908 Log: Convert Freescale PowerPC platforms to FDT convention. The following systems are affected: - MPC8555CDS - MPC8572DS This overhaul covers the following major changes: - All integrated peripherals drivers for Freescale MPC85XX SoC, which are currently in the FreeBSD source tree are reworked and adjusted so they derive config data out of the device tree blob (instead of hard coded / tabelarized values). - This includes: LBC, PCI / PCI-Express, I2C, DS1553, OpenPIC, TSEC, SEC, QUICC, UART, CFI. - Thanks to the common FDT infrastrucutre (fdtbus, simplebus) we retire ocpbus(4) driver, which was based on hard-coded config data. Note that world for these platforms has to be built WITH_FDT. Reviewed by: imp Sponsored by: The FreeBSD Foundation Added: head/sys/dev/cfi/cfi_bus_fdt.c (contents, props changed) head/sys/dev/quicc/quicc_bfe_fdt.c (contents, props changed) head/sys/dev/tsec/if_tsec_fdt.c (contents, props changed) head/sys/powerpc/include/fdt.h (contents, props changed) head/sys/powerpc/mpc85xx/ds1553_bus_fdt.c (contents, props changed) head/sys/powerpc/mpc85xx/openpic_fdt.c (contents, props changed) head/sys/powerpc/mpc85xx/pci_fdt.c (contents, props changed) Deleted: head/sys/dev/cfi/cfi_bus_lbc.c head/sys/dev/quicc/quicc_bfe_ocp.c head/sys/dev/tsec/if_tsec_ocp.c head/sys/dev/uart/uart_bus_ocp.c head/sys/powerpc/include/bootinfo.h head/sys/powerpc/include/ocpbus.h head/sys/powerpc/mpc85xx/ds1553_bus_lbc.c head/sys/powerpc/mpc85xx/ocpbus.c head/sys/powerpc/mpc85xx/ocpbus.h head/sys/powerpc/mpc85xx/opic.c head/sys/powerpc/mpc85xx/pci_ocp.c Modified: head/sys/conf/Makefile.powerpc head/sys/conf/files.powerpc head/sys/dev/fdt/fdt_pci.c head/sys/dev/sec/sec.c head/sys/dev/tsec/if_tsec.c head/sys/dev/tsec/if_tsec.h head/sys/dev/uart/uart_cpu_powerpc.c head/sys/powerpc/booke/locore.S head/sys/powerpc/booke/machdep.c head/sys/powerpc/booke/platform_bare.c head/sys/powerpc/booke/pmap.c head/sys/powerpc/conf/MPC85XX head/sys/powerpc/include/metadata.h head/sys/powerpc/mpc85xx/atpic.c head/sys/powerpc/mpc85xx/i2c.c head/sys/powerpc/mpc85xx/lbc.c head/sys/powerpc/mpc85xx/lbc.h head/sys/powerpc/mpc85xx/mpc85xx.c head/sys/powerpc/mpc85xx/mpc85xx.h head/sys/powerpc/mpc85xx/nexus.c head/sys/powerpc/powerpc/intr_machdep.c Modified: head/sys/conf/Makefile.powerpc ============================================================================== --- head/sys/conf/Makefile.powerpc Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/conf/Makefile.powerpc Sun Jul 11 21:08:29 2010 (r209908) @@ -30,6 +30,8 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" +INCLUDES+= -I$S/contrib/libfdt + CFLAGS+= -msoft-float DDB_ENABLED!= grep DDB opt_ddb.h || true Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/conf/files.powerpc Sun Jul 11 21:08:29 2010 (r209908) @@ -14,7 +14,6 @@ font.h optional sc \ no-obj no-implicit-rule before-depend \ clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" # - crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb dev/bm/if_bm.c optional bm powermac @@ -23,21 +22,23 @@ dev/adb/adb_kbd.c optional adb dev/adb/adb_mouse.c optional adb dev/adb/adb_hb_if.m optional adb dev/adb/adb_if.m optional adb -dev/cfi/cfi_bus_lbc.c optional cfi +dev/cfi/cfi_bus_fdt.c optional cfi fdt dev/fb/fb.c optional sc +dev/fdt/fdt_powerpc.c optional fdt dev/hwpmc/hwpmc_powerpc.c optional hwpmc dev/kbd/kbd.c optional sc -dev/ofw/openfirm.c optional aim -dev/ofw/openfirmio.c optional aim -dev/ofw/ofw_bus_if.m optional aim -dev/ofw/ofw_if.m optional aim -dev/ofw/ofw_bus_subr.c optional aim +dev/ofw/openfirm.c optional aim | fdt +dev/ofw/openfirmio.c optional aim | fdt +dev/ofw/ofw_bus_if.m optional aim | fdt +dev/ofw/ofw_if.m optional aim | fdt +dev/ofw/ofw_bus_subr.c optional aim | fdt dev/ofw/ofw_console.c optional aim dev/ofw/ofw_disk.c optional ofwd aim +dev/ofw/ofw_fdt.c optional fdt dev/ofw/ofw_iicbus.c optional iicbus aim dev/ofw/ofw_standard.c optional aim dev/powermac_nvram/powermac_nvram.c optional powermac_nvram powermac -dev/quicc/quicc_bfe_ocp.c optional quicc mpc85xx +dev/quicc/quicc_bfe_fdt.c optional quicc mpc85xx dev/scc/scc_bfe_macio.c optional scc powermac dev/sec/sec.c optional sec mpc85xx dev/sound/macio/aoa.c optional snd_davbus | snd_ai2s powermac @@ -49,9 +50,8 @@ dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc dev/tsec/if_tsec.c optional tsec -dev/tsec/if_tsec_ocp.c optional tsec mpc85xx -dev/uart/uart_bus_ocp.c optional uart mpc85xx -dev/uart/uart_cpu_powerpc.c optional uart +dev/tsec/if_tsec_fdt.c optional tsec fdt +dev/uart/uart_cpu_powerpc.c optional uart aim kern/syscalls.c optional ktr libkern/ashldi3.c standard libkern/ashrdi3.c standard @@ -63,6 +63,7 @@ libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard libkern/lshrdi3.c standard +libkern/memchr.c optional fdt libkern/memmove.c standard libkern/memset.c standard libkern/moddi3.c standard @@ -109,16 +110,15 @@ powerpc/fpu/fpu_mul.c optional fpu_emu powerpc/fpu/fpu_sqrt.c optional fpu_emu powerpc/fpu/fpu_subr.c optional fpu_emu powerpc/mpc85xx/atpic.c optional mpc85xx isa -powerpc/mpc85xx/ds1553_bus_lbc.c optional ds1553 +powerpc/mpc85xx/ds1553_bus_fdt.c optional ds1553 fdt powerpc/mpc85xx/ds1553_core.c optional ds1553 -powerpc/mpc85xx/i2c.c optional iicbus mpc85xx +powerpc/mpc85xx/i2c.c optional iicbus fdt powerpc/mpc85xx/isa.c optional mpc85xx isa powerpc/mpc85xx/lbc.c optional mpc85xx powerpc/mpc85xx/mpc85xx.c optional mpc85xx powerpc/mpc85xx/nexus.c optional mpc85xx -powerpc/mpc85xx/ocpbus.c optional mpc85xx -powerpc/mpc85xx/opic.c optional mpc85xx -powerpc/mpc85xx/pci_ocp.c optional pci mpc85xx +powerpc/mpc85xx/openpic_fdt.c optional fdt +powerpc/mpc85xx/pci_fdt.c optional pci mpc85xx powerpc/ofw/ofw_cpu.c optional aim powerpc/ofw/ofw_pcibus.c optional pci aim powerpc/ofw/ofw_pcib_pci.c optional pci aim Added: head/sys/dev/cfi/cfi_bus_fdt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/cfi/cfi_bus_fdt.c Sun Jul 11 21:08:29 2010 (r209908) @@ -0,0 +1,73 @@ +/*- + * Copyright (c) 2007, Juniper Networks, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +static int cfi_fdt_probe(device_t); + +static device_method_t cfi_fdt_methods[] = { + /* device interface */ + DEVMETHOD(device_probe, cfi_fdt_probe), + DEVMETHOD(device_attach, cfi_attach), + DEVMETHOD(device_detach, cfi_detach), + + {0, 0} +}; + +static driver_t cfi_fdt_driver = { + cfi_driver_name, + cfi_fdt_methods, + sizeof(struct cfi_softc), +}; + +DRIVER_MODULE (cfi, lbc, cfi_fdt_driver, cfi_devclass, 0, 0); + +static int +cfi_fdt_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "cfi-flash")) + return (ENXIO); + + return (cfi_probe(dev)); +} Modified: head/sys/dev/fdt/fdt_pci.c ============================================================================== --- head/sys/dev/fdt/fdt_pci.c Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/dev/fdt/fdt_pci.c Sun Jul 11 21:08:29 2010 (r209908) @@ -325,8 +325,9 @@ fdt_pci_route_intr(int bus, int slot, in debugf("decoded intr = %d, trig = %d, pol = %d\n", *interrupt, trig, pol); - /* XXX we should probably call powerpc_config() here... */ - +#if defined(__powerpc__) + powerpc_config_intr(INTR_VEC(intr_par, *interrupt), trig, pol); +#endif return (0); next: Added: head/sys/dev/quicc/quicc_bfe_fdt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/quicc/quicc_bfe_fdt.c Sun Jul 11 21:08:29 2010 (r209908) @@ -0,0 +1,90 @@ +/*- + * Copyright (c) 2006 Juniper Networks. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +static int quicc_fdt_probe(device_t dev); + +static device_method_t quicc_fdt_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, quicc_fdt_probe), + DEVMETHOD(device_attach, quicc_bfe_attach), + DEVMETHOD(device_detach, quicc_bfe_detach), + + DEVMETHOD(bus_alloc_resource, quicc_bus_alloc_resource), + DEVMETHOD(bus_release_resource, quicc_bus_release_resource), + DEVMETHOD(bus_get_resource, quicc_bus_get_resource), + DEVMETHOD(bus_read_ivar, quicc_bus_read_ivar), + DEVMETHOD(bus_setup_intr, quicc_bus_setup_intr), + DEVMETHOD(bus_teardown_intr, quicc_bus_teardown_intr), + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), + + { 0, 0 } +}; + +static driver_t quicc_fdt_driver = { + quicc_driver_name, + quicc_fdt_methods, + sizeof(struct quicc_softc), +}; + +static int +quicc_fdt_probe(device_t dev) +{ + phandle_t par; + pcell_t clock; + + if (!ofw_bus_is_compatible(dev, "fsl,cpm2")) + return (ENXIO); + + par = OF_parent(ofw_bus_get_node(dev)); + if (OF_getprop(par, "bus-frequency", &clock, sizeof(clock)) <= 0) + clock = 0; + + return (quicc_bfe_probe(dev, (uintptr_t)clock)); +} + +DRIVER_MODULE(quicc, simplebus, quicc_fdt_driver, quicc_devclass, 0, 0); Modified: head/sys/dev/sec/sec.c ============================================================================== --- head/sys/dev/sec/sec.c Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/dev/sec/sec.c Sun Jul 11 21:08:29 2010 (r209908) @@ -45,12 +45,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include "cryptodev_if.h" +#include #include static int sec_probe(device_t dev); @@ -153,7 +153,7 @@ static driver_t sec_driver = { }; static devclass_t sec_devclass; -DRIVER_MODULE(sec, ocpbus, sec_driver, sec_devclass, 0, 0); +DRIVER_MODULE(sec, simplebus, sec_driver, sec_devclass, 0, 0); MODULE_DEPEND(sec, crypto, 1, 1, 1); static struct sec_eu_methods sec_eus[] = { @@ -201,24 +201,16 @@ static int sec_probe(device_t dev) { struct sec_softc *sc; - device_t parent; - uintptr_t devtype; uint64_t id; - int error; - parent = device_get_parent(dev); - error = BUS_READ_IVAR(parent, dev, OCPBUS_IVAR_DEVTYPE, &devtype); - if (error) - return (error); - - if (devtype != OCPBUS_DEVTYPE_SEC) + if (!ofw_bus_is_compatible(dev, "fsl,sec2.0")) return (ENXIO); sc = device_get_softc(dev); sc->sc_rrid = 0; - sc->sc_rres = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->sc_rrid, - 0ul, ~0ul, SEC_IO_SIZE, RF_ACTIVE); + sc->sc_rres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rrid, + RF_ACTIVE); if (sc->sc_rres == NULL) return (ENXIO); @@ -276,8 +268,8 @@ sec_attach(device_t dev) /* Allocate I/O memory for SEC registers */ sc->sc_rrid = 0; - sc->sc_rres = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->sc_rrid, - 0ul, ~0ul, SEC_IO_SIZE, RF_ACTIVE); + sc->sc_rres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rrid, + RF_ACTIVE); if (sc->sc_rres == NULL) { device_printf(dev, "could not allocate I/O memory!\n"); @@ -295,12 +287,15 @@ sec_attach(device_t dev) if (error) goto fail2; - sc->sc_sec_irid = 1; - error = sec_setup_intr(sc, &sc->sc_sec_ires, &sc->sc_sec_ihand, - &sc->sc_sec_irid, sec_secondary_intr, "secondary"); - if (error) - goto fail3; + if (sc->sc_version == 3) { + sc->sc_sec_irid = 1; + error = sec_setup_intr(sc, &sc->sc_sec_ires, &sc->sc_sec_ihand, + &sc->sc_sec_irid, sec_secondary_intr, "secondary"); + + if (error) + goto fail3; + } /* Alloc DMA memory for descriptors and link tables */ error = sec_alloc_dma_mem(sc, &(sc->sc_desc_dmem), Modified: head/sys/dev/tsec/if_tsec.c ============================================================================== --- head/sys/dev/tsec/if_tsec.c Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/dev/tsec/if_tsec.c Sun Jul 11 21:08:29 2010 (r209908) @@ -1,6 +1,6 @@ /*- - * Copyright (C) 2007-2008 Semihalf, Rafal Jaworowski - * Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski + * Copyright (C) 2007-2008 Semihalf, Rafal Jaworowski + * Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1563,7 +1563,7 @@ tsec_miibus_readreg(device_t dev, int ph sc = device_get_softc(dev); - if (device_get_unit(dev) != phy) + if (sc->phyaddr != phy) return (0); sc = tsec0_sc; @@ -1591,9 +1591,8 @@ tsec_miibus_writereg(device_t dev, int p sc = device_get_softc(dev); - if (device_get_unit(dev) != phy) - device_printf(dev, "Trying to write to an alien PHY(%d)\n", - phy); + if (sc->phyaddr != phy) + return (0); sc = tsec0_sc; Modified: head/sys/dev/tsec/if_tsec.h ============================================================================== --- head/sys/dev/tsec/if_tsec.h Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/dev/tsec/if_tsec.h Sun Jul 11 21:08:29 2010 (r209908) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski + * Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,6 +28,8 @@ #ifndef _IF_TSEC_H #define _IF_TSEC_H +#include + #define TSEC_RX_NUM_DESC 256 #define TSEC_TX_NUM_DESC 256 @@ -49,6 +51,7 @@ struct tsec_softc { struct mtx transmit_lock; /* transmitter lock */ struct mtx receive_lock; /* receiver lock */ + phandle_t node; device_t dev; device_t tsec_miibus; struct mii_data *tsec_mii; /* MII media control */ @@ -128,6 +131,8 @@ struct tsec_softc { /* currently received frame */ struct mbuf *frame; + + int phyaddr; }; /* interface to get/put generic objects */ Added: head/sys/dev/tsec/if_tsec_fdt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/tsec/if_tsec_fdt.c Sun Jul 11 21:08:29 2010 (r209908) @@ -0,0 +1,352 @@ +/*- + * Copyright (C) 2007-2008 Semihalf, Rafal Jaworowski + * Copyright (C) 2006-2007 Semihalf, Piotr Kruszynski + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * From: FreeBSD: head/sys/dev/tsec/if_tsec_ocp.c 188712 2009-02-17 14:59:47Z raj + */ + +/* + * FDT 'simple-bus' attachment for Freescale TSEC controller. + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "miibus_if.h" + +#define TSEC_RID_TXIRQ 0 +#define TSEC_RID_RXIRQ 1 +#define TSEC_RID_ERRIRQ 2 + +extern struct tsec_softc *tsec0_sc; + +static int tsec_fdt_probe(device_t dev); +static int tsec_fdt_attach(device_t dev); +static int tsec_fdt_detach(device_t dev); +static int tsec_setup_intr(struct tsec_softc *sc, struct resource **ires, + void **ihand, int *irid, driver_intr_t handler, const char *iname); +static void tsec_release_intr(struct tsec_softc *sc, struct resource *ires, + void *ihand, int irid, const char *iname); + +static device_method_t tsec_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, tsec_fdt_probe), + DEVMETHOD(device_attach, tsec_fdt_attach), + DEVMETHOD(device_detach, tsec_fdt_detach), + + DEVMETHOD(device_shutdown, tsec_shutdown), + DEVMETHOD(device_suspend, tsec_suspend), + DEVMETHOD(device_resume, tsec_resume), + + /* Bus interface */ + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), + + /* MII interface */ + DEVMETHOD(miibus_readreg, tsec_miibus_readreg), + DEVMETHOD(miibus_writereg, tsec_miibus_writereg), + DEVMETHOD(miibus_statchg, tsec_miibus_statchg), + { 0, 0 } +}; + +static driver_t tsec_fdt_driver = { + "tsec", + tsec_methods, + sizeof(struct tsec_softc), +}; + +DRIVER_MODULE(tsec, simplebus, tsec_fdt_driver, tsec_devclass, 0, 0); +MODULE_DEPEND(tsec, simplebus, 1, 1, 1); +MODULE_DEPEND(tsec, ether, 1, 1, 1); + +static int +tsec_fdt_probe(device_t dev) +{ + struct tsec_softc *sc; + uint32_t id; + + if (!ofw_bus_is_compatible(dev, "gianfar")) + return (ENXIO); + + sc = device_get_softc(dev); + + sc->sc_rrid = 0; + sc->sc_rres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rrid, + RF_ACTIVE); + if (sc->sc_rres == NULL) + return (ENXIO); + + sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres); + sc->sc_bas.bst = rman_get_bustag(sc->sc_rres); + + /* Check if we are eTSEC (enhanced TSEC) */ + id = TSEC_READ(sc, TSEC_REG_ID); + sc->is_etsec = ((id >> 16) == TSEC_ETSEC_ID) ? 1 : 0; + id |= TSEC_READ(sc, TSEC_REG_ID2); + + bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rrid, sc->sc_rres); + + if (id == 0) { + device_printf(dev, "could not identify TSEC type\n"); + return (ENXIO); + } + + if (sc->is_etsec) + device_set_desc(dev, "Enhanced Three-Speed Ethernet Controller"); + else + device_set_desc(dev, "Three-Speed Ethernet Controller"); + + return (BUS_PROBE_DEFAULT); +} + +static int +tsec_fdt_attach(device_t dev) +{ + struct tsec_softc *sc; + int error = 0; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->node = ofw_bus_get_node(dev); + + /* XXX add comment on weird FSL's MII registers access design */ + if (device_get_unit(dev) == 0) + tsec0_sc = sc; + + /* Get phy address from fdt */ + if (fdt_get_phyaddr(sc->node, &sc->phyaddr) != 0) + return (ENXIO); + + /* Init timer */ + callout_init(&sc->tsec_callout, 1); + + /* Init locks */ + mtx_init(&sc->transmit_lock, device_get_nameunit(dev), "TSEC TX lock", + MTX_DEF); + mtx_init(&sc->receive_lock, device_get_nameunit(dev), "TSEC RX lock", + MTX_DEF); + mtx_init(&sc->ic_lock, device_get_nameunit(dev), "TSEC IC lock", + MTX_DEF); + + /* Allocate IO memory for TSEC registers */ + sc->sc_rrid = 0; + sc->sc_rres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->sc_rrid, + RF_ACTIVE); + if (sc->sc_rres == NULL) { + device_printf(dev, "could not allocate IO memory range!\n"); + goto fail1; + } + sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres); + sc->sc_bas.bst = rman_get_bustag(sc->sc_rres); + + /* TSEC attach */ + if (tsec_attach(sc) != 0) { + device_printf(dev, "could not be configured\n"); + goto fail2; + } + + /* Set up interrupts (TX/RX/ERR) */ + sc->sc_transmit_irid = TSEC_RID_TXIRQ; + error = tsec_setup_intr(sc, &sc->sc_transmit_ires, + &sc->sc_transmit_ihand, &sc->sc_transmit_irid, + tsec_transmit_intr, "TX"); + if (error) + goto fail2; + + sc->sc_receive_irid = TSEC_RID_RXIRQ; + error = tsec_setup_intr(sc, &sc->sc_receive_ires, + &sc->sc_receive_ihand, &sc->sc_receive_irid, + tsec_receive_intr, "RX"); + if (error) + goto fail3; + + sc->sc_error_irid = TSEC_RID_ERRIRQ; + error = tsec_setup_intr(sc, &sc->sc_error_ires, + &sc->sc_error_ihand, &sc->sc_error_irid, + tsec_error_intr, "ERR"); + if (error) + goto fail4; + + return (0); + +fail4: + tsec_release_intr(sc, sc->sc_receive_ires, sc->sc_receive_ihand, + sc->sc_receive_irid, "RX"); +fail3: + tsec_release_intr(sc, sc->sc_transmit_ires, sc->sc_transmit_ihand, + sc->sc_transmit_irid, "TX"); +fail2: + bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rrid, sc->sc_rres); +fail1: + mtx_destroy(&sc->receive_lock); + mtx_destroy(&sc->transmit_lock); + return (ENXIO); +} + +static int +tsec_setup_intr(struct tsec_softc *sc, struct resource **ires, void **ihand, + int *irid, driver_intr_t handler, const char *iname) +{ + int error; + + *ires = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, irid, RF_ACTIVE); + if (*ires == NULL) { + device_printf(sc->dev, "could not allocate %s IRQ\n", iname); + return (ENXIO); + } + error = bus_setup_intr(sc->dev, *ires, INTR_TYPE_NET | INTR_MPSAFE, + NULL, handler, sc, ihand); + if (error) { + device_printf(sc->dev, "failed to set up %s IRQ\n", iname); + if (bus_release_resource(sc->dev, SYS_RES_IRQ, *irid, *ires)) + device_printf(sc->dev, "could not release %s IRQ\n", iname); + *ires = NULL; + return (error); + } + return (0); +} + +static void +tsec_release_intr(struct tsec_softc *sc, struct resource *ires, void *ihand, + int irid, const char *iname) +{ + int error; + + if (ires == NULL) + return; + + error = bus_teardown_intr(sc->dev, ires, ihand); + if (error) + device_printf(sc->dev, "bus_teardown_intr() failed for %s intr" + ", error %d\n", iname, error); + + error = bus_release_resource(sc->dev, SYS_RES_IRQ, irid, ires); + if (error) + device_printf(sc->dev, "bus_release_resource() failed for %s " + "intr, error %d\n", iname, error); +} + +static int +tsec_fdt_detach(device_t dev) +{ + struct tsec_softc *sc; + int error; + + sc = device_get_softc(dev); + + /* Wait for stopping watchdog */ + callout_drain(&sc->tsec_callout); + + /* Stop and release all interrupts */ + tsec_release_intr(sc, sc->sc_transmit_ires, sc->sc_transmit_ihand, + sc->sc_transmit_irid, "TX"); + tsec_release_intr(sc, sc->sc_receive_ires, sc->sc_receive_ihand, + sc->sc_receive_irid, "RX"); + tsec_release_intr(sc, sc->sc_error_ires, sc->sc_error_ihand, + sc->sc_error_irid, "ERR"); + + /* TSEC detach */ + tsec_detach(sc); + + /* Free IO memory handler */ + if (sc->sc_rres) { + error = bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rrid, + sc->sc_rres); + if (error) + device_printf(dev, "bus_release_resource() failed for" + " IO memory, error %d\n", error); + } + + /* Destroy locks */ + mtx_destroy(&sc->receive_lock); + mtx_destroy(&sc->transmit_lock); + mtx_destroy(&sc->ic_lock); + return (0); +} + +void +tsec_get_hwaddr(struct tsec_softc *sc, uint8_t *addr) +{ + union { + uint32_t reg[2]; + uint8_t addr[6]; + } curmac; + uint32_t a[6]; + uint8_t lma[6]; + int i; + + /* + * Retrieve hw address from the device tree. + */ + i = OF_getprop(sc->node, "local-mac-address", (void *)lma, 6); + if (i == 6) { + bcopy(lma, addr, 6); + return; + } + + /* + * Fall back -- use the currently programmed address in the hope that + * it was set be firmware... + */ + curmac.reg[0] = TSEC_READ(sc, TSEC_REG_MACSTNADDR1); + curmac.reg[1] = TSEC_READ(sc, TSEC_REG_MACSTNADDR2); + for (i = 0; i < 6; i++) + a[5-i] = curmac.addr[i]; + + addr[0] = a[0]; + addr[1] = a[1]; + addr[2] = a[2]; + addr[3] = a[3]; + addr[4] = a[4]; + addr[5] = a[5]; +} Modified: head/sys/dev/uart/uart_cpu_powerpc.c ============================================================================== --- head/sys/dev/uart/uart_cpu_powerpc.c Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/dev/uart/uart_cpu_powerpc.c Sun Jul 11 21:08:29 2010 (r209908) @@ -27,57 +27,28 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_platform.h" - #include #include #include #include #include - -#ifndef MPC85XX -#include #include -#endif +#include #include #include -#ifdef MPC85XX -bus_space_tag_t uart_bus_space_io = &bs_be_tag; -bus_space_tag_t uart_bus_space_mem = &bs_be_tag; -#else bus_space_tag_t uart_bus_space_io = &bs_le_tag; bus_space_tag_t uart_bus_space_mem = &bs_le_tag; -#endif int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { -#ifdef MPC85XX - return ((b1->bsh == b2->bsh) ? 1 : 0); -#else + return ((pmap_kextract(b1->bsh) == pmap_kextract(b2->bsh)) ? 1 : 0); -#endif } -#ifdef MPC85XX -int -uart_cpu_getdev(int devtype, struct uart_devinfo *di) -{ - struct uart_class *class; - - class = &uart_ns8250_class; - if (class == NULL) - class = &uart_quicc_class; - if (class == NULL) - return (ENXIO); - - /* Check the environment. */ - return (uart_getenv(devtype, di, class)); -} -#else static int ofw_get_uart_console(phandle_t opts, phandle_t *result, const char *inputdev, const char *outputdev) @@ -174,4 +145,3 @@ uart_cpu_getdev(int devtype, struct uart di->parity = UART_PARITY_NONE; return (0); } -#endif Modified: head/sys/powerpc/booke/locore.S ============================================================================== --- head/sys/powerpc/booke/locore.S Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/powerpc/booke/locore.S Sun Jul 11 21:08:29 2010 (r209908) @@ -39,7 +39,6 @@ #include #include #include -#include #define TMPSTACKSZ 16384 Modified: head/sys/powerpc/booke/machdep.c ============================================================================== --- head/sys/powerpc/booke/machdep.c Sun Jul 11 20:55:39 2010 (r209907) +++ head/sys/powerpc/booke/machdep.c Sun Jul 11 21:08:29 2010 (r209908) @@ -130,13 +130,14 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include -#include +#include +#include + #include #ifdef DDB @@ -169,8 +170,6 @@ int cold = 1; long realmem = 0; long Maxmem = 0; -struct bootinfo *bootinfo; - char machine[] = "powerpc"; SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, ""); @@ -185,7 +184,6 @@ static void cpu_e500_startup(void *); SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_e500_startup, NULL); void print_kernel_section_addr(void); -void print_bootinfo(void); void print_kenv(void); u_int e500_init(u_int32_t, u_int32_t, void *); @@ -259,40 +257,6 @@ print_kenv(void) } void -print_bootinfo(void) -{ - struct bi_mem_region *mr; - struct bi_eth_addr *eth; - int i, j; - - debugf("bootinfo:\n"); - if (bootinfo == NULL) { - debugf(" no bootinfo, null ptr\n"); - return; - } - - debugf(" version = 0x%08x\n", bootinfo->bi_version); - debugf(" ccsrbar = 0x%08x\n", bootinfo->bi_bar_base); - debugf(" cpu_clk = 0x%08x\n", bootinfo->bi_cpu_clk); - debugf(" bus_clk = 0x%08x\n", bootinfo->bi_bus_clk); - - debugf(" mem regions:\n"); - mr = (struct bi_mem_region *)bootinfo->bi_data; - for (i = 0; i < bootinfo->bi_mem_reg_no; i++, mr++) - debugf(" #%d, base = 0x%08x, size = 0x%08x\n", i, - mr->mem_base, mr->mem_size); - - debugf(" eth addresses:\n"); - eth = (struct bi_eth_addr *)mr; - for (i = 0; i < bootinfo->bi_eth_addr_no; i++, eth++) { - debugf(" #%d, addr = ", i); - for (j = 0; j < 6; j++) - debugf("%02x ", eth->mac_addr[j]); - debugf("\n"); - } -} - -void print_kernel_section_addr(void) { @@ -306,54 +270,29 @@ print_kernel_section_addr(void) debugf(" _end = 0x%08x\n", (uint32_t)_end); } -struct bi_mem_region * -bootinfo_mr(void) -{ - - return ((struct bi_mem_region *)bootinfo->bi_data); -} - -struct bi_eth_addr * -bootinfo_eth(void) -{ - struct bi_mem_region *mr; - struct bi_eth_addr *eth; - int i; - - /* Advance to the eth section */ - mr = bootinfo_mr(); - for (i = 0; i < bootinfo->bi_mem_reg_no; i++, mr++) - ; - - eth = (struct bi_eth_addr *)mr; - return (eth); -} - u_int e500_init(u_int32_t startkernel, u_int32_t endkernel, void *mdp) { struct pcpu *pc; void *kmdp; - vm_offset_t end; + vm_offset_t dtbp, end; uint32_t csr; kmdp = NULL; end = endkernel; + dtbp = (vm_offset_t)NULL; /* - * Parse metadata and fetch parameters. This must be done as the first - * step as we need bootinfo data to at least init the console + * Parse metadata and fetch parameters. */ if (mdp != NULL) { preload_metadata = mdp; kmdp = preload_search_by_type("elf kernel"); if (kmdp != NULL) { - bootinfo = (struct bootinfo *)preload_search_info(kmdp, - MODINFO_METADATA | MODINFOMD_BOOTINFO); - boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int); kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *); + dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t); end = MD_FETCH(kmdp, MODINFOMD_KERNEND, vm_offset_t); #ifdef DDB ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t); @@ -362,8 +301,7 @@ e500_init(u_int32_t startkernel, u_int32 } } else { /* *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 21:11:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8F191065689; Sun, 11 Jul 2010 21:11:23 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D88488FC22; Sun, 11 Jul 2010 21:11:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BLBN2j091699; Sun, 11 Jul 2010 21:11:23 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BLBNYe091696; Sun, 11 Jul 2010 21:11:23 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007112111.o6BLBNYe091696@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 11 Jul 2010 21:11:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209909 - in head/sys: arm/include boot/uboot/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 21:11:24 -0000 Author: raj Date: Sun Jul 11 21:11:23 2010 New Revision: 209909 URL: http://svn.freebsd.org/changeset/base/209909 Log: Get rid of bootinfo for good in loader (U-Boot-based) and ARM. For FDT-enabled platforms the device tree is a modern replacement for bootinfo config data. Deleted: head/sys/arm/include/bootinfo.h Modified: head/sys/arm/include/metadata.h head/sys/boot/uboot/common/metadata.c Modified: head/sys/arm/include/metadata.h ============================================================================== --- head/sys/arm/include/metadata.h Sun Jul 11 21:08:29 2010 (r209908) +++ head/sys/arm/include/metadata.h Sun Jul 11 21:11:23 2010 (r209909) @@ -31,10 +31,4 @@ #define MODINFOMD_DTBP 0x1001 -/* - * XXX this is for tinderbox compilation sake only and will go away once the - * FDT transition is complete. - */ -#define MODINFOMD_BOOTINFO 0x2000 - #endif /* !_MACHINE_METADATA_H_ */ Modified: head/sys/boot/uboot/common/metadata.c ============================================================================== --- head/sys/boot/uboot/common/metadata.c Sun Jul 11 21:08:29 2010 (r209908) +++ head/sys/boot/uboot/common/metadata.c Sun Jul 11 21:11:23 2010 (r209909) @@ -36,9 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if !defined(LOADER_FDT_SUPPORT) -#include -#endif #include "api_public.h" #include "bootstrap.h" @@ -259,114 +256,6 @@ md_copymodules(vm_offset_t addr) return(addr); } -#if !defined(LOADER_FDT_SUPPORT) -/* - * Prepare the bootinfo structure. Put a ptr to the allocated struct in addr, - * return size. - */ -static int -md_bootinfo(struct bootinfo **addr) -{ -#define TMP_MAX_ETH 8 -#define TMP_MAX_MR 8 - struct bootinfo *bi; - struct bi_mem_region tmp_mr[TMP_MAX_MR]; - struct bi_eth_addr tmp_eth[TMP_MAX_ETH]; - struct sys_info *si; - char *str, *end; - const char *env; - void *ptr; - u_int8_t tmp_addr[6]; - int i, n, mr_no, eth_no, size; - - if ((si = ub_get_sys_info()) == NULL) - panic("can't retrieve U-Boot sysinfo"); - - /* - * Handle mem regions (we only care about DRAM) - */ - for (i = 0, mr_no = 0; i < si->mr_no; i++) { - if (si->mr[i].flags == MR_ATTR_DRAM) { - if (mr_no >= TMP_MAX_MR) { - printf("too many memory regions: %d\n", mr_no); - break; - } - tmp_mr[mr_no].mem_base = si->mr[i].start; - tmp_mr[mr_no].mem_size = si->mr[i].size; - mr_no++; - continue; - } - } - if (mr_no == 0) - panic("can't retrieve RAM info"); - - size = (mr_no * sizeof(struct bi_mem_region) - sizeof(bi->bi_data)); - - /* - * Handle Ethernet addresses: parse u-boot env for eth%daddr - */ - env = NULL; - eth_no = 0; - while ((env = ub_env_enum(env)) != NULL) { - if (strncmp(env, "eth", 3) == 0 && - strncmp(env + (strlen(env) - 4), "addr", 4) == 0) { - - /* Extract interface number */ - i = strtol(env + 3, &end, 10); - if (end == (env + 3)) - /* 'ethaddr' means interface 0 address */ - n = 0; - else - n = i; - - if (n >= TMP_MAX_MR) { - printf("Ethernet interface number too high: %d. " - "Skipping...\n"); - continue; - } - - str = ub_env_get(env); - for (i = 0; i < 6; i++) { - tmp_addr[i] = str ? strtol(str, &end, 16) : 0; - if (str) - str = (*end) ? end + 1 : end; - - tmp_eth[n].mac_addr[i] = tmp_addr[i]; - } - - /* eth_no is 1-based number of all interfaces defined */ - if (n + 1 > eth_no) - eth_no = n + 1; - } - } - - size += (eth_no * sizeof(struct bi_eth_addr)) + sizeof(struct bootinfo); - - /* - * Once its whole size is calculated, allocate space for the bootinfo - * and copy over the contents from temp containers. - */ - if ((bi = malloc(size)) == NULL) - panic("can't allocate mem for bootinfo"); - - ptr = (struct bi_mem_region *)bi->bi_data; - bcopy(tmp_mr, ptr, mr_no * sizeof(struct bi_mem_region)); - ptr += mr_no * sizeof(struct bi_mem_region); - bcopy(tmp_eth, ptr, eth_no * sizeof(struct bi_eth_addr)); - - bi->bi_mem_reg_no = mr_no; - bi->bi_eth_addr_no = eth_no; - bi->bi_version = BI_VERSION; - bi->bi_bar_base = si->bar; - bi->bi_cpu_clk = si->clk_cpu; - bi->bi_bus_clk = si->clk_bus; - - *addr = bi; - - return (size); -} -#endif - /* * Load the information expected by a kernel. * @@ -390,7 +279,6 @@ md_load(char *args, vm_offset_t *modulep vm_offset_t dtbp; char *rootdevname; int howto; - int bisize; int i; /* @@ -434,11 +322,6 @@ md_load(char *args, vm_offset_t *modulep /* Pad to a page boundary */ addr = roundup(addr, PAGE_SIZE); -#if !defined(LOADER_FDT_SUPPORT) - /* prepare bootinfo */ - bisize = md_bootinfo(&bip); -#endif - kernend = 0; kfp = file_findfile(NULL, "elf32 kernel"); if (kfp == NULL) @@ -457,8 +340,6 @@ md_load(char *args, vm_offset_t *modulep dtbp = bfp == NULL ? 0 : bfp->f_addr; file_addmetadata(kfp, MODINFOMD_DTBP, sizeof dtbp, &dtbp); -#else - file_addmetadata(kfp, MODINFOMD_BOOTINFO, bisize, bip); #endif file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend); From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 21:12:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 419481065678; Sun, 11 Jul 2010 21:12:43 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31F068FC27; Sun, 11 Jul 2010 21:12:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BLChPE092028; Sun, 11 Jul 2010 21:12:43 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BLCh4m092026; Sun, 11 Jul 2010 21:12:43 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007112112.o6BLCh4m092026@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 11 Jul 2010 21:12:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209910 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 21:12:43 -0000 Author: raj Date: Sun Jul 11 21:12:42 2010 New Revision: 209910 URL: http://svn.freebsd.org/changeset/base/209910 Log: Sort platform options. Modified: head/sys/conf/options.powerpc Modified: head/sys/conf/options.powerpc ============================================================================== --- head/sys/conf/options.powerpc Sun Jul 11 21:11:23 2010 (r209909) +++ head/sys/conf/options.powerpc Sun Jul 11 21:12:42 2010 (r209910) @@ -10,8 +10,8 @@ GFB_DEBUG opt_gfb.h GFB_NO_FONT_LOADING opt_gfb.h GFB_NO_MODE_CHANGE opt_gfb.h -POWERMAC opt_platform.h MPC85XX opt_platform.h +POWERMAC opt_platform.h PSIM SC_OFWFB opt_ofwfb.h From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 23:52:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6306E106564A; Sun, 11 Jul 2010 23:52:12 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50F288FC15; Sun, 11 Jul 2010 23:52:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BNqCg4027428; Sun, 11 Jul 2010 23:52:12 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BNqCDX027426; Sun, 11 Jul 2010 23:52:12 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201007112352.o6BNqCDX027426@svn.freebsd.org> From: Andrew Thompson Date: Sun, 11 Jul 2010 23:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209917 - head/sys/dev/usb/wlan X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 23:52:12 -0000 Author: thompsa Date: Sun Jul 11 23:52:12 2010 New Revision: 209917 URL: http://svn.freebsd.org/changeset/base/209917 Log: Update for style(9). Submitted by: Akinori Furukoshi (author) Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Sun Jul 11 22:48:55 2010 (r209916) +++ head/sys/dev/usb/wlan/if_run.c Sun Jul 11 23:52:12 2010 (r209917) @@ -569,7 +569,7 @@ run_attach(device_t self) /* wait for the chip to settle */ for (ntries = 0; ntries < 100; ntries++) { - if (run_read(sc, RT2860_ASIC_VER_ID, &ver) != 0){ + if (run_read(sc, RT2860_ASIC_VER_ID, &ver) != 0) { RUN_UNLOCK(sc); goto detach; } @@ -698,11 +698,11 @@ run_attach(device_t self) if (bootverbose) ieee80211_announce(ic); - return 0; + return (0); detach: run_detach(self); - return(ENXIO); + return (ENXIO); } static int @@ -753,9 +753,9 @@ run_vap_create(struct ieee80211com *ic, struct ieee80211vap *vap; int i; - if(sc->rvp_cnt >= RUN_VAP_MAX){ + if (sc->rvp_cnt >= RUN_VAP_MAX) { if_printf(ifp, "number of VAPs maxed out\n"); - return NULL; + return (NULL); } switch (opmode) { @@ -769,7 +769,7 @@ run_vap_create(struct ieee80211com *ic, case IEEE80211_M_MBSS: /* other than WDS vaps, only one at a time */ if (!TAILQ_EMPTY(&ic->ic_vaps)) - return NULL; + return (NULL); break; case IEEE80211_M_WDS: TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next){ @@ -779,20 +779,20 @@ run_vap_create(struct ieee80211com *ic, flags &= ~IEEE80211_CLONE_BSSID; break; } - if(vap == NULL){ + if (vap == NULL) { if_printf(ifp, "wds only supported in ap mode\n"); - return NULL; + return (NULL); } break; default: if_printf(ifp, "unknown opmode %d\n", opmode); - return NULL; + return (NULL); } rvp = (struct run_vap *) malloc(sizeof(struct run_vap), M_80211_VAP, M_NOWAIT | M_ZERO); if (rvp == NULL) - return NULL; + return (NULL); vap = &rvp->vap; ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); @@ -820,23 +820,23 @@ run_vap_create(struct ieee80211com *ic, ieee80211_vap_attach(vap, run_media_change, ieee80211_media_status); /* make sure id is always unique */ - for(i = 0; i < RUN_VAP_MAX; i++){ + for (i = 0; i < RUN_VAP_MAX; i++) { if((sc->rvp_bmap & 1 << i) == 0){ sc->rvp_bmap |= 1 << i; rvp->rvp_id = i; break; } } - if(sc->rvp_cnt++ == 0) + if (sc->rvp_cnt++ == 0) ic->ic_opmode = opmode; - if(opmode == IEEE80211_M_HOSTAP) + if (opmode == IEEE80211_M_HOSTAP) sc->cmdq_run = RUN_CMDQ_GO; DPRINTF("rvp_id=%d bmap=%x rvp_cnt=%d\n", rvp->rvp_id, sc->rvp_bmap, sc->rvp_cnt); - return vap; + return (vap); } static void @@ -848,7 +848,7 @@ run_vap_delete(struct ieee80211vap *vap) struct run_softc *sc; uint8_t rvp_id; - if(vap == NULL) + if (vap == NULL) return; ic = vap->iv_ic; @@ -891,15 +891,15 @@ run_cmdq_cb(void *arg, int pending) /* call cmdq[].func locked */ RUN_LOCK(sc); - for(i = sc->cmdq_exec; sc->cmdq[i].func && pending; - i = sc->cmdq_exec, pending--){ + for (i = sc->cmdq_exec; sc->cmdq[i].func && pending; + i = sc->cmdq_exec, pending--) { DPRINTFN(6, "cmdq_exec=%d pending=%d\n", i, pending); - if(sc->cmdq_run == RUN_CMDQ_GO){ + if (sc->cmdq_run == RUN_CMDQ_GO) { /* * If arg0 is NULL, callback func needs more * than one arg. So, pass ptr to cmdq struct. */ - if(sc->cmdq[i].arg0) + if (sc->cmdq[i].arg0) sc->cmdq[i].func(sc->cmdq[i].arg0); else sc->cmdq[i].func(&sc->cmdq[i]); @@ -942,7 +942,7 @@ run_unsetup_tx_list(struct run_softc *sc /* free up all node references and mbufs */ for (data = &pq->tx_data[0]; - data < &pq->tx_data[RUN_TX_RING_COUNT]; data++){ + data < &pq->tx_data[RUN_TX_RING_COUNT]; data++) { if (data->m != NULL) { m_freem(data->m); data->m = NULL; @@ -968,7 +968,7 @@ run_load_microcode(struct run_softc *sc) RUN_UNLOCK(sc); fw = firmware_get("runfw"); RUN_LOCK(sc); - if(fw == NULL){ + if (fw == NULL) { device_printf(sc->sc_dev, "failed loadfirmware of file %s\n", "runfw"); return ENOENT; @@ -990,14 +990,14 @@ run_load_microcode(struct run_softc *sc) base = fw->data; if ((sc->mac_ver) != 0x2860 && (sc->mac_ver) != 0x2872 && - (sc->mac_ver) != 0x3070){ + (sc->mac_ver) != 0x3070) { base += 4096; } /* cheap sanity check */ temp = fw->data; bytes = *temp; - if(bytes != be64toh(0xffffff0210280210)) { + if (bytes != be64toh(0xffffff0210280210)) { device_printf(sc->sc_dev, "firmware checksum failed\n"); error = EINVAL; goto fail; @@ -1058,7 +1058,7 @@ run_reset(struct run_softc *sc) USETW(req.wValue, 1); USETW(req.wIndex, 0); USETW(req.wLength, 0); - return usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL); + return (usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)); } static usb_error_t @@ -1093,7 +1093,7 @@ run_read(struct run_softc *sc, uint16_t *val = le32toh(tmp); else *val = 0xffffffff; - return error; + return (error); } static int @@ -1107,7 +1107,7 @@ run_read_region_1(struct run_softc *sc, USETW(req.wIndex, reg); USETW(req.wLength, len); - return run_do_request(sc, &req, buf); + return (run_do_request(sc, &req, buf)); } static int @@ -1121,7 +1121,7 @@ run_write_2(struct run_softc *sc, uint16 USETW(req.wIndex, reg); USETW(req.wLength, 0); - return run_do_request(sc, &req, NULL); + return (run_do_request(sc, &req, NULL)); } static int @@ -1131,7 +1131,7 @@ run_write(struct run_softc *sc, uint16_t if ((error = run_write_2(sc, reg, val & 0xffff)) == 0) error = run_write_2(sc, reg + 2, val >> 16); - return error; + return (error); } static int @@ -1147,7 +1147,7 @@ run_write_region_1(struct run_softc *sc, KASSERT((len & 1) == 0, ("run_write_region_1: Data too long.\n")); for (i = 0; i < len && error == 0; i += 2) error = run_write_2(sc, reg + i, buf[i] | buf[i + 1] << 8); - return error; + return (error); #else usb_device_request_t req; @@ -1156,7 +1156,7 @@ run_write_region_1(struct run_softc *sc, USETW(req.wValue, 0); USETW(req.wIndex, reg); USETW(req.wLength, len); - return run_do_request(sc, &req, buf); + return (run_do_request(sc, &req, buf)); #endif } @@ -1168,7 +1168,7 @@ run_set_region_4(struct run_softc *sc, u KASSERT((len & 3) == 0, ("run_set_region_4: Invalid data length.\n")); for (i = 0; i < len && error == 0; i += 4) error = run_write(sc, reg + i, val); - return error; + return (error); } /* Read 16-bit from eFUSE ROM (RT3070 only.) */ @@ -1180,7 +1180,7 @@ run_efuse_read_2(struct run_softc *sc, u int error, ntries; if ((error = run_read(sc, RT3070_EFUSE_CTRL, &tmp)) != 0) - return error; + return (error); addr *= 2; /*- @@ -1195,25 +1195,25 @@ run_efuse_read_2(struct run_softc *sc, u run_write(sc, RT3070_EFUSE_CTRL, tmp); for (ntries = 0; ntries < 100; ntries++) { if ((error = run_read(sc, RT3070_EFUSE_CTRL, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT3070_EFSROM_KICK)) break; run_delay(sc, 2); } if (ntries == 100) - return ETIMEDOUT; + return (ETIMEDOUT); if ((tmp & RT3070_EFUSE_AOUT_MASK) == RT3070_EFUSE_AOUT_MASK) { *val = 0xffff; /* address not found */ - return 0; + return (0); } /* determine to which 32-bit register our 16-bit word belongs */ reg = RT3070_EFUSE_DATA3 - (addr & 0xc); if ((error = run_read(sc, reg, &tmp)) != 0) - return error; + return (error); *val = (addr & 2) ? tmp >> 16 : tmp & 0xffff; - return 0; + return (0); } static int @@ -1235,7 +1235,7 @@ run_eeprom_read_2(struct run_softc *sc, *val = le16toh(tmp); else *val = 0xffff; - return error; + return (error); } static __inline int @@ -1253,17 +1253,17 @@ run_rt2870_rf_write(struct run_softc *sc for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT2860_RF_CSR_CFG0, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT2860_RF_REG_CTRL)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); /* RF registers are 24-bit on the RT2860 */ tmp = RT2860_RF_REG_CTRL | 24 << RT2860_RF_REG_WIDTH_SHIFT | (val & 0x3fffff) << 2 | (reg & 3); - return run_write(sc, RT2860_RF_CSR_CFG0, tmp); + return (run_write(sc, RT2860_RF_CSR_CFG0, tmp)); } static int @@ -1274,28 +1274,28 @@ run_rt3070_rf_read(struct run_softc *sc, for (ntries = 0; ntries < 100; ntries++) { if ((error = run_read(sc, RT3070_RF_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT3070_RF_KICK)) break; } if (ntries == 100) - return ETIMEDOUT; + return (ETIMEDOUT); tmp = RT3070_RF_KICK | reg << 8; if ((error = run_write(sc, RT3070_RF_CSR_CFG, tmp)) != 0) - return error; + return (error); for (ntries = 0; ntries < 100; ntries++) { if ((error = run_read(sc, RT3070_RF_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT3070_RF_KICK)) break; } if (ntries == 100) - return ETIMEDOUT; + return (ETIMEDOUT); *val = tmp & 0xff; - return 0; + return (0); } static int @@ -1306,15 +1306,15 @@ run_rt3070_rf_write(struct run_softc *sc for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT3070_RF_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT3070_RF_KICK)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); tmp = RT3070_RF_WRITE | RT3070_RF_KICK | reg << 8 | val; - return run_write(sc, RT3070_RF_CSR_CFG, tmp); + return (run_write(sc, RT3070_RF_CSR_CFG, tmp)); } static int @@ -1325,28 +1325,28 @@ run_bbp_read(struct run_softc *sc, uint8 for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT2860_BBP_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT2860_BBP_CSR_KICK)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); tmp = RT2860_BBP_CSR_READ | RT2860_BBP_CSR_KICK | reg << 8; if ((error = run_write(sc, RT2860_BBP_CSR_CFG, tmp)) != 0) - return error; + return (error); for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT2860_BBP_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT2860_BBP_CSR_KICK)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); *val = tmp & 0xff; - return 0; + return (0); } static int @@ -1357,15 +1357,15 @@ run_bbp_write(struct run_softc *sc, uint for (ntries = 0; ntries < 10; ntries++) { if ((error = run_read(sc, RT2860_BBP_CSR_CFG, &tmp)) != 0) - return error; + return (error); if (!(tmp & RT2860_BBP_CSR_KICK)) break; } if (ntries == 10) - return ETIMEDOUT; + return (ETIMEDOUT); tmp = RT2860_BBP_CSR_KICK | reg << 8 | val; - return run_write(sc, RT2860_BBP_CSR_CFG, tmp); + return (run_write(sc, RT2860_BBP_CSR_CFG, tmp)); } /* @@ -1389,7 +1389,7 @@ run_mcu_cmd(struct run_softc *sc, uint8_ tmp = RT2860_H2M_BUSY | RT2860_TOKEN_NO_INTR << 16 | arg; if ((error = run_write(sc, RT2860_H2M_MAILBOX, tmp)) == 0) error = run_write(sc, RT2860_HOST_CMD, cmd); - return error; + return (error); } /* @@ -1410,7 +1410,7 @@ b4inc(uint32_t b32, int8_t delta) b4 = 0xf; b32 = b32 >> 4 | b4 << 28; } - return b32; + return (b32); } static const char * @@ -1427,7 +1427,7 @@ run_get_rf(int rev) case RT3070_RF_3022: return "RT3022"; case RT3070_RF_3052: return "RT3052"; } - return "unknown"; + return ("unknown"); } int @@ -1678,7 +1678,7 @@ run_read_eeprom(struct run_softc *sc) sc->rssi_5ghz[ant] = 0; } } - return 0; + return (0); } struct ieee80211_node * @@ -1701,9 +1701,9 @@ run_media_change(struct ifnet *ifp) RUN_LOCK(sc); error = ieee80211_media_change(ifp); - if (error != ENETRESET){ + if (error != ENETRESET) { RUN_UNLOCK(sc); - return error; + return (error); } tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)]; @@ -1726,7 +1726,7 @@ run_media_change(struct ifnet *ifp) RUN_UNLOCK(sc); - return 0; + return (0); } static int @@ -1772,7 +1772,7 @@ run_newstate(struct ieee80211vap *vap, e sc->runbmap &= ~bid; /* abort TSF synchronization if there is no vap running */ - if(--sc->running == 0){ + if (--sc->running == 0) { run_read(sc, RT2860_BCN_TIME_CFG, &tmp); run_write(sc, RT2860_BCN_TIME_CFG, tmp & ~(RT2860_BCN_TX_EN | RT2860_TSF_TIMER_EN | @@ -1783,13 +1783,13 @@ run_newstate(struct ieee80211vap *vap, e case IEEE80211_S_RUN: ni = vap->iv_bss; - if(!(sc->runbmap & bid)){ + if (!(sc->runbmap & bid)) { if(sc->running++) restart_ratectl = 1; sc->runbmap |= bid; } - switch(vap->iv_opmode){ + switch (vap->iv_opmode) { case IEEE80211_M_HOSTAP: case IEEE80211_M_MBSS: sc->ap_running |= bid; @@ -1798,13 +1798,13 @@ run_newstate(struct ieee80211vap *vap, e break; case IEEE80211_M_IBSS: sc->adhoc_running |= bid; - if(!sc->ap_running) + if (!sc->ap_running) ic->ic_opmode = vap->iv_opmode; run_update_beacon_cb(vap); break; case IEEE80211_M_STA: sc->sta_running |= bid; - if(!sc->ap_running && !sc->adhoc_running) + if (!sc->ap_running && !sc->adhoc_running) ic->ic_opmode = vap->iv_opmode; /* read statistic counters (clear on read) */ @@ -1844,7 +1844,7 @@ run_newstate(struct ieee80211vap *vap, e } /* restart amrr for running VAPs */ - if((sc->ratectl_run = ratectl) && restart_ratectl) + if ((sc->ratectl_run = ratectl) && restart_ratectl) usb_callout_reset(&sc->ratectl_ch, hz, run_ratectl_to, sc); RUN_UNLOCK(sc); @@ -1871,7 +1871,7 @@ run_wme_update_cb(void *arg) wmesp->wme_params[aci].wmep_logcwmin << 12 | wmesp->wme_params[aci].wmep_aifsn << 8 | wmesp->wme_params[aci].wmep_txopLimit); - if(error) goto err; + if (error) goto err; } /* update SCH/DMA registers too */ @@ -1880,29 +1880,29 @@ run_wme_update_cb(void *arg) wmesp->wme_params[WME_AC_VI].wmep_aifsn << 8 | wmesp->wme_params[WME_AC_BK].wmep_aifsn << 4 | wmesp->wme_params[WME_AC_BE].wmep_aifsn); - if(error) goto err; + if (error) goto err; error = run_write(sc, RT2860_WMM_CWMIN_CFG, wmesp->wme_params[WME_AC_VO].wmep_logcwmin << 12 | wmesp->wme_params[WME_AC_VI].wmep_logcwmin << 8 | wmesp->wme_params[WME_AC_BK].wmep_logcwmin << 4 | wmesp->wme_params[WME_AC_BE].wmep_logcwmin); - if(error) goto err; + if (error) goto err; error = run_write(sc, RT2860_WMM_CWMAX_CFG, wmesp->wme_params[WME_AC_VO].wmep_logcwmax << 12 | wmesp->wme_params[WME_AC_VI].wmep_logcwmax << 8 | wmesp->wme_params[WME_AC_BK].wmep_logcwmax << 4 | wmesp->wme_params[WME_AC_BE].wmep_logcwmax); - if(error) goto err; + if (error) goto err; error = run_write(sc, RT2860_WMM_TXOP0_CFG, wmesp->wme_params[WME_AC_BK].wmep_txopLimit << 16 | wmesp->wme_params[WME_AC_BE].wmep_txopLimit); - if(error) goto err; + if (error) goto err; error = run_write(sc, RT2860_WMM_TXOP1_CFG, wmesp->wme_params[WME_AC_VO].wmep_txopLimit << 16 | wmesp->wme_params[WME_AC_VI].wmep_txopLimit); err: - if(error) + if (error) DPRINTF("WME update failed\n"); return; @@ -1914,13 +1914,13 @@ run_wme_update(struct ieee80211com *ic) struct run_softc *sc = ic->ic_ifp->if_softc; /* sometime called wothout lock */ - if(mtx_owned(&ic->ic_comlock.mtx)){ + if (mtx_owned(&ic->ic_comlock.mtx)) { uint32_t i = RUN_CMDQ_GET(&sc->cmdq_store); DPRINTF("cmdq_store=%d\n", i); sc->cmdq[i].func = run_wme_update_cb; sc->cmdq[i].arg0 = ic; ieee80211_runtask(ic, &sc->cmdq_task); - return (0); + return 0; } RUN_LOCK(sc); @@ -1962,7 +1962,7 @@ run_key_set_cb(void *arg) RUN_LOCK_ASSERT(sc, MA_OWNED); - if(vap->iv_opmode == IEEE80211_M_HOSTAP) + if (vap->iv_opmode == IEEE80211_M_HOSTAP) ni = ieee80211_find_vap_node(&ic->ic_sta, vap, cmdq->mac); else ni = vap->iv_bss; @@ -2017,7 +2017,7 @@ run_key_set_cb(void *arg) if (!(k->wk_flags & IEEE80211_KEY_GROUP) || (k->wk_flags & (IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV))) { /* set initial packet number in IV+EIV */ - if (k->wk_cipher == IEEE80211_CIPHER_WEP){ + if (k->wk_cipher == IEEE80211_CIPHER_WEP) { memset(iv, 0, sizeof iv); iv[3] = vap->iv_def_txkey << 6; } else { @@ -2036,24 +2036,24 @@ run_key_set_cb(void *arg) iv[6] = k->wk_keytsc >> 32; iv[7] = k->wk_keytsc >> 40; } - if(run_write_region_1(sc, RT2860_IVEIV(wcid), iv, 8)) + if (run_write_region_1(sc, RT2860_IVEIV(wcid), iv, 8)) return; } if (k->wk_flags & IEEE80211_KEY_GROUP) { /* install group key */ - if(run_read(sc, RT2860_SKEY_MODE_0_7, &attr)) + if (run_read(sc, RT2860_SKEY_MODE_0_7, &attr)) return; attr &= ~(0xf << (k->wk_keyix * 4)); attr |= mode << (k->wk_keyix * 4); - if(run_write(sc, RT2860_SKEY_MODE_0_7, attr)) + if (run_write(sc, RT2860_SKEY_MODE_0_7, attr)) return; } else { /* install pairwise key */ - if(run_read(sc, RT2860_WCID_ATTR(wcid), &attr)) + if (run_read(sc, RT2860_WCID_ATTR(wcid), &attr)) return; attr = (attr & ~0xf) | (mode << 1) | RT2860_RX_PKEY_EN; - if(run_write(sc, RT2860_WCID_ATTR(wcid), attr)) + if (run_write(sc, RT2860_WCID_ATTR(wcid), attr)) return; } @@ -2091,13 +2091,13 @@ run_key_set(struct ieee80211vap *vap, st * To make sure key will be set when hostapd * calls iv_key_set() before if_init(). */ - if(vap->iv_opmode == IEEE80211_M_HOSTAP){ + if (vap->iv_opmode == IEEE80211_M_HOSTAP) { RUN_LOCK(sc); sc->cmdq_key_set = RUN_CMDQ_GO; RUN_UNLOCK(sc); } - return(1); + return (1); } /* @@ -2186,10 +2186,10 @@ run_ratectl_cb(void *arg, int pending) struct ieee80211com *ic = sc->sc_ifp->if_l2com; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - if(vap == NULL) + if (vap == NULL) return; - if(sc->rvp_cnt <= 1 && vap->iv_opmode == IEEE80211_M_STA) + if (sc->rvp_cnt <= 1 && vap->iv_opmode == IEEE80211_M_STA) run_iter_func(sc, vap->iv_bss); else { /* @@ -2227,7 +2227,7 @@ run_drain_fifo(void *arg) /* drain Tx status FIFO (maxsize = 16) */ run_read(sc, RT2860_TX_STAT_FIFO, &stat); DPRINTFN(4, "tx stat 0x%08x\n", stat); - if(!(stat & RT2860_TXQ_VLD)) + if (!(stat & RT2860_TXQ_VLD)) break; wcid = (stat >> RT2860_TXQ_WCID_SHIFT) & 0xff; @@ -2238,7 +2238,7 @@ run_drain_fifo(void *arg) continue; ni = sc->sc_ni[wcid]; - if(ni->ni_rctls == NULL) + if (ni->ni_rctls == NULL) continue; /* update per-STA AMRR stats */ @@ -2281,8 +2281,8 @@ run_iter_func(void *arg, struct ieee8021 int txcnt = 0, success = 0, retrycnt = 0; int error; - if(sc->rvp_cnt <= 1 && (vap->iv_opmode == IEEE80211_M_IBSS || - vap->iv_opmode == IEEE80211_M_STA)){ + if (sc->rvp_cnt <= 1 && (vap->iv_opmode == IEEE80211_M_IBSS || + vap->iv_opmode == IEEE80211_M_STA)) { RUN_LOCK(sc); /* read statistic counters (clear on read) and update AMRR state */ @@ -2347,13 +2347,13 @@ run_newassoc(struct ieee80211_node *ni, uint8_t wcid = RUN_AID2WCID(ni->ni_associd); int i, j; - if(wcid > RT2870_WCID_MAX){ + if (wcid > RT2870_WCID_MAX) { device_printf(sc->sc_dev, "wcid=%d out of range\n", wcid); return; } /* only interested in true associations */ - if (isnew && ni->ni_associd != 0){ + if (isnew && ni->ni_associd != 0) { /* * This function could is called though timeout function. @@ -2422,7 +2422,7 @@ run_maxrssi_chain(struct run_softc *sc, if (rxwi->rssi[2] > rxwi->rssi[rxchain]) rxchain = 2; } - return rxchain; + return (rxchain); } static void @@ -2463,12 +2463,12 @@ run_rx_frame(struct run_softc *sc, struc wh = mtod(m, struct ieee80211_frame *); - if (wh->i_fc[1] & IEEE80211_FC1_WEP){ + if (wh->i_fc[1] & IEEE80211_FC1_WEP) { wh->i_fc[1] &= ~IEEE80211_FC1_WEP; m->m_flags |= M_WEP; } - if (flags & RT2860_RX_L2PAD){ + if (flags & RT2860_RX_L2PAD) { DPRINTFN(8, "received RT2860_RX_L2PAD frame\n"); len += 2; } @@ -2478,7 +2478,7 @@ run_rx_frame(struct run_softc *sc, struc if (__predict_false(flags & RT2860_RX_MICERR)) { /* report MIC failures to net80211 for TKIP */ - if(ni != NULL) + if (ni != NULL) ieee80211_notify_michael_failure(ni->ni_vap, wh, rxwi->keyidx); m_freem(m); ifp->if_ierrors++; @@ -2500,7 +2500,7 @@ run_rx_frame(struct run_softc *sc, struc (void)ieee80211_input_all(ic, m, rssi, nf); } - if(__predict_false(ieee80211_radiotap_active(ic))){ + if (__predict_false(ieee80211_radiotap_active(ic))) { struct run_rx_radiotap_header *tap = &sc->sc_rxtap; tap->wr_flags = 0; @@ -2601,7 +2601,7 @@ tr_setup: goto tr_setup; } - if(sc->rx_m != NULL){ + if (sc->rx_m != NULL) { m_freem(sc->rx_m); sc->rx_m = NULL; } @@ -2632,7 +2632,7 @@ tr_setup: } /* If it is the last one or a single frame, we won't copy. */ - if((xferlen -= dmalen + 8) <= 8){ + if ((xferlen -= dmalen + 8) <= 8) { /* trim 32-bit DMA-len header */ m->m_data += 4; m->m_pkthdr.len = m->m_len -= 4; @@ -2672,7 +2672,7 @@ run_tx_free(struct run_endpoint_queue *p m_freem(data->m); data->m = NULL; - if(data->ni == NULL) { + if (data->ni == NULL) { DPRINTF("no node\n"); } else { ieee80211_free_node(data->ni); @@ -2702,7 +2702,7 @@ run_bulk_tx_callbackN(struct usb_xfer *x usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); - switch (USB_GET_STATE(xfer)){ + switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: DPRINTFN(11, "transfer complete: %d " "bytes @ index %d\n", actlen, index); @@ -2720,7 +2720,7 @@ run_bulk_tx_callbackN(struct usb_xfer *x case USB_ST_SETUP: tr_setup: data = STAILQ_FIRST(&pq->tx_qh); - if(data == NULL) + if (data == NULL) break; STAILQ_REMOVE_HEAD(&pq->tx_qh, next); @@ -2790,7 +2790,7 @@ tr_setup: run_tx_free(pq, data, error); usbd_xfer_set_priv(xfer, NULL); } - if(vap == NULL) + if (vap == NULL) vap = TAILQ_FIRST(&ic->ic_vaps); if (error != USB_ERR_CANCELLED) { @@ -2908,7 +2908,7 @@ run_set_tx_desc(struct run_softc *sc, st else txwi->txop |= RT2860_TX_TXOP_BACKOFF; - if(vap->iv_opmode != IEEE80211_M_STA && !IEEE80211_QOS_HAS_SEQ(wh)) + if (vap->iv_opmode != IEEE80211_M_STA && !IEEE80211_QOS_HAS_SEQ(wh)) txwi->xflags |= RT2860_TX_NSEQ; } @@ -3036,8 +3036,8 @@ run_tx(struct run_softc *sc, struct mbuf * * FIFO stats doesn't count Tx with WCID 0xff, so we do this in run_tx(). */ - if(sc->rvp_cnt > 1 || vap->iv_opmode == IEEE80211_M_HOSTAP || - vap->iv_opmode == IEEE80211_M_MBSS){ + if (sc->rvp_cnt > 1 || vap->iv_opmode == IEEE80211_M_HOSTAP || + vap->iv_opmode == IEEE80211_M_MBSS) { uint16_t pid = (rt2860_rates[ridx].mcs + 1) & 0xf; txwi->len |= htole16(pid << RT2860_TX_PID_SHIFT); @@ -3053,7 +3053,7 @@ run_tx(struct run_softc *sc, struct mbuf * run_ratectl_cb() via callout. * Call it early. Otherwise overflow. */ - if(sc->fifo_cnt++ == 10){ + if (sc->fifo_cnt++ == 10) { /* * With multiple vaps or if_bridge, if_start() is called * with a non-sleepable lock, tcpinp. So, need to defer. @@ -3274,7 +3274,7 @@ run_tx_param(struct run_softc *sc, struc rate); if (error) { /* let caller free mbuf */ - return (error); + return error; } opflags |= /*XXX RT2573_TX_LONG_RETRY |*/ RT2860_TX_TXOP_SIFS; } @@ -3313,7 +3313,7 @@ run_tx_param(struct run_softc *sc, struc usbd_transfer_start(sc->sc_xfer[0]); - return (0); + return (0); } static int @@ -3334,14 +3334,14 @@ run_raw_xmit(struct ieee80211_node *ni, if (params == NULL) { /* tx mgt packet */ - if ((error = run_tx_mgt(sc, m, ni)) != 0){ + if ((error = run_tx_mgt(sc, m, ni)) != 0) { ifp->if_oerrors++; DPRINTF("mgt tx failed\n"); goto done; } } else { /* tx raw packet with param */ - if ((error = run_tx_param(sc, m, ni, params)) != 0){ + if ((error = run_tx_param(sc, m, ni, params)) != 0) { ifp->if_oerrors++; DPRINTF("tx with param failed\n"); goto done; @@ -3353,7 +3353,7 @@ run_raw_xmit(struct ieee80211_node *ni, done: RUN_UNLOCK(sc); - if(error != 0){ + if (error != 0) { if(m != NULL) m_freem(m); ieee80211_free_node(ni); @@ -3412,13 +3412,13 @@ run_ioctl(struct ifnet *ifp, u_long cmd, } else run_update_promisc_locked(ifp); } else { - if(ifp->if_drv_flags & IFF_DRV_RUNNING && - (ic->ic_nrunning == 0 || sc->rvp_cnt <= 1)){ + if (ifp->if_drv_flags & IFF_DRV_RUNNING && + (ic->ic_nrunning == 0 || sc->rvp_cnt <= 1)) { run_stop(sc); } } RUN_UNLOCK(sc); - if(startall) + if (startall) ieee80211_start_all(ic); break; case SIOCGIFMEDIA: @@ -3813,7 +3813,7 @@ run_set_chan(struct run_softc *sc, struc chan = ieee80211_chan2ieee(ic, c); if (chan == 0 || chan == IEEE80211_CHAN_ANY) - return EINVAL; + return (EINVAL); if (sc->mac_ver == 0x3572) run_rt3572_set_chan(sc, chan); @@ -3837,7 +3837,7 @@ run_set_chan(struct run_softc *sc, struc run_delay(sc, 10); - return 0; + return (0); } static void @@ -3918,7 +3918,7 @@ run_update_beacon_cb(void *arg) struct mbuf *m; uint8_t ridx; - if(vap->iv_bss->ni_chan == IEEE80211_CHAN_ANYC) + if (vap->iv_bss->ni_chan == IEEE80211_CHAN_ANYC) return; if ((m = ieee80211_beacon_alloc(vap->iv_bss, &RUN_VAP(vap)->bo)) == NULL) @@ -3981,7 +3981,7 @@ run_usb_timeout_cb(void *arg) if(vap->iv_state == IEEE80211_S_RUN && vap->iv_opmode != IEEE80211_M_STA) run_reset_livelock(sc); - else if(vap->iv_state == IEEE80211_S_SCAN){ + else if (vap->iv_state == IEEE80211_S_SCAN) { DPRINTF("timeout caused by scan\n"); /* cancel bgscan */ ieee80211_cancel_scan(vap); @@ -4003,7 +4003,7 @@ run_reset_livelock(struct run_softc *sc) */ run_read(sc, RT2860_DEBUG, &tmp); DPRINTFN(3, "debug reg %08x\n", tmp); - if((tmp & (1 << 29)) && (tmp & (1 << 7 | 1 << 5))){ + if ((tmp & (1 << 29)) && (tmp & (1 << 7 | 1 << 5))) { DPRINTF("CTS-to-self livelock detected\n"); run_write(sc, RT2860_MAC_SYS_CTRL, RT2860_MAC_SRST); run_delay(sc, 1); @@ -4202,7 +4202,7 @@ run_rssi2dbm(struct run_softc *sc, uint8 } else delta = sc->rssi_2ghz[rxchain] - sc->lna[0]; - return -12 - delta - rssi; + return (-12 - delta - rssi); } static int @@ -4219,7 +4219,7 @@ run_bbp_init(struct run_softc *sc) break; } if (ntries == 20) - return ETIMEDOUT; + return (ETIMEDOUT); /* initialize BBP registers to default values */ for (i = 0; i < nitems(rt2860_def_bbp); i++) { @@ -4239,7 +4239,7 @@ run_bbp_init(struct run_softc *sc) run_bbp_write(sc, 69, 0x16); run_bbp_write(sc, 73, 0x12); } - return 0; + return (0); } static int @@ -4291,7 +4291,7 @@ run_rt3070_rf_init(struct run_softc *sc) run_read(sc, RT3070_GPIO_SWITCH, &tmp); run_write(sc, RT3070_GPIO_SWITCH, tmp & ~0x20); - } else if(sc->mac_ver == 0x3572){ + } else if (sc->mac_ver == 0x3572) { run_rt3070_rf_read(sc, 6, &rf); run_rt3070_rf_write(sc, 6, rf | 0x40); @@ -4300,7 +4300,7 @@ run_rt3070_rf_init(struct run_softc *sc) tmp = (tmp & ~0x1f000000) | 0x0d000000; run_write(sc, RT3070_LDO_CFG0, tmp); - if (sc->mac_rev < 0x0211 || !sc->patch_dac){ + if (sc->mac_rev < 0x0211 || !sc->patch_dac) { run_delay(sc, 1); /* wait for 1msec */ /* decrease voltage back to 1.2V */ tmp = (tmp & ~0x1f000000) | 0x01000000; @@ -4378,7 +4378,7 @@ run_rt3070_rf_init(struct run_softc *sc) rf |= 0x03; run_rt3070_rf_write(sc, 27, rf); } - return 0; + return (0); } static int @@ -4443,7 +4443,7 @@ run_rt3070_filter_calib(struct run_softc run_rt3070_rf_read(sc, 22, &rf22); run_rt3070_rf_write(sc, 22, rf22 & ~0x01); - return 0; + return (0); } static void @@ -4569,7 +4569,7 @@ run_txrx_enable(struct run_softc *sc) run_write(sc, RT2860_MAC_SYS_CTRL, RT2860_MAC_RX_EN | RT2860_MAC_TX_EN); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Jul 11 23:54:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9208106566B; Sun, 11 Jul 2010 23:54:44 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7E928FC17; Sun, 11 Jul 2010 23:54:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6BNsi5x027982; Sun, 11 Jul 2010 23:54:44 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6BNsivl027980; Sun, 11 Jul 2010 23:54:44 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201007112354.o6BNsivl027980@svn.freebsd.org> From: Andrew Thompson Date: Sun, 11 Jul 2010 23:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209918 - head/sys/dev/usb/wlan X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 23:54:44 -0000 Author: thompsa Date: Sun Jul 11 23:54:44 2010 New Revision: 209918 URL: http://svn.freebsd.org/changeset/base/209918 Log: Use more compact deviceid table. Submitted by: Akinori Furukoshi Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Sun Jul 11 23:52:12 2010 (r209917) +++ head/sys/dev/usb/wlan/if_run.c Sun Jul 11 23:54:44 2010 (r209918) @@ -97,199 +97,201 @@ SYSCTL_INT(_hw_usb_run, OID_AUTO, debug, #define RUN_CMDQ_GET(c) (atomic_fetchadd_32((c), 1) & RUN_CMDQ_MASQ) static const struct usb_device_id run_devs[] = { - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2770) }, - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2870) }, - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT3070) }, - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT3071) }, - { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT3072) }, - { USB_VP(USB_VENDOR_ABOCOM2, USB_PRODUCT_ABOCOM2_RT2870_1) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2770) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_1) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_2) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_3) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_4) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_5) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_1) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_2) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_3) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_4) }, - { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_5) }, - { USB_VP(USB_VENDOR_AIRTIES, USB_PRODUCT_AIRTIES_RT3070) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT2070) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT2770) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT2870) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3070) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3071) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3072) }, - { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3572) }, - { USB_VP(USB_VENDOR_AMIGO, USB_PRODUCT_AMIGO_RT2870_1) }, - { USB_VP(USB_VENDOR_AMIGO, USB_PRODUCT_AMIGO_RT2870_2) }, - { USB_VP(USB_VENDOR_AMIT, USB_PRODUCT_AMIT_CGWLUSB2GNR) }, - { USB_VP(USB_VENDOR_AMIT, USB_PRODUCT_AMIT_RT2870_1) }, - { USB_VP(USB_VENDOR_AMIT2, USB_PRODUCT_AMIT2_RT2870) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_1) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_2) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_3) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_4) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_5) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_USBN13) }, - { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT3070_1) }, - { USB_VP(USB_VENDOR_ASUS2, USB_PRODUCT_ASUS2_USBN11) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT2870_1) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT2870_2) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT3070_1) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT3070_2) }, - { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT3070_3) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D8053V3) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D8055) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F6D4050V1) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_RT2870_1) }, - { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_RT2870_2) }, - { USB_VP(USB_VENDOR_CISCOLINKSYS2, USB_PRODUCT_CISCOLINKSYS2_RT3070) }, - { USB_VP(USB_VENDOR_CISCOLINKSYS3, USB_PRODUCT_CISCOLINKSYS2_RT3070) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_1) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_2) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_3) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_4) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_5) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_6) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_7) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_8) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT3070_1) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT3070_2) }, - { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_VIGORN61) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_CGWLUSB300GNM) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT2870_1) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT2870_2) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT2870_3) }, - { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT3070) }, - { USB_VP(USB_VENDOR_CYBERTAN, USB_PRODUCT_CYBERTAN_RT2870) }, - { USB_VP(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_RT2870) }, - { USB_VP(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_RT3072) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA130) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT2870_1) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT2870_2) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_1) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_2) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_3) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_4) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_5) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3072) }, - { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3072_1) }, - { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_EW7717) }, - { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_EW7718) }, - { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_RT2870_1) }, - { USB_VP(USB_VENDOR_ENCORE, USB_PRODUCT_ENCORE_RT3070_1) }, - { USB_VP(USB_VENDOR_ENCORE, USB_PRODUCT_ENCORE_RT3070_2) }, - { USB_VP(USB_VENDOR_ENCORE, USB_PRODUCT_ENCORE_RT3070_3) }, - { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWB31N) }, - { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWB32L) }, - { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_RT2870_1) }, - { USB_VP(USB_VENDOR_GIGASET, USB_PRODUCT_GIGASET_RT3070_1) }, - { USB_VP(USB_VENDOR_GIGASET, USB_PRODUCT_GIGASET_RT3070_2) }, - { USB_VP(USB_VENDOR_GUILLEMOT, USB_PRODUCT_GUILLEMOT_HWNU300) }, - { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_HWUN2) }, - { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_RT2870_1) }, - { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_RT2870_2) }, - { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_RT3070) }, - { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_1) }, - { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_2) }, - { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_3) }, - { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_4) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_RT3070) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB100) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB54GCV3) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB600N) }, - { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB600NV2) }, - { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_1) }, - { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_2) }, - { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_3) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_RT2870_1) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_RT2870_2) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCAG300N) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCG300N) }, - { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCGN) }, - { USB_VP(USB_VENDOR_MOTOROLA4, USB_PRODUCT_MOTOROLA4_RT2770) }, - { USB_VP(USB_VENDOR_MOTOROLA4, USB_PRODUCT_MOTOROLA4_RT3070) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_1) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_2) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_3) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_4) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_5) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_6) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_7) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_8) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_9) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_10) }, - { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_11) }, - { USB_VP(USB_VENDOR_OVISLINK, USB_PRODUCT_OVISLINK_RT3072) }, - { USB_VP(USB_VENDOR_PARA, USB_PRODUCT_PARA_RT3070) }, - { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT2870) }, - { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070) }, - { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070_2) }, - { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070_3) }, - { USB_VP(USB_VENDOR_PHILIPS, USB_PRODUCT_PHILIPS_RT2870) }, - { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS300MINIS) }, - { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUSMICRON) }, - { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_RT2870) }, - { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_RT3070) }, - { USB_VP(USB_VENDOR_QCOM, USB_PRODUCT_QCOM_RT2870) }, - { USB_VP(USB_VENDOR_QUANTA, USB_PRODUCT_QUANTA_RT3070) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2070) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2770) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2870) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3070) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3071) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3072) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3370) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3572) }, - { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT8070) }, - { USB_VP(USB_VENDOR_SAMSUNG2, USB_PRODUCT_SAMSUNG2_RT2870_1) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_1) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_2) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_3) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_4) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3070) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3071) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_1) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_2) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_3) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_4) }, - { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_5) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2770) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_1) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_2) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_3) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_4) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_2) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_3) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_4) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3071) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_1) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_2) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_3) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_4) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_5) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_6) }, - { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL608) }, - { USB_VP(USB_VENDOR_SPARKLAN, USB_PRODUCT_SPARKLAN_RT2870_1) }, - { USB_VP(USB_VENDOR_SPARKLAN, USB_PRODUCT_SPARKLAN_RT3070) }, - { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW153) }, - { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW303) }, - { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW313) }, - { USB_VP(USB_VENDOR_TOSHIBA, USB_PRODUCT_TOSHIBA_RT3070) }, - { USB_VP(USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_RT2870_1) }, - { USB_VP(USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_RT2870_1) }, - { USB_VP(USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_RT2870_2) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT2870_1) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT2870_2) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3070) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3072_1) }, - { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3072_2) }, - { USB_VP(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_RT2870_1) }, - { USB_VP(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_RT2870_2) }, +#define RUN_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } + RUN_DEV(ABOCOM, RT2770), + RUN_DEV(ABOCOM, RT2870), + RUN_DEV(ABOCOM, RT3070), + RUN_DEV(ABOCOM, RT3071), + RUN_DEV(ABOCOM, RT3072), + RUN_DEV(ABOCOM2, RT2870_1), + RUN_DEV(ACCTON, RT2770), + RUN_DEV(ACCTON, RT2870_1), + RUN_DEV(ACCTON, RT2870_2), + RUN_DEV(ACCTON, RT2870_3), + RUN_DEV(ACCTON, RT2870_4), + RUN_DEV(ACCTON, RT2870_5), + RUN_DEV(ACCTON, RT3070), + RUN_DEV(ACCTON, RT3070_1), + RUN_DEV(ACCTON, RT3070_2), + RUN_DEV(ACCTON, RT3070_3), + RUN_DEV(ACCTON, RT3070_4), + RUN_DEV(ACCTON, RT3070_5), + RUN_DEV(AIRTIES, RT3070), + RUN_DEV(ALLWIN, RT2070), + RUN_DEV(ALLWIN, RT2770), + RUN_DEV(ALLWIN, RT2870), + RUN_DEV(ALLWIN, RT3070), + RUN_DEV(ALLWIN, RT3071), + RUN_DEV(ALLWIN, RT3072), + RUN_DEV(ALLWIN, RT3572), + RUN_DEV(AMIGO, RT2870_1), + RUN_DEV(AMIGO, RT2870_2), + RUN_DEV(AMIT, CGWLUSB2GNR), + RUN_DEV(AMIT, RT2870_1), + RUN_DEV(AMIT2, RT2870), + RUN_DEV(ASUS, RT2870_1), + RUN_DEV(ASUS, RT2870_2), + RUN_DEV(ASUS, RT2870_3), + RUN_DEV(ASUS, RT2870_4), + RUN_DEV(ASUS, RT2870_5), + RUN_DEV(ASUS, USBN13), + RUN_DEV(ASUS, RT3070_1), + RUN_DEV(ASUS2, USBN11), + RUN_DEV(AZUREWAVE, RT2870_1), + RUN_DEV(AZUREWAVE, RT2870_2), + RUN_DEV(AZUREWAVE, RT3070_1), + RUN_DEV(AZUREWAVE, RT3070_2), + RUN_DEV(AZUREWAVE, RT3070_3), + RUN_DEV(BELKIN, F5D8053V3), + RUN_DEV(BELKIN, F5D8055), + RUN_DEV(BELKIN, F6D4050V1), + RUN_DEV(BELKIN, RT2870_1), + RUN_DEV(BELKIN, RT2870_2), + RUN_DEV(CISCOLINKSYS2, RT3070), + RUN_DEV(CISCOLINKSYS3, RT3070), + RUN_DEV(CONCEPTRONIC2, RT2870_1), + RUN_DEV(CONCEPTRONIC2, RT2870_2), + RUN_DEV(CONCEPTRONIC2, RT2870_3), + RUN_DEV(CONCEPTRONIC2, RT2870_4), + RUN_DEV(CONCEPTRONIC2, RT2870_5), + RUN_DEV(CONCEPTRONIC2, RT2870_6), + RUN_DEV(CONCEPTRONIC2, RT2870_7), + RUN_DEV(CONCEPTRONIC2, RT2870_8), + RUN_DEV(CONCEPTRONIC2, RT3070_1), + RUN_DEV(CONCEPTRONIC2, RT3070_2), + RUN_DEV(CONCEPTRONIC2, VIGORN61), + RUN_DEV(COREGA, CGWLUSB300GNM), + RUN_DEV(COREGA, RT2870_1), + RUN_DEV(COREGA, RT2870_2), + RUN_DEV(COREGA, RT2870_3), + RUN_DEV(COREGA, RT3070), + RUN_DEV(CYBERTAN, RT2870), + RUN_DEV(DLINK, RT2870), + RUN_DEV(DLINK, RT3072), + RUN_DEV(DLINK2, DWA130), + RUN_DEV(DLINK2, RT2870_1), + RUN_DEV(DLINK2, RT2870_2), + RUN_DEV(DLINK2, RT3070_1), + RUN_DEV(DLINK2, RT3070_2), + RUN_DEV(DLINK2, RT3070_3), + RUN_DEV(DLINK2, RT3070_4), + RUN_DEV(DLINK2, RT3070_5), + RUN_DEV(DLINK2, RT3072), + RUN_DEV(DLINK2, RT3072_1), + RUN_DEV(EDIMAX, EW7717), + RUN_DEV(EDIMAX, EW7718), + RUN_DEV(EDIMAX, RT2870_1), + RUN_DEV(ENCORE, RT3070_1), + RUN_DEV(ENCORE, RT3070_2), + RUN_DEV(ENCORE, RT3070_3), + RUN_DEV(GIGABYTE, GNWB31N), + RUN_DEV(GIGABYTE, GNWB32L), + RUN_DEV(GIGABYTE, RT2870_1), + RUN_DEV(GIGASET, RT3070_1), + RUN_DEV(GIGASET, RT3070_2), + RUN_DEV(GUILLEMOT, HWNU300), + RUN_DEV(HAWKING, HWUN2), + RUN_DEV(HAWKING, RT2870_1), + RUN_DEV(HAWKING, RT2870_2), + RUN_DEV(HAWKING, RT3070), + RUN_DEV(IODATA, RT3072_1), + RUN_DEV(IODATA, RT3072_2), + RUN_DEV(IODATA, RT3072_3), + RUN_DEV(IODATA, RT3072_4), + RUN_DEV(LINKSYS4, RT3070), + RUN_DEV(LINKSYS4, WUSB100), + RUN_DEV(LINKSYS4, WUSB54GCV3), + RUN_DEV(LINKSYS4, WUSB600N), + RUN_DEV(LINKSYS4, WUSB600NV2), + RUN_DEV(LOGITEC, RT2870_1), + RUN_DEV(LOGITEC, RT2870_2), + RUN_DEV(LOGITEC, RT2870_3), + RUN_DEV(MELCO, RT2870_1), + RUN_DEV(MELCO, RT2870_2), + RUN_DEV(MELCO, WLIUCAG300N), + RUN_DEV(MELCO, WLIUCG300N), + RUN_DEV(MELCO, WLIUCGN), + RUN_DEV(MOTOROLA4, RT2770), + RUN_DEV(MOTOROLA4, RT3070), + RUN_DEV(MSI, RT3070_1), + RUN_DEV(MSI, RT3070_2), + RUN_DEV(MSI, RT3070_3), + RUN_DEV(MSI, RT3070_4), + RUN_DEV(MSI, RT3070_5), + RUN_DEV(MSI, RT3070_6), + RUN_DEV(MSI, RT3070_7), + RUN_DEV(MSI, RT3070_8), + RUN_DEV(MSI, RT3070_9), + RUN_DEV(MSI, RT3070_10), + RUN_DEV(MSI, RT3070_11), + RUN_DEV(OVISLINK, RT3072), + RUN_DEV(PARA, RT3070), + RUN_DEV(PEGATRON, RT2870), + RUN_DEV(PEGATRON, RT3070), + RUN_DEV(PEGATRON, RT3070_2), + RUN_DEV(PEGATRON, RT3070_3), + RUN_DEV(PHILIPS, RT2870), + RUN_DEV(PLANEX2, GWUS300MINIS), + RUN_DEV(PLANEX2, GWUSMICRON), + RUN_DEV(PLANEX2, RT2870), + RUN_DEV(PLANEX2, RT3070), + RUN_DEV(QCOM, RT2870), + RUN_DEV(QUANTA, RT3070), + RUN_DEV(RALINK, RT2070), + RUN_DEV(RALINK, RT2770), + RUN_DEV(RALINK, RT2870), + RUN_DEV(RALINK, RT3070), + RUN_DEV(RALINK, RT3071), + RUN_DEV(RALINK, RT3072), + RUN_DEV(RALINK, RT3370), + RUN_DEV(RALINK, RT3572), + RUN_DEV(RALINK, RT8070), + RUN_DEV(SAMSUNG2, RT2870_1), + RUN_DEV(SENAO, RT2870_1), + RUN_DEV(SENAO, RT2870_2), + RUN_DEV(SENAO, RT2870_3), + RUN_DEV(SENAO, RT2870_4), + RUN_DEV(SENAO, RT3070), + RUN_DEV(SENAO, RT3071), + RUN_DEV(SENAO, RT3072_1), + RUN_DEV(SENAO, RT3072_2), + RUN_DEV(SENAO, RT3072_3), + RUN_DEV(SENAO, RT3072_4), + RUN_DEV(SENAO, RT3072_5), + RUN_DEV(SITECOMEU, RT2770), + RUN_DEV(SITECOMEU, RT2870_1), + RUN_DEV(SITECOMEU, RT2870_2), + RUN_DEV(SITECOMEU, RT2870_3), + RUN_DEV(SITECOMEU, RT2870_4), + RUN_DEV(SITECOMEU, RT3070), + RUN_DEV(SITECOMEU, RT3070_2), + RUN_DEV(SITECOMEU, RT3070_3), + RUN_DEV(SITECOMEU, RT3070_4), + RUN_DEV(SITECOMEU, RT3071), + RUN_DEV(SITECOMEU, RT3072_1), + RUN_DEV(SITECOMEU, RT3072_2), + RUN_DEV(SITECOMEU, RT3072_3), + RUN_DEV(SITECOMEU, RT3072_4), + RUN_DEV(SITECOMEU, RT3072_5), + RUN_DEV(SITECOMEU, RT3072_6), + RUN_DEV(SITECOMEU, WL608), + RUN_DEV(SPARKLAN, RT2870_1), + RUN_DEV(SPARKLAN, RT3070), + RUN_DEV(SWEEX2, LW153), + RUN_DEV(SWEEX2, LW303), + RUN_DEV(SWEEX2, LW313), + RUN_DEV(TOSHIBA, RT3070), + RUN_DEV(UMEDIA, RT2870_1), + RUN_DEV(ZCOM, RT2870_1), + RUN_DEV(ZCOM, RT2870_2), + RUN_DEV(ZINWELL, RT2870_1), + RUN_DEV(ZINWELL, RT2870_2), + RUN_DEV(ZINWELL, RT3070), + RUN_DEV(ZINWELL, RT3072_1), + RUN_DEV(ZINWELL, RT3072_2), + RUN_DEV(ZYXEL, RT2870_1), + RUN_DEV(ZYXEL, RT2870_2), +#undef RUN_DEV }; MODULE_DEPEND(run, wlan, 1, 1, 1); @@ -1920,7 +1922,7 @@ run_wme_update(struct ieee80211com *ic) sc->cmdq[i].func = run_wme_update_cb; sc->cmdq[i].arg0 = ic; ieee80211_runtask(ic, &sc->cmdq_task); - return 0; + return (0); } RUN_LOCK(sc); From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 00:49:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74847106566C; Mon, 12 Jul 2010 00:49:24 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60A8F8FC08; Mon, 12 Jul 2010 00:49:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6C0nNlE040074; Mon, 12 Jul 2010 00:49:23 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C0nM06040056; Mon, 12 Jul 2010 00:49:22 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007120049.o6C0nM06040056@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 12 Jul 2010 00:49:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209920 - in head/sys/boot: . common fdt ficl ofw ofw/libofw powerpc powerpc/boot1.chrp powerpc/ofw powerpc/uboot uboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 00:49:24 -0000 Author: nwhitehorn Date: Mon Jul 12 00:49:22 2010 New Revision: 209920 URL: http://svn.freebsd.org/changeset/base/209920 Log: Provide support in loader for booting 64-bit PowerPC kernels. Like amd64, 64-bit PowerPC kernels are loaded by a 32-bit loader, since nearly all powerpc64 firmwares execute in 32-bit mode. Added: head/sys/boot/ofw/libofw/ppc64_elf_freebsd.c (contents, props changed) Modified: head/sys/boot/Makefile head/sys/boot/common/Makefile.inc head/sys/boot/fdt/Makefile head/sys/boot/ficl/Makefile head/sys/boot/ofw/Makefile.inc head/sys/boot/ofw/libofw/Makefile head/sys/boot/ofw/libofw/libofw.h head/sys/boot/powerpc/Makefile.inc head/sys/boot/powerpc/boot1.chrp/Makefile head/sys/boot/powerpc/ofw/Makefile head/sys/boot/powerpc/ofw/conf.c head/sys/boot/powerpc/ofw/ldscript.powerpc head/sys/boot/powerpc/ofw/metadata.c head/sys/boot/powerpc/uboot/Makefile head/sys/boot/powerpc/uboot/ldscript.powerpc head/sys/boot/uboot/Makefile.inc Modified: head/sys/boot/Makefile ============================================================================== --- head/sys/boot/Makefile Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/Makefile Mon Jul 12 00:49:22 2010 (r209920) @@ -13,12 +13,12 @@ SUBDIR+= efi .endif # Build Open Firmware library. -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "sparc64" SUBDIR+= ofw .endif # Build U-Boot library. -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "arm" +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "arm" SUBDIR+= uboot .endif @@ -31,7 +31,7 @@ SUBDIR+= fdt .endif # Pick the machine-dependent subdir based on the target architecture. -ADIR= ${MACHINE:S/amd64/i386/:S/sun4v/sparc64/} +ADIR= ${MACHINE:S/amd64/i386/:S/sun4v/sparc64/:S/powerpc64/powerpc/} .if exists(${.CURDIR}/${ADIR}/.) SUBDIR+= ${ADIR} .endif Modified: head/sys/boot/common/Makefile.inc ============================================================================== --- head/sys/boot/common/Makefile.inc Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/common/Makefile.inc Mon Jul 12 00:49:22 2010 (r209920) @@ -9,8 +9,11 @@ SRCS+= load_elf32.c load_elf32_obj.c rel SRCS+= load_elf64.c load_elf64_obj.c reloc_elf64.c .elif ${MACHINE} == "pc98" SRCS+= load_elf32.c load_elf32_obj.c reloc_elf32.c -.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "arm" +.elif ${MACHINE_ARCH} == "arm" SRCS+= load_elf32.c reloc_elf32.c +.elif ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" +SRCS+= load_elf32.c reloc_elf32.c +SRCS+= load_elf64.c reloc_elf64.c .elif ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "ia64" SRCS+= load_elf64.c reloc_elf64.c .endif Modified: head/sys/boot/fdt/Makefile ============================================================================== --- head/sys/boot/fdt/Makefile Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/fdt/Makefile Mon Jul 12 00:49:22 2010 (r209920) @@ -16,10 +16,14 @@ CFLAGS+= -I${.CURDIR}/../../contrib/libf CFLAGS+= -ffreestanding -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "arm" +.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" CFLAGS+= -msoft-float .endif +.if ${MACHINE_ARCH} == "powerpc64" +CFLAGS+= -m32 +.endif + CFLAGS+= -Wformat -Wall .include Modified: head/sys/boot/ficl/Makefile ============================================================================== --- head/sys/boot/ficl/Makefile Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/ficl/Makefile Mon Jul 12 00:49:22 2010 (r209920) @@ -1,6 +1,6 @@ # $FreeBSD$ # -.PATH: ${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/} +.PATH: ${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/:S/powerpc64/powerpc/} BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \ prefix.c search.c stack.c tools.c vm.c words.c @@ -14,7 +14,7 @@ CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -m .if ${MACHINE_ARCH} == "i386" CFLAGS+= -mno-sse3 .endif -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "arm" +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "arm" CFLAGS+= -msoft-float .endif .if ${MACHINE} == "pc98" @@ -45,7 +45,11 @@ SOFTWORDS= softcore.fr jhlocal.fr marker CFLAGS+= -m32 -march=i386 -I. .endif -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/} \ +.if ${MACHINE_ARCH} == "powerpc64" +CFLAGS+= -m32 -mcpu=powerpc -I. +.endif + +CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/:S/powerpc64/powerpc/} \ -I${.CURDIR}/../common softcore.c: ${SOFTWORDS} softcore.awk Modified: head/sys/boot/ofw/Makefile.inc ============================================================================== --- head/sys/boot/ofw/Makefile.inc Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/ofw/Makefile.inc Mon Jul 12 00:49:22 2010 (r209920) @@ -1,3 +1,8 @@ # $FreeBSD$ +.if ${MACHINE_ARCH} == "powerpc64" +CFLAGS+= -m32 -mcpu=powerpc +LDFLAGS+= -m elf32ppc +.endif + .include "../Makefile.inc" Modified: head/sys/boot/ofw/libofw/Makefile ============================================================================== --- head/sys/boot/ofw/libofw/Makefile Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/ofw/libofw/Makefile Mon Jul 12 00:49:22 2010 (r209920) @@ -13,8 +13,9 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/li CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. CFLAGS+= -ffreestanding -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -msoft-float +SRCS+= ppc64_elf_freebsd.c .endif .ifdef(BOOT_DISK_DEBUG) Modified: head/sys/boot/ofw/libofw/libofw.h ============================================================================== --- head/sys/boot/ofw/libofw/libofw.h Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/ofw/libofw/libofw.h Mon Jul 12 00:49:22 2010 (r209920) @@ -62,6 +62,9 @@ int ofw_elf_loadfile(char *, vm_offset_t int ofw_elf_exec(struct preloaded_file *); extern struct file_format ofw_elf; +#ifdef __powerpc__ +extern struct file_format ofw_elf64; +#endif extern void reboot(void); Added: head/sys/boot/ofw/libofw/ppc64_elf_freebsd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/ofw/libofw/ppc64_elf_freebsd.c Mon Jul 12 00:49:22 2010 (r209920) @@ -0,0 +1,101 @@ +/*- + * Copyright (c) 2001 Benno Rice + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#define __ELF_WORD_SIZE 64 + +#include +#include + +#include +#include + +#include + +#include "bootstrap.h" +#include "libofw.h" +#include "openfirm.h" + +extern char end[]; +extern vm_offset_t reloc; /* From /conf.c */ + +int +ppc64_ofw_elf_loadfile(char *filename, u_int64_t dest, + struct preloaded_file **result) +{ + int r; + + r = __elfN(loadfile)(filename, dest, result); + if (r != 0) + return (r); + + /* + * No need to sync the icache for modules: this will + * be done by the kernel after relocation. + */ + if (!strcmp((*result)->f_type, "elf kernel")) + __syncicache((void *) (*result)->f_addr, (*result)->f_size); + return (0); +} + +int +ppc64_ofw_elf_exec(struct preloaded_file *fp) +{ + struct file_metadata *fmp; + vm_offset_t mdp; + Elf_Ehdr *e; + int error; + intptr_t entry; + + if ((fmp = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) { + return(EFTYPE); + } + e = (Elf_Ehdr *)&fmp->md_data; + + /* Handle function descriptor */ + entry = *(uint64_t *)e->e_entry; + + if ((error = md_load64(fp->f_args, &mdp)) != 0) + return (error); + + printf("Kernel entry at 0x%lx ...\n", entry); + + dev_cleanup(); + ofw_release_heap(); + + OF_chain((void *)reloc, end - (char *)reloc, (void *)entry, + (void *)mdp, sizeof(mdp)); + + panic("exec returned"); +} + +struct file_format ofw_elf64 = +{ + ppc64_ofw_elf_loadfile, + ppc64_ofw_elf_exec +}; Modified: head/sys/boot/powerpc/Makefile.inc ============================================================================== --- head/sys/boot/powerpc/Makefile.inc Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/powerpc/Makefile.inc Mon Jul 12 00:49:22 2010 (r209920) @@ -1,3 +1,8 @@ # $FreeBSD$ +.if ${MACHINE_ARCH} == "powerpc64" +CFLAGS+= -m32 -mcpu=powerpc +LDFLAGS+= -m elf32ppc +.endif + .include "../Makefile.inc" Modified: head/sys/boot/powerpc/boot1.chrp/Makefile ============================================================================== --- head/sys/boot/powerpc/boot1.chrp/Makefile Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/powerpc/boot1.chrp/Makefile Mon Jul 12 00:49:22 2010 (r209920) @@ -13,7 +13,7 @@ SRCS= boot1.c ashldi3.c INTERNALPROG= NO_MAN= -CFLAGS= -ffreestanding -msoft-float -Os -D_KERNEL \ +CFLAGS= -ffreestanding -msoft-float -Os \ -I${.CURDIR}/../../common -I${.CURDIR}/../../../ LDFLAGS=-nostdlib -static -N Modified: head/sys/boot/powerpc/ofw/Makefile ============================================================================== --- head/sys/boot/powerpc/ofw/Makefile Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/powerpc/ofw/Makefile Mon Jul 12 00:49:22 2010 (r209920) @@ -10,6 +10,7 @@ INSTALLFLAGS= -b # Architecture-specific loader code SRCS= conf.c metadata.c vers.c start.c +SRCS+= ucmpdi2.c LOADER_DISK_SUPPORT?= yes LOADER_UFS_SUPPORT?= yes @@ -62,9 +63,9 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a CFLAGS+= -DNETIF_OPEN_CLOSE_ONCE # Always add MI sources -.PATH: ${.CURDIR}/../../common +.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern .include "${.CURDIR}/../../common/Makefile.inc" -CFLAGS+= -I${.CURDIR}/../../common +CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. CFLAGS+= -I. CLEANFILES+= vers.c loader.help Modified: head/sys/boot/powerpc/ofw/conf.c ============================================================================== --- head/sys/boot/powerpc/ofw/conf.c Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/powerpc/ofw/conf.c Mon Jul 12 00:49:22 2010 (r209920) @@ -96,6 +96,7 @@ struct netif_driver *netif_drivers[] = { struct file_format *file_formats[] = { &ofw_elf, + &ofw_elf64, NULL }; Modified: head/sys/boot/powerpc/ofw/ldscript.powerpc ============================================================================== --- head/sys/boot/powerpc/ofw/ldscript.powerpc Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/powerpc/ofw/ldscript.powerpc Mon Jul 12 00:49:22 2010 (r209920) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc") -OUTPUT_ARCH(powerpc) +OUTPUT_ARCH(powerpc:common) ENTRY(_start) SEARCH_DIR(/usr/lib); /* Do we need any of these for elf? Modified: head/sys/boot/powerpc/ofw/metadata.c ============================================================================== --- head/sys/boot/powerpc/ofw/metadata.c Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/powerpc/ofw/metadata.c Mon Jul 12 00:49:22 2010 (r209920) @@ -175,6 +175,9 @@ md_copyenv(vm_offset_t addr) * MOD_SIZE sizeof(size_t) module size * MOD_METADATA (variable) type-specific metadata */ + +static int align; + #define COPY32(v, a, c) { \ u_int32_t x = (v); \ if (c) \ @@ -187,7 +190,7 @@ md_copyenv(vm_offset_t addr) COPY32(strlen(s) + 1, a, c) \ if (c) \ archsw.arch_copyin(s, a, strlen(s) + 1);\ - a += roundup(strlen(s) + 1, sizeof(u_long));\ + a += roundup(strlen(s) + 1, align); \ } #define MOD_NAME(a, s, c) MOD_STR(MODINFO_NAME, a, s, c) @@ -199,7 +202,7 @@ md_copyenv(vm_offset_t addr) COPY32(sizeof(s), a, c); \ if (c) \ archsw.arch_copyin(&s, a, sizeof(s)); \ - a += roundup(sizeof(s), sizeof(u_long)); \ + a += roundup(sizeof(s), align); \ } #define MOD_ADDR(a, s, c) MOD_VAR(MODINFO_ADDR, a, s, c) @@ -210,7 +213,7 @@ md_copyenv(vm_offset_t addr) COPY32(mm->md_size, a, c); \ if (c) \ archsw.arch_copyin(mm->md_data, a, mm->md_size);\ - a += roundup(mm->md_size, sizeof(u_long)); \ + a += roundup(mm->md_size, align); \ } #define MOD_END(a, c) { \ @@ -219,10 +222,11 @@ md_copyenv(vm_offset_t addr) } vm_offset_t -md_copymodules(vm_offset_t addr) +md_copymodules(vm_offset_t addr, int kern64) { struct preloaded_file *fp; struct file_metadata *md; + uint64_t scratch64; int c; c = addr != 0; @@ -233,8 +237,15 @@ md_copymodules(vm_offset_t addr) MOD_TYPE(addr, fp->f_type, c); if (fp->f_args) MOD_ARGS(addr, fp->f_args, c); - MOD_ADDR(addr, fp->f_addr, c); - MOD_SIZE(addr, fp->f_size, c); + if (kern64) { + scratch64 = fp->f_addr; + MOD_ADDR(addr, scratch64, c); + scratch64 = fp->f_size; + MOD_SIZE(addr, scratch64, c); + } else { + MOD_ADDR(addr, fp->f_addr, c); + MOD_SIZE(addr, fp->f_size, c); + } for (md = fp->f_metadata; md != NULL; md = md->md_next) { if (!(md->md_type & MODINFOMD_NOCOPY)) { MOD_METADATA(addr, md, c); @@ -254,7 +265,7 @@ md_copymodules(vm_offset_t addr) * - Module metadata are formatted and placed in kernel space. */ int -md_load(char *args, vm_offset_t *modulep) +md_load_dual(char *args, vm_offset_t *modulep, int kern64) { struct preloaded_file *kfp; struct preloaded_file *xp; @@ -263,11 +274,11 @@ md_load(char *args, vm_offset_t *modulep vm_offset_t addr; vm_offset_t envp; vm_offset_t size; + uint64_t scratch64; char *rootdevname; int howto; - int dtlb_slots; - int itlb_slots; + align = kern64 ? 8 : 4; howto = md_getboothowto(args); /* @@ -298,23 +309,48 @@ md_load(char *args, vm_offset_t *modulep addr = roundup(addr, PAGE_SIZE); kernend = 0; - kfp = file_findfile(NULL, "elf32 kernel"); + kfp = file_findfile(NULL, kern64 ? "elf64 kernel" : "elf32 kernel"); if (kfp == NULL) kfp = file_findfile(NULL, "elf kernel"); if (kfp == NULL) panic("can't find kernel file"); file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof howto, &howto); - file_addmetadata(kfp, MODINFOMD_ENVP, sizeof envp, &envp); - file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend); + if (kern64) { + scratch64 = envp; + file_addmetadata(kfp, MODINFOMD_ENVP, sizeof scratch64, &scratch64); + scratch64 = kernend; + file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof scratch64, &scratch64); + } else { + file_addmetadata(kfp, MODINFOMD_ENVP, sizeof envp, &envp); + file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend); + } *modulep = addr; - size = md_copymodules(0); + size = md_copymodules(0, kern64); kernend = roundup(addr + size, PAGE_SIZE); md = file_findmetadata(kfp, MODINFOMD_KERNEND); - bcopy(&kernend, md->md_data, sizeof kernend); - - (void)md_copymodules(addr); + if (kern64) { + scratch64 = kernend; + bcopy(&scratch64, md->md_data, sizeof scratch64); + } else { + bcopy(&kernend, md->md_data, sizeof kernend); + } + + (void)md_copymodules(addr, kern64); return(0); } + +int +md_load(char *args, vm_offset_t *modulep) +{ + return (md_load_dual(args, modulep, 0)); +} + +int +md_load64(char *args, vm_offset_t *modulep) +{ + return (md_load_dual(args, modulep, 1)); +} + Modified: head/sys/boot/powerpc/uboot/Makefile ============================================================================== --- head/sys/boot/powerpc/uboot/Makefile Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/powerpc/uboot/Makefile Mon Jul 12 00:49:22 2010 (r209920) @@ -10,6 +10,7 @@ NO_MAN= # Architecture-specific loader code SRCS= start.S conf.c vers.c +SRCS+= ucmpdi2.c LOADER_DISK_SUPPORT?= yes LOADER_UFS_SUPPORT?= yes @@ -68,9 +69,9 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif # Always add MI sources -.PATH: ${.CURDIR}/../../common +.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern .include "${.CURDIR}/../../common/Makefile.inc" -CFLAGS+= -I${.CURDIR}/../../common +CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. CFLAGS+= -I. CLEANFILES+= vers.c ${PROG}.help Modified: head/sys/boot/powerpc/uboot/ldscript.powerpc ============================================================================== --- head/sys/boot/powerpc/uboot/ldscript.powerpc Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/powerpc/uboot/ldscript.powerpc Mon Jul 12 00:49:22 2010 (r209920) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc") -OUTPUT_ARCH(powerpc) +OUTPUT_ARCH(powerpc:common) ENTRY(_start) SEARCH_DIR(/usr/lib); PROVIDE (__stack = 0); Modified: head/sys/boot/uboot/Makefile.inc ============================================================================== --- head/sys/boot/uboot/Makefile.inc Mon Jul 12 00:17:29 2010 (r209919) +++ head/sys/boot/uboot/Makefile.inc Mon Jul 12 00:49:22 2010 (r209920) @@ -1,3 +1,8 @@ # $FreeBSD$ +.if ${MACHINE_ARCH} == "powerpc64" +CFLAGS+= -m32 -mcpu=powerpc +LDFLAGS+= -m elf32ppc +.endif + .include "../Makefile.inc" From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 00:54:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 948D7106564A; Mon, 12 Jul 2010 00:54:41 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82D828FC21; Mon, 12 Jul 2010 00:54:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6C0sfiR041249; Mon, 12 Jul 2010 00:54:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C0sfs2041246; Mon, 12 Jul 2010 00:54:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007120054.o6C0sfs2041246@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 12 Jul 2010 00:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209921 - in head/usr.bin: truss xlint/arch/powerpc64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 00:54:41 -0000 Author: nwhitehorn Date: Mon Jul 12 00:54:41 2010 New Revision: 209921 URL: http://svn.freebsd.org/changeset/base/209921 Log: Teach truss and xlint how to operate on 64-bit PowerPC systems. Added: head/usr.bin/truss/powerpc64-fbsd.c - copied, changed from r209845, head/usr.bin/truss/powerpc-fbsd.c head/usr.bin/xlint/arch/powerpc64/ - copied from r209845, head/usr.bin/xlint/arch/powerpc/ Modified: head/usr.bin/xlint/arch/powerpc64/targparam.h Copied and modified: head/usr.bin/truss/powerpc64-fbsd.c (from r209845, head/usr.bin/truss/powerpc-fbsd.c) ============================================================================== --- head/usr.bin/truss/powerpc-fbsd.c Fri Jul 9 11:27:33 2010 (r209845, copy source) +++ head/usr.bin/truss/powerpc64-fbsd.c Mon Jul 12 00:54:41 2010 (r209921) @@ -118,9 +118,6 @@ powerpc_syscall_entry(struct trussinfo * unsigned int regargs; struct syscall *sc; - /* Account for a 64-bit argument with corresponding alignment. */ - nargs += 2; - cpid = trussinfo->curthread->tid; clear_fsc(); @@ -137,14 +134,10 @@ powerpc_syscall_entry(struct trussinfo * regargs = NARGREG; syscall_num = regs.fixreg[0]; args = ®s.fixreg[3]; - if (syscall_num == SYS_syscall) { + if (syscall_num == SYS_syscall || syscall_num == SYS___syscall) { args = ®s.fixreg[4]; regargs -= 1; syscall_num = regs.fixreg[3]; - } else if (syscall_num == SYS___syscall) { - args = ®s.fixreg[5]; - regargs -= 2; - syscall_num = regs.fixreg[4]; } fsc.number = syscall_num; @@ -172,7 +165,7 @@ powerpc_syscall_entry(struct trussinfo * memmove(&fsc.args[0], args, regargs * sizeof(fsc.args[0])); iorequest.piod_op = PIOD_READ_D; - iorequest.piod_offs = (void *)(regs.fixreg[1] + 8); + iorequest.piod_offs = (void *)(regs.fixreg[1] + 48); iorequest.piod_addr = &fsc.args[regargs]; iorequest.piod_len = (nargs - regargs) * sizeof(fsc.args[0]); ptrace(PT_IO, cpid, (caddr_t)&iorequest, 0); @@ -292,14 +285,6 @@ powerpc_syscall_exit(struct trussinfo *t asprintf(&fsc.s_args[i], "0x%lx", fsc.args[i]); } else { /* - * On 32-bit big-endian, the low word of a 64-bit return is - * in the greater address. Switch to this. XXX note that - * print_syscall_ret can't handle 64-bit return values (llseek) - */ - if (sc->ret_type == 2) - retval = regs.fixreg[4]; - - /* * Here, we only look for arguments that have OUT masked in -- * otherwise, they were handled in the syscall_entry function. */ Modified: head/usr.bin/xlint/arch/powerpc64/targparam.h ============================================================================== --- head/usr.bin/xlint/arch/powerpc/targparam.h Fri Jul 9 11:27:33 2010 (r209845) +++ head/usr.bin/xlint/arch/powerpc64/targparam.h Mon Jul 12 00:54:41 2010 (r209921) @@ -29,13 +29,15 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ /* * Machine-dependent target parameters for lint1. */ -#include "ilp32.h" +#include "lp64.h" /* * Should be set to 1 if the difference of two pointers is of type long @@ -43,8 +45,8 @@ * kept in sync with the compiler! */ -#define PTRDIFF_IS_LONG 0 -#define SIZEOF_IS_ULONG 0 +#define PTRDIFF_IS_LONG 1 +#define SIZEOF_IS_ULONG 1 #define FLOAT_SIZE (4 * CHAR_BIT) #define DOUBLE_SIZE (8 * CHAR_BIT) From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 00:56:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FAD5106564A; Mon, 12 Jul 2010 00:56:36 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35C818FC08; Mon, 12 Jul 2010 00:56:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6C0uafA041726; Mon, 12 Jul 2010 00:56:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C0uaUe041724; Mon, 12 Jul 2010 00:56:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007120056.o6C0uaUe041724@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 12 Jul 2010 00:56:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209922 - head/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 00:56:36 -0000 Author: nwhitehorn Date: Mon Jul 12 00:56:35 2010 New Revision: 209922 URL: http://svn.freebsd.org/changeset/base/209922 Log: Build libsmb should be on powerpc64 as well. Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Mon Jul 12 00:54:41 2010 (r209921) +++ head/lib/Makefile Mon Jul 12 00:56:35 2010 (r209922) @@ -188,7 +188,7 @@ _libsmb= libsmb _libvgl= libvgl .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" _libsmb= libsmb .endif From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 01:58:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 064621065674; Mon, 12 Jul 2010 01:58:47 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0BB78FC12; Mon, 12 Jul 2010 01:58:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6C1wkFs055424; Mon, 12 Jul 2010 01:58:46 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C1wkga055422; Mon, 12 Jul 2010 01:58:46 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201007120158.o6C1wkga055422@svn.freebsd.org> From: Brian Somers Date: Mon, 12 Jul 2010 01:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209924 - head/bin/pkill X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 01:58:47 -0000 Author: brian Date: Mon Jul 12 01:58:46 2010 New Revision: 209924 URL: http://svn.freebsd.org/changeset/base/209924 Log: Add -l to the synopsis Submitted by: jhell at dataix dot net MFC after: 3 days Modified: head/bin/pkill/pkill.1 Modified: head/bin/pkill/pkill.1 ============================================================================== --- head/bin/pkill/pkill.1 Mon Jul 12 01:08:59 2010 (r209923) +++ head/bin/pkill/pkill.1 Mon Jul 12 01:58:46 2010 (r209924) @@ -53,7 +53,7 @@ .Ar pattern ... .Nm pkill .Op Fl Ar signal -.Op Fl ILafinovx +.Op Fl ILafilnovx .Op Fl F Ar pidfile .Op Fl G Ar gid .Op Fl M Ar core From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 04:21:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CE911065672; Mon, 12 Jul 2010 04:21:51 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D6A68FC08; Mon, 12 Jul 2010 04:21:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6C4Lpmg086994; Mon, 12 Jul 2010 04:21:51 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C4LoHD086992; Mon, 12 Jul 2010 04:21:50 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201007120421.o6C4LoHD086992@svn.freebsd.org> From: Maxim Konovalov Date: Mon, 12 Jul 2010 04:21:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209926 - head/usr.sbin/mountd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 04:21:51 -0000 Author: maxim Date: Mon Jul 12 04:21:50 2010 New Revision: 209926 URL: http://svn.freebsd.org/changeset/base/209926 Log: o Fix typo: sepcify -> specify. PR: docs/148499 Submitted by: Warren Block MFC after: 1 week Modified: head/usr.sbin/mountd/exports.5 Modified: head/usr.sbin/mountd/exports.5 ============================================================================== --- head/usr.sbin/mountd/exports.5 Mon Jul 12 03:00:29 2010 (r209925) +++ head/usr.sbin/mountd/exports.5 Mon Jul 12 04:21:50 2010 (r209926) @@ -82,7 +82,7 @@ including regular files if the option is used on .Xr mountd 8 . The third form has the string ``V4:'' followed by a single absolute path -name, to sepcify the NFSv4 tree root. +name, to specify the NFSv4 tree root. The pathnames must not have any symbolic links in them and should not have any .Dq Pa \&. From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 06:46:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 330361065678; Mon, 12 Jul 2010 06:46:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0AE3A8FC0C; Mon, 12 Jul 2010 06:46:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6C6kHOd018661; Mon, 12 Jul 2010 06:46:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C6kH2h018658; Mon, 12 Jul 2010 06:46:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007120646.o6C6kH2h018658@svn.freebsd.org> From: Alexander Motin Date: Mon, 12 Jul 2010 06:46:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209927 - head/sys/x86/isa X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 06:46:18 -0000 Author: mav Date: Mon Jul 12 06:46:17 2010 New Revision: 209927 URL: http://svn.freebsd.org/changeset/base/209927 Log: Instead of deleting existing IRQ resource, which is not really working for ACPI bus, find wanted IRQ rid or spare one. This should fix panic during boot on systems reporting fancy IRQ numbers for attimer and atrtc. Modified: head/sys/x86/isa/atrtc.c head/sys/x86/isa/clock.c Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Mon Jul 12 04:21:50 2010 (r209926) +++ head/sys/x86/isa/atrtc.c Mon Jul 12 06:46:17 2010 (r209927) @@ -244,6 +244,7 @@ static int atrtc_attach(device_t dev) { struct atrtc_softc *sc; + u_long s; int i, diag; sc = device_get_softc(dev); @@ -260,7 +261,9 @@ atrtc_attach(device_t dev) (resource_int_value(device_get_name(dev), device_get_unit(dev), "clock", &i) != 0 || i != 0)) { sc->intr_rid = 0; - bus_delete_resource(dev, SYS_RES_IRQ, sc->intr_rid); + while (bus_get_resource(dev, SYS_RES_IRQ, sc->intr_rid, + &s, NULL) == 0 && s != 8) + sc->intr_rid++; if (!(sc->intr_res = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->intr_rid, 8, 8, 1, RF_ACTIVE))) { device_printf(dev,"Can't map interrupt.\n"); Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Mon Jul 12 04:21:50 2010 (r209926) +++ head/sys/x86/isa/clock.c Mon Jul 12 06:46:17 2010 (r209927) @@ -94,7 +94,8 @@ static int i8254_ticked; struct attimer_softc { int intr_en; - int intr_rid; + int port_rid, intr_rid; + struct resource *port_res; struct resource *intr_res; void *intr_handler; struct timecounter tc; @@ -523,10 +524,14 @@ static int attimer_attach(device_t dev) { struct attimer_softc *sc; + u_long s; int i; attimer_sc = sc = device_get_softc(dev); bzero(sc, sizeof(struct attimer_softc)); + if (!(sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, + &sc->port_rid, IO_TIMER1, IO_TIMER1 + 3, 4, RF_ACTIVE))) + device_printf(dev,"Warning: Couldn't map I/O.\n"); i8254_intsrc = intr_lookup_source(0); if (i8254_intsrc != NULL) i8254_pending = i8254_intsrc->is_pic->pic_source_pending; @@ -541,7 +546,9 @@ attimer_attach(device_t dev) if (resource_int_value(device_get_name(dev), device_get_unit(dev), "clock", &i) != 0 || i != 0) { sc->intr_rid = 0; - bus_delete_resource(dev, SYS_RES_IRQ, sc->intr_rid); + while (bus_get_resource(dev, SYS_RES_IRQ, sc->intr_rid, + &s, NULL) == 0 && s != 0) + sc->intr_rid++; if (!(sc->intr_res = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->intr_rid, 0, 0, 1, RF_ACTIVE))) { device_printf(dev,"Can't map interrupt.\n"); From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 07:24:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA9DD1065674; Mon, 12 Jul 2010 07:24:40 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB3ED8FC0C; Mon, 12 Jul 2010 07:24:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6C7Oekl027117; Mon, 12 Jul 2010 07:24:40 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C7OeuT027114; Mon, 12 Jul 2010 07:24:40 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007120724.o6C7OeuT027114@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 12 Jul 2010 07:24:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209928 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 07:24:41 -0000 Author: jchandra Date: Mon Jul 12 07:24:40 2010 New Revision: 209928 URL: http://svn.freebsd.org/changeset/base/209928 Log: Move KSEG address definitions from cpu.h to cpuregs.h with the other definitions, add some XKPHYS related definitions for n64. Reviewed by: imp Modified: head/sys/mips/include/cpu.h head/sys/mips/include/cpuregs.h Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Mon Jul 12 06:46:17 2010 (r209927) +++ head/sys/mips/include/cpu.h Mon Jul 12 07:24:40 2010 (r209928) @@ -49,23 +49,6 @@ #include -#define MIPS_KSEG0_LARGEST_PHYS (0x20000000) -#define MIPS_PHYS_MASK (0x1fffffff) - -#define MIPS_PHYS_TO_KSEG0(x) ((uintptr_t)(x) | MIPS_KSEG0_START) -#define MIPS_PHYS_TO_KSEG1(x) ((uintptr_t)(x) | MIPS_KSEG1_START) -#define MIPS_KSEG0_TO_PHYS(x) ((uintptr_t)(x) & MIPS_PHYS_MASK) -#define MIPS_KSEG1_TO_PHYS(x) ((uintptr_t)(x) & MIPS_PHYS_MASK) - -#define MIPS_IS_KSEG0_ADDR(x) \ - (((vm_offset_t)(x) >= MIPS_KSEG0_START) && \ - ((vm_offset_t)(x) <= MIPS_KSEG0_END)) -#define MIPS_IS_KSEG1_ADDR(x) \ - (((vm_offset_t)(x) >= MIPS_KSEG1_START) && \ - ((vm_offset_t)(x) <= MIPS_KSEG1_END)) -#define MIPS_IS_VALID_PTR(x) (MIPS_IS_KSEG0_ADDR(x) || \ - MIPS_IS_KSEG1_ADDR(x)) - /* * Status register. */ Modified: head/sys/mips/include/cpuregs.h ============================================================================== --- head/sys/mips/include/cpuregs.h Mon Jul 12 06:46:17 2010 (r209927) +++ head/sys/mips/include/cpuregs.h Mon Jul 12 07:24:40 2010 (r209928) @@ -78,6 +78,9 @@ * Caching of mapped addresses is controlled by bits in the TLB entry. */ +#define MIPS_KSEG0_LARGEST_PHYS (0x20000000) +#define MIPS_PHYS_MASK (0x1fffffff) + #if !defined(_LOCORE) #define MIPS_KUSEG_START 0x00000000 #define MIPS_KSEG0_START ((intptr_t)(int32_t)0x80000000) @@ -91,7 +94,20 @@ #define MIPS_KSEG2_START MIPS_KSSEG_START #define MIPS_KSEG2_END MIPS_KSSEG_END -#endif + +#define MIPS_PHYS_TO_KSEG0(x) ((uintptr_t)(x) | MIPS_KSEG0_START) +#define MIPS_PHYS_TO_KSEG1(x) ((uintptr_t)(x) | MIPS_KSEG1_START) +#define MIPS_KSEG0_TO_PHYS(x) ((uintptr_t)(x) & MIPS_PHYS_MASK) +#define MIPS_KSEG1_TO_PHYS(x) ((uintptr_t)(x) & MIPS_PHYS_MASK) + +#define MIPS_IS_KSEG0_ADDR(x) \ + (((vm_offset_t)(x) >= MIPS_KSEG0_START) && \ + ((vm_offset_t)(x) <= MIPS_KSEG0_END)) +#define MIPS_IS_KSEG1_ADDR(x) \ + (((vm_offset_t)(x) >= MIPS_KSEG1_START) && \ + ((vm_offset_t)(x) <= MIPS_KSEG1_END)) +#define MIPS_IS_VALID_PTR(x) (MIPS_IS_KSEG0_ADDR(x) || \ + MIPS_IS_KSEG1_ADDR(x)) #define MIPS_XKPHYS_START 0x8000000000000000 #define MIPS_XKPHYS_END 0xbfffffffffffffff @@ -101,7 +117,12 @@ #define MIPS_PHYS_TO_XKPHYS(cca,x) \ ((0x2ULL << 62) | ((unsigned long long)(cca) << 59) | (x)) -#define MIPS_XKPHYS_TO_PHYS(x) ((x) & 0x07ffffffffffffffULL) +#define MIPS_PHYS_TO_XKPHYS_CACHED(x) \ + ((0x2ULL << 62) | ((unsigned long long)(MIPS_XKPHYS_CCA_CNC) << 59) | (x)) +#define MIPS_PHYS_TO_XKPHYS_UNCACHED(x) \ + ((0x2ULL << 62) | ((unsigned long long)(MIPS_XKPHYS_CCA_UC) << 59) | (x)) + +#define MIPS_XKPHYS_TO_PHYS(x) ((x) & 0x07ffffffffffffffULL) #define MIPS_XUSEG_START 0x0000000000000000 #define MIPS_XUSEG_END 0x0000010000000000 @@ -109,6 +130,8 @@ #define MIPS_XKSEG_START 0xc000000000000000 #define MIPS_XKSEG_END 0xc00000ff80000000 +#endif + /* CPU dependent mtc0 hazard hook */ #ifdef TARGET_OCTEON #define COP0_SYNC nop; nop; nop; nop; nop; From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 07:42:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44840106566B; Mon, 12 Jul 2010 07:42:43 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3457C8FC20; Mon, 12 Jul 2010 07:42:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6C7ghKp031050; Mon, 12 Jul 2010 07:42:43 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C7ghOS031048; Mon, 12 Jul 2010 07:42:43 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007120742.o6C7ghOS031048@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 12 Jul 2010 07:42:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209929 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 07:42:43 -0000 Author: jchandra Date: Mon Jul 12 07:42:42 2010 New Revision: 209929 URL: http://svn.freebsd.org/changeset/base/209929 Log: Merge jmallett@'s n64 work into HEAD 64 bit TLB definitions in pte.h Reviewed by: imp Obtained from: jmallett (http://svn.freebsd.org/base/user/jmallett/octeon) Modified: head/sys/mips/include/pte.h Modified: head/sys/mips/include/pte.h ============================================================================== --- head/sys/mips/include/pte.h Mon Jul 12 07:24:40 2010 (r209928) +++ head/sys/mips/include/pte.h Mon Jul 12 07:42:42 2010 (r209929) @@ -82,8 +82,24 @@ typedef pt_entry_t *pd_entry_t; * Note that in FreeBSD, we map 2 TLB pages is equal to 1 VM page. */ #define TLBHI_ASID_MASK (0xff) +#if defined(__mips_n64) +#define TLBHI_R_SHIFT 62 +#define TLBHI_R_USER (0x00UL << TLBHI_R_SHIFT) +#define TLBHI_R_SUPERVISOR (0x01UL << TLBHI_R_SHIFT) +#define TLBHI_R_KERNEL (0x03UL << TLBHI_R_SHIFT) +#define TLBHI_R_MASK (0x03UL << TLBHI_R_SHIFT) +#define TLBHI_VA_R(va) ((va) & TLBHI_R_MASK) +#define TLBHI_FILL_SHIFT 40 +#define TLBHI_VPN2_SHIFT (TLB_PAGE_SHIFT + 1) +#define TLBHI_VPN2_MASK (((~((1UL << TLBHI_VPN2_SHIFT) - 1)) << (63 - TLBHI_FILL_SHIFT)) >> (63 - TLBHI_FILL_SHIFT)) +#define TLBHI_VA_TO_VPN2(va) ((va) & TLBHI_VPN2_MASK) +#define TLBHI_ENTRY(va, asid) ((TLBHI_VA_R((va))) /* Region. */ | \ + (TLBHI_VA_TO_VPN2((va))) /* VPN2. */ | \ + ((asid) & TLBHI_ASID_MASK)) +#else #define TLBHI_PAGE_MASK (2 * PAGE_SIZE - 1) #define TLBHI_ENTRY(va, asid) (((va) & ~TLBHI_PAGE_MASK) | ((asid) & TLBHI_ASID_MASK)) +#endif /* * TLB flags managed in hardware: From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 09:38:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41A4D1065740; Mon, 12 Jul 2010 09:38:45 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FE128FC19; Mon, 12 Jul 2010 09:38:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6C9cjwH056587; Mon, 12 Jul 2010 09:38:45 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6C9cjWD056585; Mon, 12 Jul 2010 09:38:45 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007120938.o6C9cjWD056585@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 12 Jul 2010 09:38:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209930 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 09:38:45 -0000 Author: jchandra Date: Mon Jul 12 09:38:44 2010 New Revision: 209930 URL: http://svn.freebsd.org/changeset/base/209930 Log: Merge jmallett@'s n64 work into HEAD. Merge changes for initial n64 support in pmap.c. Use direct mapped (XKPHYS) access for a lot of operations that earlier needed temporary mapping. Add support for using XKSEG for kernel mappings. Reviewed by: imp Obtained from: jmallett (http://svn.freebsd.org/base/user/jmallett/octeon) Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Mon Jul 12 07:42:42 2010 (r209929) +++ head/sys/mips/mips/pmap.c Mon Jul 12 09:38:44 2010 (r209930) @@ -128,7 +128,11 @@ __FBSDID("$FreeBSD$"); #define pmap_segshift(v) (((v) >> SEGSHIFT) & (NPDEPG - 1)) #define segtab_pde(m, v) ((m)[pmap_segshift((v))]) +#if defined(__mips_n64) +#define NUSERPGTBLS (NPDEPG) +#else #define NUSERPGTBLS (pmap_segshift(VM_MAXUSER_ADDRESS)) +#endif #define mips_segtrunc(va) ((va) & ~SEGOFSET) #define is_kernel_pmap(x) ((x) == kernel_pmap) @@ -196,6 +200,7 @@ static void pmap_ptpgzone_dtor(void *mem static void *pmap_ptpgzone_allocf(uma_zone_t, int, u_int8_t *, int); static uma_zone_t ptpgzone; +#if !defined(__mips_n64) struct local_sysmaps { vm_offset_t base; uint16_t valid1, valid2; @@ -256,6 +261,7 @@ static struct local_sysmaps sysmap_lmem[ tlb_invalidate_address(kernel_pmap, sysm->base + PAGE_SIZE); \ sysm->valid2 = 0; \ intr_restore(intr) +#endif static inline pt_entry_t * pmap_segmap(pmap_t pmap, vm_offset_t va) @@ -321,7 +327,7 @@ pmap_steal_memory(vm_size_t size) } /* - * Bootstrap the system enough to run with virtual memory. This + * Bootstrap the system enough to run with virtual memory. This * assumes that the phys_avail array has been initialized. */ void @@ -330,7 +336,9 @@ pmap_bootstrap(void) pt_entry_t *pgtab; pt_entry_t *pte; int i, j; +#if !defined(__mips_n64) int memory_larger_than_512meg = 0; +#endif /* Sort. */ again: @@ -341,14 +349,11 @@ again: phys_avail[i] = round_page(phys_avail[i]); phys_avail[i + 1] = trunc_page(phys_avail[i + 1]); - if (phys_avail[i + 1] >= MIPS_KSEG0_LARGEST_PHYS) - memory_larger_than_512meg++; if (i < 2) continue; if (phys_avail[i - 2] > phys_avail[i]) { vm_paddr_t ptemp[2]; - ptemp[0] = phys_avail[i + 0]; ptemp[1] = phys_avail[i + 1]; @@ -361,6 +366,11 @@ again: } } +#if !defined(__mips_n64) + if (phys_avail[i - 1] >= MIPS_KSEG0_LARGEST_PHYS) + memory_larger_than_512meg = 1; +#endif + /* * Copy the phys_avail[] array before we start stealing memory from it. */ @@ -395,7 +405,6 @@ again: */ kstack0 = pmap_steal_memory(KSTACK_PAGES << PAGE_SHIFT); - virtual_avail = VM_MIN_KERNEL_ADDRESS; virtual_end = VM_MAX_KERNEL_ADDRESS; @@ -419,6 +428,7 @@ again: printf("pcpu is available at virtual address %p.\n", pcpup); #endif +#if !defined(__mips_n64) /* * Steal some virtual space that will not be in kernel_segmap. This * va memory space will be used to map in kernel pages that are @@ -433,6 +443,7 @@ again: sysmap_lmem[i].valid1 = sysmap_lmem[i].valid2 = 0; } } +#endif /* * Allocate segment table for the kernel @@ -443,6 +454,7 @@ again: * Allocate second level page tables for the kernel */ nkpt = NKPT; +#if !defined(__mips_n64) if (memory_larger_than_512meg) { /* * If we have a large memory system we CANNOT afford to hit @@ -459,6 +471,7 @@ again: */ nkpt = (PAGE_SIZE / sizeof(pd_entry_t)) - (virtual_avail >> SEGSHIFT); } +#endif pgtab = (pt_entry_t *)pmap_steal_memory(PAGE_SIZE * nkpt); /* @@ -768,12 +781,24 @@ pmap_kremove(vm_offset_t va) * architectures should map the pages starting at '*virt' and * update '*virt' with the first usable address after the mapped * region. + * + * Use XKPHYS for 64 bit, and KSEG0 where possible for 32 bit. */ +#if defined(__mips_n64) +vm_offset_t +pmap_map(vm_offset_t *virt, vm_offset_t start, vm_offset_t end, int prot) +{ + return (MIPS_PHYS_TO_XKPHYS_CACHED(start)); +} +#else vm_offset_t pmap_map(vm_offset_t *virt, vm_offset_t start, vm_offset_t end, int prot) { vm_offset_t va, sva; + if (end <= MIPS_KSEG0_LARGEST_PHYS) + return (MIPS_PHYS_TO_KSEG0(start)); + va = sva = *virt; while (start < end) { pmap_kenter(va, start); @@ -783,6 +808,7 @@ pmap_map(vm_offset_t *virt, vm_offset_t *virt = va; return (sva); } +#endif /* * Add a list of wired pages to the kva @@ -2037,7 +2063,20 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ /* * Make a temporary mapping for a physical address. This is only intended * to be used for panic dumps. + * + * Use XKPHYS for 64 bit, and KSEG0 where possible for 32 bit. */ +#if defined(__mips_n64) +void * +pmap_kenter_temporary(vm_paddr_t pa, int i) +{ + return ((void *)MIPS_PHYS_TO_XKPHYS_CACHED(pa)); +} +void +pmap_kenter_temporary_free(vm_paddr_t pa) +{ +} +#else void * pmap_kenter_temporary(vm_paddr_t pa, int i) { @@ -2098,6 +2137,7 @@ pmap_kenter_temporary_free(vm_paddr_t pa sysm->valid1 = 0; } } +#endif /* * Moved the code to Machine Independent @@ -2203,7 +2243,21 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm /* * pmap_zero_page zeros the specified hardware page by mapping * the page into KVM and using bzero to clear its contents. + * + * Use XKPHYS for 64 bit, and KSEG0 where possible for 32 bit. */ +#if defined (__mips_n64) +void +pmap_zero_page(vm_page_t m) +{ + vm_offset_t va; + vm_paddr_t phys = VM_PAGE_TO_PHYS(m); + + va = MIPS_PHYS_TO_XKPHYS_CACHED(phys); + bzero((caddr_t)va, PAGE_SIZE); + mips_dcache_wbinv_range(va, PAGE_SIZE); +} +#else void pmap_zero_page(vm_page_t m) { @@ -2225,13 +2279,25 @@ pmap_zero_page(vm_page_t m) PMAP_LMEM_UNMAP(); } } - +#endif /* * pmap_zero_page_area zeros the specified hardware page by mapping * the page into KVM and using bzero to clear its contents. * * off and size may not cover an area beyond a single hardware page. */ +#if defined (__mips_n64) +void +pmap_zero_page_area(vm_page_t m, int off, int size) +{ + vm_offset_t va; + vm_paddr_t phys = VM_PAGE_TO_PHYS(m); + + va = MIPS_PHYS_TO_XKPHYS_CACHED(phys); + bzero((char *)(caddr_t)va + off, size); + mips_dcache_wbinv_range(va + off, size); +} +#else void pmap_zero_page_area(vm_page_t m, int off, int size) { @@ -2252,7 +2318,20 @@ pmap_zero_page_area(vm_page_t m, int off PMAP_LMEM_UNMAP(); } } +#endif + +#if defined (__mips_n64) +void +pmap_zero_page_idle(vm_page_t m) +{ + vm_offset_t va; + vm_paddr_t phys = VM_PAGE_TO_PHYS(m); + va = MIPS_PHYS_TO_XKPHYS_CACHED(phys); + bzero((caddr_t)va, PAGE_SIZE); + mips_dcache_wbinv_range(va, PAGE_SIZE); +} +#else void pmap_zero_page_idle(vm_page_t m) { @@ -2273,13 +2352,32 @@ pmap_zero_page_idle(vm_page_t m) PMAP_LMEM_UNMAP(); } } +#endif /* * pmap_copy_page copies the specified (machine independent) * page by mapping the page into virtual memory and using * bcopy to copy the page, one machine dependent page at a * time. + * + * Use XKPHYS for 64 bit, and KSEG0 where possible for 32 bit. */ +#if defined (__mips_n64) +void +pmap_copy_page(vm_page_t src, vm_page_t dst) +{ + vm_offset_t va_src, va_dst; + vm_paddr_t phy_src = VM_PAGE_TO_PHYS(src); + vm_paddr_t phy_dst = VM_PAGE_TO_PHYS(dst); + + pmap_flush_pvcache(src); + mips_dcache_wbinv_range_index(MIPS_PHYS_TO_XKPHYS_CACHED(phy_dst), PAGE_SIZE); + va_src = MIPS_PHYS_TO_XKPHYS_CACHED(phy_src); + va_dst = MIPS_PHYS_TO_XKPHYS_CACHED(phy_dst); + bcopy((caddr_t)va_src, (caddr_t)va_dst, PAGE_SIZE); + mips_dcache_wbinv_range(va_dst, PAGE_SIZE); +} +#else void pmap_copy_page(vm_page_t src, vm_page_t dst) { @@ -2310,6 +2408,7 @@ pmap_copy_page(vm_page_t src, vm_page_t PMAP_LMEM_UNMAP(); } } +#endif /* * Returns true if the pmap's pv is one of the first @@ -2715,7 +2814,21 @@ pmap_clear_reference(vm_page_t m) * address space. Return a pointer to where it is mapped. This * routine is intended to be used for mapping device memory, * NOT real memory. + * + * Use XKPHYS uncached for 64 bit, and KSEG1 where possible for 32 bit. */ +#if defined(__mips_n64) +void * +pmap_mapdev(vm_offset_t pa, vm_size_t size) +{ + return ((void *)MIPS_PHYS_TO_XKPHYS_UNCACHED(pa)); +} + +void +pmap_unmapdev(vm_offset_t va, vm_size_t size) +{ +} +#else void * pmap_mapdev(vm_offset_t pa, vm_size_t size) { @@ -2762,6 +2875,7 @@ pmap_unmapdev(vm_offset_t va, vm_size_t pmap_kremove(tmpva); kmem_free(kernel_map, base, size); } +#endif /* * perform the pmap work for mincore @@ -3078,6 +3192,7 @@ pmap_set_modified(vm_offset_t pa) PHYS_TO_VM_PAGE(pa)->md.pv_flags |= (PV_TABLE_REF | PV_TABLE_MOD); } + /* * Routine: pmap_kextract * Function: @@ -3087,41 +3202,68 @@ pmap_set_modified(vm_offset_t pa) /* PMAP_INLINE */ vm_offset_t pmap_kextract(vm_offset_t va) { - vm_offset_t pa = 0; + int mapped; + + /* + * First, the direct-mapped regions. + */ +#if defined(__mips_n64) + if (va >= MIPS_XKPHYS_START && va < MIPS_XKPHYS_END) + return (MIPS_XKPHYS_TO_PHYS(va)); +#endif + + if (va >= MIPS_KSEG0_START && va < MIPS_KSEG0_END) + return (MIPS_KSEG0_TO_PHYS(va)); - if (va < MIPS_KSEG0_START) { - /* user virtual address */ + if (va >= MIPS_KSEG1_START && va < MIPS_KSEG1_END) + return (MIPS_KSEG1_TO_PHYS(va)); + + /* + * User virtual addresses. + */ + if (va < VM_MAXUSER_ADDRESS) { pt_entry_t *ptep; if (curproc && curproc->p_vmspace) { ptep = pmap_pte(&curproc->p_vmspace->vm_pmap, va); - if (ptep) - pa = TLBLO_PTE_TO_PA(*ptep) | - (va & PAGE_MASK); - } - } else if (va >= MIPS_KSEG0_START && - va < MIPS_KSEG1_START) - pa = MIPS_KSEG0_TO_PHYS(va); - else if (va >= MIPS_KSEG1_START && - va < MIPS_KSEG2_START) - pa = MIPS_KSEG1_TO_PHYS(va); - else if (va >= MIPS_KSEG2_START && va < VM_MAX_KERNEL_ADDRESS) { + if (ptep) { + return (TLBLO_PTE_TO_PA(*ptep) | + (va & PAGE_MASK)); + } + return (0); + } + } + + /* + * Should be kernel virtual here, otherwise fail + */ + mapped = (va >= MIPS_KSEG2_START || va < MIPS_KSEG2_END); +#if defined(__mips_n64) + mapped = mapped || (va >= MIPS_XKSEG_START || va < MIPS_XKSEG_END); +#endif + /* + * Kernel virtual. + */ + + if (mapped) { pt_entry_t *ptep; /* Is the kernel pmap initialized? */ if (kernel_pmap->pm_active) { - /* Its inside the virtual address range */ + /* It's inside the virtual address range */ ptep = pmap_pte(kernel_pmap, va); if (ptep) { return (TLBLO_PTE_TO_PA(*ptep) | (va & PAGE_MASK)); } - return (0); } + return (0); } - return pa; + + panic("%s for unknown address space %p.", __func__, (void *)va); } + void pmap_flush_pvcache(vm_page_t m) { From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 09:42:05 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F37B106568C; Mon, 12 Jul 2010 09:42:05 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 012D38FC0A; Mon, 12 Jul 2010 09:42:04 +0000 (UTC) Received: from c122-106-145-25.carlnfd1.nsw.optusnet.com.au (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6C9g1ra007453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Jul 2010 19:42:02 +1000 Date: Mon, 12 Jul 2010 19:42:01 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "Jayachandran C." In-Reply-To: <201007120724.o6C7OeuT027114@svn.freebsd.org> Message-ID: <20100712185429.B61886@delplex.bde.org> References: <201007120724.o6C7OeuT027114@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r209928 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 09:42:05 -0000 On Mon, 12 Jul 2010, Jayachandran C. wrote: > Log: > Move KSEG address definitions from cpu.h to cpuregs.h with the other > definitions, add some XKPHYS related definitions for n64. This is a good start to cleaning up mips cpu.h. but far from complete. cpu.h is for MD implementations of a few (about 10) MI interfaces. Most cpu.h's are about 2K long but the mips one is about 17K. The arm one is the smallest, partly because it is missing a copyright, but it still consists about half of things that shouldn't be in it. The amd64 one is the most correct. The only bugs in it are: - lots of namespace pollution via nested includes. Unfortunately a couple of things in the nested includes are needed to implement the macros in this file. - COPY_SIGCODE is defined, but seems to have never been used in FreeBSD. 4.4BSD had it in all cpu.h's and may even have used it in its execve(), but FreeBSD only has it in a few cpu.h's and has no references to it in any other source file at any time. - cpu_halt() and cpu_reset() have a MI interface and don't need to be implemented as a macro, so they should be declared in an MI place. Perhaps similarly for some other cpu_*() functions. cpu_excec() and cpu_swapin() are now empty macros for amd64, but they could be empty functions. - fork_trampoline() is are declared, but is not used by MI code (but is referred to in comments in MI code). - swi_vm(): like cpu*_() but more MI. Only missing busdma support for some archines makes it MD. It is a callback function and cannot be a macro since its address is taken so that it can be called back to. amd64 cpu.h ends up with definitions or declarations for: - 3 things that need to be there - 7 things that don't need to be there, but can reasonably be there - 2 things that shouldn't be there - 2 things that really shouldn't be there - 1 thing that shouldn't be anywhere - uncounted namespace pollution from the nested includes. Bruce From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 10:14:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37F13106564A; Mon, 12 Jul 2010 10:14:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2772A8FC16; Mon, 12 Jul 2010 10:14:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CAEPDK065970; Mon, 12 Jul 2010 10:14:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CAEP49065968; Mon, 12 Jul 2010 10:14:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007121014.o6CAEP49065968@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 12 Jul 2010 10:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209932 - head/lib/libc/compat-43 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 10:14:25 -0000 Author: kib Date: Mon Jul 12 10:14:24 2010 New Revision: 209932 URL: http://svn.freebsd.org/changeset/base/209932 Log: For xsi_sigpause(3), remove the supplied signal from the process mask during sigpause(2) call. It was backward. Check that the signal number is valid. Reported by: Garrett Cooper MFC after: 1 week Modified: head/lib/libc/compat-43/sigcompat.c Modified: head/lib/libc/compat-43/sigcompat.c ============================================================================== --- head/lib/libc/compat-43/sigcompat.c Mon Jul 12 10:11:10 2010 (r209931) +++ head/lib/libc/compat-43/sigcompat.c Mon Jul 12 10:14:24 2010 (r209932) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include +#include #include #include #include "un-namespace.h" @@ -111,9 +112,16 @@ int xsi_sigpause(int sig) { sigset_t set; + int error; - sigemptyset(&set); - sigaddset(&set, sig); + if (!_SIG_VALID(sig)) { + errno = EINVAL; + return (-1); + } + error = _sigprocmask(SIG_BLOCK, NULL, &set); + if (error != 0) + return (error); + sigdelset(&set, sig); return (_sigsuspend(&set)); } From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 10:15:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53C69106564A; Mon, 12 Jul 2010 10:15:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4394D8FC15; Mon, 12 Jul 2010 10:15:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CAFYNm066275; Mon, 12 Jul 2010 10:15:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CAFYBo066273; Mon, 12 Jul 2010 10:15:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007121015.o6CAFYBo066273@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 12 Jul 2010 10:15:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209933 - head/lib/libthr/thread X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 10:15:34 -0000 Author: kib Date: Mon Jul 12 10:15:33 2010 New Revision: 209933 URL: http://svn.freebsd.org/changeset/base/209933 Log: Use _SIG_VALID instead of expanded form of the macro. Submitted by: Garrett Cooper MFC after: 1 week Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c ============================================================================== --- head/lib/libthr/thread/thr_sig.c Mon Jul 12 10:14:24 2010 (r209932) +++ head/lib/libthr/thread/thr_sig.c Mon Jul 12 10:15:33 2010 (r209933) @@ -194,7 +194,7 @@ int _sigaction(int sig, const struct sigaction * act, struct sigaction * oact) { /* Check if the signal number is out of range: */ - if (sig < 1 || sig > _SIG_MAXSIG || sig == SIGCANCEL) { + if (!_SIG_VALID(sig) || sig == SIGCANCEL) { /* Return an invalid argument: */ errno = EINVAL; return (-1); From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 10:18:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2DD0106566C; Mon, 12 Jul 2010 10:18:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2D408FC17; Mon, 12 Jul 2010 10:18:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CAIAum066865; Mon, 12 Jul 2010 10:18:10 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CAIAwQ066863; Mon, 12 Jul 2010 10:18:10 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007121018.o6CAIAwQ066863@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 12 Jul 2010 10:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209934 - head/sys/ddb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 10:18:11 -0000 Author: kib Date: Mon Jul 12 10:18:10 2010 New Revision: 209934 URL: http://svn.freebsd.org/changeset/base/209934 Log: One more use for _SIG_VALID. Submitted by: Garrett Cooper MFC after: 1 week Modified: head/sys/ddb/db_command.c Modified: head/sys/ddb/db_command.c ============================================================================== --- head/sys/ddb/db_command.c Mon Jul 12 10:15:33 2010 (r209933) +++ head/sys/ddb/db_command.c Mon Jul 12 10:18:10 2010 (r209934) @@ -633,7 +633,7 @@ db_kill(dummy1, dummy2, dummy3, dummy4) if (!db_expression(&pid)) DB_ERROR(("Missing process ID\n")); db_skip_to_eol(); - if (sig < 1 || sig > _SIG_MAXSIG) + if (!_SIG_VALID(sig)) DB_ERROR(("Signal number out of range\n")); /* From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 10:22:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 469691065673; Mon, 12 Jul 2010 10:22:59 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C8078FC15; Mon, 12 Jul 2010 10:22:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CAMxd1067970; Mon, 12 Jul 2010 10:22:59 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CAMwXx067967; Mon, 12 Jul 2010 10:22:58 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007121022.o6CAMwXx067967@svn.freebsd.org> From: "Jayachandran C." Date: Mon, 12 Jul 2010 10:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209935 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 10:22:59 -0000 Author: jchandra Date: Mon Jul 12 10:22:58 2010 New Revision: 209935 URL: http://svn.freebsd.org/changeset/base/209935 Log: Merge jmallett@'s n64 work into HEAD Initial set of ddb changes to support n64 Reviewed by: imp Obtained from: jmallett (http://svn.freebsd.org/base/user/jmallett/octeon) Modified: head/sys/mips/mips/db_interface.c head/sys/mips/mips/db_trace.c Modified: head/sys/mips/mips/db_interface.c ============================================================================== --- head/sys/mips/mips/db_interface.c Mon Jul 12 10:18:10 2010 (r209934) +++ head/sys/mips/mips/db_interface.c Mon Jul 12 10:22:58 2010 (r209935) @@ -115,12 +115,12 @@ int (*do_db_log_stack_trace_cmd)(char *) static int db_frame(struct db_variable *vp, db_expr_t *valuep, int op) { - int *reg; + register_t *reg; if (kdb_frame == NULL) return (0); - reg = (int *)((uintptr_t)kdb_frame + (db_expr_t)vp->valuep); + reg = (register_t *)((uintptr_t)kdb_frame + (size_t)(intptr_t)vp->valuep); if (op == DB_VAR_GET) *valuep = *reg; else Modified: head/sys/mips/mips/db_trace.c ============================================================================== --- head/sys/mips/mips/db_trace.c Mon Jul 12 10:18:10 2010 (r209934) +++ head/sys/mips/mips/db_trace.c Mon Jul 12 10:22:58 2010 (r209935) @@ -140,7 +140,7 @@ loop: } /* check for bad SP: could foul up next frame */ /*XXX MIPS64 bad: this hard-coded SP is lame */ - if (sp & 3 || sp < 0x80000000) { + if (sp & 3 || (uintptr_t)sp < 0x80000000u) { (*printfn) ("SP 0x%x: not in kernel\n", sp); ra = 0; subr = 0; @@ -377,7 +377,7 @@ db_md_set_watchpoint(db_expr_t addr, db_ int -db_md_clr_watchpoint( db_expr_t addr, db_expr_t size) +db_md_clr_watchpoint(db_expr_t addr, db_expr_t size) { return(0); @@ -403,8 +403,8 @@ db_trace_thread(struct thread *thr, int struct pcb *ctx; if (thr == curthread) { - sp = (register_t)__builtin_frame_address(0); - ra = (register_t)__builtin_return_address(0); + sp = (register_t)(intptr_t)__builtin_frame_address(0); + ra = (register_t)(intptr_t)__builtin_return_address(0); __asm __volatile( "jal 99f\n" From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 12:16:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC24F106566C; Mon, 12 Jul 2010 12:16:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBE578FC18; Mon, 12 Jul 2010 12:16:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CCGBeu093325; Mon, 12 Jul 2010 12:16:11 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CCGBb6093324; Mon, 12 Jul 2010 12:16:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007121216.o6CCGBb6093324@svn.freebsd.org> From: Alexander Motin Date: Mon, 12 Jul 2010 12:16:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209944 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 12:16:12 -0000 Author: mav Date: Mon Jul 12 12:16:11 2010 New Revision: 209944 URL: http://svn.freebsd.org/changeset/base/209944 Log: Revert and remake r209883: Do not grab lock while setting up interrupt, as it causes LOR with allocation code. Instead make interrupt handler check that CAM bus initialization completed before touching it. While there, slightly improve attach errors handling. Reported by: kib Modified: head/sys/dev/ata/ata-all.c Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Mon Jul 12 11:31:13 2010 (r209943) +++ head/sys/dev/ata/ata-all.c Mon Jul 12 12:16:11 2010 (r209944) @@ -185,29 +185,28 @@ ata_attach(device_t dev) if (ch->dma.alloc) ch->dma.alloc(dev); - mtx_lock(&ch->state_mtx); /* setup interrupt delivery */ rid = ATA_IRQ_RID; ch->r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (!ch->r_irq) { device_printf(dev, "unable to allocate interrupt\n"); - mtx_unlock(&ch->state_mtx); return ENXIO; } if ((error = bus_setup_intr(dev, ch->r_irq, ATA_INTR_FLAGS, NULL, ata_interrupt, ch, &ch->ih))) { + bus_release_resource(dev, SYS_RES_IRQ, rid, ch->r_irq); device_printf(dev, "unable to setup interrupt\n"); - goto err1; + return error; } #ifndef ATA_CAM - mtx_unlock(&ch->state_mtx); /* probe and attach devices on this channel unless we are in early boot */ if (!ata_delayed_attach) ata_identify(dev); return (0); #else + mtx_lock(&ch->state_mtx); /* Create the device queue for our SIM. */ devq = cam_simq_alloc(1); if (devq == NULL) { @@ -220,8 +219,9 @@ ata_attach(device_t dev) device_get_unit(dev), &ch->state_mtx, 1, 0, devq); if (ch->sim == NULL) { device_printf(dev, "unable to allocate sim\n"); + cam_simq_free(devq); error = ENOMEM; - goto err2; + goto err1; } if (xpt_bus_register(ch->sim, dev, 0) != CAM_SUCCESS) { device_printf(dev, "unable to register xpt bus\n"); @@ -241,11 +241,12 @@ err3: xpt_bus_deregister(cam_sim_path(ch->sim)); err2: cam_sim_free(ch->sim, /*free_devq*/TRUE); -#endif + ch->sim = NULL; err1: - bus_release_resource(dev, SYS_RES_IRQ, ATA_IRQ_RID, ch->r_irq); + bus_release_resource(dev, SYS_RES_IRQ, rid, ch->r_irq); mtx_unlock(&ch->state_mtx); return (error); +#endif } int @@ -283,6 +284,7 @@ ata_detach(device_t dev) xpt_free_path(ch->path); xpt_bus_deregister(cam_sim_path(ch->sim)); cam_sim_free(ch->sim, /*free_devq*/TRUE); + ch->sim = NULL; mtx_unlock(&ch->state_mtx); #endif @@ -309,9 +311,12 @@ ata_conn_event(void *context, int dummy) union ccb *ccb; mtx_lock(&ch->state_mtx); + if (ch->sim == NULL) { + mtx_unlock(&ch->state_mtx); + return; + } ata_reinit(dev); - mtx_unlock(&ch->state_mtx); - if ((ccb = xpt_alloc_ccb()) == NULL) + if ((ccb = xpt_alloc_ccb_nowait()) == NULL) return; if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(ch->sim), @@ -320,6 +325,7 @@ ata_conn_event(void *context, int dummy) return; } xpt_rescan(ccb); + mtx_unlock(&ch->state_mtx); #else ata_reinit(dev); #endif From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 12:21:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 769601065670; Mon, 12 Jul 2010 12:21:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 48E2F8FC1C; Mon, 12 Jul 2010 12:21:40 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id CA29946B8A; Mon, 12 Jul 2010 08:21:39 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CCC2C8A03C; Mon, 12 Jul 2010 08:21:38 -0400 (EDT) From: John Baldwin To: Alexander Motin Date: Mon, 12 Jul 2010 08:13:19 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007111647.o6BGlk0O033551@svn.freebsd.org> In-Reply-To: <201007111647.o6BGlk0O033551@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007120813.19223.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 12 Jul 2010 08:21:38 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209900 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 12:21:40 -0000 On Sunday, July 11, 2010 12:47:46 pm Alexander Motin wrote: > Author: mav > Date: Sun Jul 11 16:47:45 2010 > New Revision: 209900 > URL: http://svn.freebsd.org/changeset/base/209900 > > Log: > Remove interval validation from cpu_tick_calibrate(). As I found, check > was needed at preliminary version of the patch, where number of CPU ticks > was divided strictly on 16 seconds. Final code instead uses real interval > duration, so precise interval should not be important. Same time aliasing > issues around second boundary causes false positives, periodically logging > useless "t_delta ... too long/short" messages when HZ set below 256. Hmm, did you ask phk@ about this? I notice that the printfs only trigger if you have bootverbose enabled, so they were not affecting normal users as most people do not run their systems with bootverbose enabled. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 12:50:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 286291065678; Mon, 12 Jul 2010 12:50:37 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1978D8FC1E; Mon, 12 Jul 2010 12:50:35 +0000 (UTC) Received: by bwz12 with SMTP id 12so2824779bwz.13 for ; Mon, 12 Jul 2010 05:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=XvmvLg82hu/t9tSb96NZqo4pfyMRT+uC3WN90NAO75E=; b=TuXGMbxkcLyzOY4mRjWtkwjH6yJVGEZFP/UGZQ+YXA0j96a93TPmqnZfekrorjiG1Q bUjlQnxfyuNjAAt7E6MmAB7pxAC9rUqPQgRpfV0mIyvtwdvKHghQQjcA0gKL0FGiaaJc sOKRoU/EFds3RbVxGoC6Z6vQrJkYxY1+SlI0g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=uUSjVeEosZtBCTfbi4hgiEgOV2Gmf0At0lAYqtd8LhxvaThdvBq+OIUVed5rfjk93S zPPamg58g6BrlqpewmCFFpKb1I7xsHqFn+aVnHUXbMvUO/ggWJq1KOCKL01StcEyJ6ZK dNjBEBKTM+2mKOAc1PaqPUXr2qTc4WLhUYxEI= Received: by 10.204.84.17 with SMTP id h17mr2146460bkl.101.1278939034504; Mon, 12 Jul 2010 05:50:34 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id g11sm18388636bkw.10.2010.07.12.05.50.33 (version=SSLv3 cipher=RC4-MD5); Mon, 12 Jul 2010 05:50:33 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C3B0F63.6000905@FreeBSD.org> Date: Mon, 12 Jul 2010 15:49:39 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: John Baldwin References: <201007111647.o6BGlk0O033551@svn.freebsd.org> <201007120813.19223.jhb@freebsd.org> In-Reply-To: <201007120813.19223.jhb@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209900 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 12:50:37 -0000 John Baldwin wrote: > On Sunday, July 11, 2010 12:47:46 pm Alexander Motin wrote: >> Author: mav >> Date: Sun Jul 11 16:47:45 2010 >> New Revision: 209900 >> URL: http://svn.freebsd.org/changeset/base/209900 >> >> Log: >> Remove interval validation from cpu_tick_calibrate(). As I found, check >> was needed at preliminary version of the patch, where number of CPU ticks >> was divided strictly on 16 seconds. Final code instead uses real interval >> duration, so precise interval should not be important. Same time aliasing >> issues around second boundary causes false positives, periodically logging >> useless "t_delta ... too long/short" messages when HZ set below 256. > > Hmm, did you ask phk@ about this? Yes. He agreed that code should be reconsidered. > I notice that the printfs only trigger if > you have bootverbose enabled, so they were not affecting normal users as most > people do not run their systems with bootverbose enabled. Yes, but they produce major part of kernel messages on my own systems. I've got tired seeing them for years. It would be fine if they were usable, but, as I have told here and on current@, with preset implementation they were absolutely meaningless. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 13:38:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BD2A1065672; Mon, 12 Jul 2010 13:38:26 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61E398FC08; Mon, 12 Jul 2010 13:38:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CDcQFg011531; Mon, 12 Jul 2010 13:38:26 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CDcQZE011529; Mon, 12 Jul 2010 13:38:26 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007121338.o6CDcQZE011529@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 12 Jul 2010 13:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209945 - head/sys/powerpc/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 13:38:26 -0000 Author: nwhitehorn Date: Mon Jul 12 13:38:26 2010 New Revision: 209945 URL: http://svn.freebsd.org/changeset/base/209945 Log: MFppc64: Provide ELF definitions for 64-bit PowerPC. This unbreaks the powerpc loader build. Modified: head/sys/powerpc/include/elf.h Modified: head/sys/powerpc/include/elf.h ============================================================================== --- head/sys/powerpc/include/elf.h Mon Jul 12 12:16:11 2010 (r209944) +++ head/sys/powerpc/include/elf.h Mon Jul 12 13:38:26 2010 (r209945) @@ -36,14 +36,26 @@ * [ppc-eabi-1995-01.pdf] for details. */ -#include /* Definitions common to all 32 bit architectures. */ - +#ifndef __ELF_WORD_SIZE +#ifdef __powerpc64__ +#define __ELF_WORD_SIZE 64 /* Used by */ +#else #define __ELF_WORD_SIZE 32 /* Used by */ +#endif +#endif + +#include /* Definitions common to all 32 bit architectures. */ +#include /* Definitions common to all 64 bit architectures. */ #include +#if __ELF_WORD_SIZE == 64 +#define ELF_ARCH EM_PPC64 +#define ELF_MACHINE_OK(x) ((x) == EM_PPC64) +#else #define ELF_ARCH EM_PPC - +#define ELF_ARCH32 EM_PPC #define ELF_MACHINE_OK(x) ((x) == EM_PPC) +#endif /* * Auxiliary vector entries for passing information to the interpreter. @@ -61,6 +73,15 @@ typedef struct { /* Auxiliary vector ent } a_un; } Elf32_Auxinfo; +typedef struct { /* Auxiliary vector entry on initial stack */ + long a_type; /* Entry type. */ + union { + long a_val; /* Integer value. */ + void *a_ptr; /* Address. */ + void (*a_fcn)(void); /* Function pointer (not used). */ + } a_un; +} Elf64_Auxinfo; + __ElfType(Auxinfo); /* Values for a_type. */ @@ -91,10 +112,17 @@ __ElfType(Auxinfo); #define R_PPC_EMB_COUNT (R_PPC_EMB_RELSDA - R_PPC_EMB_NADDR32 + 1) /* Define "machine" characteristics */ +#if __ELF_WORD_SIZE == 64 +#define ELF_TARG_CLASS ELFCLASS64 +#define ELF_TARG_DATA ELFDATA2MSB +#define ELF_TARG_MACH EM_PPC64 +#define ELF_TARG_VER 1 +#else #define ELF_TARG_CLASS ELFCLASS32 #define ELF_TARG_DATA ELFDATA2MSB #define ELF_TARG_MACH EM_PPC #define ELF_TARG_VER 1 +#endif #define ET_DYN_LOAD_ADDR 0x01010000 From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 14:19:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DC74106564A; Mon, 12 Jul 2010 14:19:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DCF48FC28; Mon, 12 Jul 2010 14:19:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CEJNQR020600; Mon, 12 Jul 2010 14:19:23 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CEJNr5020598; Mon, 12 Jul 2010 14:19:23 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007121419.o6CEJNr5020598@svn.freebsd.org> From: John Baldwin Date: Mon, 12 Jul 2010 14:19:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209946 - head/sys/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 14:19:24 -0000 Author: jhb Date: Mon Jul 12 14:19:23 2010 New Revision: 209946 URL: http://svn.freebsd.org/changeset/base/209946 Log: - Add missing locking around flushing of an NFS node's attribute cache in the NMODIFIED case of nfs_open(). - Cosmetic tweak to simplify an expression in nfs_lookup(). Reviewed by: rmacklem, bde MFC after: 1 week Modified: head/sys/nfsclient/nfs_vnops.c Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Mon Jul 12 13:38:26 2010 (r209945) +++ head/sys/nfsclient/nfs_vnops.c Mon Jul 12 14:19:23 2010 (r209946) @@ -525,10 +525,12 @@ nfs_open(struct vop_open_args *ap) error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1); if (error == EINTR || error == EIO) return (error); + mtx_lock(&np->n_mtx); np->n_attrstamp = 0; KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp); if (vp->v_type == VDIR) np->n_direofoffset = 0; + mtx_unlock(&np->n_mtx); error = VOP_GETATTR(vp, &vattr, ap->a_cred); if (error) return (error); @@ -970,8 +972,8 @@ nfs_lookup(struct vop_lookup_args *ap) */ newvp = *vpp; newnp = VTONFS(newvp); - if ((cnp->cn_flags & (ISLASTCN | ISOPEN)) == - (ISLASTCN | ISOPEN) && !(newnp->n_flag & NMODIFIED)) { + if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && + !(newnp->n_flag & NMODIFIED)) { mtx_lock(&newnp->n_mtx); newnp->n_attrstamp = 0; KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(newvp); From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 14:27:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D1441065674; Mon, 12 Jul 2010 14:27:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0E288FC1C; Mon, 12 Jul 2010 14:27:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CERn2u022552; Mon, 12 Jul 2010 14:27:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CERnOJ022550; Mon, 12 Jul 2010 14:27:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007121427.o6CERnOJ022550@svn.freebsd.org> From: John Baldwin Date: Mon, 12 Jul 2010 14:27:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209948 - head/sys/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 14:27:51 -0000 Author: jhb Date: Mon Jul 12 14:27:49 2010 New Revision: 209948 URL: http://svn.freebsd.org/changeset/base/209948 Log: A previous change moved the GETATTR RPC for open() calls that hit in the name cache up into nfs_lookup() instead of nfs_open(). Continue this trend by flushing the attribute cache for leaf nodes in nfs_lookup() during an open() if we do a LOOKUP RPC. For NFSv3 this should generally be a NOP as the attributes are flushed before fetching the post-op attributes from the LOOKUP RPC which most (all?) NFSv3 servers provide, so the post-op attributes should populate the cache. Now all NFS open() calls will always clear the cached attributes during the nfs_lookup() prior to nfs_open() in the !NMODIFIED case to provide CTOC. As a result, we can remove the conditional flushing of the attribute cache from nfs_open(). Reviewed by: rmacklem, bde MFC after: 2 weeks Modified: head/sys/nfsclient/nfs_vnops.c Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Mon Jul 12 14:24:20 2010 (r209947) +++ head/sys/nfsclient/nfs_vnops.c Mon Jul 12 14:27:49 2010 (r209948) @@ -538,15 +538,6 @@ nfs_open(struct vop_open_args *ap) np->n_mtime = vattr.va_mtime; mtx_unlock(&np->n_mtx); } else { - struct thread *td = curthread; - - if (np->n_ac_ts_syscalls != td->td_syscalls || - np->n_ac_ts_tid != td->td_tid || - td->td_proc == NULL || - np->n_ac_ts_pid != td->td_proc->p_pid) { - np->n_attrstamp = 0; - KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp); - } mtx_unlock(&np->n_mtx); error = VOP_GETATTR(vp, &vattr, ap->a_cred); if (error) @@ -1123,6 +1114,20 @@ nfs_lookup(struct vop_lookup_args *ap) return (error); } newvp = NFSTOV(np); + + /* + * Flush the attribute cache when opening a leaf node + * to ensure that fresh attributes are fetched in + * nfs_open() if we are unable to fetch attributes + * from the LOOKUP reply. + */ + if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && + !(np->n_flag & NMODIFIED)) { + mtx_lock(&np->n_mtx); + np->n_attrstamp = 0; + KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(newvp); + mtx_unlock(&np->n_mtx); + } } if (v3) { nfsm_postop_attr(newvp, attrflag); From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 15:08:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B74671065672; Mon, 12 Jul 2010 15:08:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 883A48FC0A; Mon, 12 Jul 2010 15:08:28 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 264F746B89; Mon, 12 Jul 2010 11:08:28 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 53DB88A03C; Mon, 12 Jul 2010 11:08:27 -0400 (EDT) From: John Baldwin To: Alexander Motin Date: Mon, 12 Jul 2010 10:03:09 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007111647.o6BGlk0O033551@svn.freebsd.org> <201007120813.19223.jhb@freebsd.org> <4C3B0F63.6000905@FreeBSD.org> In-Reply-To: <4C3B0F63.6000905@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007121003.09749.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 12 Jul 2010 11:08:27 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209900 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 15:08:28 -0000 On Monday, July 12, 2010 8:49:39 am Alexander Motin wrote: > John Baldwin wrote: > > On Sunday, July 11, 2010 12:47:46 pm Alexander Motin wrote: > >> Author: mav > >> Date: Sun Jul 11 16:47:45 2010 > >> New Revision: 209900 > >> URL: http://svn.freebsd.org/changeset/base/209900 > >> > >> Log: > >> Remove interval validation from cpu_tick_calibrate(). As I found, check > >> was needed at preliminary version of the patch, where number of CPU ticks > >> was divided strictly on 16 seconds. Final code instead uses real interval > >> duration, so precise interval should not be important. Same time aliasing > >> issues around second boundary causes false positives, periodically logging > >> useless "t_delta ... too long/short" messages when HZ set below 256. > > > > Hmm, did you ask phk@ about this? > > Yes. He agreed that code should be reconsidered. Ah, ok. I didn't recall any replies on the list. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 15:08:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9ECCF106597A; Mon, 12 Jul 2010 15:08:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id DD3848FC18; Mon, 12 Jul 2010 15:08:42 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 902FB46B8A; Mon, 12 Jul 2010 11:08:42 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D4D708A050; Mon, 12 Jul 2010 11:08:41 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Mon, 12 Jul 2010 11:08:12 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007121427.o6CERnOJ022550@svn.freebsd.org> In-Reply-To: <201007121427.o6CERnOJ022550@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007121108.12564.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 12 Jul 2010 11:08:41 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r209948 - head/sys/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 15:08:46 -0000 On Monday, July 12, 2010 10:27:49 am John Baldwin wrote: > Author: jhb > Date: Mon Jul 12 14:27:49 2010 > New Revision: 209948 > URL: http://svn.freebsd.org/changeset/base/209948 > > Log: > A previous change moved the GETATTR RPC for open() calls that hit in the > name cache up into nfs_lookup() instead of nfs_open(). Continue this > trend by flushing the attribute cache for leaf nodes in nfs_lookup() during > an open() if we do a LOOKUP RPC. For NFSv3 this should generally be a NOP > as the attributes are flushed before fetching the post-op attributes from > the LOOKUP RPC which most (all?) NFSv3 servers provide, so the post-op > attributes should populate the cache. > > Now all NFS open() calls will always clear the cached attributes during the > nfs_lookup() prior to nfs_open() in the !NMODIFIED case to provide CTOC. > As a result, we can remove the conditional flushing of the attribute > cache from nfs_open(). One benefit is that we can now remove td_syscalls which added extra overhead to each system call. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 15:32:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 867D7106566B; Mon, 12 Jul 2010 15:32:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A9E28FC0A; Mon, 12 Jul 2010 15:32:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CFWjAs037096; Mon, 12 Jul 2010 15:32:45 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CFWjPS037093; Mon, 12 Jul 2010 15:32:45 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007121532.o6CFWjPS037093@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 12 Jul 2010 15:32:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209949 - in head: lib/libstand sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 15:32:46 -0000 Author: jkim Date: Mon Jul 12 15:32:45 2010 New Revision: 209949 URL: http://svn.freebsd.org/changeset/base/209949 Log: Use type-specific inline function imax() instead of deprecated macro MAX(). Prodded by: bde Modified: head/lib/libstand/printf.c head/sys/kern/subr_prf.c Modified: head/lib/libstand/printf.c ============================================================================== --- head/lib/libstand/printf.c Mon Jul 12 14:27:49 2010 (r209948) +++ head/lib/libstand/printf.c Mon Jul 12 15:32:45 2010 (r209949) @@ -151,7 +151,6 @@ ksprintn(char *nbuf, uintmax_t num, int static int kvprintf(char const *fmt, void (*func)(int), void *arg, int radix, va_list ap) { -#define MAX(a, b) (((a) > (b)) ? (a) : (b)) #define PCHAR(c) {int cc=(c); if (func) (*func)(cc); else *d++ = cc; retval++; } char nbuf[MAXNBUF]; char *d; @@ -422,7 +421,7 @@ number: if (!ladjust && padc == '0') dwidth = width - tmp; - width -= tmp + MAX(dwidth, n); + width -= tmp + imax(dwidth, n); dwidth -= n; if (!ladjust) while (width-- > 0) Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Mon Jul 12 14:27:49 2010 (r209948) +++ head/sys/kern/subr_prf.c Mon Jul 12 15:32:45 2010 (r209949) @@ -813,7 +813,7 @@ number: if (!ladjust && padc == '0') dwidth = width - tmp; - width -= tmp + MAX(dwidth, n); + width -= tmp + imax(dwidth, n); dwidth -= n; if (!ladjust) while (width-- > 0) From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 16:08:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 920CD1065678; Mon, 12 Jul 2010 16:08:07 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EB838FC18; Mon, 12 Jul 2010 16:08:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CG87Ao044975; Mon, 12 Jul 2010 16:08:07 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CG8767044968; Mon, 12 Jul 2010 16:08:07 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007121608.o6CG8767044968@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 12 Jul 2010 16:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209950 - in head/sys: conf powerpc/aim powerpc/booke powerpc/include powerpc/powerpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 16:08:07 -0000 Author: nwhitehorn Date: Mon Jul 12 16:08:07 2010 New Revision: 209950 URL: http://svn.freebsd.org/changeset/base/209950 Log: Unify ABI-related bits of the Book-E and AIM machdep routines (exec_setregs, etc.) in order to simplify the addition of 64-bit support, and possible future extension of the Book-E code to handle hard floating point and Altivec. MFC after: 1 month Added: head/sys/powerpc/powerpc/exec_machdep.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/aim/machdep.c head/sys/powerpc/aim/vm_machdep.c head/sys/powerpc/booke/machdep.c head/sys/powerpc/booke/vm_machdep.c head/sys/powerpc/include/psl.h Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Mon Jul 12 15:32:45 2010 (r209949) +++ head/sys/conf/files.powerpc Mon Jul 12 16:08:07 2010 (r209950) @@ -157,6 +157,7 @@ powerpc/powerpc/db_interface.c optional powerpc/powerpc/db_trace.c optional ddb powerpc/powerpc/dump_machdep.c standard powerpc/powerpc/elf_machdep.c standard +powerpc/powerpc/exec_machdep.c standard powerpc/powerpc/fpu.c optional aim powerpc/powerpc/fuswintr.c standard powerpc/powerpc/gdb_machdep.c optional gdb Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Mon Jul 12 15:32:45 2010 (r209949) +++ head/sys/powerpc/aim/machdep.c Mon Jul 12 16:08:07 2010 (r209950) @@ -155,8 +155,6 @@ void install_extint(void (*)(void)); int setfault(faultbuf); /* defined in locore.S */ -static int grab_mcontext(struct thread *, mcontext_t *, int); - void asm_panic(char *); long Maxmem = 0; @@ -580,295 +578,6 @@ bzero(void *buf, size_t len) } void -sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) -{ - struct trapframe *tf; - struct sigframe *sfp; - struct sigacts *psp; - struct sigframe sf; - struct thread *td; - struct proc *p; - int oonstack, rndfsize; - int sig; - int code; - - td = curthread; - p = td->td_proc; - PROC_LOCK_ASSERT(p, MA_OWNED); - sig = ksi->ksi_signo; - code = ksi->ksi_code; - psp = p->p_sigacts; - mtx_assert(&psp->ps_mtx, MA_OWNED); - tf = td->td_frame; - oonstack = sigonstack(tf->fixreg[1]); - - rndfsize = ((sizeof(sf) + 15) / 16) * 16; - - CTR4(KTR_SIG, "sendsig: td=%p (%s) catcher=%p sig=%d", td, p->p_comm, - catcher, sig); - - /* - * Save user context - */ - memset(&sf, 0, sizeof(sf)); - grab_mcontext(td, &sf.sf_uc.uc_mcontext, 0); - sf.sf_uc.uc_sigmask = *mask; - sf.sf_uc.uc_stack = td->td_sigstk; - sf.sf_uc.uc_stack.ss_flags = (td->td_pflags & TDP_ALTSTACK) - ? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE; - - sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; - - /* - * Allocate and validate space for the signal handler context. - */ - if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && - SIGISMEMBER(psp->ps_sigonstack, sig)) { - sfp = (struct sigframe *)(td->td_sigstk.ss_sp + - td->td_sigstk.ss_size - rndfsize); - } else { - sfp = (struct sigframe *)(tf->fixreg[1] - rndfsize); - } - - /* - * Translate the signal if appropriate (Linux emu ?) - */ - if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) - sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)]; - - /* - * Save the floating-point state, if necessary, then copy it. - */ - /* XXX */ - - /* - * Set up the registers to return to sigcode. - * - * r1/sp - sigframe ptr - * lr - sig function, dispatched to by blrl in trampoline - * r3 - sig number - * r4 - SIGINFO ? &siginfo : exception code - * r5 - user context - * srr0 - trampoline function addr - */ - tf->lr = (register_t)catcher; - tf->fixreg[1] = (register_t)sfp; - tf->fixreg[FIRSTARG] = sig; - tf->fixreg[FIRSTARG+2] = (register_t)&sfp->sf_uc; - if (SIGISMEMBER(psp->ps_siginfo, sig)) { - /* - * Signal handler installed with SA_SIGINFO. - */ - tf->fixreg[FIRSTARG+1] = (register_t)&sfp->sf_si; - - /* - * Fill siginfo structure. - */ - sf.sf_si = ksi->ksi_info; - sf.sf_si.si_signo = sig; - sf.sf_si.si_addr = (void *)((tf->exc == EXC_DSI) ? - tf->cpu.aim.dar : tf->srr0); - } else { - /* Old FreeBSD-style arguments. */ - tf->fixreg[FIRSTARG+1] = code; - tf->fixreg[FIRSTARG+3] = (tf->exc == EXC_DSI) ? - tf->cpu.aim.dar : tf->srr0; - } - mtx_unlock(&psp->ps_mtx); - PROC_UNLOCK(p); - - tf->srr0 = (register_t)(PS_STRINGS - *(p->p_sysent->sv_szsigcode)); - - /* - * copy the frame out to userland. - */ - if (copyout(&sf, sfp, sizeof(*sfp)) != 0) { - /* - * Process has trashed its stack. Kill it. - */ - CTR2(KTR_SIG, "sendsig: sigexit td=%p sfp=%p", td, sfp); - PROC_LOCK(p); - sigexit(td, SIGILL); - } - - CTR3(KTR_SIG, "sendsig: return td=%p pc=%#x sp=%#x", td, - tf->srr0, tf->fixreg[1]); - - PROC_LOCK(p); - mtx_lock(&psp->ps_mtx); -} - -int -sigreturn(struct thread *td, struct sigreturn_args *uap) -{ - ucontext_t uc; - int error; - - CTR2(KTR_SIG, "sigreturn: td=%p ucp=%p", td, uap->sigcntxp); - - if (copyin(uap->sigcntxp, &uc, sizeof(uc)) != 0) { - CTR1(KTR_SIG, "sigreturn: efault td=%p", td); - return (EFAULT); - } - - error = set_mcontext(td, &uc.uc_mcontext); - if (error != 0) - return (error); - - kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, NULL, 0); - - CTR3(KTR_SIG, "sigreturn: return td=%p pc=%#x sp=%#x", - td, uc.uc_mcontext.mc_srr0, uc.uc_mcontext.mc_gpr[1]); - - return (EJUSTRETURN); -} - -#ifdef COMPAT_FREEBSD4 -int -freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap) -{ - - return sigreturn(td, (struct sigreturn_args *)uap); -} -#endif - -/* - * Construct a PCB from a trapframe. This is called from kdb_trap() where - * we want to start a backtrace from the function that caused us to enter - * the debugger. We have the context in the trapframe, but base the trace - * on the PCB. The PCB doesn't have to be perfect, as long as it contains - * enough for a backtrace. - */ -void -makectx(struct trapframe *tf, struct pcb *pcb) -{ - - pcb->pcb_lr = tf->srr0; - pcb->pcb_sp = tf->fixreg[1]; -} - -/* - * get_mcontext/sendsig helper routine that doesn't touch the - * proc lock - */ -static int -grab_mcontext(struct thread *td, mcontext_t *mcp, int flags) -{ - struct pcb *pcb; - - pcb = td->td_pcb; - - memset(mcp, 0, sizeof(mcontext_t)); - - mcp->mc_vers = _MC_VERSION; - mcp->mc_flags = 0; - memcpy(&mcp->mc_frame, td->td_frame, sizeof(struct trapframe)); - if (flags & GET_MC_CLEAR_RET) { - mcp->mc_gpr[3] = 0; - mcp->mc_gpr[4] = 0; - } - - /* - * This assumes that floating-point context is *not* lazy, - * so if the thread has used FP there would have been a - * FP-unavailable exception that would have set things up - * correctly. - */ - if (pcb->pcb_flags & PCB_FPU) { - KASSERT(td == curthread, - ("get_mcontext: fp save not curthread")); - critical_enter(); - save_fpu(td); - critical_exit(); - mcp->mc_flags |= _MC_FP_VALID; - memcpy(&mcp->mc_fpscr, &pcb->pcb_fpu.fpscr, sizeof(double)); - memcpy(mcp->mc_fpreg, pcb->pcb_fpu.fpr, 32*sizeof(double)); - } - - /* - * Repeat for Altivec context - */ - - if (pcb->pcb_flags & PCB_VEC) { - KASSERT(td == curthread, - ("get_mcontext: fp save not curthread")); - critical_enter(); - save_vec(td); - critical_exit(); - mcp->mc_flags |= _MC_AV_VALID; - mcp->mc_vscr = pcb->pcb_vec.vscr; - mcp->mc_vrsave = pcb->pcb_vec.vrsave; - memcpy(mcp->mc_avec, pcb->pcb_vec.vr, sizeof(mcp->mc_avec)); - } - - mcp->mc_len = sizeof(*mcp); - - return (0); -} - -int -get_mcontext(struct thread *td, mcontext_t *mcp, int flags) -{ - int error; - - error = grab_mcontext(td, mcp, flags); - if (error == 0) { - PROC_LOCK(curthread->td_proc); - mcp->mc_onstack = sigonstack(td->td_frame->fixreg[1]); - PROC_UNLOCK(curthread->td_proc); - } - - return (error); -} - -int -set_mcontext(struct thread *td, const mcontext_t *mcp) -{ - struct pcb *pcb; - struct trapframe *tf; - - pcb = td->td_pcb; - tf = td->td_frame; - - if (mcp->mc_vers != _MC_VERSION || - mcp->mc_len != sizeof(*mcp)) - return (EINVAL); - - /* - * Don't let the user set privileged MSR bits - */ - if ((mcp->mc_srr1 & PSL_USERSTATIC) != (tf->srr1 & PSL_USERSTATIC)) { - return (EINVAL); - } - - memcpy(tf, mcp->mc_frame, sizeof(mcp->mc_frame)); - - if (mcp->mc_flags & _MC_FP_VALID) { - if ((pcb->pcb_flags & PCB_FPU) != PCB_FPU) { - critical_enter(); - enable_fpu(td); - critical_exit(); - } - memcpy(&pcb->pcb_fpu.fpscr, &mcp->mc_fpscr, sizeof(double)); - memcpy(pcb->pcb_fpu.fpr, mcp->mc_fpreg, 32*sizeof(double)); - } - - if (mcp->mc_flags & _MC_AV_VALID) { - if ((pcb->pcb_flags & PCB_VEC) != PCB_VEC) { - critical_enter(); - enable_vec(td); - critical_exit(); - } - pcb->pcb_vec.vscr = mcp->mc_vscr; - pcb->pcb_vec.vrsave = mcp->mc_vrsave; - memcpy(pcb->pcb_vec.vr, mcp->mc_avec, sizeof(mcp->mc_avec)); - } - - - return (0); -} - -void cpu_boot(int howto) { } @@ -948,123 +657,6 @@ cpu_idle_wakeup(int cpu) return (0); } -/* - * Set set up registers on exec. - */ -void -exec_setregs(struct thread *td, struct image_params *imgp, u_long stack) -{ - struct trapframe *tf; - struct ps_strings arginfo; - - tf = trapframe(td); - bzero(tf, sizeof *tf); - tf->fixreg[1] = -roundup(-stack + 8, 16); - - /* - * XXX Machine-independent code has already copied arguments and - * XXX environment to userland. Get them back here. - */ - (void)copyin((char *)PS_STRINGS, &arginfo, sizeof(arginfo)); - - /* - * Set up arguments for _start(): - * _start(argc, argv, envp, obj, cleanup, ps_strings); - * - * Notes: - * - obj and cleanup are the auxilliary and termination - * vectors. They are fixed up by ld.elf_so. - * - ps_strings is a NetBSD extention, and will be - * ignored by executables which are strictly - * compliant with the SVR4 ABI. - * - * XXX We have to set both regs and retval here due to different - * XXX calling convention in trap.c and init_main.c. - */ - /* - * XXX PG: these get overwritten in the syscall return code. - * execve() should return EJUSTRETURN, like it does on NetBSD. - * Emulate by setting the syscall return value cells. The - * registers still have to be set for init's fork trampoline. - */ - td->td_retval[0] = arginfo.ps_nargvstr; - td->td_retval[1] = (register_t)arginfo.ps_argvstr; - tf->fixreg[3] = arginfo.ps_nargvstr; - tf->fixreg[4] = (register_t)arginfo.ps_argvstr; - tf->fixreg[5] = (register_t)arginfo.ps_envstr; - tf->fixreg[6] = 0; /* auxillary vector */ - tf->fixreg[7] = 0; /* termination vector */ - tf->fixreg[8] = (register_t)PS_STRINGS; /* NetBSD extension */ - - tf->srr0 = imgp->entry_addr; - tf->srr1 = PSL_MBO | PSL_USERSET | PSL_FE_DFLT; - td->td_pcb->pcb_flags = 0; -} - -int -fill_regs(struct thread *td, struct reg *regs) -{ - struct trapframe *tf; - - tf = td->td_frame; - memcpy(regs, tf, sizeof(struct reg)); - - return (0); -} - -int -fill_dbregs(struct thread *td, struct dbreg *dbregs) -{ - /* No debug registers on PowerPC */ - return (ENOSYS); -} - -int -fill_fpregs(struct thread *td, struct fpreg *fpregs) -{ - struct pcb *pcb; - - pcb = td->td_pcb; - - if ((pcb->pcb_flags & PCB_FPU) == 0) - memset(fpregs, 0, sizeof(struct fpreg)); - else - memcpy(fpregs, &pcb->pcb_fpu, sizeof(struct fpreg)); - - return (0); -} - -int -set_regs(struct thread *td, struct reg *regs) -{ - struct trapframe *tf; - - tf = td->td_frame; - memcpy(tf, regs, sizeof(struct reg)); - - return (0); -} - -int -set_dbregs(struct thread *td, struct dbreg *dbregs) -{ - /* No debug registers on PowerPC */ - return (ENOSYS); -} - -int -set_fpregs(struct thread *td, struct fpreg *fpregs) -{ - struct pcb *pcb; - - pcb = td->td_pcb; - if ((pcb->pcb_flags & PCB_FPU) == 0) - enable_fpu(td); - memcpy(&pcb->pcb_fpu, fpregs, sizeof(struct fpreg)); - - return (0); -} - int ptrace_set_pc(struct thread *td, unsigned long addr) { Modified: head/sys/powerpc/aim/vm_machdep.c ============================================================================== --- head/sys/powerpc/aim/vm_machdep.c Mon Jul 12 15:32:45 2010 (r209949) +++ head/sys/powerpc/aim/vm_machdep.c Mon Jul 12 16:08:07 2010 (r209950) @@ -358,6 +358,7 @@ sf_buf_free(struct sf_buf *sf) void swi_vm(void *dummy) { + if (busdma_swi_pending != 0) busdma_swi(); } @@ -385,31 +386,6 @@ is_physical_memory(addr) /* * Threading functions */ -void -cpu_thread_exit(struct thread *td) -{ -} - -void -cpu_thread_clean(struct thread *td) -{ -} - -void -cpu_thread_alloc(struct thread *td) -{ - struct pcb *pcb; - - pcb = (struct pcb *)((td->td_kstack + td->td_kstack_pages * PAGE_SIZE - - sizeof(struct pcb)) & ~0x2fU); - td->td_pcb = pcb; - td->td_frame = (struct trapframe *)pcb - 1; -} - -void -cpu_thread_free(struct thread *td) -{ -} void cpu_thread_swapin(struct thread *td) @@ -421,121 +397,3 @@ cpu_thread_swapout(struct thread *td) { } -void -cpu_set_syscall_retval(struct thread *td, int error) -{ - struct proc *p; - struct trapframe *tf; - int fixup; - - if (error == EJUSTRETURN) - return; - - p = td->td_proc; - tf = td->td_frame; - - if (tf->fixreg[0] == SYS___syscall) { - int code = tf->fixreg[FIRSTARG + 1]; - if (p->p_sysent->sv_mask) - code &= p->p_sysent->sv_mask; - fixup = (code != SYS_freebsd6_lseek && code != SYS_lseek) ? - 1 : 0; - } else - fixup = 0; - - switch (error) { - case 0: - if (fixup) { - /* - * 64-bit return, 32-bit syscall. Fixup byte order - */ - tf->fixreg[FIRSTARG] = 0; - tf->fixreg[FIRSTARG + 1] = td->td_retval[0]; - } else { - tf->fixreg[FIRSTARG] = td->td_retval[0]; - tf->fixreg[FIRSTARG + 1] = td->td_retval[1]; - } - tf->cr &= ~0x10000000; /* XXX: Magic number */ - break; - case ERESTART: - /* - * Set user's pc back to redo the system call. - */ - tf->srr0 -= 4; - break; - default: - if (p->p_sysent->sv_errsize) { - error = (error < p->p_sysent->sv_errsize) ? - p->p_sysent->sv_errtbl[error] : -1; - } - tf->fixreg[FIRSTARG] = error; - tf->cr |= 0x10000000; /* XXX: Magic number */ - break; - } -} - -void -cpu_set_upcall(struct thread *td, struct thread *td0) -{ - struct pcb *pcb2; - struct trapframe *tf; - struct callframe *cf; - - pcb2 = td->td_pcb; - - /* Copy the upcall pcb */ - bcopy(td0->td_pcb, pcb2, sizeof(*pcb2)); - - /* Create a stack for the new thread */ - tf = td->td_frame; - bcopy(td0->td_frame, tf, sizeof(struct trapframe)); - tf->fixreg[FIRSTARG] = 0; - tf->fixreg[FIRSTARG + 1] = 0; - tf->cr &= ~0x10000000; - - /* Set registers for trampoline to user mode. */ - cf = (struct callframe *)tf - 1; - memset(cf, 0, sizeof(struct callframe)); - cf->cf_func = (register_t)fork_return; - cf->cf_arg0 = (register_t)td; - cf->cf_arg1 = (register_t)tf; - - pcb2->pcb_sp = (register_t)cf; - pcb2->pcb_lr = (register_t)fork_trampoline; - pcb2->pcb_cpu.aim.usr = kernel_pmap->pm_sr[USER_SR]; - - /* Setup to release spin count in fork_exit(). */ - td->td_md.md_spinlock_count = 1; - td->td_md.md_saved_msr = PSL_KERNSET; -} - -void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, - stack_t *stack) -{ - struct trapframe *tf; - uint32_t sp; - - tf = td->td_frame; - /* align stack and alloc space for frame ptr and saved LR */ - sp = ((uint32_t)stack->ss_sp + stack->ss_size - sizeof(uint64_t)) & - ~0x1f; - bzero(tf, sizeof(struct trapframe)); - - tf->fixreg[1] = (register_t)sp; - tf->fixreg[3] = (register_t)arg; - tf->srr0 = (register_t)entry; - tf->srr1 = PSL_MBO | PSL_USERSET | PSL_FE_DFLT; - td->td_pcb->pcb_flags = 0; - - td->td_retval[0] = (register_t)entry; - td->td_retval[1] = 0; -} - -int -cpu_set_user_tls(struct thread *td, void *tls_base) -{ - - td->td_frame->fixreg[2] = (register_t)tls_base + 0x7008; - return (0); -} Modified: head/sys/powerpc/booke/machdep.c ============================================================================== --- head/sys/powerpc/booke/machdep.c Mon Jul 12 15:32:45 2010 (r209949) +++ head/sys/powerpc/booke/machdep.c Mon Jul 12 16:08:07 2010 (r209950) @@ -458,75 +458,6 @@ cpu_pcpu_init(struct pcpu *pcpu, int cpu #endif } -/* Set set up registers on exec. */ -void -exec_setregs(struct thread *td, struct image_params *imgp, u_long stack) -{ - struct trapframe *tf; - struct ps_strings arginfo; - - tf = trapframe(td); - bzero(tf, sizeof *tf); - tf->fixreg[1] = -roundup(-stack + 8, 16); - - /* - * XXX Machine-independent code has already copied arguments and - * XXX environment to userland. Get them back here. - */ - (void)copyin((char *)PS_STRINGS, &arginfo, sizeof(arginfo)); - - /* - * Set up arguments for _start(): - * _start(argc, argv, envp, obj, cleanup, ps_strings); - * - * Notes: - * - obj and cleanup are the auxilliary and termination - * vectors. They are fixed up by ld.elf_so. - * - ps_strings is a NetBSD extention, and will be - * ignored by executables which are strictly - * compliant with the SVR4 ABI. - * - * XXX We have to set both regs and retval here due to different - * XXX calling convention in trap.c and init_main.c. - */ - /* - * XXX PG: these get overwritten in the syscall return code. - * execve() should return EJUSTRETURN, like it does on NetBSD. - * Emulate by setting the syscall return value cells. The - * registers still have to be set for init's fork trampoline. - */ - td->td_retval[0] = arginfo.ps_nargvstr; - td->td_retval[1] = (register_t)arginfo.ps_argvstr; - tf->fixreg[3] = arginfo.ps_nargvstr; - tf->fixreg[4] = (register_t)arginfo.ps_argvstr; - tf->fixreg[5] = (register_t)arginfo.ps_envstr; - tf->fixreg[6] = 0; /* auxillary vector */ - tf->fixreg[7] = 0; /* termination vector */ - tf->fixreg[8] = (register_t)PS_STRINGS; /* NetBSD extension */ - - tf->srr0 = imgp->entry_addr; - tf->srr1 = PSL_USERSET; - td->td_pcb->pcb_flags = 0; -} - -int -fill_regs(struct thread *td, struct reg *regs) -{ - struct trapframe *tf; - - tf = td->td_frame; - memcpy(regs, tf, sizeof(struct reg)); - - return (0); -} - -int -fill_fpregs(struct thread *td, struct fpreg *fpregs) -{ - - return (0); -} - /* * Flush the D-cache for non-DMA I/O so that the I-cache can * be made coherent later. @@ -538,115 +469,6 @@ cpu_flush_dcache(void *ptr, size_t len) } /* - * Construct a PCB from a trapframe. This is called from kdb_trap() where - * we want to start a backtrace from the function that caused us to enter - * the debugger. We have the context in the trapframe, but base the trace - * on the PCB. The PCB doesn't have to be perfect, as long as it contains - * enough for a backtrace. - */ -void -makectx(struct trapframe *tf, struct pcb *pcb) -{ - - pcb->pcb_lr = tf->srr0; - pcb->pcb_sp = tf->fixreg[1]; -} - -/* - * get_mcontext/sendsig helper routine that doesn't touch the - * proc lock. - */ -static int -grab_mcontext(struct thread *td, mcontext_t *mcp, int flags) -{ - struct pcb *pcb; - - pcb = td->td_pcb; - memset(mcp, 0, sizeof(mcontext_t)); - - mcp->mc_vers = _MC_VERSION; - mcp->mc_flags = 0; - memcpy(&mcp->mc_frame, td->td_frame, sizeof(struct trapframe)); - if (flags & GET_MC_CLEAR_RET) { - mcp->mc_gpr[3] = 0; - mcp->mc_gpr[4] = 0; - } - - /* XXX Altivec context ? */ - - mcp->mc_len = sizeof(*mcp); - return (0); -} - -int -get_mcontext(struct thread *td, mcontext_t *mcp, int flags) -{ - int error; - - error = grab_mcontext(td, mcp, flags); - if (error == 0) { - PROC_LOCK(curthread->td_proc); - mcp->mc_onstack = sigonstack(td->td_frame->fixreg[1]); - PROC_UNLOCK(curthread->td_proc); - } - - return (error); -} - -int -set_mcontext(struct thread *td, const mcontext_t *mcp) -{ - struct pcb *pcb; - struct trapframe *tf; - - pcb = td->td_pcb; - tf = td->td_frame; - - if (mcp->mc_vers != _MC_VERSION || mcp->mc_len != sizeof(*mcp)) - return (EINVAL); - - memcpy(tf, mcp->mc_frame, sizeof(mcp->mc_frame)); - - /* XXX Altivec context? */ - - return (0); -} - -int -sigreturn(struct thread *td, struct sigreturn_args *uap) -{ - ucontext_t uc; - int error; - - CTR2(KTR_SIG, "sigreturn: td=%p ucp=%p", td, uap->sigcntxp); - - if (copyin(uap->sigcntxp, &uc, sizeof(uc)) != 0) { - CTR1(KTR_SIG, "sigreturn: efault td=%p", td); - return (EFAULT); - } - - error = set_mcontext(td, &uc.uc_mcontext); - if (error != 0) - return (error); - - kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, NULL, 0); - - CTR3(KTR_SIG, "sigreturn: return td=%p pc=%#x sp=%#x", - td, uc.uc_mcontext.mc_srr0, uc.uc_mcontext.mc_gpr[1]); - - return (EJUSTRETURN); -} - -#ifdef COMPAT_FREEBSD4 -int -freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap) -{ - - return sigreturn(td, (struct sigreturn_args *)uap); -} -#endif - -/* * cpu_idle * * Set Wait state enable. @@ -712,39 +534,6 @@ cpu_halt(void) } int -set_regs(struct thread *td, struct reg *regs) -{ - struct trapframe *tf; - - tf = td->td_frame; - memcpy(tf, regs, sizeof(struct reg)); - return (0); -} - -int -fill_dbregs(struct thread *td, struct dbreg *dbregs) -{ - - /* No debug registers on PowerPC */ - return (ENOSYS); -} - -int -set_dbregs(struct thread *td, struct dbreg *dbregs) -{ - - /* No debug registers on PowerPC */ - return (ENOSYS); -} - -int -set_fpregs(struct thread *td, struct fpreg *fpregs) -{ - - return (0); -} - -int ptrace_set_pc(struct thread *td, unsigned long addr) { struct trapframe *tf; @@ -798,124 +587,6 @@ kdb_cpu_set_singlestep(void) } void -sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) -{ - struct trapframe *tf; - struct sigframe *sfp; - struct sigacts *psp; - struct sigframe sf; - struct thread *td; - struct proc *p; - int oonstack, rndfsize; - int sig, code; - - td = curthread; - p = td->td_proc; - PROC_LOCK_ASSERT(p, MA_OWNED); - sig = ksi->ksi_signo; - code = ksi->ksi_code; - psp = p->p_sigacts; - mtx_assert(&psp->ps_mtx, MA_OWNED); - tf = td->td_frame; - oonstack = sigonstack(tf->fixreg[1]); - - rndfsize = ((sizeof(sf) + 15) / 16) * 16; - - CTR4(KTR_SIG, "sendsig: td=%p (%s) catcher=%p sig=%d", td, p->p_comm, - catcher, sig); - - /* - * Save user context - */ - memset(&sf, 0, sizeof(sf)); - grab_mcontext(td, &sf.sf_uc.uc_mcontext, 0); - sf.sf_uc.uc_sigmask = *mask; - sf.sf_uc.uc_stack = td->td_sigstk; - sf.sf_uc.uc_stack.ss_flags = (td->td_pflags & TDP_ALTSTACK) - ? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE; - - sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; - - /* - * Allocate and validate space for the signal handler context. - */ - if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && - SIGISMEMBER(psp->ps_sigonstack, sig)) { - sfp = (struct sigframe *)((caddr_t)td->td_sigstk.ss_sp + - td->td_sigstk.ss_size - rndfsize); - } else { - sfp = (struct sigframe *)(tf->fixreg[1] - rndfsize); - } - - /* - * Translate the signal if appropriate (Linux emu ?) - */ - if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) - sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)]; - - /* - * Save the floating-point state, if necessary, then copy it. - */ - /* XXX */ - - /* - * Set up the registers to return to sigcode. - * - * r1/sp - sigframe ptr - * lr - sig function, dispatched to by blrl in trampoline - * r3 - sig number - * r4 - SIGINFO ? &siginfo : exception code - * r5 - user context - * srr0 - trampoline function addr - */ - tf->lr = (register_t)catcher; - tf->fixreg[1] = (register_t)sfp; - tf->fixreg[FIRSTARG] = sig; - tf->fixreg[FIRSTARG+2] = (register_t)&sfp->sf_uc; - if (SIGISMEMBER(psp->ps_siginfo, sig)) { - /* - * Signal handler installed with SA_SIGINFO. - */ - tf->fixreg[FIRSTARG+1] = (register_t)&sfp->sf_si; - - /* - * Fill siginfo structure. - */ - sf.sf_si = ksi->ksi_info; - sf.sf_si.si_signo = sig; - sf.sf_si.si_addr = (void *) ((tf->exc == EXC_DSI) ? - tf->cpu.booke.dear : tf->srr0); - } else { - /* Old FreeBSD-style arguments. */ - tf->fixreg[FIRSTARG+1] = code; - tf->fixreg[FIRSTARG+3] = (tf->exc == EXC_DSI) ? - tf->cpu.booke.dear : tf->srr0; - } - mtx_unlock(&psp->ps_mtx); - PROC_UNLOCK(p); - - tf->srr0 = (register_t)(PS_STRINGS - *(p->p_sysent->sv_szsigcode)); - - /* - * copy the frame out to userland. - */ - if (copyout((caddr_t)&sf, (caddr_t)sfp, sizeof(sf)) != 0) { - /* - * Process has trashed its stack. Kill it. - */ - CTR2(KTR_SIG, "sendsig: sigexit td=%p sfp=%p", td, sfp); - PROC_LOCK(p); - sigexit(td, SIGILL); - } - - CTR3(KTR_SIG, "sendsig: return td=%p pc=%#x sp=%#x", td, - tf->srr0, tf->fixreg[1]); - - PROC_LOCK(p); - mtx_lock(&psp->ps_mtx); -} - -void bzero(void *buf, size_t len) { caddr_t p; Modified: head/sys/powerpc/booke/vm_machdep.c ============================================================================== --- head/sys/powerpc/booke/vm_machdep.c Mon Jul 12 15:32:45 2010 (r209949) +++ head/sys/powerpc/booke/vm_machdep.c Mon Jul 12 16:08:07 2010 (r209950) @@ -357,6 +357,7 @@ sf_buf_free(struct sf_buf *sf) void swi_vm(void *dummy) { + if (busdma_swi_pending != 0) busdma_swi(); } @@ -381,34 +382,6 @@ is_physical_memory(vm_offset_t addr) /* * Thread functions */ -void -cpu_thread_exit(struct thread *td) -{ - -} - -void -cpu_thread_clean(struct thread *td) -{ - -} - -void -cpu_thread_alloc(struct thread *td) -{ - struct pcb *pcb; - - pcb = (struct pcb *)((td->td_kstack + td->td_kstack_pages * PAGE_SIZE - - sizeof(struct pcb)) & ~0x3fU); - td->td_pcb = pcb; - td->td_frame = (struct trapframe *)pcb - 1; -} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 17:18:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 749571065673; Mon, 12 Jul 2010 17:18:58 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4ADF88FC18; Mon, 12 Jul 2010 17:18:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CHIwSo061113; Mon, 12 Jul 2010 17:18:58 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CHIwbO061111; Mon, 12 Jul 2010 17:18:58 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201007121718.o6CHIwbO061111@svn.freebsd.org> From: Ed Maste Date: Mon, 12 Jul 2010 17:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209951 - head/usr.bin/make X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 17:18:58 -0000 Author: emaste Date: Mon Jul 12 17:18:58 2010 New Revision: 209951 URL: http://svn.freebsd.org/changeset/base/209951 Log: Remove extraneous ; Modified: head/usr.bin/make/str.c Modified: head/usr.bin/make/str.c ============================================================================== --- head/usr.bin/make/str.c Mon Jul 12 16:08:07 2010 (r209950) +++ head/usr.bin/make/str.c Mon Jul 12 17:18:58 2010 (r209951) @@ -150,7 +150,7 @@ brk_string(ArgArray *aa, const char str[ ArgArray_Init(aa); - aa->buffer = estrdup(str);; + aa->buffer = estrdup(str); arg = aa->buffer; start = arg; From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 19:09:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2828106567E; Mon, 12 Jul 2010 19:09:18 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92FB78FC0C; Mon, 12 Jul 2010 19:09:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CJ9IVx088062; Mon, 12 Jul 2010 19:09:18 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CJ9IpP088061; Mon, 12 Jul 2010 19:09:18 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007121909.o6CJ9IpP088061@svn.freebsd.org> From: Benedict Reuschling Date: Mon, 12 Jul 2010 19:09:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209954 - head/etc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 19:09:18 -0000 Author: bcr (doc committer) Date: Mon Jul 12 19:09:18 2010 New Revision: 209954 URL: http://svn.freebsd.org/changeset/base/209954 Log: Fix spelling of "weirdo" in /etc/gettytab comment. PR: docs/148500 Submitted by: Warren Block (wblock at wonkity dot com) Approved by: ed@ MFC after: 1 week Modified: head/etc/gettytab Modified: head/etc/gettytab ============================================================================== --- head/etc/gettytab Mon Jul 12 17:50:38 2010 (r209953) +++ head/etc/gettytab Mon Jul 12 19:09:18 2010 (r209954) @@ -165,7 +165,7 @@ P|Pc|Pc console:\ :ht:np:sp#9600: # -# Wierdo special case for fast crt's with hardcopy devices +# Weirdo special case for fast crt's with hardcopy devices # 8|T9600|CRT with hardcopy:\ :nx=T300:tc=9600-baud: From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 19:59:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7AD110657A8; Mon, 12 Jul 2010 19:59:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7D008FC29; Mon, 12 Jul 2010 19:59:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CJxFua002413; Mon, 12 Jul 2010 19:59:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CJxFuN002411; Mon, 12 Jul 2010 19:59:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007121959.o6CJxFuN002411@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 12 Jul 2010 19:59:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209955 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 19:59:15 -0000 Author: kib Date: Mon Jul 12 19:59:15 2010 New Revision: 209955 URL: http://svn.freebsd.org/changeset/base/209955 Log: When switching the thread from the processor, store %dr7 content into the pcb before disabling watchpoints. Otherwise, when the thread is restored on a processor, watchpoints are still disabled. Submitted by: Tijl Coosemans (I would be much happier if Tijl commited this himself) MFC after: 1 week Modified: head/sys/amd64/amd64/cpu_switch.S Modified: head/sys/amd64/amd64/cpu_switch.S ============================================================================== --- head/sys/amd64/amd64/cpu_switch.S Mon Jul 12 19:09:18 2010 (r209954) +++ head/sys/amd64/amd64/cpu_switch.S Mon Jul 12 19:59:15 2010 (r209955) @@ -243,13 +243,13 @@ store_dr: movq %dr2,%r13 movq %dr3,%r12 movq %dr6,%r11 - andq $0x0000fc00, %rax /* disable all watchpoints */ movq %r15,PCB_DR0(%r8) movq %r14,PCB_DR1(%r8) movq %r13,PCB_DR2(%r8) movq %r12,PCB_DR3(%r8) movq %r11,PCB_DR6(%r8) movq %rax,PCB_DR7(%r8) + andq $0x0000fc00, %rax /* disable all watchpoints */ movq %rax,%dr7 jmp done_store_dr From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 20:45:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02FC3106564A; Mon, 12 Jul 2010 20:45:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E75518FC12; Mon, 12 Jul 2010 20:45:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CKjb4n012737; Mon, 12 Jul 2010 20:45:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CKjbZn012735; Mon, 12 Jul 2010 20:45:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007122045.o6CKjbZn012735@svn.freebsd.org> From: John Baldwin Date: Mon, 12 Jul 2010 20:45:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209956 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 20:45:38 -0000 Author: jhb Date: Mon Jul 12 20:45:37 2010 New Revision: 209956 URL: http://svn.freebsd.org/changeset/base/209956 Log: Remove a dead test. We already exclude NMI traps from this code in an earlier condition. MFC after: 1 week Modified: head/sys/amd64/amd64/trap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Mon Jul 12 19:59:15 2010 (r209955) +++ head/sys/amd64/amd64/trap.c Mon Jul 12 20:45:37 2010 (r209956) @@ -268,9 +268,9 @@ trap(struct trapframe *frame) /* * We shouldn't enable interrupts while holding a - * spin lock or servicing an NMI. + * spin lock. */ - if (type != T_NMI && td->td_md.md_spinlock_count == 0) + if (td->td_md.md_spinlock_count == 0) enable_intr(); } } From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 21:08:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BD20106566C; Mon, 12 Jul 2010 21:08:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1ABFA8FC12; Mon, 12 Jul 2010 21:08:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CL8Zud017789; Mon, 12 Jul 2010 21:08:35 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CL8Z3l017785; Mon, 12 Jul 2010 21:08:35 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007122108.o6CL8Z3l017785@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 12 Jul 2010 21:08:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209957 - in head/sys: amd64/acpica conf modules/acpi/acpi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 21:08:36 -0000 Author: jkim Date: Mon Jul 12 21:08:35 2010 New Revision: 209957 URL: http://svn.freebsd.org/changeset/base/209957 Log: Move i386-inherited logic of building ACPI headers for acpi_wakeup.c into better places and remove intermediate makefile and shell scripts. This makes parallel kernel build little bit safer for amd64. Deleted: head/sys/amd64/acpica/Makefile head/sys/amd64/acpica/genwakecode.sh head/sys/amd64/acpica/genwakedata.sh Modified: head/sys/amd64/acpica/acpi_wakecode.S head/sys/conf/files.amd64 head/sys/modules/acpi/acpi/Makefile Modified: head/sys/amd64/acpica/acpi_wakecode.S ============================================================================== --- head/sys/amd64/acpica/acpi_wakecode.S Mon Jul 12 20:45:37 2010 (r209956) +++ head/sys/amd64/acpica/acpi_wakecode.S Mon Jul 12 21:08:35 2010 (r209957) @@ -29,8 +29,6 @@ * $FreeBSD$ */ -#define LOCORE - #include #include Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Mon Jul 12 20:45:37 2010 (r209956) +++ head/sys/conf/files.amd64 Mon Jul 12 21:08:35 2010 (r209957) @@ -70,17 +70,26 @@ hptrr_lib.o optional hptrr \ amd64/acpica/OsdEnvironment.c optional acpi amd64/acpica/acpi_machdep.c optional acpi amd64/acpica/acpi_switch.S optional acpi -acpi_wakecode.h optional acpi \ - dependency "$S/amd64/acpica/acpi_wakecode.S assym.s" \ - compile-with "${MAKE} -f $S/amd64/acpica/Makefile ${.TARGET} MAKESRCPATH=$S/amd64/acpica" \ +acpi_wakecode.o optional acpi \ + dependency "$S/amd64/acpica/acpi_wakecode.S assym.s" \ + compile-with "${NORMAL_S}" \ no-obj no-implicit-rule before-depend \ - clean "acpi_wakecode.h acpi_wakecode.o acpi_wakecode.bin" -# -acpi_wakedata.h optional acpi \ - dependency "$S/amd64/acpica/acpi_wakecode.S assym.s" \ - compile-with "${MAKE} -f $S/amd64/acpica/Makefile ${.TARGET} MAKESRCPATH=$S/amd64/acpica" \ - no-obj no-implicit-rule before-depend \ - clean "acpi_wakedata.h acpi_wakecode.o acpi_wakecode.bin" + clean "acpi_wakecode.o" +acpi_wakecode.bin optional acpi \ + dependency "acpi_wakecode.o" \ + compile-with "objcopy -S -O binary acpi_wakecode.o ${.TARGET}" \ + no-obj no-implicit-rule before-depend \ + clean "acpi_wakecode.bin" +acpi_wakecode.h optional acpi \ + dependency "acpi_wakecode.bin" \ + compile-with "file2c -sx 'static char wakecode[] = {' '};' < acpi_wakecode.bin > ${.TARGET}" \ + no-obj no-implicit-rule before-depend \ + clean "acpi_wakecode.h" +acpi_wakedata.h optional acpi \ + dependency "acpi_wakecode.o" \ + compile-with 'nm -n --defined-only acpi_wakecode.o | while read offset dummy what; do echo "#define $${what} 0x$${offset}"; done > ${.TARGET}' \ + no-obj no-implicit-rule before-depend \ + clean "acpi_wakedata.h" # amd64/acpica/acpi_wakeup.c optional acpi amd64/acpica/madt.c optional acpi Modified: head/sys/modules/acpi/acpi/Makefile ============================================================================== --- head/sys/modules/acpi/acpi/Makefile Mon Jul 12 20:45:37 2010 (r209956) +++ head/sys/modules/acpi/acpi/Makefile Mon Jul 12 21:08:35 2010 (r209957) @@ -99,15 +99,25 @@ SRCS+= assym.s madt.c CLEANFILES+= acpi_wakecode.bin acpi_wakecode.h acpi_wakecode.o .if ${MACHINE_ARCH} == "amd64" -SRCS+= acpi_switch.S opt_global.h +SRCS+= acpi_switch.S acpi_wakedata.h opt_global.h CLEANFILES+= acpi_wakedata.h ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} acpi_switch.o: acpi_switch.S ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} -.endif - +acpi_wakecode.o: acpi_wakecode.S assym.s + ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} +acpi_wakecode.bin: acpi_wakecode.o + objcopy -S -O binary acpi_wakecode.o ${.TARGET} +acpi_wakecode.h: acpi_wakecode.bin + file2c -sx 'static char wakecode[] = {' '};' < acpi_wakecode.bin > \ + ${.TARGET} +acpi_wakedata.h: acpi_wakecode.o + nm -n --defined-only ${.ALLSRC} | while read offset dummy what; do \ + echo "#define $${what} 0x$${offset}"; done > ${.TARGET} +.else acpi_wakecode.h: acpi_wakecode.S assym.s ${MAKE} -f ${.CURDIR}/../../../${MACHINE_ARCH}/acpica/Makefile \ MAKESRCPATH=${.CURDIR}/../../../${MACHINE_ARCH}/acpica +.endif .include From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 21:09:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9E3C106566C; Mon, 12 Jul 2010 21:09:55 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99F558FC08; Mon, 12 Jul 2010 21:09:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CL9thN018128; Mon, 12 Jul 2010 21:09:55 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CL9tEC018126; Mon, 12 Jul 2010 21:09:55 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201007122109.o6CL9tEC018126@svn.freebsd.org> From: Peter Grehan Date: Mon, 12 Jul 2010 21:09:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209958 - head/sys/powerpc/powermac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 21:09:55 -0000 Author: grehan Date: Mon Jul 12 21:09:55 2010 New Revision: 209958 URL: http://svn.freebsd.org/changeset/base/209958 Log: Fix printf specifier to allow 32/64 bit builds. Obtained from: projects/ppc64 Modified: head/sys/powerpc/powermac/grackle.c Modified: head/sys/powerpc/powermac/grackle.c ============================================================================== --- head/sys/powerpc/powermac/grackle.c Mon Jul 12 21:08:35 2010 (r209957) +++ head/sys/powerpc/powermac/grackle.c Mon Jul 12 21:09:55 2010 (r209958) @@ -472,7 +472,7 @@ grackle_activate_resource(device_t bus, start += sc->sc_iostart; if (bootverbose) - printf("grackle mapdev: start %x, len %ld\n", start, + printf("grackle mapdev: start %zx, len %ld\n", start, rman_get_size(res)); p = pmap_mapdev(start, (vm_size_t)rman_get_size(res)); From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 21:47:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3D01106564A; Mon, 12 Jul 2010 21:47:30 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C35FB8FC15; Mon, 12 Jul 2010 21:47:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CLlUBX026409; Mon, 12 Jul 2010 21:47:30 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CLlUeR026405; Mon, 12 Jul 2010 21:47:30 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201007122147.o6CLlUeR026405@svn.freebsd.org> From: Jack F Vogel Date: Mon, 12 Jul 2010 21:47:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209959 - head/sys/dev/e1000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 21:47:31 -0000 Author: jfv Date: Mon Jul 12 21:47:30 2010 New Revision: 209959 URL: http://svn.freebsd.org/changeset/base/209959 Log: Fix for a panic when TX checksum offload is done and a packet has only a header in the first mbuf, the checksum code will dereference a pointer into the non-existing IP header. Do a check for the size and pullup if needed. Thanks to Michael Tuexen for this fix. MFC: asap - should be in 8.1 IMHO Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_lem.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Mon Jul 12 21:09:55 2010 (r209958) +++ head/sys/dev/e1000/if_em.c Mon Jul 12 21:47:30 2010 (r209959) @@ -1738,6 +1738,19 @@ em_xmit(struct tx_ring *txr, struct mbuf do_tso = ((m_head->m_pkthdr.csum_flags & CSUM_TSO) != 0); /* + ** When doing checksum offload, it is critical to + ** make sure the first mbuf has more than header, + ** because that routine expects data to be present. + */ + if ((m_head->m_pkthdr.csum_flags & CSUM_OFFLOAD) && + (m_head->m_len < ETHER_HDR_LEN + sizeof(struct ip))) { + m_head = m_pullup(m_head, ETHER_HDR_LEN + sizeof(struct ip)); + *m_headp = m_head; + if (m_head == NULL) + return (ENOBUFS); + } + + /* * TSO workaround: * If an mbuf is only header we need * to pull 4 bytes of data into it. @@ -3262,6 +3275,7 @@ em_transmit_checksum_setup(struct tx_rin cmd = hdr_len = ipproto = 0; + *txd_upper = *txd_lower = 0; cur = txr->next_avail_desc; /* @@ -3305,29 +3319,21 @@ em_transmit_checksum_setup(struct tx_rin *txd_upper |= E1000_TXD_POPTS_IXSM << 8; } - if (mp->m_len < ehdrlen + ip_hlen) - return; /* failure */ - hdr_len = ehdrlen + ip_hlen; ipproto = ip->ip_p; - break; + case ETHERTYPE_IPV6: ip6 = (struct ip6_hdr *)(mp->m_data + ehdrlen); ip_hlen = sizeof(struct ip6_hdr); /* XXX: No header stacking. */ - if (mp->m_len < ehdrlen + ip_hlen) - return; /* failure */ - /* IPv6 doesn't have a header checksum. */ hdr_len = ehdrlen + ip_hlen; ipproto = ip6->ip6_nxt; - break; + default: - *txd_upper = 0; - *txd_lower = 0; return; } @@ -3381,6 +3387,8 @@ em_transmit_checksum_setup(struct tx_rin break; } + if (TXD == NULL) + return; TXD->tcp_seg_setup.data = htole32(0); TXD->cmd_and_length = htole32(adapter->txd_cmd | E1000_TXD_CMD_DEXT | cmd); Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Mon Jul 12 21:09:55 2010 (r209958) +++ head/sys/dev/e1000/if_lem.c Mon Jul 12 21:47:30 2010 (r209959) @@ -1566,6 +1566,19 @@ lem_xmit(struct adapter *adapter, struct } /* + ** When doing checksum offload, it is critical to + ** make sure the first mbuf has more than header, + ** because that routine expects data to be present. + */ + if ((m_head->m_pkthdr.csum_flags & CSUM_OFFLOAD) && + (m_head->m_len < ETHER_HDR_LEN + sizeof(struct ip))) { + m_head = m_pullup(m_head, ETHER_HDR_LEN + sizeof(struct ip)); + *m_headp = m_head; + if (m_head == NULL) + return (ENOBUFS); + } + + /* * Map the packet for DMA * * Capture the first descriptor index, @@ -2851,6 +2864,7 @@ lem_transmit_checksum_setup(struct adapt cmd = hdr_len = ipproto = 0; + *txd_upper = *txd_lower = 0; curr_txd = adapter->next_avail_tx_desc; /* @@ -2894,9 +2908,6 @@ lem_transmit_checksum_setup(struct adapt *txd_upper |= E1000_TXD_POPTS_IXSM << 8; } - if (mp->m_len < ehdrlen + ip_hlen) - return; /* failure */ - hdr_len = ehdrlen + ip_hlen; ipproto = ip->ip_p; @@ -2905,18 +2916,13 @@ lem_transmit_checksum_setup(struct adapt ip6 = (struct ip6_hdr *)(mp->m_data + ehdrlen); ip_hlen = sizeof(struct ip6_hdr); /* XXX: No header stacking. */ - if (mp->m_len < ehdrlen + ip_hlen) - return; /* failure */ - /* IPv6 doesn't have a header checksum. */ hdr_len = ehdrlen + ip_hlen; ipproto = ip6->ip6_nxt; - break; + default: - *txd_upper = 0; - *txd_lower = 0; return; } @@ -2970,6 +2976,8 @@ lem_transmit_checksum_setup(struct adapt break; } + if (TXD == NULL) + return; TXD->tcp_seg_setup.data = htole32(0); TXD->cmd_and_length = htole32(adapter->txd_cmd | E1000_TXD_CMD_DEXT | cmd); From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 22:57:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 442131065670; Mon, 12 Jul 2010 22:57:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A0F38FC08; Mon, 12 Jul 2010 22:57:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CMvvem041896; Mon, 12 Jul 2010 22:57:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CMvvC5041893; Mon, 12 Jul 2010 22:57:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201007122257.o6CMvvC5041893@svn.freebsd.org> From: Marius Strobl Date: Mon, 12 Jul 2010 22:57:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209960 - head/sys/dev/mpt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 22:57:58 -0000 Author: marius Date: Mon Jul 12 22:57:57 2010 New Revision: 209960 URL: http://svn.freebsd.org/changeset/base/209960 Log: - Make the maxsize parameter of the data buffer DMA tag match maxio, which was missed in r209599. Reported and tested by: Michael Moll - Declare mpt_dma_buf_alloc() static just like mpt_dma_buf_free(), both are used in mpt.c only. Reviewed by: ken MFC after: r209599 Modified: head/sys/dev/mpt/mpt.c head/sys/dev/mpt/mpt.h Modified: head/sys/dev/mpt/mpt.c ============================================================================== --- head/sys/dev/mpt/mpt.c Mon Jul 12 21:47:30 2010 (r209959) +++ head/sys/dev/mpt/mpt.c Mon Jul 12 22:57:57 2010 (r209960) @@ -128,6 +128,7 @@ static void mpt_send_event_ack(struct mp static int mpt_send_event_request(struct mpt_softc *mpt, int onoff); static int mpt_soft_reset(struct mpt_softc *mpt); static void mpt_hard_reset(struct mpt_softc *mpt); +static int mpt_dma_buf_alloc(struct mpt_softc *mpt); static void mpt_dma_buf_free(struct mpt_softc *mpt); static int mpt_configure_ioc(struct mpt_softc *mpt, int, int); static int mpt_enable_ioc(struct mpt_softc *mpt, int); @@ -2475,7 +2476,7 @@ mpt_download_fw(struct mpt_softc *mpt) return (0); } -int +static int mpt_dma_buf_alloc(struct mpt_softc *mpt) { struct mpt_map_info mi; @@ -2486,8 +2487,9 @@ mpt_dma_buf_alloc(struct mpt_softc *mpt) /* Create a child tag for data buffers */ if (mpt_dma_tag_create(mpt, mpt->parent_dmat, 1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, - NULL, NULL, MAXBSIZE, mpt->max_cam_seg_cnt, - BUS_SPACE_MAXSIZE_32BIT, 0, &mpt->buffer_dmat) != 0) { + NULL, NULL, (mpt->max_cam_seg_cnt - 1) * PAGE_SIZE, + mpt->max_cam_seg_cnt, BUS_SPACE_MAXSIZE_32BIT, 0, + &mpt->buffer_dmat) != 0) { mpt_prt(mpt, "cannot create a dma tag for data buffers\n"); return (1); } Modified: head/sys/dev/mpt/mpt.h ============================================================================== --- head/sys/dev/mpt/mpt.h Mon Jul 12 21:47:30 2010 (r209959) +++ head/sys/dev/mpt/mpt.h Mon Jul 12 22:57:57 2010 (r209960) @@ -1279,7 +1279,6 @@ void mpt_check_doorbell(struct mpt_soft void mpt_dump_reply_frame(struct mpt_softc *mpt, MSG_DEFAULT_REPLY *reply_frame); -int mpt_dma_buf_alloc(struct mpt_softc *mpt); void mpt_set_config_regs(struct mpt_softc *); int mpt_issue_cfg_req(struct mpt_softc */*mpt*/, request_t */*req*/, cfgparms_t *params, From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 23:01:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CB6F1065673; Mon, 12 Jul 2010 23:01:21 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C5EB8FC0C; Mon, 12 Jul 2010 23:01:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CN1LYF042672; Mon, 12 Jul 2010 23:01:21 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CN1Lto042670; Mon, 12 Jul 2010 23:01:21 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201007122301.o6CN1Lto042670@svn.freebsd.org> From: Marius Strobl Date: Mon, 12 Jul 2010 23:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209961 - head/sys/dev/mpt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 23:01:21 -0000 Author: marius Date: Mon Jul 12 23:01:21 2010 New Revision: 209961 URL: http://svn.freebsd.org/changeset/base/209961 Log: Correct inverted parent DMA tag parameters. Reviewed by: ken MFC after: 3 days Modified: head/sys/dev/mpt/mpt_pci.c Modified: head/sys/dev/mpt/mpt_pci.c ============================================================================== --- head/sys/dev/mpt/mpt_pci.c Mon Jul 12 22:57:57 2010 (r209960) +++ head/sys/dev/mpt/mpt_pci.c Mon Jul 12 23:01:21 2010 (r209961) @@ -754,8 +754,8 @@ mpt_dma_mem_alloc(struct mpt_softc *mpt) /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/BUS_SPACE_MAXSIZE_32BIT, - /*nsegments*/BUS_SPACE_MAXSIZE_32BIT, - /*maxsegsz*/BUS_SPACE_UNRESTRICTED, /*flags*/0, + /*nsegments*/BUS_SPACE_UNRESTRICTED, + /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/0, &mpt->parent_dmat) != 0) { mpt_prt(mpt, "cannot create parent dma tag\n"); return (1); From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 23:49:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CB781065670; Mon, 12 Jul 2010 23:49:05 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58BE28FC16; Mon, 12 Jul 2010 23:49:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CNn5DV053105; Mon, 12 Jul 2010 23:49:05 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CNn5td053095; Mon, 12 Jul 2010 23:49:05 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201007122349.o6CNn5td053095@svn.freebsd.org> From: Martin Matuska Date: Mon, 12 Jul 2010 23:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209962 - in head: . cddl/compat/opensolaris/include cddl/compat/opensolaris/misc cddl/contrib/opensolaris/cmd/pyzfs cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cd... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 23:49:05 -0000 Author: mm Date: Mon Jul 12 23:49:04 2010 New Revision: 209962 URL: http://svn.freebsd.org/changeset/base/209962 Log: Merge ZFS version 15 and almost all OpenSolaris bugfixes referenced in Solaris 10 updates 141445-09 and 142901-14. Detailed information: (OpenSolaris revisions and Bug IDs, Solaris 10 patch numbers) 7844:effed23820ae 6755435 zfs_open() and zfs_close() needs to use ZFS_ENTER/ZFS_VERIFY_ZP (141445-01) 7897:e520d8258820 6748436 inconsistent zpool.cache in boot_archive could panic a zfs root filesystem upon boot-up (141445-01) 7965:b795da521357 6740164 zpool attach can create an illegal root pool (141909-02) 8084:b811cc60d650 6769612 zpool_import() will continue to write to cachefile even if altroot is set (N/A) 8121:7fd09d4ebd9c 6757430 want an option for zdb to disable space map loading and leak tracking (141445-01) 8129:e4f45a0bfbb0 6542860 ASSERT: reason != VDEV_LABEL_REMOVE||vdev_inuse(vd, crtxg, reason, 0) (141445-01) 8188:fd00c0a81e80 6761100 want zdb option to select older uberblocks (141445-01) 8190:6eeea43ced42 6774886 zfs_setattr() won't allow ndmp to restore SUNWattr_rw (141445-01) 8225:59a9961c2aeb 6737463 panic while trying to write out config file if root pool import fails (141445-01) 8227:f7d7be9b1f56 6765294 Refactor replay (141445-01) 8228:51e9ca9ee3a5 6572357 libzfs should do more to avoid mnttab lookups (141909-01) 6572376 zfs_iter_filesystems and zfs_iter_snapshots get objset stats twice (141909-01) 8241:5a60f16123ba 6328632 zpool offline is a bit too conservative (141445-01) 6739487 ASSERT: txg <= spa_final_txg due to scrub/export race (141445-01) 6767129 ASSERT: cvd->vdev_isspare, in spa_vdev_detach() (141445-01) 6747698 checksum failures after offline -t / export / import / scrub (141445-01) 6745863 ZFS writes to disk after it has been offlined (141445-01) 6722540 50% slowdown on scrub/resilver with certain vdev configurations (141445-01) 6759999 resilver logic rewrites ditto blocks on both source and destination (141445-01) 6758107 I/O should never suspend during spa_load() (141445-01) 6776548 codereview(1) runs off the page when faced with multi-line comments (N/A) 6761406 AMD errata 91 workaround doesn't work on 64-bit systems (141445-01) 8242:e46e4b2f0a03 6770866 GRUB/ZFS should require physical path or devid, but not both (141445-01) 8269:03a7e9050cfd 6674216 "zfs share" doesn't work, but "zfs set sharenfs=on" does (141445-01) 6621164 $SRC/cmd/zfs/zfs_main.c seems to have a syntax error in the translation note (141445-01) 6635482 i18n problems in libzfs_dataset.c and zfs_main.c (141445-01) 6595194 "zfs get" VALUE column is as wide as NAME (141445-01) 6722991 vdev_disk.c: error checking for ddi_pathname_to_dev_t() must test for NODEV (141445-01) 6396518 ASSERT strings shouldn't be pre-processed (141445-01) 8274:846b39508aff 6713916 scrub/resilver needlessly decompress data (141445-01) 8343:655db2375fed 6739553 libzfs_status msgid table is out of sync (141445-01) 6784104 libzfs unfairly rejects numerical values greater than 2^63 (141445-01) 6784108 zfs_realloc() should not free original memory on failure (141445-01) 8525:e0e0e525d0f8 6788830 set large value to reservation cause core dump (141445-01) 6791064 want sysevents for ZFS scrub (141445-01) 6791066 need to be able to set cachefile on faulted pools (141445-01) 6791071 zpool_do_import() should not enable datasets on faulted pools (141445-01) 6792134 getting multiple properties on a faulted pool leads to confusion (141445-01) 8547:bcc7b46e5ff7 6792884 Vista clients cannot access .zfs (141445-01) 8632:36ef517870a3 6798384 It can take a village to raise a zio (141445-01) 8636:7e4ce9158df3 6551866 deadlock between zfs_write(), zfs_freesp(), and zfs_putapage() (141909-01) 6504953 zfs_getpage() misunderstands VOP_GETPAGE() interface (141909-01) 6702206 ZFS read/writer lock contention throttles sendfile() benchmark (141445-01) 6780491 Zone on a ZFS filesystem has poor fork/exec performance (141445-01) 6747596 assertion failed: DVA_EQUAL(BP_IDENTITY(&zio->io_bp_orig), BP_IDENTITY(zio->io_bp))); (141445-01) 8692:692d4668b40d 6801507 ZFS read aggregation should not mind the gap (141445-01) 8697:e62d2612c14d 6633095 creating a filesystem with many properties set is slow (141445-01) 8768:dfecfdbb27ed 6775697 oracle crashes when overwriting after hitting quota on zfs (141909-01) 8811:f8deccf701cf 6790687 libzfs mnttab caching ignores external changes (141445-01) 6791101 memory leak from libzfs_mnttab_init (141445-01) 8845:91af0d9c0790 6800942 smb_session_create() incorrectly stores IP addresses (N/A) 6582163 Access Control List (ACL) for shares (141445-01) 6804954 smb_search - shortname field should be space padded following the NULL terminator (N/A) 6800184 Panic at smb_oplock_conflict+0x35() (N/A) 8876:59d2e67b4b65 6803822 Reboot after replacement of system disk in a ZFS mirror drops to grub> prompt (141445-01) 8924:5af812f84759 6789318 coredump when issue zdb -uuuu poolname/ (141445-01) 6790345 zdb -dddd -e poolname coredump (141445-01) 6797109 zdb: 'zdb -dddddd pool_name/fs_name inode' coredump if the file with inode was deleted (141445-01) 6797118 zdb: 'zdb -dddddd poolname inum' coredump if I miss the fs name (141445-01) 6803343 shareiscsi=on failed, iscsitgtd failed request to share (141445-01) 9030:243fd360d81f 6815893 hang mounting a dataset after booting into a new boot environment (141445-01) 9056:826e1858a846 6809691 'zpool create -f' no longer overwrites ufs infomation (141445-01) 9179:d8fbd96b79b3 6790064 zfs needs to determine uid and gid earlier in create process (141445-01) 9214:8d350e5d04aa 6604992 forced unmount + being in .zfs/snapshot/ = not happy (141909-01) 6810367 assertion failed: dvp->v_flag & VROOT, file: ../../common/fs/gfs.c, line: 426 (141909-01) 9229:e3f8b41e5db4 6807765 ztest_dsl_dataset_promote_busy needs to clean up after ENOSPC (141445-01) 9230:e4561e3eb1ef 6821169 offlining a device results in checksum errors (141445-01) 6821170 ZFS should not increment error stats for unavailable devices (141445-01) 6824006 need to increase issue and interrupt taskqs threads in zfs (141445-01) 9234:bffdc4fc05c4 6792139 recovering from a suspended pool needs some work (141445-01) 6794830 reboot command hangs on a failed zfs pool (141445-01) 9246:67c03c93c071 6824062 System panicked in zfs_mount due to NULL pointer dereference when running btts and svvs tests (141909-01) 9276:a8a7fc849933 6816124 System crash running zpool destroy on broken zpool (141445-03) 9355:09928982c591 6818183 zfs snapshot -r is slow due to set_snap_props() doing txg_wait_synced() for each new snapshot (141445-03) 9391:413d0661ef33 6710376 log device can show incorrect status when other parts of pool are degraded (141445-03) 9396:f41cf682d0d3 (part already merged) 6501037 want user/group quotas on ZFS (141445-03) 6827260 assertion failed in arc_read(): hdr == pbuf->b_hdr (141445-03) 6815592 panic: No such hold X on refcount Y from zfs_znode_move (141445-03) 6759986 zfs list shows temporary %clone when doing online zfs recv (141445-03) 9404:319573cd93f8 6774713 zfs ignores canmount=noauto when sharenfs property != off (141445-03) 9412:4aefd8704ce0 6717022 ZFS DMU needs zero-copy support (141445-03) 9425:e7ffacaec3a8 6799895 spa_add_spares() needs to be protected by config lock (141445-03) 6826466 want to post sysevents on hot spare activation (141445-03) 6826468 spa 'allowfaulted' needs some work (141445-03) 6826469 kernel support for storing vdev FRU information (141445-03) 6826470 skip posting checksum errors from DTL regions of leaf vdevs (141445-03) 6826471 I/O errors after device remove probe can confuse FMA (141445-03) 6826472 spares should enjoy some of the benefits of cache devices (141445-03) 9443:2a96d8478e95 6833711 gang leaders shouldn't have to be logical (141445-03) 9463:d0bd231c7518 6764124 want zdb to be able to checksum metadata blocks only (141445-03) 9465:8372081b8019 6830237 zfs panic in zfs_groupmember() (141445-03) 9466:1fdfd1fed9c4 6833162 phantom log device in zpool status (141445-03) 9469:4f68f041ddcd 6824968 add ZFS userquota support to rquotad (141445-03) 9470:6d827468d7b5 6834217 godfather I/O should reexecute (141445-03) 9480:fcff33da767f 6596237 Stop looking and start ganging (141909-02) 9493:9933d599bc93 6623978 lwb->lwb_buf != NULL, file ../../../uts/common/fs/zfs/zil.c, line 787, function zil_lwb_commit (141445-06) 9512:64cafcbcc337 6801810 Commit of aligned streaming rewrites to ZIL device causes unwanted disk reads (N/A) 9515:d3b739d9d043 6586537 async zio taskqs can block out userland commands (142901-09) 9554:787363635b6a 6836768 zfs_userspace() callback has no way to indicate failure (N/A) 9574:1eb6a6ab2c57 6838062 zfs panics when an error is encountered in space_map_load() (141909-02) 9583:b0696cd037cc 6794136 Panic BAD TRAP: type=e when importing degraded zraid pool. (141909-03) 9630:e25a03f552e0 6776104 "zfs import" deadlock between spa_unload() and spa_async_thread() (141445-06) 9653:a70048a304d1 6664765 Unable to remove files when using fat-zap and quota exceeded on ZFS filesystem (141445-06) 9688:127be1845343 6841321 zfs userspace / zfs get userused@ doesn't work on mounted snapshot (N/A) 6843069 zfs get userused@S-1-... doesn't work (N/A) 9873:8ddc892eca6e 6847229 assertion failed: refcount_count(&tx->tx_space_written) + delta <= tx->tx_space_towrite in dmu_tx.c (141445-06) 9904:d260bd3fd47c 6838344 kernel heap corruption detected on zil while stress testing (141445-06) 9951:a4895b3dd543 6844900 zfs_ioc_userspace_upgrade leaks (N/A) 10040:38b25aeeaf7a 6857012 zfs panics on zpool import (141445-06) 10000:241a51d8720c 6848242 zdb -e no longer works as expected (N/A) 10100:4a6965f6bef8 6856634 snv_117 not booting: zfs_parse_bootfs: error2 (141445-07) 10160:a45b03783d44 6861983 zfs should use new name <-> SID interfaces (N/A) 6862984 userquota commands can hang (141445-06) 10299:80845694147f 6696858 zfs receive of incremental replication stream can dereference NULL pointer and crash (N/A) 10302:a9e3d1987706 6696858 zfs receive of incremental replication stream can dereference NULL pointer and crash (fix lint) (N/A) 10575:2a8816c5173b (partial merge) 6882227 spa_async_remove() shouldn't do a full clear (142901-14) 10800:469478b180d9 6880764 fsync on zfs is broken if writes are greater than 32kb on a hard crash and no log attached (142901-09) 6793430 zdb -ivvvv assertion failure: bp->blk_cksum.zc_word[2] == dmu_objset_id(zilog->zl_os) (N/A) 10801:e0bf032e8673 (partial merge) 6822816 assertion failed: zap_remove_int(ds_next_clones_obj) returns ENOENT (142901-09) 10810:b6b161a6ae4a 6892298 buf->b_hdr->b_state != arc_anon, file: ../../common/fs/zfs/arc.c, line: 2849 (142901-09) 10890:499786962772 6807339 spurious checksum errors when replacing a vdev (142901-13) 11249:6c30f7dfc97b 6906110 bad trap panic in zil_replay_log_record (142901-13) 6906946 zfs replay isn't handling uid/gid correctly (142901-13) 11454:6e69bacc1a5a 6898245 suspended zpool should not cause rest of the zfs/zpool commands to hang (142901-10) 11546:42ea6be8961b (partial merge) 6833999 3-way deadlock in dsl_dataset_hold_ref() and dsl_sync_task_group_sync() (142901-09) Discussed with: pjd Approved by: delphij (mentor) Obtained from: OpenSolaris (multiple Bug IDs) MFC after: 2 months Added: head/cddl/contrib/opensolaris/cmd/pyzfs/ head/cddl/contrib/opensolaris/cmd/pyzfs/pyzfs.py (contents, props changed) head/cddl/contrib/opensolaris/lib/pyzfs/ head/cddl/contrib/opensolaris/lib/pyzfs/common/ head/cddl/contrib/opensolaris/lib/pyzfs/common/__init__.py (contents, props changed) head/cddl/contrib/opensolaris/lib/pyzfs/common/allow.py (contents, props changed) head/cddl/contrib/opensolaris/lib/pyzfs/common/dataset.py (contents, props changed) head/cddl/contrib/opensolaris/lib/pyzfs/common/groupspace.py (contents, props changed) head/cddl/contrib/opensolaris/lib/pyzfs/common/ioctl.c (contents, props changed) head/cddl/contrib/opensolaris/lib/pyzfs/common/unallow.py (contents, props changed) head/cddl/contrib/opensolaris/lib/pyzfs/common/userspace.py (contents, props changed) head/cddl/contrib/opensolaris/lib/pyzfs/common/util.py (contents, props changed) head/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c (contents, props changed) Modified: head/UPDATING head/cddl/compat/opensolaris/include/mnttab.h head/cddl/compat/opensolaris/misc/mnttab.c head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 head/cddl/contrib/opensolaris/cmd/zdb/zdb.c head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_graph.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h head/cddl/contrib/opensolaris/lib/libzpool/common/taskq.c head/sys/cddl/boot/zfs/zfsimpl.h head/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c head/sys/cddl/compat/opensolaris/sys/misc.h head/sys/cddl/compat/opensolaris/sys/policy.h head/sys/cddl/compat/opensolaris/sys/sid.h head/sys/cddl/compat/opensolaris/sys/uio.h head/sys/cddl/compat/opensolaris/sys/vnode.h head/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.h head/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.h head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c head/sys/cddl/contrib/opensolaris/common/zfs/zprop_common.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_deleg.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_prop.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_acl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_dir.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_fuid.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_rlock.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c head/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h head/sys/cddl/contrib/opensolaris/uts/common/sys/fm/fs/zfs.h head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h head/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h head/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h head/sys/modules/zfs/Makefile Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Jul 12 23:01:21 2010 (r209961) +++ head/UPDATING Mon Jul 12 23:49:04 2010 (r209962) @@ -23,6 +23,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. ln -s aj /etc/malloc.conf.) +20100713: + A new version of ZFS (version 15) has been merged to -HEAD. + This version uses a python library for the following subcommands: + zfs allow, zfs unallow, zfs groupspace, zfs userspace. + For full functionality of these commands the following port must + be installed: sysutils/py-zfs + 20100429: 'vm_page's are now hashed by physical address to an array of mutexes. Currently this is only used to serialize access to hold_count. Over @@ -964,6 +971,22 @@ COMMON ITEMS: path, and has the highest probability of being successful. Please try this approach before reporting problems with a major version upgrade. + ZFS notes + --------- + When upgrading the boot ZFS pool to a new version, always follow + these two steps: + + 1.) recompile and reinstall the ZFS boot loader and boot block + (this is part of "make buildworld" and "make installworld") + + 2.) update the ZFS boot block on your boot drive + + The following example updates the ZFS boot block on the first + partition (freebsd-boot) of a GPT partitioned drive ad0: + "gpart bootcode -p /boot/gptzfsboot -i 1 ad0" + + Non-boot pools do not need these updates. + To build a kernel ----------------- If you are updating from a prior version of FreeBSD (even one just Modified: head/cddl/compat/opensolaris/include/mnttab.h ============================================================================== --- head/cddl/compat/opensolaris/include/mnttab.h Mon Jul 12 23:01:21 2010 (r209961) +++ head/cddl/compat/opensolaris/include/mnttab.h Mon Jul 12 23:49:04 2010 (r209962) @@ -3,10 +3,13 @@ #ifndef _OPENSOLARIS_MNTTAB_H_ #define _OPENSOLARIS_MNTTAB_H_ +#include +#include + #include #include -#define MNTTAB _PATH_DEVNULL +#define MNTTAB _PATH_DEVZERO #define MNT_LINE_MAX 1024 #define umount2(p, f) unmount(p, f) @@ -17,7 +20,12 @@ struct mnttab { char *mnt_fstype; char *mnt_mntopts; }; +#define extmnttab mnttab int getmntany(FILE *fd, struct mnttab *mgetp, struct mnttab *mrefp); +int getmntent(FILE *fp, struct mnttab *mp); +char *hasmntopt(struct mnttab *mnt, char *opt); + +void statfs2mnttab(struct statfs *sfs, struct mnttab *mp); #endif /* !_OPENSOLARIS_MNTTAB_H_ */ Modified: head/cddl/compat/opensolaris/misc/mnttab.c ============================================================================== --- head/cddl/compat/opensolaris/misc/mnttab.c Mon Jul 12 23:01:21 2010 (r209961) +++ head/cddl/compat/opensolaris/misc/mnttab.c Mon Jul 12 23:49:04 2010 (r209962) @@ -36,6 +36,9 @@ __FBSDID("$FreeBSD$"); #include #include #include + +#include +#include #include #include #include @@ -88,75 +91,126 @@ optadd(char *mntopts, size_t size, const strlcat(mntopts, opt, size); } -int -getmntany(FILE *fd __unused, struct mnttab *mgetp, struct mnttab *mrefp) +void +statfs2mnttab(struct statfs *sfs, struct mnttab *mp) { - static struct statfs *sfs = NULL; static char mntopts[MNTMAXSTR]; - struct opt *o; - long i, n, flags; + long flags; - if (sfs != NULL) { - free(sfs); - sfs = NULL; - } mntopts[0] = '\0'; - n = getfsstat(NULL, 0, MNT_NOWAIT); - if (n == -1) - return (-1); - n = sizeof(*sfs) * (n + 8); - sfs = malloc(n); - if (sfs == NULL) - return (-1); - n = getfsstat(sfs, n, MNT_WAIT); - if (n == -1) { - free(sfs); - sfs = NULL; - return (-1); + flags = sfs->f_flags; +#define OPTADD(opt) optadd(mntopts, sizeof(mntopts), (opt)) + if (flags & MNT_RDONLY) + OPTADD(MNTOPT_RO); + else + OPTADD(MNTOPT_RW); + if (flags & MNT_NOSUID) + OPTADD(MNTOPT_NOSUID); + else + OPTADD(MNTOPT_SETUID); + if (flags & MNT_UPDATE) + OPTADD(MNTOPT_REMOUNT); + if (flags & MNT_NOATIME) + OPTADD(MNTOPT_NOATIME); + else + OPTADD(MNTOPT_ATIME); + OPTADD(MNTOPT_NOXATTR); + if (flags & MNT_NOEXEC) + OPTADD(MNTOPT_NOEXEC); + else + OPTADD(MNTOPT_EXEC); +#undef OPTADD + mp->mnt_special = sfs->f_mntfromname; + mp->mnt_mountp = sfs->f_mntonname; + mp->mnt_fstype = sfs->f_fstypename; + mp->mnt_mntopts = mntopts; +} + +static struct statfs *gsfs = NULL; +static int allfs = 0; + +static int +statfs_init(void) +{ + struct statfs *sfs; + int error; + + if (gsfs != NULL) { + free(gsfs); + gsfs = NULL; } - for (i = 0; i < n; i++) { + allfs = getfsstat(NULL, 0, MNT_WAIT); + if (allfs == -1) + goto fail; + gsfs = malloc(sizeof(gsfs[0]) * allfs * 2); + if (gsfs == NULL) + goto fail; + allfs = getfsstat(gsfs, (long)(sizeof(gsfs[0]) * allfs * 2), + MNT_WAIT); + if (allfs == -1) + goto fail; + sfs = realloc(gsfs, allfs * sizeof(gsfs[0])); + if (sfs != NULL) + gsfs = sfs; + return (0); +fail: + error = errno; + if (gsfs != NULL) + free(gsfs); + gsfs = NULL; + allfs = 0; + return (error); +} + +int +getmntany(FILE *fd __unused, struct mnttab *mgetp, struct mnttab *mrefp) +{ + struct statfs *sfs; + int i, error; + + error = statfs_init(); + if (error != 0) + return (error); + + for (i = 0; i < allfs; i++) { if (mrefp->mnt_special != NULL && - strcmp(mrefp->mnt_special, sfs[i].f_mntfromname) != 0) { + strcmp(mrefp->mnt_special, gsfs[i].f_mntfromname) != 0) { continue; } if (mrefp->mnt_mountp != NULL && - strcmp(mrefp->mnt_mountp, sfs[i].f_mntonname) != 0) { + strcmp(mrefp->mnt_mountp, gsfs[i].f_mntonname) != 0) { continue; } if (mrefp->mnt_fstype != NULL && - strcmp(mrefp->mnt_fstype, sfs[i].f_fstypename) != 0) { + strcmp(mrefp->mnt_fstype, gsfs[i].f_fstypename) != 0) { continue; } - flags = sfs[i].f_flags; -#define OPTADD(opt) optadd(mntopts, sizeof(mntopts), (opt)) - if (flags & MNT_RDONLY) - OPTADD(MNTOPT_RO); - else - OPTADD(MNTOPT_RW); - if (flags & MNT_NOSUID) - OPTADD(MNTOPT_NOSUID); - else - OPTADD(MNTOPT_SETUID); - if (flags & MNT_UPDATE) - OPTADD(MNTOPT_REMOUNT); - if (flags & MNT_NOATIME) - OPTADD(MNTOPT_NOATIME); - else - OPTADD(MNTOPT_ATIME); - OPTADD(MNTOPT_NOXATTR); - if (flags & MNT_NOEXEC) - OPTADD(MNTOPT_NOEXEC); - else - OPTADD(MNTOPT_EXEC); -#undef OPTADD - mgetp->mnt_special = sfs[i].f_mntfromname; - mgetp->mnt_mountp = sfs[i].f_mntonname; - mgetp->mnt_fstype = sfs[i].f_fstypename; - mgetp->mnt_mntopts = mntopts; + statfs2mnttab(&gsfs[i], mgetp); return (0); } - free(sfs); - sfs = NULL; return (-1); } + +int +getmntent(FILE *fp, struct mnttab *mp) +{ + struct statfs *sfs; + int error, nfs; + + nfs = (int)lseek(fileno(fp), 0, SEEK_CUR); + if (nfs == -1) + return (errno); + /* If nfs is 0, we want to refresh out cache. */ + if (nfs == 0 || gsfs == NULL) { + error = statfs_init(); + if (error != 0) + return (error); + } + if (nfs >= allfs) + return (-1); + statfs2mnttab(&gsfs[nfs], mp); + if (lseek(fileno(fp), 1, SEEK_CUR) == -1) + return (errno); + return (0); +} Added: head/cddl/contrib/opensolaris/cmd/pyzfs/pyzfs.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/pyzfs/pyzfs.py Mon Jul 12 23:49:04 2010 (r209962) @@ -0,0 +1,79 @@ +#! /usr/bin/python2.4 -S +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# Note, we want SIGINT (control-c) to exit the process quietly, to mimic +# the standard behavior of C programs. The best we can do with pure +# Python is to run with -S (to disable "import site"), and start our +# program with a "try" statement. Hopefully nobody hits ^C before our +# try statement is executed. + +try: + import site + import gettext + import zfs.util + import zfs.ioctl + import sys + import errno + + """This is the main script for doing zfs subcommands. It doesn't know + what subcommands there are, it just looks for a module zfs. + that implements that subcommand.""" + + _ = gettext.translation("SUNW_OST_OSCMD", "/usr/lib/locale", + fallback=True).gettext + + if len(sys.argv) < 2: + sys.exit(_("missing subcommand argument")) + + zfs.ioctl.set_cmdstr(" ".join(["zfs"] + sys.argv[1:])) + + try: + # import zfs. + # subfunc = zfs..do_ + + subcmd = sys.argv[1] + __import__("zfs." + subcmd) + submod = getattr(zfs, subcmd) + subfunc = getattr(submod, "do_" + subcmd) + except (ImportError, AttributeError): + sys.exit(_("invalid subcommand")) + + try: + subfunc() + except zfs.util.ZFSError, e: + print(e) + sys.exit(1) + +except IOError, e: + import errno + import sys + + if e.errno == errno.EPIPE: + sys.exit(1) + raise +except KeyboardInterrupt: + import sys + + sys.exit(1) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Mon Jul 12 23:01:21 2010 (r209961) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Mon Jul 12 23:49:04 2010 (r209962) @@ -1,23 +1,8 @@ '\" te -.\" CDDL HEADER START -.\" -.\" The contents of this file are subject to the terms of the -.\" Common Development and Distribution License (the "License"). -.\" You may not use this file except in compliance with the License. -.\" -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -.\" or http://www.opensolaris.org/os/licensing. -.\" See the License for the specific language governing permissions -.\" and limitations under the License. -.\" -.\" When distributing Covered Code, include this CDDL HEADER in each -.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. -.\" If applicable, add the following below this CDDL HEADER, with the -.\" fields enclosed by brackets "[]" replaced with your own identifying -.\" information: Portions Copyright [yyyy] [name of copyright owner] -.\" -.\" CDDL HEADER END .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH zdb 1M "31 Oct 2005" "SunOS 5.11" "System Administration Commands" .SH NAME zdb \- ZFS debugger Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Jul 12 23:01:21 2010 (r209961) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Jul 12 23:49:04 2010 (r209962) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -87,8 +87,8 @@ static void usage(void) { (void) fprintf(stderr, - "Usage: %s [-udibcsv] [-U cachefile_path] " - "[-S user:cksumalg] " + "Usage: %s [-udibcsvL] [-U cachefile_path] [-t txg]\n" + "\t [-S user:cksumalg] " "dataset [object...]\n" " %s -C [pool]\n" " %s -l dev\n" @@ -102,12 +102,16 @@ usage(void) (void) fprintf(stderr, " -C cached pool configuration\n"); (void) fprintf(stderr, " -i intent logs\n"); (void) fprintf(stderr, " -b block statistics\n"); - (void) fprintf(stderr, " -c checksum all data blocks\n"); + (void) fprintf(stderr, " -m metaslabs\n"); + (void) fprintf(stderr, " -c checksum all metadata (twice for " + "all data) blocks\n"); (void) fprintf(stderr, " -s report stats on zdb's I/O\n"); (void) fprintf(stderr, " -S : -- " "dump blkptr signatures\n"); (void) fprintf(stderr, " -v verbose (applies to all others)\n"); (void) fprintf(stderr, " -l dump label contents\n"); + (void) fprintf(stderr, " -L disable leak tracking (do not " + "load spacemaps)\n"); (void) fprintf(stderr, " -U cachefile_path -- use alternate " "cachefile\n"); (void) fprintf(stderr, " -R read and display block from a " @@ -115,12 +119,19 @@ usage(void) (void) fprintf(stderr, " -e Pool is exported/destroyed/" "has altroot\n"); (void) fprintf(stderr, " -p (use with -e)\n"); + (void) fprintf(stderr, " -t highest txg to use when " + "searching for uberblocks\n"); (void) fprintf(stderr, "Specify an option more than once (e.g. -bb) " "to make only that option verbose\n"); (void) fprintf(stderr, "Default is to dump everything non-verbosely\n"); exit(1); } +/* + * Called for usage errors that are discovered after a call to spa_open(), + * dmu_bonus_hold(), or pool_match(). abort() is called for other errors. + */ + static void fatal(const char *fmt, ...) { @@ -132,7 +143,7 @@ fatal(const char *fmt, ...) va_end(ap); (void) fprintf(stderr, "\n"); - abort(); + exit(1); } static void @@ -205,7 +216,7 @@ dump_packed_nvlist(objset_t *os, uint64_ size_t nvsize = *(uint64_t *)data; char *packed = umem_alloc(nvsize, UMEM_NOFAIL); - VERIFY(0 == dmu_read(os, object, 0, nvsize, packed)); + VERIFY(0 == dmu_read(os, object, 0, nvsize, packed, DMU_READ_PREFETCH)); VERIFY(nvlist_unpack(packed, nvsize, &nv, 0) == 0); @@ -431,7 +442,7 @@ dump_spacemap(objset_t *os, space_map_ob alloc = 0; for (offset = 0; offset < smo->smo_objsize; offset += sizeof (entry)) { VERIFY(0 == dmu_read(os, smo->smo_object, offset, - sizeof (entry), &entry)); + sizeof (entry), &entry, DMU_READ_PREFETCH)); if (SM_DEBUG_DECODE(entry)) { (void) printf("\t\t[%4llu] %s: txg %llu, pass %llu\n", (u_longlong_t)(offset / sizeof (entry)), @@ -463,6 +474,21 @@ dump_spacemap(objset_t *os, space_map_ob } static void +dump_metaslab_stats(metaslab_t *msp) +{ + char maxbuf[5]; + space_map_t *sm = &msp->ms_map; + avl_tree_t *t = sm->sm_pp_root; + int free_pct = sm->sm_space * 100 / sm->sm_size; + + nicenum(space_map_maxsize(sm), maxbuf); + + (void) printf("\t %20s %10lu %7s %6s %4s %4d%%\n", + "segments", avl_numnodes(t), "maxsize", maxbuf, + "freepct", free_pct); +} + +static void dump_metaslab(metaslab_t *msp) { char freebuf[5]; @@ -472,22 +498,28 @@ dump_metaslab(metaslab_t *msp) nicenum(msp->ms_map.sm_size - smo->smo_alloc, freebuf); - if (dump_opt['d'] <= 5) { - (void) printf("\t%10llx %10llu %5s\n", - (u_longlong_t)msp->ms_map.sm_start, - (u_longlong_t)smo->smo_object, - freebuf); - return; - } - (void) printf( - "\tvdev %llu offset %08llx spacemap %4llu free %5s\n", + "\tvdev %5llu offset %12llx spacemap %6llu free %5s\n", (u_longlong_t)vd->vdev_id, (u_longlong_t)msp->ms_map.sm_start, (u_longlong_t)smo->smo_object, freebuf); - ASSERT(msp->ms_map.sm_size == (1ULL << vd->vdev_ms_shift)); + if (dump_opt['m'] > 1) { + mutex_enter(&msp->ms_lock); + VERIFY(space_map_load(&msp->ms_map, zfs_metaslab_ops, + SM_FREE, &msp->ms_smo, spa->spa_meta_objset) == 0); + dump_metaslab_stats(msp); + space_map_unload(&msp->ms_map); + mutex_exit(&msp->ms_lock); + } + + if (dump_opt['d'] > 5 || dump_opt['m'] > 2) { + ASSERT(msp->ms_map.sm_size == (1ULL << vd->vdev_ms_shift)); + + mutex_enter(&msp->ms_lock); + dump_spacemap(spa->spa_meta_objset, smo, &msp->ms_map); + mutex_exit(&msp->ms_lock); + } - dump_spacemap(spa->spa_meta_objset, smo, &msp->ms_map); } static void @@ -502,14 +534,12 @@ dump_metaslabs(spa_t *spa) for (c = 0; c < rvd->vdev_children; c++) { vd = rvd->vdev_child[c]; - (void) printf("\n vdev %llu\n\n", (u_longlong_t)vd->vdev_id); + (void) printf("\t%-10s %-19s %-15s %-10s\n", + "vdev", "offset", "spacemap", "free"); + (void) printf("\t%10s %19s %15s %10s\n", + "----------", "-------------------", + "---------------", "-------------"); - if (dump_opt['d'] <= 5) { - (void) printf("\t%10s %10s %5s\n", - "offset", "spacemap", "free"); - (void) printf("\t%10s %10s %5s\n", - "------", "--------", "----"); - } for (m = 0; m < vd->vdev_ms_count; m++) dump_metaslab(vd->vdev_ms[m]); (void) printf("\n"); @@ -517,44 +547,52 @@ dump_metaslabs(spa_t *spa) } static void +dump_dtl_seg(space_map_t *sm, uint64_t start, uint64_t size) +{ + char *prefix = (void *)sm; + + (void) printf("%s [%llu,%llu) length %llu\n", + prefix, + (u_longlong_t)start, + (u_longlong_t)(start + size), + (u_longlong_t)(size)); +} + +static void dump_dtl(vdev_t *vd, int indent) { - avl_tree_t *t = &vd->vdev_dtl_map.sm_root; - space_seg_t *ss; - vdev_t *pvd; - int c; + spa_t *spa = vd->vdev_spa; + boolean_t required; + char *name[DTL_TYPES] = { "missing", "partial", "scrub", "outage" }; + char prefix[256]; + + spa_vdev_state_enter(spa); + required = vdev_dtl_required(vd); + (void) spa_vdev_state_exit(spa, NULL, 0); if (indent == 0) (void) printf("\nDirty time logs:\n\n"); - (void) printf("\t%*s%s\n", indent, "", + (void) printf("\t%*s%s [%s]\n", indent, "", vd->vdev_path ? vd->vdev_path : - vd->vdev_parent ? vd->vdev_ops->vdev_op_type : - spa_name(vd->vdev_spa)); - - for (ss = avl_first(t); ss; ss = AVL_NEXT(t, ss)) { - /* - * Everything in this DTL must appear in all parent DTL unions. - */ - for (pvd = vd; pvd; pvd = pvd->vdev_parent) - ASSERT(vdev_dtl_contains(&pvd->vdev_dtl_map, - ss->ss_start, ss->ss_end - ss->ss_start)); - (void) printf("\t%*soutage [%llu,%llu] length %llu\n", - indent, "", - (u_longlong_t)ss->ss_start, - (u_longlong_t)ss->ss_end - 1, - (u_longlong_t)(ss->ss_end - ss->ss_start)); - } - - (void) printf("\n"); + vd->vdev_parent ? vd->vdev_ops->vdev_op_type : spa_name(spa), + required ? "DTL-required" : "DTL-expendable"); - if (dump_opt['d'] > 5 && vd->vdev_children == 0) { - dump_spacemap(vd->vdev_spa->spa_meta_objset, &vd->vdev_dtl, - &vd->vdev_dtl_map); - (void) printf("\n"); + for (int t = 0; t < DTL_TYPES; t++) { + space_map_t *sm = &vd->vdev_dtl[t]; + if (sm->sm_space == 0) + continue; + (void) snprintf(prefix, sizeof (prefix), "\t%*s%s", + indent + 2, "", name[t]); + mutex_enter(sm->sm_lock); + space_map_walk(sm, dump_dtl_seg, (void *)prefix); + mutex_exit(sm->sm_lock); + if (dump_opt['d'] > 5 && vd->vdev_children == 0) + dump_spacemap(spa->spa_meta_objset, + &vd->vdev_dtl_smo, sm); } - for (c = 0; c < vd->vdev_children; c++) + for (int c = 0; c < vd->vdev_children; c++) dump_dtl(vd->vdev_child[c], indent + 4); } @@ -668,7 +706,8 @@ visit_indirect(spa_t *spa, const dnode_p break; fill += cbp->blk_fill; } - ASSERT3U(fill, ==, bp->blk_fill); + if (!err) + ASSERT3U(fill, ==, bp->blk_fill); (void) arc_buf_remove_ref(buf, &buf); } @@ -904,6 +943,7 @@ dump_uidgid(objset_t *os, znode_phys_t * /* first find the fuid object. It lives in the master node */ VERIFY(zap_lookup(os, MASTER_NODE_OBJ, ZFS_FUID_TABLES, 8, 1, &fuid_obj) == 0); + zfs_fuid_avl_tree_create(&idx_tree, &domain_tree); (void) zfs_fuid_table_load(os, fuid_obj, &idx_tree, &domain_tree); fuid_table_loaded = B_TRUE; @@ -1007,6 +1047,8 @@ static object_viewer_t *object_viewer[DM dump_packed_nvlist, /* FUID nvlist size */ dump_zap, /* DSL dataset next clones */ dump_zap, /* DSL scrub queue */ + dump_zap, /* ZFS user/group used */ + dump_zap, /* ZFS user/group quota */ }; static void @@ -1070,6 +1112,14 @@ dump_object(objset_t *os, uint64_t objec } if (verbosity >= 4) { + (void) printf("\tdnode flags: %s%s\n", + (dn->dn_phys->dn_flags & DNODE_FLAG_USED_BYTES) ? + "USED_BYTES " : "", + (dn->dn_phys->dn_flags & DNODE_FLAG_USERUSED_ACCOUNTED) ? + "USERUSED_ACCOUNTED " : ""); + (void) printf("\tdnode maxblkid: %llu\n", + (longlong_t)dn->dn_phys->dn_maxblkid); + object_viewer[doi.doi_bonus_type](os, object, bonus, bsize); object_viewer[doi.doi_type](os, object, NULL, 0); *print_header = 1; @@ -1124,7 +1174,7 @@ dump_dir(objset_t *os) uint64_t object, object_count; uint64_t refdbytes, usedobjs, scratch; char numbuf[8]; - char blkbuf[BP_SPRINTF_LEN]; + char blkbuf[BP_SPRINTF_LEN + 20]; char osname[MAXNAMELEN]; char *type = "UNKNOWN"; int verbosity = dump_opt['d']; @@ -1150,8 +1200,8 @@ dump_dir(objset_t *os) nicenum(refdbytes, numbuf); if (verbosity >= 4) { - (void) strcpy(blkbuf, ", rootbp "); - sprintf_blkptr(blkbuf + strlen(blkbuf), + (void) sprintf(blkbuf + strlen(blkbuf), ", rootbp "); + (void) sprintf_blkptr(blkbuf + strlen(blkbuf), BP_SPRINTF_LEN - strlen(blkbuf), os->os->os_rootbp); } else { blkbuf[0] = '\0'; @@ -1186,7 +1236,12 @@ dump_dir(objset_t *os) } dump_object(os, 0, verbosity, &print_header); - object_count = 1; + object_count = 0; + if (os->os->os_userused_dnode && + os->os->os_userused_dnode->dn_type != 0) { + dump_object(os, DMU_USERUSED_OBJECT, verbosity, &print_header); + dump_object(os, DMU_GROUPUSED_OBJECT, verbosity, &print_header); + } object = 0; while ((error = dmu_object_next(os, &object, B_FALSE, 0)) == 0) { @@ -1198,8 +1253,10 @@ dump_dir(objset_t *os) (void) printf("\n"); - if (error != ESRCH) - fatal("dmu_object_next() = %d", error); + if (error != ESRCH) { + (void) fprintf(stderr, "dmu_object_next() = %d\n", error); + abort(); + } } static void @@ -1390,7 +1447,8 @@ static space_map_ops_t zdb_space_map_ops zdb_space_map_unload, NULL, /* alloc */ zdb_space_map_claim, - NULL /* free */ + NULL, /* free */ + NULL /* maxsize */ }; static void @@ -1489,8 +1547,9 @@ zdb_count_block(spa_t *spa, zdb_cb_t *zc } } - VERIFY(zio_wait(zio_claim(NULL, spa, spa_first_txg(spa), bp, - NULL, NULL, ZIO_FLAG_MUSTSUCCEED)) == 0); + if (!dump_opt['L']) + VERIFY(zio_wait(zio_claim(NULL, spa, spa_first_txg(spa), bp, + NULL, NULL, ZIO_FLAG_MUSTSUCCEED)) == 0); } static int @@ -1499,13 +1558,25 @@ zdb_blkptr_cb(spa_t *spa, blkptr_t *bp, { zdb_cb_t *zcb = arg; char blkbuf[BP_SPRINTF_LEN]; + dmu_object_type_t type; + boolean_t is_l0_metadata; if (bp == NULL) return (0); - zdb_count_block(spa, zcb, bp, BP_GET_TYPE(bp)); + type = BP_GET_TYPE(bp); + + zdb_count_block(spa, zcb, bp, type); - if (dump_opt['c'] || dump_opt['S']) { + /* + * if we do metadata-only checksumming there's no need to checksum + * indirect blocks here because it is done during traverse + */ + is_l0_metadata = (BP_GET_LEVEL(bp) == 0 && type < DMU_OT_NUMTYPES && + dmu_ot[type].ot_metadata); + + if (dump_opt['c'] > 1 || dump_opt['S'] || + (dump_opt['c'] && is_l0_metadata)) { int ioerr, size; void *data; @@ -1517,7 +1588,7 @@ zdb_blkptr_cb(spa_t *spa, blkptr_t *bp, free(data); /* We expect io errors on intent log */ - if (ioerr && BP_GET_TYPE(bp) != DMU_OT_INTENT_LOG) { + if (ioerr && type != DMU_OT_INTENT_LOG) { zcb->zcb_haderrors = 1; zcb->zcb_errors[ioerr]++; @@ -1565,9 +1636,12 @@ dump_block_stats(spa_t *spa) int c, e; if (!dump_opt['S']) { - (void) printf("\nTraversing all blocks to %sverify" - " nothing leaked ...\n", - dump_opt['c'] ? "verify checksums and " : ""); + (void) printf("\nTraversing all blocks %s%s%s%s%s...\n", + (dump_opt['c'] || !dump_opt['L']) ? "to verify " : "", + (dump_opt['c'] == 1) ? "metadata " : "", + dump_opt['c'] ? "checksums " : "", + (dump_opt['c'] && !dump_opt['L']) ? "and verify " : "", + !dump_opt['L'] ? "nothing leaked " : ""); } /* @@ -1578,7 +1652,8 @@ dump_block_stats(spa_t *spa) * it's not part of any space map) is a double allocation, * reference to a freed block, or an unclaimed log block. */ - zdb_leak_init(spa); + if (!dump_opt['L']) + zdb_leak_init(spa); /* * If there's a deferred-free bplist, process that first. @@ -1620,7 +1695,8 @@ dump_block_stats(spa_t *spa) /* * Report any leaked segments. */ - zdb_leak_fini(spa); + if (!dump_opt['L']) + zdb_leak_fini(spa); /* * If we're interested in printing out the blkptr signatures, @@ -1646,14 +1722,16 @@ dump_block_stats(spa_t *spa) tzb = &zcb.zcb_type[ZB_TOTAL][DMU_OT_TOTAL]; if (tzb->zb_asize == alloc + logalloc) { - (void) printf("\n\tNo leaks (block sum matches space" - " maps exactly)\n"); + if (!dump_opt['L']) + (void) printf("\n\tNo leaks (block sum matches space" + " maps exactly)\n"); } else { (void) printf("block traversal size %llu != alloc %llu " - "(leaked %lld)\n", + "(%s %lld)\n", (u_longlong_t)tzb->zb_asize, (u_longlong_t)alloc + logalloc, - (u_longlong_t)(alloc + logalloc - tzb->zb_asize)); + (dump_opt['L']) ? "unreachable" : "leaked", + (longlong_t)(alloc + logalloc - tzb->zb_asize)); leaks = 1; } @@ -1760,14 +1838,17 @@ dump_zpool(spa_t *spa) if (dump_opt['u']) dump_uberblock(&spa->spa_uberblock); - if (dump_opt['d'] || dump_opt['i']) { + if (dump_opt['d'] || dump_opt['i'] || dump_opt['m']) { dump_dir(dp->dp_meta_objset); if (dump_opt['d'] >= 3) { dump_bplist(dp->dp_meta_objset, spa->spa_sync_bplist_obj, "Deferred frees"); dump_dtl(spa->spa_root_vdev, 0); - dump_metaslabs(spa); } + + if (dump_opt['d'] >= 3 || dump_opt['m']) + dump_metaslabs(spa); + (void) dmu_objset_find(spa_name(spa), dump_one_dir, NULL, DS_FIND_SNAPSHOTS | DS_FIND_CHILDREN); } @@ -2243,13 +2324,14 @@ main(int argc, char **argv) dprintf_setup(&argc, argv); - while ((c = getopt(argc, argv, "udibcsvCS:U:lRep:")) != -1) { + while ((c = getopt(argc, argv, "udibcmsvCLS:U:lRep:t:")) != -1) { switch (c) { case 'u': case 'd': case 'i': case 'b': case 'c': + case 'm': case 's': case 'C': case 'l': @@ -2257,6 +2339,9 @@ main(int argc, char **argv) dump_opt[c]++; dump_all = 0; break; + case 'L': + dump_opt[c]++; + break; case 'v': verbose++; break; @@ -2287,6 +2372,14 @@ main(int argc, char **argv) else usage(); break; + case 't': + ub_max_txg = strtoull(optarg, NULL, 0); + if (ub_max_txg < TXG_INITIAL) { + (void) fprintf(stderr, "incorrect txg " + "specified: %s\n", optarg); + usage(); + } + break; default: usage(); break; @@ -2374,7 +2467,7 @@ main(int argc, char **argv) } if (error == 0) - error = spa_import_faulted(argv[0], + error = spa_import_verbatim(argv[0], exported_conf, nvl); nvlist_free(nvl); Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Mon Jul 12 23:01:21 2010 (r209961) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c Mon Jul 12 23:49:04 2010 (r209962) @@ -115,7 +115,7 @@ zil_prt_rec_write(zilog_t *zilog, int tx (u_longlong_t)lr->lr_foid, (longlong_t)lr->lr_offset, (u_longlong_t)lr->lr_length, (u_longlong_t)lr->lr_blkoff); - if (verbose < 5) + if (txtype == TX_WRITE2 || verbose < 5) return; if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) { @@ -123,18 +123,19 @@ zil_prt_rec_write(zilog_t *zilog, int tx bp->blk_birth >= spa_first_txg(zilog->zl_spa) ? "will claim" : "won't claim"); print_log_bp(bp, "\t\t\t"); + if (BP_IS_HOLE(bp)) { + (void) printf("\t\t\tLSIZE 0x%llx\n", + (u_longlong_t)BP_GET_LSIZE(bp)); + } if (bp->blk_birth == 0) { bzero(buf, sizeof (buf)); } else { zbookmark_t zb; - ASSERT3U(bp->blk_cksum.zc_word[ZIL_ZC_OBJSET], ==, - dmu_objset_id(zilog->zl_os)); - - zb.zb_objset = bp->blk_cksum.zc_word[ZIL_ZC_OBJSET]; - zb.zb_object = 0; - zb.zb_level = -1; - zb.zb_blkid = bp->blk_cksum.zc_word[ZIL_ZC_SEQ]; + zb.zb_objset = dmu_objset_id(zilog->zl_os); + zb.zb_object = lr->lr_foid; + zb.zb_level = 0; + zb.zb_blkid = -1; /* unknown */ error = zio_wait(zio_read(NULL, zilog->zl_spa, bp, buf, BP_GET_LSIZE(bp), NULL, NULL, @@ -251,6 +252,7 @@ static zil_rec_info_t zil_rec_info[TX_MA { zil_prt_rec_create, "TX_MKDIR_ACL " }, { zil_prt_rec_create, "TX_MKDIR_ATTR " }, { zil_prt_rec_create, "TX_MKDIR_ACL_ATTR " }, + { zil_prt_rec_write, "TX_WRITE2 " }, }; /* ARGSUSED */ Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Jul 12 23:01:21 2010 (r209961) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Jul 12 23:49:04 2010 (r209962) @@ -1,9 +1,12 @@ '\" te .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. -.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. -.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH zfs 1M "14 Feb 2009" "SunOS 5.11" "System Administration Commands" +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. +.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with +.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. +.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with +.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH zfs 1M "5 May 2009" "SunOS 5.11" "System Administration Commands" .SH NAME zfs \- configures ZFS file systems .SH SYNOPSIS @@ -66,7 +69,7 @@ zfs \- configures ZFS file systems .LP .nf -\fBzfs\fR \fBlist\fR [\fB-rH\fR] [\fB-o\fR \fIproperty\fR[,...]] [\fB-t\fR \fItype\fR[,...]] +\fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-H\fR][\fB-o\fR \fIproperty\fR[,...]] [\fB-t\fR \fItype\fR[,...]] [\fB-s\fR \fIproperty\fR] ... [\fB-S\fR \fIproperty\fR] ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR] ... .fi @@ -77,8 +80,8 @@ zfs \- configures ZFS file systems .LP .nf -\fBzfs\fR \fBget\fR [\fB-rHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-s\fR \fIsource\fR[,...]] "\fIall\fR" | \fIproperty\fR[,...] - \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ... +\fBzfs\fR \fBget\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-Hp\fR][\fB-o\fR \fIfield\fR[,...]] [\fB-s\fR \fIsource\fR[,...]] + "\fIall\fR" | \fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ... .fi .LP @@ -98,6 +101,18 @@ zfs \- configures ZFS file systems .LP .nf +\fBzfs\fR \fBuserspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ... + [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR|\fIsnapshot\fR +.fi + +.LP +.nf +\fBzfs\fR \fBgroupspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ... + [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR|\fIsnapshot\fR +.fi + +.LP +.nf \fBzfs\fR \fBmount\fR .fi *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 01:24:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FBA71065674; Tue, 13 Jul 2010 01:24:03 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F2F848FC1B; Tue, 13 Jul 2010 01:24:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D1O2s9073960; Tue, 13 Jul 2010 01:24:02 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D1O2KX073958; Tue, 13 Jul 2010 01:24:02 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007130124.o6D1O2KX073958@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 01:24:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209963 - head/sys/sun4v/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 01:24:03 -0000 Author: nwhitehorn Date: Tue Jul 13 01:24:02 2010 New Revision: 209963 URL: http://svn.freebsd.org/changeset/base/209963 Log: Add a missing architecture declaration to the machine specification for sun4v. Modified: head/sys/sun4v/conf/DEFAULTS Modified: head/sys/sun4v/conf/DEFAULTS ============================================================================== --- head/sys/sun4v/conf/DEFAULTS Mon Jul 12 23:49:04 2010 (r209962) +++ head/sys/sun4v/conf/DEFAULTS Tue Jul 13 01:24:02 2010 (r209963) @@ -3,7 +3,7 @@ # # $FreeBSD$ -machine sun4v +machine sun4v sparc64 # Pseudo devices. device mem # Memory and kernel memory devices From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 01:55:04 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E95F1106566B; Tue, 13 Jul 2010 01:55:03 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id 8F1178FC16; Tue, 13 Jul 2010 01:55:03 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 98357A5C894; Tue, 13 Jul 2010 09:55:02 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id pumrU-lgYZYK; Tue, 13 Jul 2010 09:54:56 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id A35F3A5C544; Tue, 13 Jul 2010 09:54:54 +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:openpgp:content-type:content-transfer-encoding; b=bcDwslpTWFOqnTqmDAWuo3I30sj7DIbmups9V3FiH03baJIRC4GuhYpOF+ulU5yUe q/d48XOvnuysvRDKgfnPA== Message-ID: <4C3BC76B.3090108@delphij.net> Date: Mon, 12 Jul 2010 18:54:51 -0700 From: Xin LI Organization: The Geek China Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.10) Gecko/20100629 Thunderbird/3.0.5 ThunderBrowse/3.3 MIME-Version: 1.0 To: Jung-uk Kim References: <201007122108.o6CL8Z3l017785@svn.freebsd.org> In-Reply-To: <201007122108.o6CL8Z3l017785@svn.freebsd.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r209957 - in head/sys: amd64/acpica conf modules/acpi/acpi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 01:55:04 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2010/07/12 14:08, Jung-uk Kim wrote: > Author: jkim > Date: Mon Jul 12 21:08:35 2010 > New Revision: 209957 > URL: http://svn.freebsd.org/changeset/base/209957 > > Log: > Move i386-inherited logic of building ACPI headers for acpi_wakeup.c into > better places and remove intermediate makefile and shell scripts. This > makes parallel kernel build little bit safer for amd64. Oh nice, this have fixed my parallel build issue, thanks! Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iQEcBAEBCAAGBQJMO8drAAoJEATO+BI/yjfBlTYIAL86ZEIFaJ5v44fQ8nLxYvM2 H6uxQgwXTILxZhTnfli/Iv9qWE5l+XcW0oElP/FpsftYnrYKJJ4NeOeHMuNdxMd8 LGK5SOlypOAmvCYHF1OswLjCmBBeTCc1jfrgiv98XtMQ/+eJXXW+gclmeAQgqhSn +BDSgd4t81rMJRV6avtC4Hz/ZASeBZjUU5dpgmOuzdMsv9c9xWI/fUCnmQv7z22M 8OEH0PJ2Z4Rpa+iEaNRY4rYR2V+qKyVooDvVFRcvorHhxx53tuaze1SLTVDgp8db vvPCy7cyJ2r7Ko/Ovyi/gSazS9FwD3IQM10mFFHeVGyjbVVsz4HfQPCSnbEZdW0= =+06z -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 02:45:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B91AE106566C; Tue, 13 Jul 2010 02:45:19 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A590D8FC1B; Tue, 13 Jul 2010 02:45:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D2jJuB091949; Tue, 13 Jul 2010 02:45:19 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D2jJ8g091947; Tue, 13 Jul 2010 02:45:19 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201007130245.o6D2jJ8g091947@svn.freebsd.org> From: Colin Percival Date: Tue, 13 Jul 2010 02:45:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209964 - head/sys/kern releng/7.1 releng/7.1/sys/conf releng/7.1/sys/kern releng/7.3 releng/7.3/sys/conf releng/7.3/sys/kern releng/8.0 releng/8.0/sys/conf releng/8.0/sys/kern releng/8... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 02:45:19 -0000 Author: cperciva Date: Tue Jul 13 02:45:17 2010 New Revision: 209964 URL: http://svn.freebsd.org/changeset/base/209964 Log: Correctly copy the M_RDONLY flag when duplicating a reference to an mbuf external buffer. Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-10:07.mbuf Modified: head/sys/kern/uipc_mbuf.c Changes in other areas also in this revision: Modified: releng/7.1/UPDATING releng/7.1/sys/conf/newvers.sh releng/7.1/sys/kern/uipc_mbuf.c releng/7.3/UPDATING releng/7.3/sys/conf/newvers.sh releng/7.3/sys/kern/uipc_mbuf.c releng/8.0/UPDATING releng/8.0/sys/conf/newvers.sh releng/8.0/sys/kern/uipc_mbuf.c releng/8.1/UPDATING releng/8.1/sys/kern/uipc_mbuf.c stable/7/sys/kern/uipc_mbuf.c stable/8/sys/kern/uipc_mbuf.c Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Tue Jul 13 01:24:02 2010 (r209963) +++ head/sys/kern/uipc_mbuf.c Tue Jul 13 02:45:17 2010 (r209964) @@ -302,6 +302,7 @@ mb_dupcl(struct mbuf *n, struct mbuf *m) n->m_ext.ref_cnt = m->m_ext.ref_cnt; n->m_ext.ext_type = m->m_ext.ext_type; n->m_flags |= M_EXT; + n->m_flags |= m->m_flags & M_RDONLY; } /* From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 02:45:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E93D1065674; Tue, 13 Jul 2010 02:45:45 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E0778FC1B; Tue, 13 Jul 2010 02:45:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D2jitj092103; Tue, 13 Jul 2010 02:45:44 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D2ji8Q092101; Tue, 13 Jul 2010 02:45:44 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007130245.o6D2ji8Q092101@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 13 Jul 2010 02:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209965 - head/sys/dev/acpica/Osd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 02:45:45 -0000 Author: jkim Date: Tue Jul 13 02:45:44 2010 New Revision: 209965 URL: http://svn.freebsd.org/changeset/base/209965 Log: According to ACPICA User Guide and Programmer Reference, the read data must be zero extended to fill the 32-bit return value even if the bit width of the port is less than 32. Modified: head/sys/dev/acpica/Osd/OsdHardware.c Modified: head/sys/dev/acpica/Osd/OsdHardware.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdHardware.c Tue Jul 13 02:45:17 2010 (r209964) +++ head/sys/dev/acpica/Osd/OsdHardware.c Tue Jul 13 02:45:44 2010 (r209965) @@ -71,16 +71,13 @@ AcpiOsReadPort(ACPI_IO_ADDRESS InPort, U switch (Width) { case 8: - *(u_int8_t *)Value = bus_space_read_1(ACPI_BUS_SPACE_IO, - ACPI_BUS_HANDLE, InPort); + *Value = bus_space_read_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); break; case 16: - *(u_int16_t *)Value = bus_space_read_2(ACPI_BUS_SPACE_IO, - ACPI_BUS_HANDLE, InPort); + *Value = bus_space_read_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); break; case 32: - *(u_int32_t *)Value = bus_space_read_4(ACPI_BUS_SPACE_IO, - ACPI_BUS_HANDLE, InPort); + *Value = bus_space_read_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); break; default: /* debug trap goes here */ From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 02:48:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EE12106566B; Tue, 13 Jul 2010 02:48:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5516B8FC17; Tue, 13 Jul 2010 02:48:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D2mg9A092757; Tue, 13 Jul 2010 02:48:42 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D2mgK7092755; Tue, 13 Jul 2010 02:48:42 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007130248.o6D2mgK7092755@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 13 Jul 2010 02:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209966 - head/sys/dev/acpica/Osd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 02:48:42 -0000 Author: jkim Date: Tue Jul 13 02:48:42 2010 New Revision: 209966 URL: http://svn.freebsd.org/changeset/base/209966 Log: Fix white spaces. Modified: head/sys/dev/acpica/Osd/OsdHardware.c Modified: head/sys/dev/acpica/Osd/OsdHardware.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdHardware.c Tue Jul 13 02:45:44 2010 (r209965) +++ head/sys/dev/acpica/Osd/OsdHardware.c Tue Jul 13 02:48:42 2010 (r209966) @@ -53,16 +53,16 @@ __FBSDID("$FreeBSD$"); */ #ifdef __i386__ -#define ACPI_BUS_SPACE_IO I386_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 +#define ACPI_BUS_SPACE_IO I386_BUS_SPACE_IO +#define ACPI_BUS_HANDLE 0 #endif #ifdef __ia64__ -#define ACPI_BUS_SPACE_IO IA64_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 +#define ACPI_BUS_SPACE_IO IA64_BUS_SPACE_IO +#define ACPI_BUS_HANDLE 0 #endif #ifdef __amd64__ -#define ACPI_BUS_SPACE_IO AMD64_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 +#define ACPI_BUS_SPACE_IO AMD64_BUS_SPACE_IO +#define ACPI_BUS_HANDLE 0 #endif ACPI_STATUS @@ -72,15 +72,15 @@ AcpiOsReadPort(ACPI_IO_ADDRESS InPort, U switch (Width) { case 8: *Value = bus_space_read_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); - break; + break; case 16: *Value = bus_space_read_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); - break; + break; case 32: *Value = bus_space_read_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); - break; + break; default: - /* debug trap goes here */ + /* debug trap goes here */ break; } @@ -93,16 +93,16 @@ AcpiOsWritePort(ACPI_IO_ADDRESS OutPort, switch (Width) { case 8: - bus_space_write_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); - break; + bus_space_write_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); + break; case 16: - bus_space_write_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); - break; + bus_space_write_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); + break; case 32: - bus_space_write_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); - break; + bus_space_write_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); + break; default: - /* debug trap goes here */ + /* debug trap goes here */ break; } @@ -117,7 +117,7 @@ AcpiOsReadPciConfiguration(ACPI_PCI_ID * u_int32_t val; if (!pci_cfgregopen()) - return (AE_NOT_EXIST); + return (AE_NOT_EXIST); val = pci_cfgregread(PciId->Bus, PciId->Device, PciId->Function, Register, byte_width); From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 03:49:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AF5F1065675; Tue, 13 Jul 2010 03:49:31 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A0C08FC18; Tue, 13 Jul 2010 03:49:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D3nVnQ006508; Tue, 13 Jul 2010 03:49:31 GMT (envelope-from takawata@svn.freebsd.org) Received: (from takawata@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D3nU6J006505; Tue, 13 Jul 2010 03:49:30 GMT (envelope-from takawata@svn.freebsd.org) Message-Id: <201007130349.o6D3nU6J006505@svn.freebsd.org> From: Takanori Watanabe Date: Tue, 13 Jul 2010 03:49:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209967 - in head/sys/dev/usb: . serial X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 03:49:31 -0000 Author: takawata Date: Tue Jul 13 03:49:30 2010 New Revision: 209967 URL: http://svn.freebsd.org/changeset/base/209967 Log: One more Prolific serial device ID. Submitted by: Kouichi Hirabayashi on FreeBSD-users-jp MFC after: 1 week. Modified: head/sys/dev/usb/serial/uplcom.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/uplcom.c ============================================================================== --- head/sys/dev/usb/serial/uplcom.c Tue Jul 13 02:48:42 2010 (r209966) +++ head/sys/dev/usb/serial/uplcom.c Tue Jul 13 03:49:30 2010 (r209967) @@ -256,6 +256,8 @@ static const struct usb_device_id uplcom UPLCOM_DEV(PROLIFIC, RSAQ2, 0, 0xFFFF, PL2303), /* I/O DATA USB-RSAQ3 */ UPLCOM_DEV(PROLIFIC, RSAQ3, 0, 0xFFFF, PL2303X), + /* I/O DATA USB-RSAQ3 */ + UPLCOM_DEV(IODATA, USBRSAQ5, 0, 0xFFFF, PL2303X), /* PLANEX USB-RS232 URS-03 */ UPLCOM_DEV(ATEN, UC232A, 0, 0xFFFF, PL2303), /* TrendNet TU-S9 */ Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jul 13 02:48:42 2010 (r209966) +++ head/sys/dev/usb/usbdevs Tue Jul 13 03:49:30 2010 (r209967) @@ -1807,6 +1807,7 @@ product IODATA RT3072_2 0x0945 RT3072 product IODATA RT3072_3 0x0947 RT3072 product IODATA RT3072_4 0x0948 RT3072 product IODATA USBRSAQ 0x0a03 Serial USB-RSAQ1 +product IODATA USBRSAQ5 0x0a0e Serial USB-RSAQ5 product IODATA2 USB2SC 0x0a09 USB2.0-SCSI Bridge USB2-SC /* Iomega products */ From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 03:56:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 006C1106566B; Tue, 13 Jul 2010 03:56:30 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3FC78FC1F; Tue, 13 Jul 2010 03:56:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D3uTRF008121; Tue, 13 Jul 2010 03:56:29 GMT (envelope-from takawata@svn.freebsd.org) Received: (from takawata@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D3uTSY008119; Tue, 13 Jul 2010 03:56:29 GMT (envelope-from takawata@svn.freebsd.org) Message-Id: <201007130356.o6D3uTSY008119@svn.freebsd.org> From: Takanori Watanabe Date: Tue, 13 Jul 2010 03:56:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209968 - head/sys/dev/usb/serial X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 03:56:30 -0000 Author: takawata Date: Tue Jul 13 03:56:29 2010 New Revision: 209968 URL: http://svn.freebsd.org/changeset/base/209968 Log: Fix comment. Pointed out by: hrs Modified: head/sys/dev/usb/serial/uplcom.c Modified: head/sys/dev/usb/serial/uplcom.c ============================================================================== --- head/sys/dev/usb/serial/uplcom.c Tue Jul 13 03:49:30 2010 (r209967) +++ head/sys/dev/usb/serial/uplcom.c Tue Jul 13 03:56:29 2010 (r209968) @@ -256,7 +256,7 @@ static const struct usb_device_id uplcom UPLCOM_DEV(PROLIFIC, RSAQ2, 0, 0xFFFF, PL2303), /* I/O DATA USB-RSAQ3 */ UPLCOM_DEV(PROLIFIC, RSAQ3, 0, 0xFFFF, PL2303X), - /* I/O DATA USB-RSAQ3 */ + /* I/O DATA USB-RSAQ5 */ UPLCOM_DEV(IODATA, USBRSAQ5, 0, 0xFFFF, PL2303X), /* PLANEX USB-RS232 URS-03 */ UPLCOM_DEV(ATEN, UC232A, 0, 0xFFFF, PL2303), From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 04:08:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FFB01065676; Tue, 13 Jul 2010 04:08:08 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EDBF8FC16; Tue, 13 Jul 2010 04:08:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D488Mt010736; Tue, 13 Jul 2010 04:08:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D488rD010731; Tue, 13 Jul 2010 04:08:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007130408.o6D488rD010731@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 04:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209969 - head/usr.sbin/config X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 04:08:08 -0000 Author: nwhitehorn Date: Tue Jul 13 04:08:08 2010 New Revision: 209969 URL: http://svn.freebsd.org/changeset/base/209969 Log: Enhance config to handle MACHINEs with multiple architectures: - Passing -m to config will now print the MACHINE and MACHINE_ARCH given in the passed kernel configuration file and then exit. - If an option is defined in options.MACHINE with the same name as the architecture of the kernel being configured, that option will be considered set. This allows conditional compilation based on CPU architecture. Config version is now 600010. Reviewed by: imp Modified: head/usr.sbin/config/config.8 head/usr.sbin/config/configvers.h head/usr.sbin/config/main.c head/usr.sbin/config/mkoptions.c Modified: head/usr.sbin/config/config.8 ============================================================================== --- head/usr.sbin/config/config.8 Tue Jul 13 03:56:29 2010 (r209968) +++ head/usr.sbin/config/config.8 Tue Jul 13 04:08:08 2010 (r209969) @@ -78,6 +78,9 @@ Note that does not append .Ar SYSTEM_NAME to the directory given. +.It Fl m +Print the MACHINE and MACHINE_ARCH values for this +kernel and exit. .It Fl g Configure a system for debugging. .It Fl x Ar kernel Modified: head/usr.sbin/config/configvers.h ============================================================================== --- head/usr.sbin/config/configvers.h Tue Jul 13 03:56:29 2010 (r209968) +++ head/usr.sbin/config/configvers.h Tue Jul 13 04:08:08 2010 (r209969) @@ -49,5 +49,5 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600009 +#define CONFIGVERS 600010 #define MAJOR_VERS(x) ((x) / 100000) Modified: head/usr.sbin/config/main.c ============================================================================== --- head/usr.sbin/config/main.c Tue Jul 13 03:56:29 2010 (r209968) +++ head/usr.sbin/config/main.c Tue Jul 13 04:08:08 2010 (r209969) @@ -110,13 +110,18 @@ main(int argc, char **argv) char *p; char xxx[MAXPATHLEN]; char *kernfile; + int printmachine; + printmachine = 0; kernfile = NULL; - while ((ch = getopt(argc, argv, "Cd:gpVx:")) != -1) + while ((ch = getopt(argc, argv, "Cd:gmpVx:")) != -1) switch (ch) { case 'C': filebased = 1; break; + case 'm': + printmachine = 1; + break; case 'd': if (*destdir == '\0') strlcpy(destdir, optarg, sizeof(destdir)); @@ -171,13 +176,6 @@ main(int argc, char **argv) strlcat(destdir, PREFIX, sizeof(destdir)); } - p = path((char *)NULL); - if (stat(p, &buf)) { - if (mkdir(p, 0777)) - err(2, "%s", p); - } else if (!S_ISDIR(buf.st_mode)) - errx(EXIT_FAILURE, "%s isn't a directory", p); - SLIST_INIT(&cputype); SLIST_INIT(&mkopt); SLIST_INIT(&opt); @@ -207,6 +205,19 @@ main(int argc, char **argv) } checkversion(); + if (printmachine) { + printf("%s\t%s\n",machinename,machinearch); + exit(0); + } + + /* Make compile directory */ + p = path((char *)NULL); + if (stat(p, &buf)) { + if (mkdir(p, 0777)) + err(2, "%s", p); + } else if (!S_ISDIR(buf.st_mode)) + errx(EXIT_FAILURE, "%s isn't a directory", p); + /* * make symbolic links in compilation directory * for "sys" (to make genassym.c work along with #include ) @@ -280,7 +291,7 @@ static void usage(void) { - fprintf(stderr, "usage: config [-CgpV] [-d destdir] sysname\n"); + fprintf(stderr, "usage: config [-CgmpV] [-d destdir] sysname\n"); fprintf(stderr, " config -x kernel\n"); exit(EX_USAGE); } Modified: head/usr.sbin/config/mkoptions.c ============================================================================== --- head/usr.sbin/config/mkoptions.c Tue Jul 13 03:56:29 2010 (r209968) +++ head/usr.sbin/config/mkoptions.c Tue Jul 13 04:08:08 2010 (r209969) @@ -94,6 +94,20 @@ options(void) SLIST_INSERT_HEAD(&opt, op, op_next); read_options(); + + /* Fake the value of MACHINE_ARCH as an option if necessary */ + SLIST_FOREACH(ol, &otab, o_next) { + if (strcasecmp(ol->o_name, machinearch) != 0) + continue; + + op = (struct opt *)calloc(1, sizeof(*op)); + if (op == NULL) + err(EXIT_FAILURE, "calloc"); + op->op_name = ns(ol->o_name); + SLIST_INSERT_HEAD(&opt, op, op_next); + break; + } + SLIST_FOREACH(op, &opt, op_next) { SLIST_FOREACH(ol, &otab, o_next) { if (eq(op->op_name, ol->o_name) && From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 04:11:26 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 636C3106564A; Tue, 13 Jul 2010 04:11:26 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C8BB8FC15; Tue, 13 Jul 2010 04:11:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D4BPUM011519; Tue, 13 Jul 2010 04:11:25 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D4BPuE011517; Tue, 13 Jul 2010 04:11:25 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201007130411.o6D4BPuE011517@svn.freebsd.org> From: Maxim Konovalov Date: Tue, 13 Jul 2010 04:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209970 - head/sbin/kldload X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 04:11:26 -0000 Author: maxim Date: Tue Jul 13 04:11:25 2010 New Revision: 209970 URL: http://svn.freebsd.org/changeset/base/209970 Log: o Add -q flag to the synopsis. PR: docs/148535 Submitted by: Warren Block MFC after: 1 week Modified: head/sbin/kldload/kldload.8 Modified: head/sbin/kldload/kldload.8 ============================================================================== --- head/sbin/kldload/kldload.8 Tue Jul 13 04:08:08 2010 (r209969) +++ head/sbin/kldload/kldload.8 Tue Jul 13 04:11:25 2010 (r209970) @@ -34,6 +34,7 @@ .Sh SYNOPSIS .Nm .Op Fl v +.Op Fl q .Ar .Sh DESCRIPTION The @@ -60,7 +61,7 @@ The utility will warn if a module is requested as a bare filename and is present in the current directory. .Pp -The following option is available: +The following options are available: .Bl -tag -width indent .It Fl v Be more verbose. From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 04:13:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6822C1065674; Tue, 13 Jul 2010 04:13:31 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5671C8FC17; Tue, 13 Jul 2010 04:13:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D4DVgv012013; Tue, 13 Jul 2010 04:13:31 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D4DVHm012011; Tue, 13 Jul 2010 04:13:31 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201007130413.o6D4DVHm012011@svn.freebsd.org> From: Maxim Konovalov Date: Tue, 13 Jul 2010 04:13:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209971 - head/sbin/kldload X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 04:13:31 -0000 Author: maxim Date: Tue Jul 13 04:13:31 2010 New Revision: 209971 URL: http://svn.freebsd.org/changeset/base/209971 Log: o Add -q flag to usage(). MFC after: 1 week Modified: head/sbin/kldload/kldload.c Modified: head/sbin/kldload/kldload.c ============================================================================== --- head/sbin/kldload/kldload.c Tue Jul 13 04:11:25 2010 (r209970) +++ head/sbin/kldload/kldload.c Tue Jul 13 04:13:31 2010 (r209971) @@ -129,7 +129,7 @@ path_check(const char *kldname, int quie static void usage(void) { - fprintf(stderr, "usage: kldload [-v] file ...\n"); + fprintf(stderr, "usage: kldload [-v] [-q] file ...\n"); exit(1); } From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 04:30:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A3481065678; Tue, 13 Jul 2010 04:30:51 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19EE18FC12; Tue, 13 Jul 2010 04:30:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D4UpnM015894; Tue, 13 Jul 2010 04:30:51 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D4UoGv015892; Tue, 13 Jul 2010 04:30:51 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201007130430.o6D4UoGv015892@svn.freebsd.org> From: Maxim Konovalov Date: Tue, 13 Jul 2010 04:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209972 - head/sbin/iscontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 04:30:51 -0000 Author: maxim Date: Tue Jul 13 04:30:50 2010 New Revision: 209972 URL: http://svn.freebsd.org/changeset/base/209972 Log: o Restore missed flag in the synopsis. PR: docs/148534 Submitted by: Warren Block MFC after: 1 week Modified: head/sbin/iscontrol/iscontrol.8 Modified: head/sbin/iscontrol/iscontrol.8 ============================================================================== --- head/sbin/iscontrol/iscontrol.8 Tue Jul 13 04:13:31 2010 (r209971) +++ head/sbin/iscontrol/iscontrol.8 Tue Jul 13 04:30:50 2010 (r209972) @@ -34,7 +34,7 @@ .Nm .Op Fl vd .Oo -.Op Fl Ar file +.Op Fl c Ar file .Op Fl n Ar nickname .Oc .Op Fl t Ar target From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 04:31:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B3E01065676; Tue, 13 Jul 2010 04:31:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B2A08FC16; Tue, 13 Jul 2010 04:31:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D4VK02016034; Tue, 13 Jul 2010 04:31:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D4VKG8016032; Tue, 13 Jul 2010 04:31:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007130431.o6D4VKG8016032@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 04:31:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209973 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 04:31:20 -0000 Author: imp Date: Tue Jul 13 04:31:19 2010 New Revision: 209973 URL: http://svn.freebsd.org/changeset/base/209973 Log: Remove detect-vmware.sh, recently removed. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Jul 13 04:30:50 2010 (r209972) +++ head/ObsoleteFiles.inc Tue Jul 13 04:31:19 2010 (r209973) @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100706: removed pc-sysinstall's detect-vmware.sh +OLD_FILES+=usr/share/pc-sysinstall/backend-query/detect-vmware.sh # 20100701: [powerpc] removed .if ${TARGET_ARCH} == "powerpc" OLD_FILES+=usr/include/machine/intr.h From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 05:32:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 196CC1065670; Tue, 13 Jul 2010 05:32:20 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04D648FC17; Tue, 13 Jul 2010 05:32:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D5WJk8029603; Tue, 13 Jul 2010 05:32:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D5WJ8P029593; Tue, 13 Jul 2010 05:32:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007130532.o6D5WJ8P029593@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 05:32:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209975 - in head: . sys/conf sys/powerpc/aim sys/powerpc/booke sys/powerpc/conf sys/powerpc/cpufreq sys/powerpc/include sys/powerpc/powerpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 05:32:20 -0000 Author: nwhitehorn Date: Tue Jul 13 05:32:19 2010 New Revision: 209975 URL: http://svn.freebsd.org/changeset/base/209975 Log: MFppc64: Kernel sources for 64-bit PowerPC, along with build-system changes to keep 32-bit kernels compiling (build system changes for 64-bit kernels are coming later). Existing 32-bit PowerPC kernel configurations must be updated after this change to specify their architecture. Added: head/sys/powerpc/aim/locore32.S - copied, changed from r209910, head/sys/powerpc/aim/locore.S head/sys/powerpc/aim/locore64.S - copied, changed from r209910, head/sys/powerpc/aim/locore.S head/sys/powerpc/aim/slb.c (contents, props changed) head/sys/powerpc/aim/swtch32.S - copied, changed from r209910, head/sys/powerpc/aim/swtch.S head/sys/powerpc/aim/swtch64.S - copied, changed from r209910, head/sys/powerpc/aim/swtch.S head/sys/powerpc/aim/trap_subr32.S - copied, changed from r209910, head/sys/powerpc/aim/trap_subr.S head/sys/powerpc/aim/trap_subr64.S - copied, changed from r209910, head/sys/powerpc/aim/trap_subr.S head/sys/powerpc/include/slb.h (contents, props changed) head/sys/powerpc/powerpc/elf32_machdep.c - copied, changed from r209910, head/sys/powerpc/powerpc/elf_machdep.c head/sys/powerpc/powerpc/elf64_machdep.c - copied, changed from r209910, head/sys/powerpc/powerpc/elf_machdep.c head/sys/powerpc/powerpc/sigcode32.S - copied, changed from r209910, head/sys/powerpc/powerpc/sigcode.S head/sys/powerpc/powerpc/sigcode64.S - copied, changed from r209910, head/sys/powerpc/powerpc/sigcode.S Deleted: head/sys/powerpc/aim/swtch.S head/sys/powerpc/powerpc/elf_machdep.c head/sys/powerpc/powerpc/sigcode.S Modified: head/UPDATING head/sys/conf/Makefile.powerpc head/sys/conf/files.powerpc head/sys/conf/options.powerpc head/sys/powerpc/aim/copyinout.c head/sys/powerpc/aim/locore.S head/sys/powerpc/aim/machdep.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/aim/mp_cpudep.c head/sys/powerpc/aim/ofw_machdep.c head/sys/powerpc/aim/trap.c head/sys/powerpc/aim/vm_machdep.c head/sys/powerpc/booke/locore.S head/sys/powerpc/booke/machdep.c head/sys/powerpc/booke/swtch.S head/sys/powerpc/booke/vm_machdep.c head/sys/powerpc/conf/DEFAULTS head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/MPC85XX head/sys/powerpc/conf/NOTES head/sys/powerpc/cpufreq/pcr.c head/sys/powerpc/include/_align.h head/sys/powerpc/include/_bus.h head/sys/powerpc/include/_inttypes.h head/sys/powerpc/include/_limits.h head/sys/powerpc/include/_stdint.h head/sys/powerpc/include/_types.h head/sys/powerpc/include/asm.h head/sys/powerpc/include/atomic.h head/sys/powerpc/include/bus.h head/sys/powerpc/include/cpufunc.h head/sys/powerpc/include/db_machdep.h head/sys/powerpc/include/frame.h head/sys/powerpc/include/hid.h head/sys/powerpc/include/md_var.h head/sys/powerpc/include/param.h head/sys/powerpc/include/pcb.h head/sys/powerpc/include/pcpu.h head/sys/powerpc/include/pmap.h head/sys/powerpc/include/proc.h head/sys/powerpc/include/profile.h head/sys/powerpc/include/psl.h head/sys/powerpc/include/pte.h head/sys/powerpc/include/reg.h head/sys/powerpc/include/runq.h head/sys/powerpc/include/smp.h head/sys/powerpc/include/spr.h head/sys/powerpc/include/sr.h head/sys/powerpc/include/trap_aim.h head/sys/powerpc/include/ucontext.h head/sys/powerpc/include/vmparam.h head/sys/powerpc/powerpc/cpu.c head/sys/powerpc/powerpc/db_interface.c head/sys/powerpc/powerpc/db_trace.c head/sys/powerpc/powerpc/exec_machdep.c head/sys/powerpc/powerpc/genassym.c head/sys/powerpc/powerpc/in_cksum.c head/sys/powerpc/powerpc/mp_machdep.c head/sys/powerpc/powerpc/setjmp.S head/sys/powerpc/powerpc/stack_machdep.c head/sys/powerpc/powerpc/syncicache.c head/sys/powerpc/powerpc/sys_machdep.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Jul 13 05:12:14 2010 (r209974) +++ head/UPDATING Tue Jul 13 05:32:19 2010 (r209975) @@ -24,6 +24,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. 20100713: + Due to the import of powerpc64 support, all existing powerpc kernel + configuration files must be updated with a machine directive like this: + machine powerpc powerpc + + In addition, an updated config(8) is required to build powerpc kernels + after this change. + +20100713: A new version of ZFS (version 15) has been merged to -HEAD. This version uses a python library for the following subcommands: zfs allow, zfs unallow, zfs groupspace, zfs userspace. Modified: head/sys/conf/Makefile.powerpc ============================================================================== --- head/sys/conf/Makefile.powerpc Tue Jul 13 05:12:14 2010 (r209974) +++ head/sys/conf/Makefile.powerpc Tue Jul 13 05:32:19 2010 (r209975) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600004 +%VERSREQ= 600010 STD8X16FONT?= iso @@ -28,6 +28,9 @@ S= ./@ S= ../../.. .endif .endif + +LDSCRIPT_NAME?= ldscript.${MACHINE_ARCH} + .include "$S/conf/kern.pre.mk" INCLUDES+= -I$S/contrib/libfdt Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Tue Jul 13 05:12:14 2010 (r209974) +++ head/sys/conf/files.powerpc Tue Jul 13 05:32:19 2010 (r209975) @@ -36,7 +36,7 @@ dev/ofw/ofw_console.c optional aim dev/ofw/ofw_disk.c optional ofwd aim dev/ofw/ofw_fdt.c optional fdt dev/ofw/ofw_iicbus.c optional iicbus aim -dev/ofw/ofw_standard.c optional aim +dev/ofw/ofw_standard.c optional aim powerpc dev/powermac_nvram/powermac_nvram.c optional powermac_nvram powermac dev/quicc/quicc_bfe_fdt.c optional quicc mpc85xx dev/scc/scc_bfe_macio.c optional scc powermac @@ -53,37 +53,39 @@ dev/tsec/if_tsec.c optional tsec dev/tsec/if_tsec_fdt.c optional tsec fdt dev/uart/uart_cpu_powerpc.c optional uart aim kern/syscalls.c optional ktr -libkern/ashldi3.c standard -libkern/ashrdi3.c standard +libkern/ashldi3.c optional powerpc +libkern/ashrdi3.c optional powerpc libkern/bcmp.c standard -libkern/cmpdi2.c standard -libkern/divdi3.c standard +libkern/cmpdi2.c optional powerpc +libkern/divdi3.c optional powerpc libkern/ffs.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard -libkern/lshrdi3.c standard +libkern/lshrdi3.c optional powerpc libkern/memchr.c optional fdt libkern/memmove.c standard libkern/memset.c standard -libkern/moddi3.c standard -libkern/qdivrem.c standard -libkern/ucmpdi2.c standard -libkern/udivdi3.c standard -libkern/umoddi3.c standard +libkern/moddi3.c optional powerpc +libkern/qdivrem.c optional powerpc +libkern/ucmpdi2.c optional powerpc +libkern/udivdi3.c optional powerpc +libkern/umoddi3.c optional powerpc powerpc/aim/clock.c optional aim powerpc/aim/copyinout.c optional aim powerpc/aim/interrupt.c optional aim powerpc/aim/locore.S optional aim no-obj powerpc/aim/machdep.c optional aim -powerpc/aim/mmu_oea.c optional aim +powerpc/aim/mmu_oea.c optional aim powerpc powerpc/aim/mmu_oea64.c optional aim powerpc/aim/mp_cpudep.c optional aim smp powerpc/aim/nexus.c optional aim powerpc/aim/ofw_machdep.c optional aim powerpc/aim/ofwmagic.S optional aim powerpc/aim/platform_chrp.c optional aim -powerpc/aim/swtch.S optional aim +powerpc/aim/slb.c optional aim powerpc64 +powerpc/aim/swtch32.S optional aim powerpc +powerpc/aim/swtch64.S optional aim powerpc64 powerpc/aim/trap.c optional aim powerpc/aim/uma_machdep.c optional aim powerpc/aim/vm_machdep.c optional aim @@ -156,7 +158,8 @@ powerpc/powerpc/db_hwwatch.c optional dd powerpc/powerpc/db_interface.c optional ddb powerpc/powerpc/db_trace.c optional ddb powerpc/powerpc/dump_machdep.c standard -powerpc/powerpc/elf_machdep.c standard +powerpc/powerpc/elf32_machdep.c optional powerpc | compat_freebsd32 +powerpc/powerpc/elf64_machdep.c optional powerpc64 powerpc/powerpc/exec_machdep.c standard powerpc/powerpc/fpu.c optional aim powerpc/powerpc/fuswintr.c standard @@ -173,7 +176,8 @@ powerpc/powerpc/platform.c standard powerpc/powerpc/platform_if.m standard powerpc/powerpc/sc_machdep.c optional sc powerpc/powerpc/setjmp.S standard -powerpc/powerpc/sigcode.S standard +powerpc/powerpc/sigcode32.S optional powerpc | compat_freebsd32 +powerpc/powerpc/sigcode64.S optional powerpc64 powerpc/powerpc/stack_machdep.c optional ddb | stack powerpc/powerpc/suswintr.c standard powerpc/powerpc/syncicache.c standard @@ -183,3 +187,10 @@ powerpc/psim/iobus.c optional psim powerpc/psim/ata_iobus.c optional ata psim powerpc/psim/openpic_iobus.c optional psim powerpc/psim/uart_iobus.c optional uart psim + +compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 +compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 +compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 +compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 +kern/imgact_elf32.c optional compat_freebsd32 + Modified: head/sys/conf/options.powerpc ============================================================================== --- head/sys/conf/options.powerpc Tue Jul 13 05:12:14 2010 (r209974) +++ head/sys/conf/options.powerpc Tue Jul 13 05:32:19 2010 (r209975) @@ -4,8 +4,13 @@ AIM opt_global.h E500 opt_global.h +POWERPC +POWERPC64 + FPU_EMU +COMPAT_FREEBSD32 opt_compat.h + GFB_DEBUG opt_gfb.h GFB_NO_FONT_LOADING opt_gfb.h GFB_NO_MODE_CHANGE opt_gfb.h Modified: head/sys/powerpc/aim/copyinout.c ============================================================================== --- head/sys/powerpc/aim/copyinout.c Tue Jul 13 05:12:14 2010 (r209974) +++ head/sys/powerpc/aim/copyinout.c Tue Jul 13 05:32:19 2010 (r209975) @@ -57,6 +57,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include @@ -66,20 +68,45 @@ __FBSDID("$FreeBSD$"); #include #include +#include int setfault(faultbuf); /* defined in locore.S */ /* * Makes sure that the right segment of userspace is mapped in. */ + +#ifdef __powerpc64__ +static __inline void +set_user_sr(pmap_t pm, const void *addr) +{ + register_t esid, vsid, slb1, slb2; + + esid = USER_ADDR >> ADDR_SR_SHFT; + PMAP_LOCK(pm); + vsid = va_to_vsid(pm, (vm_offset_t)addr); + PMAP_UNLOCK(pm); + + slb1 = vsid << SLBV_VSID_SHIFT; + slb2 = (esid << SLBE_ESID_SHIFT) | SLBE_VALID | USER_SR; + + __asm __volatile ("slbie %0; slbmte %1, %2" :: "r"(esid << 28), + "r"(slb1), "r"(slb2)); + isync(); +} +#else static __inline void -set_user_sr(register_t vsid) +set_user_sr(pmap_t pm, const void *addr) { + register_t vsid; + + vsid = va_to_vsid(pm, (vm_offset_t)addr); isync(); __asm __volatile ("mtsr %0,%1" :: "n"(USER_SR), "r"(vsid)); isync(); } +#endif int copyout(const void *kaddr, void *udaddr, size_t len) @@ -103,13 +130,13 @@ copyout(const void *kaddr, void *udaddr, up = udaddr; while (len > 0) { - p = (char *)USER_ADDR + ((u_int)up & ~SEGMENT_MASK); + p = (char *)USER_ADDR + ((uintptr_t)up & ~SEGMENT_MASK); l = ((char *)USER_ADDR + SEGMENT_LENGTH) - p; if (l > len) l = len; - set_user_sr(pm->pm_sr[(u_int)up >> ADDR_SR_SHFT]); + set_user_sr(pm,up); bcopy(kp, p, l); @@ -144,13 +171,13 @@ copyin(const void *udaddr, void *kaddr, up = udaddr; while (len > 0) { - p = (char *)USER_ADDR + ((u_int)up & ~SEGMENT_MASK); + p = (char *)USER_ADDR + ((uintptr_t)up & ~SEGMENT_MASK); l = ((char *)USER_ADDR + SEGMENT_LENGTH) - p; if (l > len) l = len; - set_user_sr(pm->pm_sr[(u_int)up >> ADDR_SR_SHFT]); + set_user_sr(pm,up); bcopy(p, kp, l); @@ -218,14 +245,14 @@ subyte(void *addr, int byte) td = PCPU_GET(curthread); pm = &td->td_proc->p_vmspace->vm_pmap; - p = (char *)((u_int)USER_ADDR + ((u_int)addr & ~SEGMENT_MASK)); + p = (char *)(USER_ADDR + ((uintptr_t)addr & ~SEGMENT_MASK)); if (setfault(env)) { td->td_pcb->pcb_onfault = NULL; return (-1); } - set_user_sr(pm->pm_sr[(u_int)addr >> ADDR_SR_SHFT]); + set_user_sr(pm,addr); *p = (char)byte; @@ -233,6 +260,33 @@ subyte(void *addr, int byte) return (0); } +#ifdef __powerpc64__ +int +suword32(void *addr, int word) +{ + struct thread *td; + pmap_t pm; + faultbuf env; + int *p; + + td = PCPU_GET(curthread); + pm = &td->td_proc->p_vmspace->vm_pmap; + p = (int *)(USER_ADDR + ((uintptr_t)addr & ~SEGMENT_MASK)); + + if (setfault(env)) { + td->td_pcb->pcb_onfault = NULL; + return (-1); + } + + set_user_sr(pm,addr); + + *p = word; + + td->td_pcb->pcb_onfault = NULL; + return (0); +} +#endif + int suword(void *addr, long word) { @@ -243,14 +297,14 @@ suword(void *addr, long word) td = PCPU_GET(curthread); pm = &td->td_proc->p_vmspace->vm_pmap; - p = (long *)((u_int)USER_ADDR + ((u_int)addr & ~SEGMENT_MASK)); + p = (long *)(USER_ADDR + ((uintptr_t)addr & ~SEGMENT_MASK)); if (setfault(env)) { td->td_pcb->pcb_onfault = NULL; return (-1); } - set_user_sr(pm->pm_sr[(u_int)addr >> ADDR_SR_SHFT]); + set_user_sr(pm,addr); *p = word; @@ -258,12 +312,19 @@ suword(void *addr, long word) return (0); } +#ifdef __powerpc64__ +int +suword64(void *addr, int64_t word) +{ + return (suword(addr, (long)word)); +} +#else int suword32(void *addr, int32_t word) { return (suword(addr, (long)word)); } - +#endif int fubyte(const void *addr) @@ -276,20 +337,47 @@ fubyte(const void *addr) td = PCPU_GET(curthread); pm = &td->td_proc->p_vmspace->vm_pmap; - p = (u_char *)((u_int)USER_ADDR + ((u_int)addr & ~SEGMENT_MASK)); + p = (u_char *)(USER_ADDR + ((uintptr_t)addr & ~SEGMENT_MASK)); + + if (setfault(env)) { + td->td_pcb->pcb_onfault = NULL; + return (-1); + } + + set_user_sr(pm,addr); + + val = *p; + + td->td_pcb->pcb_onfault = NULL; + return (val); +} + +#ifdef __powerpc64__ +int32_t +fuword32(const void *addr) +{ + struct thread *td; + pmap_t pm; + faultbuf env; + int32_t *p, val; + + td = PCPU_GET(curthread); + pm = &td->td_proc->p_vmspace->vm_pmap; + p = (int32_t *)(USER_ADDR + ((uintptr_t)addr & ~SEGMENT_MASK)); if (setfault(env)) { td->td_pcb->pcb_onfault = NULL; return (-1); } - set_user_sr(pm->pm_sr[(u_int)addr >> ADDR_SR_SHFT]); + set_user_sr(pm,addr); val = *p; td->td_pcb->pcb_onfault = NULL; return (val); } +#endif long fuword(const void *addr) @@ -301,14 +389,14 @@ fuword(const void *addr) td = PCPU_GET(curthread); pm = &td->td_proc->p_vmspace->vm_pmap; - p = (long *)((u_int)USER_ADDR + ((u_int)addr & ~SEGMENT_MASK)); + p = (long *)(USER_ADDR + ((uintptr_t)addr & ~SEGMENT_MASK)); if (setfault(env)) { td->td_pcb->pcb_onfault = NULL; return (-1); } - set_user_sr(pm->pm_sr[(u_int)addr >> ADDR_SR_SHFT]); + set_user_sr(pm,addr); val = *p; @@ -316,18 +404,59 @@ fuword(const void *addr) return (val); } +#ifndef __powerpc64__ int32_t fuword32(const void *addr) { return ((int32_t)fuword(addr)); } +#endif uint32_t -casuword32(volatile uint32_t *base, uint32_t oldval, uint32_t newval) +casuword32(volatile uint32_t *addr, uint32_t old, uint32_t new) { - return (casuword((volatile u_long *)base, oldval, newval)); + struct thread *td; + pmap_t pm; + faultbuf env; + uint32_t *p, val; + + td = PCPU_GET(curthread); + pm = &td->td_proc->p_vmspace->vm_pmap; + p = (uint32_t *)(USER_ADDR + ((uintptr_t)addr & ~SEGMENT_MASK)); + + set_user_sr(pm,(const void *)(vm_offset_t)addr); + + if (setfault(env)) { + td->td_pcb->pcb_onfault = NULL; + return (-1); + } + + __asm __volatile ( + "1:\tlwarx %0, 0, %2\n\t" /* load old value */ + "cmplw %3, %0\n\t" /* compare */ + "bne 2f\n\t" /* exit if not equal */ + "stwcx. %4, 0, %2\n\t" /* attempt to store */ + "bne- 1b\n\t" /* spin if failed */ + "b 3f\n\t" /* we've succeeded */ + "2:\n\t" + "stwcx. %0, 0, %2\n\t" /* clear reservation (74xx) */ + "3:\n\t" + : "=&r" (val), "=m" (*p) + : "r" (p), "r" (old), "r" (new), "m" (*p) + : "cc", "memory"); + + td->td_pcb->pcb_onfault = NULL; + + return (val); } +#ifndef __powerpc64__ +u_long +casuword(volatile u_long *addr, u_long old, u_long new) +{ + return (casuword32((volatile uint32_t *)addr, old, new)); +} +#else u_long casuword(volatile u_long *addr, u_long old, u_long new) { @@ -338,9 +467,9 @@ casuword(volatile u_long *addr, u_long o td = PCPU_GET(curthread); pm = &td->td_proc->p_vmspace->vm_pmap; - p = (u_long *)((u_int)USER_ADDR + ((u_int)addr & ~SEGMENT_MASK)); + p = (u_long *)(USER_ADDR + ((uintptr_t)addr & ~SEGMENT_MASK)); - set_user_sr(pm->pm_sr[(u_int)addr >> ADDR_SR_SHFT]); + set_user_sr(pm,(const void *)(vm_offset_t)addr); if (setfault(env)) { td->td_pcb->pcb_onfault = NULL; @@ -348,14 +477,14 @@ casuword(volatile u_long *addr, u_long o } __asm __volatile ( - "1:\tlwarx %0, 0, %2\n\t" /* load old value */ - "cmplw %3, %0\n\t" /* compare */ + "1:\tldarx %0, 0, %2\n\t" /* load old value */ + "cmpld %3, %0\n\t" /* compare */ "bne 2f\n\t" /* exit if not equal */ - "stwcx. %4, 0, %2\n\t" /* attempt to store */ + "stdcx. %4, 0, %2\n\t" /* attempt to store */ "bne- 1b\n\t" /* spin if failed */ "b 3f\n\t" /* we've succeeded */ "2:\n\t" - "stwcx. %0, 0, %2\n\t" /* clear reservation (74xx) */ + "stdcx. %0, 0, %2\n\t" /* clear reservation (74xx) */ "3:\n\t" : "=&r" (val), "=m" (*p) : "r" (p), "r" (old), "r" (new), "m" (*p) @@ -365,3 +494,5 @@ casuword(volatile u_long *addr, u_long o return (val); } +#endif + Modified: head/sys/powerpc/aim/locore.S ============================================================================== --- head/sys/powerpc/aim/locore.S Tue Jul 13 05:12:14 2010 (r209974) +++ head/sys/powerpc/aim/locore.S Tue Jul 13 05:32:19 2010 (r209975) @@ -1,209 +1,8 @@ /* $FreeBSD$ */ -/* $NetBSD: locore.S,v 1.24 2000/05/31 05:09:17 thorpej Exp $ */ -/*- - * Copyright (C) 2001 Benno Rice - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY Benno Rice ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -/*- - * Copyright (C) 1995, 1996 Wolfgang Solfrank. - * Copyright (C) 1995, 1996 TooLs GmbH. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by TooLs GmbH. - * 4. The name of TooLs GmbH may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ +#ifdef __powerpc64__ +#include +#else +#include +#endif -#include "assym.s" - -#include - -#include -#include -#include -#include -#include -#include - -/* Locate the per-CPU data structure */ -#define GET_CPUINFO(r) \ - mfsprg0 r - -/* - * Compiled KERNBASE location and the kernel load address - */ - .globl kernbase - .set kernbase, KERNBASE - -#define TMPSTKSZ 8192 /* 8K temporary stack */ - -/* - * Globals - */ - .data - .align 4 -GLOBAL(tmpstk) - .space TMPSTKSZ -GLOBAL(esym) - .long 0 /* end of symbol table */ - -GLOBAL(ofmsr) - .long 0, 0, 0, 0, 0 /* msr/sprg0-3 used in Open Firmware */ - -#define INTRCNT_COUNT 256 /* max(HROWPIC_IRQMAX,OPENPIC_IRQMAX) */ -GLOBAL(intrnames) - .space INTRCNT_COUNT * (MAXCOMLEN + 1) * 2 -GLOBAL(eintrnames) - .align 4 -GLOBAL(intrcnt) - .space INTRCNT_COUNT * 4 * 2 -GLOBAL(eintrcnt) - -/* - * File-scope for locore.S - */ -idle_u: - .long 0 /* fake uarea during idle after exit */ -openfirmware_entry: - .long 0 /* Open Firmware entry point */ -srsave: - .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - - .text - .globl btext -btext: - -/* - * This symbol is here for the benefit of kvm_mkdb, and is supposed to - * mark the start of kernel text. - */ - .globl kernel_text -kernel_text: - -/* - * Startup entry. Note, this must be the first thing in the text - * segment! - */ - .text - .globl __start -__start: - li 8,0 - li 9,0x100 - mtctr 9 -1: - dcbf 0,8 - icbi 0,8 - addi 8,8,0x20 - bdnz 1b - sync - isync - - /* Save the argument pointer and length */ - mr 20,6 - mr 21,7 - - lis 8,openfirmware_entry@ha - stw 5,openfirmware_entry@l(8) /* save client interface handler */ - - lis 1,(tmpstk+TMPSTKSZ-16)@ha - addi 1,1,(tmpstk+TMPSTKSZ-16)@l - - mfmsr 0 - lis 9,ofmsr@ha - stwu 0,ofmsr@l(9) - - mfsprg0 0 /* save SPRG0-3 */ - stw 0,4(9) /* ofmsr[1] = sprg0 */ - mfsprg1 0 - stw 0,8(9) /* ofmsr[2] = sprg1 */ - mfsprg2 0 - stw 0,12(9) /* ofmsr[3] = sprg2 */ - mfsprg3 0 - stw 0,16(9) /* ofmsr[4] = sprg3 */ - - bl OF_initial_setup - - lis 4,end@ha - addi 4,4,end@l - mr 5,4 - - lis 3,kernel_text@ha - addi 3,3,kernel_text@l - - /* Restore the argument pointer and length */ - mr 6,20 - mr 7,21 - - bl powerpc_init - mr %r1, %r3 - li %r3, 0 - stw %r3, 0(%r1) - bl mi_startup - b OF_exit - -/* - * int setfault() - * - * Similar to setjmp to setup for handling faults on accesses to user memory. - * Any routine using this may only call bcopy, either the form below, - * or the (currently used) C code optimized, so it doesn't use any non-volatile - * registers. - */ - .globl setfault -setfault: - mflr 0 - mfcr 12 - mfsprg 4,0 - lwz 4,PC_CURTHREAD(4) - lwz 4,TD_PCB(4) - stw 3,PCB_ONFAULT(4) - stw 0,0(3) - stw 1,4(3) - stw 2,8(3) - stmw 12,12(3) - xor 3,3,3 - blr - -#include Copied and modified: head/sys/powerpc/aim/locore32.S (from r209910, head/sys/powerpc/aim/locore.S) ============================================================================== --- head/sys/powerpc/aim/locore.S Sun Jul 11 21:12:42 2010 (r209910, copy source) +++ head/sys/powerpc/aim/locore32.S Tue Jul 13 05:32:19 2010 (r209975) @@ -62,9 +62,7 @@ #include #include -#include #include -#include #include /* Locate the per-CPU data structure */ @@ -206,4 +204,4 @@ setfault: xor 3,3,3 blr -#include +#include Copied and modified: head/sys/powerpc/aim/locore64.S (from r209910, head/sys/powerpc/aim/locore.S) ============================================================================== --- head/sys/powerpc/aim/locore.S Sun Jul 11 21:12:42 2010 (r209910, copy source) +++ head/sys/powerpc/aim/locore64.S Tue Jul 13 05:32:19 2010 (r209975) @@ -62,9 +62,7 @@ #include #include -#include #include -#include #include /* Locate the per-CPU data structure */ @@ -78,6 +76,7 @@ .set kernbase, KERNBASE #define TMPSTKSZ 8192 /* 8K temporary stack */ +#define OFWSTKSZ 4096 /* 4K Open Firmware stack */ /* * Globals @@ -86,11 +85,13 @@ .align 4 GLOBAL(tmpstk) .space TMPSTKSZ +GLOBAL(ofwstk) + .space OFWSTKSZ GLOBAL(esym) - .long 0 /* end of symbol table */ + .llong 0 /* end of symbol table */ GLOBAL(ofmsr) - .long 0, 0, 0, 0, 0 /* msr/sprg0-3 used in Open Firmware */ + .llong 0, 0, 0, 0, 0 /* msr/sprg0-3 used in Open Firmware */ #define INTRCNT_COUNT 256 /* max(HROWPIC_IRQMAX,OPENPIC_IRQMAX) */ GLOBAL(intrnames) @@ -105,11 +106,11 @@ GLOBAL(eintrcnt) * File-scope for locore.S */ idle_u: - .long 0 /* fake uarea during idle after exit */ + .llong 0 /* fake uarea during idle after exit */ openfirmware_entry: - .long 0 /* Open Firmware entry point */ + .llong 0 /* Open Firmware entry point */ srsave: - .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + .llong 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .text .globl btext @@ -127,8 +128,7 @@ kernel_text: * segment! */ .text - .globl __start -__start: +ASENTRY(__start) li 8,0 li 9,0x100 mtctr 9 @@ -145,43 +145,183 @@ __start: mr 21,7 lis 8,openfirmware_entry@ha - stw 5,openfirmware_entry@l(8) /* save client interface handler */ + std 5,openfirmware_entry@l(8) /* save client interface handler */ - lis 1,(tmpstk+TMPSTKSZ-16)@ha - addi 1,1,(tmpstk+TMPSTKSZ-16)@l + /* Set up the stack pointer */ + lis 1,(tmpstk+TMPSTKSZ-48)@ha + addi 1,1,(tmpstk+TMPSTKSZ-48)@l + + /* Set up the TOC pointer */ + lis 2,tocbase@ha + ld 2,tocbase@l(2) mfmsr 0 lis 9,ofmsr@ha - stwu 0,ofmsr@l(9) + stdu 0,ofmsr@l(9) mfsprg0 0 /* save SPRG0-3 */ - stw 0,4(9) /* ofmsr[1] = sprg0 */ + std 0,8(9) /* ofmsr[1] = sprg0 */ mfsprg1 0 - stw 0,8(9) /* ofmsr[2] = sprg1 */ + std 0,16(9) /* ofmsr[2] = sprg1 */ mfsprg2 0 - stw 0,12(9) /* ofmsr[3] = sprg2 */ + std 0,24(9) /* ofmsr[3] = sprg2 */ mfsprg3 0 - stw 0,16(9) /* ofmsr[4] = sprg3 */ + std 0,32(9) /* ofmsr[4] = sprg3 */ + + /* Switch to 64-bit mode */ + mfmsr 9 + li 8,1 + insrdi 9,8,1,0 + mtmsrd 9 - bl OF_initial_setup + bl .OF_initial_setup + nop lis 4,end@ha addi 4,4,end@l mr 5,4 - lis 3,kernel_text@ha - addi 3,3,kernel_text@l + lis 3,kernbase@ha + addi 3,3,kernbase@l /* Restore the argument pointer and length */ mr 6,20 mr 7,21 - bl powerpc_init + bl .powerpc_init + nop mr %r1, %r3 li %r3, 0 - stw %r3, 0(%r1) - bl mi_startup - b OF_exit + std %r3, 0(%r1) + bl .mi_startup + nop + b .OF_exit + nop + +/* + * PPC64 ABI TOC base + */ + + .align 3 + .globl tocbase +tocbase: + .llong .TOC.@tocbase + +/* + * Open Firmware Real-mode Entry Point. This is a huge pain. + */ + +ASENTRY(ofw_32bit_mode_entry) + mflr %r0 + std %r0,16(%r1) + stdu %r1,-208(%r1) + + /* + * We need to save the following, because OF's register save/ + * restore code assumes that the contents of registers are + * at most 32 bits wide: lr, cr, r2, r13-r31, the old MSR. These + * get placed in that order in the stack. + */ + + mfcr %r4 + std %r4,48(%r1) + std %r13,56(%r1) + std %r14,64(%r1) + std %r15,72(%r1) + std %r16,80(%r1) + std %r17,88(%r1) + std %r18,96(%r1) + std %r19,104(%r1) + std %r20,112(%r1) + std %r21,120(%r1) + std %r22,128(%r1) + std %r23,136(%r1) + std %r24,144(%r1) + std %r25,152(%r1) + std %r26,160(%r1) + std %r27,168(%r1) + std %r28,176(%r1) + std %r29,184(%r1) + std %r30,192(%r1) + std %r31,200(%r1) + + /* Record the old MSR */ + mfmsr %r6 + + /* read client interface handler */ + lis %r4,openfirmware_entry@ha + ld %r4,openfirmware_entry@l(%r4) + + /* + * Set the MSR to the OF value. This has the side effect of disabling + * exceptions, which is important for the next few steps. + */ + + lis %r5,ofmsr@ha + ld %r5,ofmsr@l(%r5) + mtmsrd %r5 + isync + + /* + * Set up OF stack. This needs to be accessible in real mode and + * use the 32-bit ABI stack frame format. The pointer to the current + * kernel stack is placed at the very top of the stack along with + * the old MSR so we can get them back later. + */ + mr %r5,%r1 + lis %r1,(ofwstk+OFWSTKSZ-32)@ha + addi %r1,%r1,(ofwstk+OFWSTKSZ-32)@l + std %r5,8(%r1) /* Save real stack pointer */ + std %r2,16(%r1) /* Save old TOC */ + std %r6,24(%r1) /* Save old MSR */ + li %r5,0 + stw %r5,4(%r1) + stw %r5,0(%r1) + + /* Finally, branch to OF */ + mtctr %r4 + bctrl + + /* Reload stack pointer and MSR from the OFW stack */ + ld %r6,24(%r1) + ld %r2,16(%r1) + ld %r1,8(%r1) + + /* Now set the real MSR */ + mtmsrd %r6 + isync + + /* Sign-extend the return value from OF */ + extsw %r3,%r3 + + /* Restore all the non-volatile registers */ + ld %r5,48(%r1) + mtcr %r5 + ld %r13,56(%r1) + ld %r14,64(%r1) + ld %r15,72(%r1) + ld %r16,80(%r1) + ld %r17,88(%r1) + ld %r18,96(%r1) + ld %r19,104(%r1) + ld %r20,112(%r1) + ld %r21,120(%r1) + ld %r22,128(%r1) + ld %r23,136(%r1) + ld %r24,144(%r1) + ld %r25,152(%r1) + ld %r26,160(%r1) + ld %r27,168(%r1) + ld %r28,176(%r1) + ld %r29,184(%r1) + ld %r30,192(%r1) + ld %r31,200(%r1) + + /* Restore the stack and link register */ + ld %r1,0(%r1) + ld %r0,16(%r1) + mtlr %r0 + blr /* * int setfault() @@ -191,19 +331,39 @@ __start: * or the (currently used) C code optimized, so it doesn't use any non-volatile * registers. */ - .globl setfault -setfault: +ASENTRY(setfault) mflr 0 mfcr 12 mfsprg 4,0 - lwz 4,PC_CURTHREAD(4) - lwz 4,TD_PCB(4) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 05:43:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0B23106564A; Tue, 13 Jul 2010 05:43:43 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFE978FC08; Tue, 13 Jul 2010 05:43:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D5hhAq032127; Tue, 13 Jul 2010 05:43:43 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D5hhqb032125; Tue, 13 Jul 2010 05:43:43 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007130543.o6D5hhqb032125@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 05:43:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209976 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 05:43:43 -0000 Author: nwhitehorn Date: Tue Jul 13 05:43:43 2010 New Revision: 209976 URL: http://svn.freebsd.org/changeset/base/209976 Log: Add powerpc64 kernel ldscript. Added: head/sys/conf/ldscript.powerpc64 - copied, changed from r209910, head/sys/conf/ldscript.powerpc Copied and modified: head/sys/conf/ldscript.powerpc64 (from r209910, head/sys/conf/ldscript.powerpc) ============================================================================== --- head/sys/conf/ldscript.powerpc Sun Jul 11 21:12:42 2010 (r209910, copy source) +++ head/sys/conf/ldscript.powerpc64 Tue Jul 13 05:43:43 2010 (r209976) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ -OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc") +OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", "elf64-powerpc") OUTPUT_ARCH(powerpc) ENTRY(__start) SEARCH_DIR(/usr/lib); From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 06:24:00 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 184BF106564A; Tue, 13 Jul 2010 06:24:00 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 8790C8FC12; Tue, 13 Jul 2010 06:23:59 +0000 (UTC) Received: from c122-106-145-25.carlnfd1.nsw.optusnet.com.au (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6D6NrFd027102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Jul 2010 16:23:55 +1000 Date: Tue, 13 Jul 2010 16:23:53 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Jung-uk Kim In-Reply-To: <201007121532.o6CFWjPS037093@svn.freebsd.org> Message-ID: <20100713162342.M62787@delplex.bde.org> References: <201007121532.o6CFWjPS037093@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r209949 - in head: lib/libstand sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 06:24:00 -0000 On Mon, 12 Jul 2010, Jung-uk Kim wrote: > Log: > Use type-specific inline function imax() instead of deprecated macro MAX(). > > Prodded by: bde Thanks. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 06:42:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AABF1065670; Tue, 13 Jul 2010 06:42:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A0E08FC16; Tue, 13 Jul 2010 06:42:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D6gl0a045178; Tue, 13 Jul 2010 06:42:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D6gltn045176; Tue, 13 Jul 2010 06:42:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007130642.o6D6gltn045176@svn.freebsd.org> From: Alexander Motin Date: Tue, 13 Jul 2010 06:42:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209977 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 06:42:47 -0000 Author: mav Date: Tue Jul 13 06:42:47 2010 New Revision: 209977 URL: http://svn.freebsd.org/changeset/base/209977 Log: Disable multi-sector PIO transfers if ATA_SET_MULTI command failed. Submitted by: Mikolaj Golub on fs@ Modified: head/sys/dev/ata/ata-disk.c Modified: head/sys/dev/ata/ata-disk.c ============================================================================== --- head/sys/dev/ata/ata-disk.c Tue Jul 13 05:43:43 2010 (r209976) +++ head/sys/dev/ata/ata-disk.c Tue Jul 13 06:42:47 2010 (r209977) @@ -406,6 +406,8 @@ ad_init(device_t dev) if (!ata_controlcmd(dev, ATA_SET_MULTI, 0, 0, secsperint)) atadev->max_iosize = secsperint * DEV_BSIZE; + else + atadev->max_iosize = DEV_BSIZE; } else atadev->max_iosize = DEV_BSIZE; From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 06:49:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B72111065676; Tue, 13 Jul 2010 06:49:35 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A68068FC1C; Tue, 13 Jul 2010 06:49:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D6nZwn046717; Tue, 13 Jul 2010 06:49:35 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D6nZ5a046715; Tue, 13 Jul 2010 06:49:35 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007130649.o6D6nZ5a046715@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 13 Jul 2010 06:49:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209978 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 06:49:35 -0000 Author: lstewart Date: Tue Jul 13 06:49:34 2010 New Revision: 209978 URL: http://svn.freebsd.org/changeset/base/209978 Log: - Rename DPCPU_SUM to DPCPU_VARSUM to better reflect the fact it operates on member variables of a DPCPU struct. - Add DPCPU_SUM which sums a DPCPU variable. Sponsored by: FreeBSD Foundation MFC after: 3 days Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Tue Jul 13 06:42:47 2010 (r209977) +++ head/sys/sys/pcpu.h Tue Jul 13 06:49:34 2010 (r209978) @@ -109,7 +109,19 @@ extern uintptr_t dpcpu_off[]; /* * Utility macros. */ -#define DPCPU_SUM(n, var) __extension__ \ +#define DPCPU_SUM(n) __extension__ \ +({ \ + u_int _i; \ + __typeof(DPCPU_PTR(n)) sum; \ + \ + sum = 0; \ + CPU_FOREACH(_i) { \ + sum += DPCPU_ID_PTR(_i, n); \ + } \ + sum; \ +}) + +#define DPCPU_VARSUM(n, var) __extension__ \ ({ \ u_int _i; \ __typeof((DPCPU_PTR(n))->var) sum; \ From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 06:57:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0F0A106566B; Tue, 13 Jul 2010 06:57:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE0038FC13; Tue, 13 Jul 2010 06:57:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D6vRf7048548; Tue, 13 Jul 2010 06:57:27 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D6vR2e048544; Tue, 13 Jul 2010 06:57:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007130657.o6D6vR2e048544@svn.freebsd.org> From: Alexander Motin Date: Tue, 13 Jul 2010 06:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209979 - in head/sys: conf pc98/cbus pc98/conf x86/isa X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 06:57:27 -0000 Author: mav Date: Tue Jul 13 06:57:27 2010 New Revision: 209979 URL: http://svn.freebsd.org/changeset/base/209979 Log: Unify pc98 event timer code with the rest of x86. Reviewed by: nyan@ Deleted: head/sys/pc98/cbus/clock.c Modified: head/sys/conf/files.pc98 head/sys/pc98/conf/GENERIC.hints head/sys/x86/isa/clock.c Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Tue Jul 13 06:49:34 2010 (r209978) +++ head/sys/conf/files.pc98 Tue Jul 13 06:57:27 2010 (r209979) @@ -227,7 +227,6 @@ libkern/udivdi3.c standard libkern/umoddi3.c standard pc98/apm/apm_bioscall.S optional apm pc98/cbus/cbus_dma.c optional isa -pc98/cbus/clock.c standard pc98/cbus/fdc.c optional fdc pc98/cbus/fdc_cbus.c optional fdc isa pc98/cbus/gdc.c optional gdc @@ -253,8 +252,10 @@ pc98/pc98/pc98_machdep.c standard # x86 shared code between IA32, AMD64 and PC98 architectures # x86/isa/atpic.c optional atpic +x86/isa/clock.c standard x86/isa/isa.c optional isa x86/x86/io_apic.c optional apic x86/x86/local_apic.c optional apic x86/x86/mca.c standard x86/x86/msi.c optional apic pci +x86/x86/timeevents.c standard Modified: head/sys/pc98/conf/GENERIC.hints ============================================================================== --- head/sys/pc98/conf/GENERIC.hints Tue Jul 13 06:49:34 2010 (r209978) +++ head/sys/pc98/conf/GENERIC.hints Tue Jul 13 06:57:27 2010 (r209979) @@ -42,6 +42,10 @@ hint.ct.0.at="isa" #hint.ct.0.at="isa" #hint.ct.0.flags="0x50000" +hint.attimer.0.at="isa" +hint.attimer.0.port="0x71" +hint.attimer.0.irq="0" + hint.pcrtc.0.at="isa" hint.pckbd.0.at="isa" Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Tue Jul 13 06:49:34 2010 (r209978) +++ head/sys/x86/isa/clock.c Tue Jul 13 06:57:27 2010 (r209979) @@ -66,9 +66,17 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef PC98 +#include +#else #include +#endif #ifdef DEV_ISA +#ifdef PC98 +#include +#else #include +#endif #include #endif @@ -78,8 +86,12 @@ __FBSDID("$FreeBSD$"); int clkintr_pending; #ifndef TIMER_FREQ +#ifdef PC98 +#define TIMER_FREQ 2457600 +#else #define TIMER_FREQ 1193182 #endif +#endif u_int i8254_freq = TIMER_FREQ; TUNABLE_INT("hw.i8254.freq", &i8254_freq); int i8254_max_count; @@ -97,6 +109,10 @@ struct attimer_softc { int port_rid, intr_rid; struct resource *port_res; struct resource *intr_res; +#ifdef PC98 + int port_rid2; + struct resource *port_res2; +#endif void *intr_handler; struct timecounter tc; struct eventtimer et; @@ -150,7 +166,11 @@ timer_spkr_acquire(void) { int mode; +#ifdef PC98 + mode = TIMER_SEL1 | TIMER_SQWAVE | TIMER_16BIT; +#else mode = TIMER_SEL2 | TIMER_SQWAVE | TIMER_16BIT; +#endif if (timer2_state != RELEASED) return (-1); @@ -163,7 +183,11 @@ timer_spkr_acquire(void) * and this is probably good enough for timer2, so we aren't as * careful with it as with timer0. */ +#ifdef PC98 + outb(TIMER_MODE, TIMER_SEL1 | (mode & 0x3f)); +#else outb(TIMER_MODE, TIMER_SEL2 | (mode & 0x3f)); +#endif ppi_spkr_on(); /* enable counter2 output to speaker */ return (0); } @@ -175,7 +199,11 @@ timer_spkr_release(void) if (timer2_state != ACQUIRED) return (-1); timer2_state = RELEASED; +#ifdef PC98 + outb(TIMER_MODE, TIMER_SEL1 | TIMER_SQWAVE | TIMER_16BIT); +#else outb(TIMER_MODE, TIMER_SEL2 | TIMER_SQWAVE | TIMER_16BIT); +#endif ppi_spkr_off(); /* disable counter2 output to speaker */ return (0); } @@ -186,8 +214,13 @@ timer_spkr_setfreq(int freq) freq = i8254_freq / freq; mtx_lock_spin(&clock_lock); +#ifdef PC98 + outb(TIMER_CNTR1, freq & 0xff); + outb(TIMER_CNTR1, freq >> 8); +#else outb(TIMER_CNTR2, freq & 0xff); outb(TIMER_CNTR2, freq >> 8); +#endif mtx_unlock_spin(&clock_lock); } @@ -293,7 +326,11 @@ DELAY(int n) while (ticks_left > 0) { #ifdef KDB if (kdb_active) { +#ifdef PC98 + outb(0x5f, 0); +#else inb(0x84); +#endif tick = prev_tick - 1; if (tick <= 0) tick = i8254_max_count; @@ -377,7 +414,9 @@ timer_restore(void) { i8254_restore(); /* restore i8254_freq and hz */ +#ifndef PC98 atrtc_restore(); /* reenable RTC interrupts */ +#endif } #endif @@ -387,6 +426,10 @@ i8254_init(void) { mtx_init(&clock_lock, "clk", NULL, MTX_SPIN | MTX_NOPROFILE); +#ifdef PC98 + if (pc98_machine_type & M_8M) + i8254_freq = 1996800L; /* 1.9968 MHz */ +#endif set_i8254_freq(i8254_freq, 0); } @@ -506,6 +549,51 @@ static struct isa_pnp_id attimer_ids[] = { 0 } }; +#ifdef PC98 +static void +pc98_alloc_resource(device_t dev) +{ + static bus_addr_t iat1[] = {0, 2, 4, 6}; + static bus_addr_t iat2[] = {0, 4}; + struct attimer_softc *sc; + + sc = device_get_softc(dev); + + sc->port_rid = 0; + bus_set_resource(dev, SYS_RES_IOPORT, sc->port_rid, IO_TIMER1, 1); + sc->port_res = isa_alloc_resourcev(dev, SYS_RES_IOPORT, + &sc->port_rid, iat1, 4, RF_ACTIVE); + if (sc->port_res == NULL) + device_printf(dev, "Warning: Couldn't map I/O.\n"); + else + isa_load_resourcev(sc->port_res, iat1, 4); + + sc->port_rid2 = 4; + bus_set_resource(dev, SYS_RES_IOPORT, sc->port_rid2, TIMER_CNTR1, 1); + sc->port_res2 = isa_alloc_resourcev(dev, SYS_RES_IOPORT, + &sc->port_rid2, iat2, 2, RF_ACTIVE); + if (sc->port_res2 == NULL) + device_printf(dev, "Warning: Couldn't map I/O.\n"); + else + isa_load_resourcev(sc->port_res2, iat2, 2); +} + +static void +pc98_release_resource(device_t dev) +{ + struct attimer_softc *sc; + + sc = device_get_softc(dev); + + if (sc->port_res) + bus_release_resource(dev, SYS_RES_IOPORT, sc->port_rid, + sc->port_res); + if (sc->port_res2) + bus_release_resource(dev, SYS_RES_IOPORT, sc->port_rid2, + sc->port_res2); +} +#endif + static int attimer_probe(device_t dev) { @@ -515,6 +603,11 @@ attimer_probe(device_t dev) /* ENOENT means no PnP-ID, device is hinted. */ if (result == ENOENT) { device_set_desc(dev, "AT timer"); +#ifdef PC98 + /* To print resources correctly. */ + pc98_alloc_resource(dev); + pc98_release_resource(dev); +#endif return (BUS_PROBE_LOW_PRIORITY); } return (result); @@ -529,9 +622,13 @@ attimer_attach(device_t dev) attimer_sc = sc = device_get_softc(dev); bzero(sc, sizeof(struct attimer_softc)); +#ifdef PC98 + pc98_alloc_resource(dev); +#else if (!(sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->port_rid, IO_TIMER1, IO_TIMER1 + 3, 4, RF_ACTIVE))) device_printf(dev,"Warning: Couldn't map I/O.\n"); +#endif i8254_intsrc = intr_lookup_source(0); if (i8254_intsrc != NULL) i8254_pending = i8254_intsrc->is_pic->pic_source_pending; From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 07:00:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 742AC106566C; Tue, 13 Jul 2010 07:00:57 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 62CA68FC18; Tue, 13 Jul 2010 07:00:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D70vIS049352; Tue, 13 Jul 2010 07:00:57 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D70v87049350; Tue, 13 Jul 2010 07:00:57 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007130700.o6D70v87049350@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 13 Jul 2010 07:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209980 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 07:00:57 -0000 Author: lstewart Date: Tue Jul 13 07:00:57 2010 New Revision: 209980 URL: http://svn.freebsd.org/changeset/base/209980 Log: Catch up with the rename of DPCPU_SUM to DPCPU_VARSUM in r209978. Sponsored by: FreeBSD Foundation Modified: head/sys/netinet/siftr.c Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Tue Jul 13 06:57:27 2010 (r209979) +++ head/sys/netinet/siftr.c Tue Jul 13 07:00:57 2010 (r209980) @@ -1282,16 +1282,16 @@ siftr_manage_ops(uint8_t action) siftr_pkt_manager_thr = NULL; mtx_unlock(&siftr_pkt_mgr_mtx); - totalss.n_in = DPCPU_SUM(ss, n_in); - totalss.n_out = DPCPU_SUM(ss, n_out); - totalss.nskip_in_malloc = DPCPU_SUM(ss, nskip_in_malloc); - totalss.nskip_out_malloc = DPCPU_SUM(ss, nskip_out_malloc); - totalss.nskip_in_mtx = DPCPU_SUM(ss, nskip_in_mtx); - totalss.nskip_out_mtx = DPCPU_SUM(ss, nskip_out_mtx); - totalss.nskip_in_tcpcb = DPCPU_SUM(ss, nskip_in_tcpcb); - totalss.nskip_out_tcpcb = DPCPU_SUM(ss, nskip_out_tcpcb); - totalss.nskip_in_inpcb = DPCPU_SUM(ss, nskip_in_inpcb); - totalss.nskip_out_inpcb = DPCPU_SUM(ss, nskip_out_inpcb); + totalss.n_in = DPCPU_VARSUM(ss, n_in); + totalss.n_out = DPCPU_VARSUM(ss, n_out); + totalss.nskip_in_malloc = DPCPU_VARSUM(ss, nskip_in_malloc); + totalss.nskip_out_malloc = DPCPU_VARSUM(ss, nskip_out_malloc); + totalss.nskip_in_mtx = DPCPU_VARSUM(ss, nskip_in_mtx); + totalss.nskip_out_mtx = DPCPU_VARSUM(ss, nskip_out_mtx); + totalss.nskip_in_tcpcb = DPCPU_VARSUM(ss, nskip_in_tcpcb); + totalss.nskip_out_tcpcb = DPCPU_VARSUM(ss, nskip_out_tcpcb); + totalss.nskip_in_inpcb = DPCPU_VARSUM(ss, nskip_in_inpcb); + totalss.nskip_out_inpcb = DPCPU_VARSUM(ss, nskip_out_inpcb); total_skipped_pkts = totalss.nskip_in_malloc + totalss.nskip_out_malloc + totalss.nskip_in_mtx + From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 07:10:11 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4785A1065673; Tue, 13 Jul 2010 07:10:11 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id CF6198FC1D; Tue, 13 Jul 2010 07:10:10 +0000 (UTC) Received: from c122-106-145-25.carlnfd1.nsw.optusnet.com.au (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6D7A6iA015867 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Jul 2010 17:10:07 +1000 Date: Tue, 13 Jul 2010 17:10:06 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Alexander Motin In-Reply-To: <4C3B0F63.6000905@FreeBSD.org> Message-ID: <20100713162403.T62787@delplex.bde.org> References: <201007111647.o6BGlk0O033551@svn.freebsd.org> <201007120813.19223.jhb@freebsd.org> <4C3B0F63.6000905@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin Subject: Re: svn commit: r209900 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 07:10:11 -0000 On Mon, 12 Jul 2010, Alexander Motin wrote: > John Baldwin wrote: >> On Sunday, July 11, 2010 12:47:46 pm Alexander Motin wrote: >>> ... >>> Log: >>> Remove interval validation from cpu_tick_calibrate(). As I found, check >>> was needed at preliminary version of the patch, where number of CPU ticks >>> was divided strictly on 16 seconds. Final code instead uses real interval >>> duration, so precise interval should not be important. Same time aliasing >>> issues around second boundary causes false positives, periodically logging >>> useless "t_delta ... too long/short" messages when HZ set below 256. >> >> Hmm, did you ask phk@ about this? > > Yes. He agreed that code should be reconsidered. > >> I notice that the printfs only trigger if >> you have bootverbose enabled, so they were not affecting normal users as most >> people do not run their systems with bootverbose enabled. > > Yes, but they produce major part of kernel messages on my own systems. > I've got tired seeing them for years. It would be fine if they were > usable, but, as I have told here and on current@, with preset > implementation they were absolutely meaningless. Perhaps they are needed for some time warps, e.g., ones from the clock being stopped while in ddb: while in ddb, time_uptime isn't updated, so considerably more than 16 seconds have usually elapsed between calls to cpu_tick_calibrate(). However, the timecounter is hardware so it is updated while in ddb, so the delta-time can easily be a few seconds different from 16 (I think it is always more if the timecounter works right, and it can be less if the timecounter wraps or otherwise overflows (overflow in scaling)). However: - entering ddb breaks timecounting (except in my version, which restores the time about 3 seconds after exiting ddb, and loses only about $(cat /var/db/ntp.drift) microseconds of accuracy per second spent in ddb; my timecounter frequencies are calibrated so that $(cat /var/db/ntp.drift) is 0+-5, so the loss is small -- ntp can't tell the difference between this loss and the loss from a large temperature change) - entering ddb breaks cputick calibration even more than timecounting, except in my version. The timecounter should just lose a few seconds while in ddb. Taking deltas of it can result in a loss of almost 100% in accuracy of the calibrated frequency, especially in the overflowing cases which always happen after staying in ddb long enough for the timecounter to wrap (~2 seconds with a TSC timecounter on amd64 and i386) - the validation seemed to be of no use for detecting time warps caused by ddb. I didn't investigate this. Fix for cputick calibration: % diff -c2 ./kern/kern_tc.c~ ./kern/kern_tc.c % *** ./kern/kern_tc.c~ Thu Mar 20 01:05:27 2008 % --- ./kern/kern_tc.c Thu Mar 20 01:05:29 2008 % *************** % *** 884,888 **** % return; % % ! getbinuptime(&t_this); % c_this = cpu_ticks(); % if (t_last.sec != 0) { % --- 884,888 ---- % return; % % ! binuptime(&t_this); % c_this = cpu_ticks(); % if (t_last.sec != 0) { Minor fix for accuracy. % *************** % *** 922,931 **** % c_delta <<= 20; % c_delta /= divi; % ! if (c_delta > cpu_tick_frequency) { % ! if (0 && bootverbose) % ! printf("cpu_tick increased to %ju Hz\n", % ! c_delta); % ! cpu_tick_frequency = c_delta; % ! } % } % } % --- 922,930 ---- % c_delta <<= 20; % c_delta /= divi; % ! if (0 && bootverbose) % ! printf( % ! "cpu_tick_frequency changed from %ju to %ju Hz\n", % ! cpu_tick_frequency, c_delta); % ! cpu_tick_frequency = c_delta; % } % } Variable frequencies have the interesting capability of varying in both positive and negative directions. This fixes the case of negative-going changes. Without this, the overflowing timecounter cases caused cpu_tick_frequency to become huge (100's of times the correct value), and it was clamped to the hugest value ever seen. The way this mostly fixes the problem is that cpu_tick_frequency can be off by a factor of 100, but only for 16 seconds or so until the next calibration fixes it. I don't use this in the same kernels that have the fix for the timecounters. An integrated fix would prevent recalibration until 16 seconds after the timecounter has been restored. Setting cpu_tick_variable to 0 is an even simpler fix if the cputicker is not very variable. Without this, normal frequency drift due to temperature changes caused cpu_tick frequency to become larger than the correct value by a few ppm. Again it was clamped to the largest value ever seen, but errors of a few ppm are hard to see. There seem to be similar problems after suspend/resume, but only transient ones -- there seems to be nothing to prevent the recalibration running in the middle of a resume and seeing garbage, but then resume hopefully fixes things up by restoring the frequency, and hopefully recalibration run after that never sees garbage. If not, then the above recovers from lost races after about 16 seconds in the same way as for ddb. The fix also fixes the terminology in the diagnostic message. There is no `cpu_tick' here, and if there were then it should be a period (like kern.clockrate tick). There is only a frequency here. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 07:52:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BEAF106567C; Tue, 13 Jul 2010 07:52:51 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id E57068FC17; Tue, 13 Jul 2010 07:52:47 +0000 (UTC) Received: by bwz12 with SMTP id 12so3545560bwz.13 for ; Tue, 13 Jul 2010 00:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=2hUu+KzZBQKkXmZ6HryA0O1g3PR3gA7DzF3L/DgatMc=; b=P5r3jpj07/U8bYBIIkXBpIcNMewiKvL53p50SFFKleBFbOKlxlYLLs+hXAxMr1eqfN yfbx6r6n4+GUelmx+zXz7f32AcQ+jD3Yrsim8jzxnV9dcMiUQTqyWrku4WQu+Tv0LJvw xDAtBA0rlypetjvjgGq/wz+eAeEomjosZxBJI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=HkbWcRatGHkURnnKxJRFTrJYHzKuN89ugumUgv/0QpyzkqfZmRwJp50pA00ToBUV2v SuejX62q8MkdBLqQcc0RG0mFJXgb5v5aKF5qRYtNLDI9ksvCUKXM88vEc45s0gKcGwoA rbTTbIjgmPFXdymoyO8JCUs0s++W3tjCEpsMA= Received: by 10.223.107.211 with SMTP id c19mr1556928fap.40.1279007566653; Tue, 13 Jul 2010 00:52:46 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 11sm690435fas.2.2010.07.13.00.52.45 (version=SSLv3 cipher=RC4-MD5); Tue, 13 Jul 2010 00:52:46 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C3C1B4A.5070501@FreeBSD.org> Date: Tue, 13 Jul 2010 10:52:42 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: Bruce Evans References: <201007111647.o6BGlk0O033551@svn.freebsd.org> <201007120813.19223.jhb@freebsd.org> <4C3B0F63.6000905@FreeBSD.org> <20100713162403.T62787@delplex.bde.org> In-Reply-To: <20100713162403.T62787@delplex.bde.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r209900 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 07:52:51 -0000 Bruce Evans wrote: > Fix for cputick calibration: > > % diff -c2 ./kern/kern_tc.c~ ./kern/kern_tc.c > % *** ./kern/kern_tc.c~ Thu Mar 20 01:05:27 2008 > % --- ./kern/kern_tc.c Thu Mar 20 01:05:29 2008 > % *************** > % *** 884,888 **** > % return; > % % ! getbinuptime(&t_this); > % c_this = cpu_ticks(); > % if (t_last.sec != 0) { > % --- 884,888 ---- > % return; > % % ! binuptime(&t_this); > % c_this = cpu_ticks(); > % if (t_last.sec != 0) { > > Minor fix for accuracy. > > % *************** > % *** 922,931 **** > % c_delta <<= 20; > % c_delta /= divi; > % ! if (c_delta > cpu_tick_frequency) { > % ! if (0 && bootverbose) > % ! printf("cpu_tick increased to %ju Hz\n", > % ! c_delta); > % ! cpu_tick_frequency = c_delta; > % ! } > % } > % } > % --- 922,930 ---- > % c_delta <<= 20; > % c_delta /= divi; > % ! if (0 && bootverbose) > % ! printf( > % ! "cpu_tick_frequency changed from %ju to %ju Hz\n", > % ! cpu_tick_frequency, c_delta); > % ! cpu_tick_frequency = c_delta; > % } > % } > > Variable frequencies have the interesting capability of varying in > both positive and negative directions. This fixes the case of > negative-going changes. Without this, the overflowing timecounter > cases caused cpu_tick_frequency to become huge (100's of times the > correct value), and it was clamped to the hugest value ever seen. The > way this mostly fixes the problem is that cpu_tick_frequency can be > off by a factor of 100, but only for 16 seconds or so until the next > calibration fixes it. I have no hardware to check, but I have feeling that calibration didn't work well also for older CPUs with variable TSC frequency, when frequency is decreasing. I see TSC timecounter frequency changed at tsc_freq_changed(), but set_cputicker() is not called there to adopt it, neither calibration can reduce it by itself. > I don't use this in the same kernels that have the fix for the > timecounters. An integrated fix would prevent recalibration until 16 > seconds after the timecounter has been restored. > > Setting cpu_tick_variable to 0 is an even simpler fix if the cputicker > is not very variable. Yes. In fact cputicker is invariable for the most of modern x86 CPUs. But it's frequency is not always precisely known. > Without this, normal frequency drift due to temperature changes caused > cpu_tick frequency to become larger than the correct value by a few > ppm. Again it was clamped to the largest value ever seen, but errors > of a few ppm are hard to see. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 08:05:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 862F81065674; Tue, 13 Jul 2010 08:05:48 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7259B8FC1B; Tue, 13 Jul 2010 08:05:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D85mtP063767; Tue, 13 Jul 2010 08:05:48 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D85mDN063765; Tue, 13 Jul 2010 08:05:48 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007130805.o6D85mDN063765@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 13 Jul 2010 08:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209981 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 08:05:48 -0000 Author: lstewart Date: Tue Jul 13 08:05:48 2010 New Revision: 209981 URL: http://svn.freebsd.org/changeset/base/209981 Log: Macro to simplify zeroing DPCPU variables. Sponsored by: FreeBSD Foundation MFC after: 3 days Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Tue Jul 13 07:00:57 2010 (r209980) +++ head/sys/sys/pcpu.h Tue Jul 13 08:05:48 2010 (r209981) @@ -133,6 +133,15 @@ extern uintptr_t dpcpu_off[]; sum; \ }) +#define DPCPU_ZERO(n) do { \ + u_int _i; \ + \ + CPU_FOREACH(_i) { \ + bzero(DPCPU_ID_PTR(_i, n), \ + sizeof(__typeof(DPCPU_PTR(n)))); \ + } \ +} while(0) + /* * XXXUPS remove as soon as we have per cpu variable * linker sets and can define rm_queue in _rm_lock.h From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 08:23:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBE111065672; Tue, 13 Jul 2010 08:23:46 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA58E8FC28; Tue, 13 Jul 2010 08:23:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D8NkVn067901; Tue, 13 Jul 2010 08:23:46 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D8Nkun067899; Tue, 13 Jul 2010 08:23:46 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007130823.o6D8Nkun067899@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 13 Jul 2010 08:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209982 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 08:23:46 -0000 Author: lstewart Date: Tue Jul 13 08:23:46 2010 New Revision: 209982 URL: http://svn.freebsd.org/changeset/base/209982 Log: The SIFTR DPCPU statistics struct was not being zeroed between enable/disable cycles so the values would accumulate rather than reset for each cycle. Sponsored by: FreeBSD Foundation Modified: head/sys/netinet/siftr.c Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Tue Jul 13 08:05:48 2010 (r209981) +++ head/sys/netinet/siftr.c Tue Jul 13 08:23:46 2010 (r209982) @@ -1233,6 +1233,8 @@ siftr_manage_ops(uint8_t action) STAILQ_INIT(&pkt_queue); + DPCPU_ZERO(ss); + siftr_exit_pkt_manager_thread = 0; ret = kthread_add(&siftr_pkt_manager_thread, NULL, NULL, From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 09:17:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE36F106567F; Tue, 13 Jul 2010 09:17:30 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D04388FC1E; Tue, 13 Jul 2010 09:17:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6D9HUil079997; Tue, 13 Jul 2010 09:17:30 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6D9HUb3079995; Tue, 13 Jul 2010 09:17:30 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007130917.o6D9HUb3079995@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 13 Jul 2010 09:17:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209987 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 09:17:31 -0000 Author: lstewart Date: Tue Jul 13 09:17:30 2010 New Revision: 209987 URL: http://svn.freebsd.org/changeset/base/209987 Log: - The sum variable used in DPCPU_SUM needs to be of the same type as the DPCPU variable, rather than a pointer to the type. - Zero # bytes equivalent to sizeof(object), not sizeof(ptr_to_object). - Remove an unnecessary __typeof. Sponsored by: FreeBSD Foundation Submitted by: jmallet MFC after: 3 days Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Tue Jul 13 08:55:52 2010 (r209986) +++ head/sys/sys/pcpu.h Tue Jul 13 09:17:30 2010 (r209987) @@ -112,7 +112,7 @@ extern uintptr_t dpcpu_off[]; #define DPCPU_SUM(n) __extension__ \ ({ \ u_int _i; \ - __typeof(DPCPU_PTR(n)) sum; \ + __typeof(*DPCPU_PTR(n)) sum; \ \ sum = 0; \ CPU_FOREACH(_i) { \ @@ -137,8 +137,7 @@ extern uintptr_t dpcpu_off[]; u_int _i; \ \ CPU_FOREACH(_i) { \ - bzero(DPCPU_ID_PTR(_i, n), \ - sizeof(__typeof(DPCPU_PTR(n)))); \ + bzero(DPCPU_ID_PTR(_i, n), sizeof(*DPCPU_PTR(n))); \ } \ } while(0) From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 10:32:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DD29106564A; Tue, 13 Jul 2010 10:32:44 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE53B8FC1C; Tue, 13 Jul 2010 10:32:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DAWhgj096793; Tue, 13 Jul 2010 10:32:43 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DAWhPn096791; Tue, 13 Jul 2010 10:32:43 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201007131032.o6DAWhPn096791@svn.freebsd.org> From: Ed Schouten Date: Tue, 13 Jul 2010 10:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209988 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 10:32:44 -0000 Author: ed Date: Tue Jul 13 10:32:43 2010 New Revision: 209988 URL: http://svn.freebsd.org/changeset/base/209988 Log: UT_NAMESIZE is no more. Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Tue Jul 13 09:17:30 2010 (r209987) +++ head/sys/sys/param.h Tue Jul 13 10:32:43 2010 (r209988) @@ -69,7 +69,6 @@ * Redefined constants are from POSIX 1003.1 limits file. * * MAXCOMLEN should be >= sizeof(ac_comm) (see ) - * MAXLOGNAME should be == UT_NAMESIZE+1 (see ) */ #include From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 12:39:15 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 980641065674; Tue, 13 Jul 2010 12:39:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 21A3C8FC1B; Tue, 13 Jul 2010 12:39:14 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id o6DCdD8k031776; Tue, 13 Jul 2010 16:39:13 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id o6DCdDeN031775; Tue, 13 Jul 2010 16:39:13 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 13 Jul 2010 16:39:13 +0400 From: Gleb Smirnoff To: Jack F Vogel Message-ID: <20100713123912.GF63689@FreeBSD.org> References: <201007091711.o69HBUDP096886@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201007091711.o69HBUDP096886@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r209859 - head/sys/dev/e1000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 12:39:15 -0000 On Fri, Jul 09, 2010 at 05:11:30PM +0000, Jack F Vogel wrote: J> Author: jfv J> Date: Fri Jul 9 17:11:29 2010 J> New Revision: 209859 J> URL: http://svn.freebsd.org/changeset/base/209859 J> J> Log: J> Fix of a VLAN problem by jhb, the checksum capability J> got lost along the way. J> J> MFC: asap J> J> Modified: J> head/sys/dev/e1000/if_igb.c J> J> Modified: head/sys/dev/e1000/if_igb.c J> ============================================================================== J> --- head/sys/dev/e1000/if_igb.c Fri Jul 9 16:19:51 2010 (r209858) J> +++ head/sys/dev/e1000/if_igb.c Fri Jul 9 17:11:29 2010 (r209859) J> @@ -2679,7 +2679,7 @@ igb_setup_interface(device_t dev, struct J> J> ifp->if_capabilities = ifp->if_capenable = 0; J> J> - ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_MTU; J> + ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM; J> ifp->if_capabilities |= IFCAP_TSO4; J> ifp->if_capabilities |= IFCAP_JUMBO_MTU; J> if (igb_header_split) And now the IFCAP_VLAN_MTU got lost along the way, didn't it? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 12:46:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 923191065673; Tue, 13 Jul 2010 12:46:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E9788FC21; Tue, 13 Jul 2010 12:46:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DCk6cv027774; Tue, 13 Jul 2010 12:46:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DCk6Yq027768; Tue, 13 Jul 2010 12:46:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007131246.o6DCk6Yq027768@svn.freebsd.org> From: Alexander Motin Date: Tue, 13 Jul 2010 12:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209990 - in head/sys: dev/acpica x86/isa x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 12:46:06 -0000 Author: mav Date: Tue Jul 13 12:46:06 2010 New Revision: 209990 URL: http://svn.freebsd.org/changeset/base/209990 Log: Rise knowledge about curthread->td_intr_frame by one step. Make timer callback argument really opaque. Not repeat interrupt handler's problem in case somebody will ever need to have both argument and frame. Modified: head/sys/dev/acpica/acpi_hpet.c head/sys/x86/isa/atrtc.c head/sys/x86/isa/clock.c head/sys/x86/x86/local_apic.c head/sys/x86/x86/timeevents.c Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Tue Jul 13 11:04:46 2010 (r209989) +++ head/sys/dev/acpica/acpi_hpet.c Tue Jul 13 12:46:06 2010 (r209990) @@ -216,10 +216,8 @@ hpet_intr_single(void *arg) } else if (t->mode == 2) t->mode = 0; mt = (t->pcpu_master < 0) ? t : &sc->t[t->pcpu_master]; - if (mt->et.et_active) { - mt->et.et_event_cb(&mt->et, - mt->et.et_arg ? mt->et.et_arg : curthread->td_intr_frame); - } + if (mt->et.et_active) + mt->et.et_event_cb(&mt->et, mt->et.et_arg); return (FILTER_HANDLED); } Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Tue Jul 13 11:04:46 2010 (r209989) +++ head/sys/x86/isa/atrtc.c Tue Jul 13 12:46:06 2010 (r209990) @@ -209,11 +209,8 @@ rtc_intr(void *arg) while (rtcin(RTC_INTR) & RTCIR_PERIOD) { flag = 1; - if (sc->et.et_active) { - sc->et.et_event_cb(&sc->et, - sc->et.et_arg ? sc->et.et_arg : - curthread->td_intr_frame); - } + if (sc->et.et_active) + sc->et.et_event_cb(&sc->et, sc->et.et_arg); } return(flag ? FILTER_HANDLED : FILTER_STRAY); } Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Tue Jul 13 11:04:46 2010 (r209989) +++ head/sys/x86/isa/clock.c Tue Jul 13 12:46:06 2010 (r209990) @@ -148,10 +148,8 @@ clkintr(void *arg) mtx_unlock_spin(&clock_lock); } - if (sc && sc->et.et_active) { - sc->et.et_event_cb(&sc->et, - sc->et.et_arg ? sc->et.et_arg : curthread->td_intr_frame); - } + if (sc && sc->et.et_active) + sc->et.et_event_cb(&sc->et, sc->et.et_arg); #ifdef DEV_MCA /* Reset clock interrupt by asserting bit 7 of port 0x61 */ Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Tue Jul 13 11:04:46 2010 (r209989) +++ head/sys/x86/x86/local_apic.c Tue Jul 13 12:46:06 2010 (r209990) @@ -802,8 +802,7 @@ lapic_handle_timer(struct trapframe *fra td = curthread; oldframe = td->td_intr_frame; td->td_intr_frame = frame; - lapic_et.et_event_cb(&lapic_et, - lapic_et.et_arg ? lapic_et.et_arg : frame); + lapic_et.et_event_cb(&lapic_et, lapic_et.et_arg); td->td_intr_frame = oldframe; } critical_exit(); Modified: head/sys/x86/x86/timeevents.c ============================================================================== --- head/sys/x86/x86/timeevents.c Tue Jul 13 11:04:46 2010 (r209989) +++ head/sys/x86/x86/timeevents.c Tue Jul 13 12:46:06 2010 (r209990) @@ -165,7 +165,7 @@ timer1cb(struct eventtimer *et, void *ar } } } - hardclockhandler((struct trapframe *)arg); + hardclockhandler(curthread->td_intr_frame); } /* timer2 callback. */ @@ -188,7 +188,7 @@ timer2cb(struct eventtimer *et, void *ar } } } - statclockhandler((struct trapframe *)arg); + statclockhandler(curthread->td_intr_frame); } /* From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 12:46:57 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BA881065672; Tue, 13 Jul 2010 12:46:57 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 89C588FC1B; Tue, 13 Jul 2010 12:46:56 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id o6DCktpU031883; Tue, 13 Jul 2010 16:46:55 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id o6DCktvh031882; Tue, 13 Jul 2010 16:46:55 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 13 Jul 2010 16:46:55 +0400 From: Gleb Smirnoff To: Jack F Vogel Message-ID: <20100713124655.GG63689@FreeBSD.org> References: <201007091711.o69HBUDP096886@svn.freebsd.org> <20100713123912.GF63689@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20100713123912.GF63689@FreeBSD.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r209859 - head/sys/dev/e1000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 12:46:57 -0000 On Tue, Jul 13, 2010 at 04:39:13PM +0400, Gleb Smirnoff wrote: T> On Fri, Jul 09, 2010 at 05:11:30PM +0000, Jack F Vogel wrote: T> J> Author: jfv T> J> Date: Fri Jul 9 17:11:29 2010 T> J> New Revision: 209859 T> J> URL: http://svn.freebsd.org/changeset/base/209859 T> J> T> J> Log: T> J> Fix of a VLAN problem by jhb, the checksum capability T> J> got lost along the way. T> J> T> J> MFC: asap T> J> T> J> Modified: T> J> head/sys/dev/e1000/if_igb.c T> J> T> J> Modified: head/sys/dev/e1000/if_igb.c T> J> ============================================================================== T> J> --- head/sys/dev/e1000/if_igb.c Fri Jul 9 16:19:51 2010 (r209858) T> J> +++ head/sys/dev/e1000/if_igb.c Fri Jul 9 17:11:29 2010 (r209859) T> J> @@ -2679,7 +2679,7 @@ igb_setup_interface(device_t dev, struct T> J> T> J> ifp->if_capabilities = ifp->if_capenable = 0; T> J> T> J> - ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_MTU; T> J> + ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM; T> J> ifp->if_capabilities |= IFCAP_TSO4; T> J> ifp->if_capabilities |= IFCAP_JUMBO_MTU; T> J> if (igb_header_split) T> T> And now the IFCAP_VLAN_MTU got lost along the way, didn't it? Oops, sorry. Now I read the entire file. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 12:47:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A8C7106566C; Tue, 13 Jul 2010 12:47:32 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 348CD8FC13; Tue, 13 Jul 2010 12:47:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DClWep028129; Tue, 13 Jul 2010 12:47:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DClWcp028124; Tue, 13 Jul 2010 12:47:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007131247.o6DClWcp028124@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 12:47:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209991 - in head/sys/modules: . cas hwpmc sound/driver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 12:47:32 -0000 Author: nwhitehorn Date: Tue Jul 13 12:47:31 2010 New Revision: 209991 URL: http://svn.freebsd.org/changeset/base/209991 Log: Make kernel modules build correctly on 64-bit PowerPC. Modified: head/sys/modules/Makefile head/sys/modules/cas/Makefile head/sys/modules/hwpmc/Makefile head/sys/modules/sound/driver/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Jul 13 12:46:06 2010 (r209990) +++ head/sys/modules/Makefile Tue Jul 13 12:47:31 2010 (r209991) @@ -318,7 +318,7 @@ SUBDIR= ${_3dfx} \ ${_zfs} \ zlib \ -.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "arm" && \ +.if ${MACHINE_CPUARCH} != "powerpc" && ${MACHINE_ARCH} != "arm" && \ ${MACHINE_ARCH} != "mips" _syscons= syscons _vpo= vpo @@ -615,7 +615,7 @@ _wi= wi _xe= xe .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" _an= an _bm= bm _cpufreq= cpufreq Modified: head/sys/modules/cas/Makefile ============================================================================== --- head/sys/modules/cas/Makefile Tue Jul 13 12:46:06 2010 (r209990) +++ head/sys/modules/cas/Makefile Tue Jul 13 12:47:31 2010 (r209991) @@ -5,7 +5,7 @@ KMOD= if_cas SRCS= bus_if.h device_if.h if_cas.c miibus_if.h pci_if.h ${ofw_bus_if} -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" ofw_bus_if= ofw_bus_if.h .endif Modified: head/sys/modules/hwpmc/Makefile ============================================================================== --- head/sys/modules/hwpmc/Makefile Tue Jul 13 12:46:06 2010 (r209990) +++ head/sys/modules/hwpmc/Makefile Tue Jul 13 12:47:31 2010 (r209991) @@ -28,7 +28,7 @@ SRCS+= device_if.h bus_if.h SRCS+= hwpmc_ia64.c .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" SRCS+= hwpmc_powerpc.c .endif Modified: head/sys/modules/sound/driver/Makefile ============================================================================== --- head/sys/modules/sound/driver/Makefile Tue Jul 13 12:46:06 2010 (r209990) +++ head/sys/modules/sound/driver/Makefile Tue Jul 13 12:47:31 2010 (r209991) @@ -15,7 +15,7 @@ SUBDIR+= audiocs .endif .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" SUBDIR+= ai2s davbus .endif From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 12:47:47 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA783106566C; Tue, 13 Jul 2010 12:47:47 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 5FBBE8FC1D; Tue, 13 Jul 2010 12:47:46 +0000 (UTC) Received: from c122-106-145-25.carlnfd1.nsw.optusnet.com.au (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6DClhwI017697 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Jul 2010 22:47:44 +1000 Date: Tue, 13 Jul 2010 22:47:43 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Alexander Motin In-Reply-To: <4C3C1B4A.5070501@FreeBSD.org> Message-ID: <20100713222551.K62994@delplex.bde.org> References: <201007111647.o6BGlk0O033551@svn.freebsd.org> <201007120813.19223.jhb@freebsd.org> <4C3B0F63.6000905@FreeBSD.org> <20100713162403.T62787@delplex.bde.org> <4C3C1B4A.5070501@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans Subject: Re: svn commit: r209900 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 12:47:47 -0000 On Tue, 13 Jul 2010, Alexander Motin wrote: > Bruce Evans wrote: >> Fix for cputick calibration: >> ... >> Variable frequencies have the interesting capability of varying in >> both positive and negative directions. This fixes the case of >> negative-going changes. ... > > I have no hardware to check, but I have feeling that calibration didn't > work well also for older CPUs with variable TSC frequency, when > frequency is decreasing. I see TSC timecounter frequency changed at > tsc_freq_changed(), but set_cputicker() is not called there to adopt it, > neither calibration can reduce it by itself. It is only called from init_TSC() and tsc_levels_changed(). I don't really understand tsc_xxx_change*(). It's interesting that the call in tsc_levels_changed() passes `max_freq' as the frequency. Is the calibrator expected to reduce from a maximum frequency to a much smaller throttled frequency? But it can only go the other way without my change. >> I don't use this in the same kernels that have the fix for the >> timecounters. An integrated fix would prevent recalibration until 16 >> seconds after the timecounter has been restored. >> >> Setting cpu_tick_variable to 0 is an even simpler fix if the cputicker >> is not very variable. > > Yes. In fact cputicker is invariable for the most of modern x86 CPUs. > But it's frequency is not always precisely known. When it is invariable, it is easy to determine precisely (just wait long enough to find the average to the desired accuracy (this is only seconds for 1 ppm even with a slow timecounter like ACPI-fast as a reference). Try ~bde/tsccalib/tsccalib.c on a FreeBSD cluster machine. This requires all the CPUs to be in sync since it doesn't know how to pin the thread to a CPU. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 12:51:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91FE31065676; Tue, 13 Jul 2010 12:51:03 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 876A18FC14; Tue, 13 Jul 2010 12:51:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DCp3I1029073; Tue, 13 Jul 2010 12:51:03 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DCp3R1029069; Tue, 13 Jul 2010 12:51:03 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007131251.o6DCp3R1029069@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 12:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209992 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 12:51:03 -0000 Author: nwhitehorn Date: Tue Jul 13 12:51:02 2010 New Revision: 209992 URL: http://svn.freebsd.org/changeset/base/209992 Log: Install arch-specific manpages by MACHINE_CPUARCH, not MACHINE_ARCH. Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Tue Jul 13 12:47:31 2010 (r209991) +++ head/share/man/man4/Makefile Tue Jul 13 12:51:02 2010 (r209992) @@ -678,8 +678,8 @@ MLINKS+=lindev.4 full.4 _atp.4= atp.4 .endif -.if exists(${.CURDIR}/man4.${MACHINE_ARCH}) -SUBDIR= man4.${MACHINE_ARCH} +.if exists(${.CURDIR}/man4.${MACHINE_CPUARCH}) +SUBDIR= man4.${MACHINE_CPUARCH} .endif .include From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 13:11:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C9801065674; Tue, 13 Jul 2010 13:11:19 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0156C8FC1E; Tue, 13 Jul 2010 13:11:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DDBIYg033819; Tue, 13 Jul 2010 13:11:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DDBIIg033814; Tue, 13 Jul 2010 13:11:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007131311.o6DDBIIg033814@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 13:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209993 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 13:11:19 -0000 Author: nwhitehorn Date: Tue Jul 13 13:11:18 2010 New Revision: 209993 URL: http://svn.freebsd.org/changeset/base/209993 Log: Convert several instances of MACHINE_ARCH to MACHINE_CPUARCH and use the correct compiler flags on 64-bit PowerPC. Modified: head/sys/conf/kern.mk head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Jul 13 12:51:02 2010 (r209992) +++ head/sys/conf/kern.mk Tue Jul 13 13:11:18 2010 (r209993) @@ -74,7 +74,7 @@ INLINE_LIMIT?= 8000 # floating point registers for integer operations which it has a tendency to do. # Also explicitly disable Altivec instructions inside the kernel. # -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -msoft-float -mno-altivec INLINE_LIMIT?= 15000 .endif Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Tue Jul 13 12:51:02 2010 (r209992) +++ head/sys/conf/kern.post.mk Tue Jul 13 13:11:18 2010 (r209993) @@ -166,8 +166,8 @@ SRCS= assym.s vnode_if.h ${BEFORE_DEPEND mv .newdep .depend _ILINKS= machine -.if ${MACHINE} != ${MACHINE_ARCH} -_ILINKS+= ${MACHINE_ARCH} +.if ${MACHINE} != ${MACHINE_CPUARCH} +_ILINKS+= ${MACHINE_CPUARCH} .endif # Ensure that the link exists without depending on it when it exists. @@ -181,8 +181,8 @@ ${_ILINKS}: @case ${.TARGET} in \ machine) \ path=${S}/${MACHINE}/include ;; \ - ${MACHINE_ARCH}) \ - path=${S}/${MACHINE_ARCH}/include ;; \ + ${MACHINE_CPUARCH}) \ + path=${S}/${MACHINE_CPUARCH}/include ;; \ esac ; \ ${ECHO} ${.TARGET} "->" $$path ; \ ln -s $$path ${.TARGET} Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Jul 13 12:51:02 2010 (r209992) +++ head/sys/conf/kern.pre.mk Tue Jul 13 13:11:18 2010 (r209993) @@ -12,7 +12,7 @@ KODIR?= /boot/${KERNEL} LDSCRIPT_NAME?= ldscript.$M LDSCRIPT?= $S/conf/${LDSCRIPT_NAME} -M= ${MACHINE_ARCH} +M= ${MACHINE_CPUARCH} AWK?= awk LINT?= lint Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Tue Jul 13 12:51:02 2010 (r209992) +++ head/sys/conf/kmod.mk Tue Jul 13 13:11:18 2010 (r209993) @@ -129,7 +129,7 @@ CFLAGS+= ${DEBUG_FLAGS} CFLAGS+= -fno-omit-frame-pointer .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -mlongcall -fno-omit-frame-pointer .endif @@ -226,8 +226,8 @@ ${FULLPROG}: ${OBJS} .endif _ILINKS=@ machine -.if ${MACHINE} != ${MACHINE_ARCH} -_ILINKS+=${MACHINE_ARCH} +.if ${MACHINE} != ${MACHINE_CPUARCH} +_ILINKS+=${MACHINE_CPUARCH} .endif all: objwarn ${PROG} @@ -254,8 +254,8 @@ SYSDIR= ${_dir} ${_ILINKS}: @case ${.TARGET} in \ - ${MACHINE_ARCH}) \ - path=${SYSDIR}/${MACHINE_ARCH}/include ;; \ + ${MACHINE_CPUARCH}) \ + path=${SYSDIR}/${MACHINE_CPUARCH}/include ;; \ machine) \ path=${SYSDIR}/${MACHINE}/include ;; \ @) \ @@ -451,11 +451,11 @@ assym.s: @/kern/genassym.sh .endif sh @/kern/genassym.sh genassym.o > ${.TARGET} .if exists(@) -genassym.o: @/${MACHINE_ARCH}/${MACHINE_ARCH}/genassym.c +genassym.o: @/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}/genassym.c .endif genassym.o: @ machine ${SRCS:Mopt_*.h} ${CC} -c ${CFLAGS:N-fno-common} \ - @/${MACHINE_ARCH}/${MACHINE_ARCH}/genassym.c + @/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}/genassym.c .endif lint: ${SRCS} From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 15:01:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9955C106564A; Tue, 13 Jul 2010 15:01:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A6F78FC17; Tue, 13 Jul 2010 15:01:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DF1ao1071496; Tue, 13 Jul 2010 15:01:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DF1ag5071495; Tue, 13 Jul 2010 15:01:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007131501.o6DF1ag5071495@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 15:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209994 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 15:01:36 -0000 Author: imp Date: Tue Jul 13 15:01:36 2010 New Revision: 209994 URL: http://svn.freebsd.org/changeset/base/209994 Log: Remove obsolete define "COPY_SIGCODE". This is unused in FreeBSD. Submitted by: bde@ Modified: head/sys/mips/include/cpu.h Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Tue Jul 13 13:11:18 2010 (r209993) +++ head/sys/mips/include/cpu.h Tue Jul 13 15:01:36 2010 (r209994) @@ -278,12 +278,6 @@ * Exported definitions unique to mips cpu support. */ -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#define COPY_SIGCODE /* copy sigcode above user stack in exec */ - #define cpu_swapout(p) panic("cpu_swapout: can't get here"); #ifndef _LOCORE From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 15:06:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D6691065676; Tue, 13 Jul 2010 15:06:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AF078FC1B; Tue, 13 Jul 2010 15:06:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DF6DvU072561; Tue, 13 Jul 2010 15:06:13 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DF6Des072558; Tue, 13 Jul 2010 15:06:13 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007131506.o6DF6Des072558@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 15:06:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209995 - in head/sys: amd64/include i386/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 15:06:14 -0000 Author: imp Date: Tue Jul 13 15:06:13 2010 New Revision: 209995 URL: http://svn.freebsd.org/changeset/base/209995 Log: Remove obsolete undef of COPY_SIGCODE. It appears to have not been used in FreeBSD in quite some time (maybe since before 4.4-lite :) Submitted by: bde Modified: head/sys/amd64/include/cpu.h head/sys/i386/include/cpu.h Modified: head/sys/amd64/include/cpu.h ============================================================================== --- head/sys/amd64/include/cpu.h Tue Jul 13 15:01:36 2010 (r209994) +++ head/sys/amd64/include/cpu.h Tue Jul 13 15:06:13 2010 (r209995) @@ -43,12 +43,6 @@ #include #include -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#undef COPY_SIGCODE /* don't copy sigcode above user stack in exec */ - #define cpu_exec(p) /* nothing */ #define cpu_swapin(p) /* nothing */ #define cpu_getstack(td) ((td)->td_frame->tf_rsp) Modified: head/sys/i386/include/cpu.h ============================================================================== --- head/sys/i386/include/cpu.h Tue Jul 13 15:01:36 2010 (r209994) +++ head/sys/i386/include/cpu.h Tue Jul 13 15:06:13 2010 (r209995) @@ -43,12 +43,6 @@ #include #include -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#undef COPY_SIGCODE /* don't copy sigcode above user stack in exec */ - #define cpu_exec(p) /* nothing */ #define cpu_swapin(p) /* nothing */ #define cpu_getstack(td) ((td)->td_frame->tf_esp) From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 15:29:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E49A5106566B; Tue, 13 Jul 2010 15:29:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3C8B8FC16; Tue, 13 Jul 2010 15:29:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DFTb8s077753; Tue, 13 Jul 2010 15:29:37 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DFTbrn077748; Tue, 13 Jul 2010 15:29:37 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007131529.o6DFTbrn077748@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 15:29:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209996 - in head/sys/mips: include mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 15:29:38 -0000 Author: imp Date: Tue Jul 13 15:29:37 2010 New Revision: 209996 URL: http://svn.freebsd.org/changeset/base/209996 Log: cpu_id and fpu_id are unused, except to be set early in the boot code. The problem with setting it there is that the last CPU to come up wins, it seems. This also removes one more ifdef in locore.S, a noble goal too. Since they are unused, and pollute cpu.h, remove them. Submitted by: bde.h (cpu.h pollution) Approved in theory by: jmallet@ Modified: head/sys/mips/include/cpu.h head/sys/mips/include/md_var.h head/sys/mips/mips/cpu.c head/sys/mips/mips/locore.S Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Tue Jul 13 15:06:13 2010 (r209995) +++ head/sys/mips/include/cpu.h Tue Jul 13 15:29:37 2010 (r209996) @@ -393,16 +393,7 @@ union cpuprid { #define MIPS_RM52XX 0x28 /* QED RM52X0 based FPU ISA IV */ #define MIPS_VR5400 0x54 /* NEC Vr5400 FPU ISA IV+ */ -#ifndef _LOCORE -extern union cpuprid cpu_id; - -#define mips_proc_type() ((cpu_id.cpu.cp_vendor << 8) | cpu_id.cpu.cp_imp) -#define mips_set_proc_type(type) (cpu_id.cpu.cp_vendor = (type) >> 8, \ - cpu_id.cpu.cp_imp = ((type) & 0x00ff)) -#endif /* !_LOCORE */ - #if defined(_KERNEL) && !defined(_LOCORE) -extern union cpuprid fpu_id; struct user; Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Tue Jul 13 15:06:13 2010 (r209995) +++ head/sys/mips/include/md_var.h Tue Jul 13 15:29:37 2010 (r209996) @@ -66,7 +66,6 @@ void mips_generic_reset(void); #endif void mips_vector_init(void); -void cpu_identify(void); void mips_cpu_init(void); void mips_pcpu0_init(void); void mips_proc0_init(void); Modified: head/sys/mips/mips/cpu.c ============================================================================== --- head/sys/mips/mips/cpu.c Tue Jul 13 15:06:13 2010 (r209995) +++ head/sys/mips/mips/cpu.c Tue Jul 13 15:29:37 2010 (r209996) @@ -52,15 +52,14 @@ __FBSDID("$FreeBSD$"); #include #include -struct mips_cpuinfo cpuinfo; +static void cpu_identify(void); -union cpuprid cpu_id; -union cpuprid fpu_id; +struct mips_cpuinfo cpuinfo; /* * Attempt to identify the MIPS CPU as much as possible. * - * XXX: Assumes the CPU is MIPS32 compliant. + * XXX: Assumes the CPU is MIPS{32,64}{,r2} compliant. * XXX: For now, skip config register selections 2 and 3 * as we don't currently use L2/L3 cache or additional * MIPS32 processor features. @@ -148,7 +147,7 @@ mips_cpu_init(void) cpu_identify(); } -void +static void cpu_identify(void) { uint32_t cfg0, cfg1, cfg2, cfg3; Modified: head/sys/mips/mips/locore.S ============================================================================== --- head/sys/mips/mips/locore.S Tue Jul 13 15:06:13 2010 (r209995) +++ head/sys/mips/mips/locore.S Tue Jul 13 15:29:37 2010 (r209996) @@ -134,25 +134,6 @@ VECTOR(_locore, unknown) mtc0 t0, MIPS_COP_0_CONFIG COP0_SYNC - /* Read and store the PrID FPU ID for CPU identification, if any. */ - mfc0 t2, COP_0_STATUS_REG - mfc0 t0, MIPS_COP_0_PRID -#ifdef CPU_HAVEFPU - and t2, MIPS_SR_COP_1_BIT - beqz t2, 1f - move t1, zero - cfc1 t1, MIPS_FPU_ID -1: -#else - /* - * This platform has no FPU, and attempting to detect one - * using the official method causes an exception. - */ - move t1, zero -#endif - sw t0, _C_LABEL(cpu_id) - sw t1, _C_LABEL(fpu_id) - /*xxximp * now that we pass a0...a3 to the platform_init routine, do we need * to stash this stuff here? From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 16:16:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 904DB106568E; Tue, 13 Jul 2010 16:16:41 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E4548FC13; Tue, 13 Jul 2010 16:16:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DGGftf088281; Tue, 13 Jul 2010 16:16:41 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DGGfF8088279; Tue, 13 Jul 2010 16:16:41 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201007131616.o6DGGfF8088279@svn.freebsd.org> From: Maxim Konovalov Date: Tue, 13 Jul 2010 16:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210000 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 16:16:41 -0000 Author: maxim Date: Tue Jul 13 16:16:41 2010 New Revision: 210000 URL: http://svn.freebsd.org/changeset/base/210000 Log: o Correct path to include file. PR: docs/148545 Submitted by: Anton Shterenlikht MFC after: 1 week Modified: head/share/man/man4/ath.4 Modified: head/share/man/man4/ath.4 ============================================================================== --- head/share/man/man4/ath.4 Tue Jul 13 16:15:03 2010 (r209999) +++ head/share/man/man4/ath.4 Tue Jul 13 16:16:41 2010 (r210000) @@ -198,7 +198,7 @@ ifconfig wlan0 create wlandev ath0 wlanm The Atheros Hardware Access Layer was unable to configure the hardware as requested. The status code is explained in the HAL include file -.Pa sys/contrib/dev/ath/ah.h . +.Pa sys/dev/ath/ath_hal/ah.h . .It "ath%d: failed to allocate descriptors: %d" The driver was unable to allocate contiguous memory for the transmit and receive descriptors. @@ -227,7 +227,7 @@ The driver will reset the hardware and c The Atheros Hardware Access Layer was unable to reset the hardware as requested. The status code is explained in the HAL include file -.Pa sys/contrib/dev/ath/ah.h . +.Pa sys/dev/ath/ath_hal/ah.h . This should not happen. .It "ath%d: unable to start recv logic" The driver was unable to restart frame reception. From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 16:24:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 655731065679; Tue, 13 Jul 2010 16:24:04 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52EA48FC0A; Tue, 13 Jul 2010 16:24:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DGO4qu090030; Tue, 13 Jul 2010 16:24:04 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DGO4T3090028; Tue, 13 Jul 2010 16:24:04 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201007131624.o6DGO4T3090028@svn.freebsd.org> From: "Simon L. Nielsen" Date: Tue, 13 Jul 2010 16:24:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210002 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 16:24:04 -0000 Author: simon Date: Tue Jul 13 16:24:04 2010 New Revision: 210002 URL: http://svn.freebsd.org/changeset/base/210002 Log: In the example for how to create a VLAN, also include an example of setting the IP address. While it is documented earlier in rc.conf(5) that the '.' in the VLAN name becomes a '_' in rc.conf, this may not be easy to find when just using rc.conf(5) as reference documentation. MFC after: 1 week Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Tue Jul 13 16:21:35 2010 (r210001) +++ head/share/man/man5/rc.conf.5 Tue Jul 13 16:24:04 2010 (r210002) @@ -1151,9 +1151,10 @@ To create a vlan device named .Li em0.101 on .Li em0 -with the vlan tag 101: +with the vlan tag 101 and the optional the IPv4 address 192.0.2.1/24: .Bd -literal vlans_em0="101" +ifconfig_em0_101="inet 192.0.2.1/24" .Ed .Pp To create a vlan device named From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 16:35:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62780106564A; Tue, 13 Jul 2010 16:35:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 502538FC17; Tue, 13 Jul 2010 16:35:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DGZgti092663; Tue, 13 Jul 2010 16:35:42 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DGZgUq092661; Tue, 13 Jul 2010 16:35:42 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007131635.o6DGZgUq092661@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 13 Jul 2010 16:35:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210003 - head/sys/dev/acpica X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 16:35:42 -0000 Author: jkim Date: Tue Jul 13 16:35:41 2010 New Revision: 210003 URL: http://svn.freebsd.org/changeset/base/210003 Log: Make SMP code path conditional at run-time. Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Tue Jul 13 16:24:04 2010 (r210002) +++ head/sys/dev/acpica/acpi.c Tue Jul 13 16:35:41 2010 (r210003) @@ -46,9 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef SMP #include -#endif #include #include @@ -2523,11 +2521,11 @@ acpi_EnterSleepState(struct acpi_softc * return_ACPI_STATUS (AE_OK); } -#ifdef SMP - thread_lock(curthread); - sched_bind(curthread, 0); - thread_unlock(curthread); -#endif + if (smp_started) { + thread_lock(curthread); + sched_bind(curthread, 0); + thread_unlock(curthread); + } /* * Be sure to hold Giant across DEVICE_SUSPEND/RESUME since non-MPSAFE @@ -2608,11 +2606,11 @@ backout: mtx_unlock(&Giant); -#ifdef SMP - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); -#endif + if (smp_started) { + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); + } /* Allow another sleep request after a while. */ timeout(acpi_sleep_enable, sc, hz * ACPI_MINIMUM_AWAKETIME); From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 16:44:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 634C91065672; Tue, 13 Jul 2010 16:44:00 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6824F8FC19; Tue, 13 Jul 2010 16:43:59 +0000 (UTC) Received: by wyf22 with SMTP id 22so706694wyf.13 for ; Tue, 13 Jul 2010 09:43:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=d1NyCsaCyN7m7a05ffOZw2yGh+/teu8zXpiyIdwfW5s=; b=Fq/WP6oIkL6fC//nSh+pMbuAGG7VThwN8I7xlt5AgEEgqRlCKjX5V0g9eg+b5sGYIJ 4BeQ969aMsLXGuquxwkLM2XFvKfB5cP/tr60KQY6Mr64xOdmHtNlNRdlvVQ5o9M2hcvd hGqAtAfo2DVGHhIj/w+JUqpDhrz/EW9siyqAc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=d/IifOnimFcZ+dgBAzPdNti4I7xDVJrsKGlL2vuxTRnqcVvtggu2nQQZ9A7DhYRfm0 620TQW0DQ5Oc0r5rzjxz6Tk9mB989i93xMHIWxi0+90os/ndBOr0VZ6oT4c/RHWab3G+ +4M6dLr2TD/8pxPbLUIN7D1/RIavrLrN+6lLo= MIME-Version: 1.0 Received: by 10.227.94.138 with SMTP id z10mr4059886wbm.166.1279039435421; Tue, 13 Jul 2010 09:43:55 -0700 (PDT) Received: by 10.216.27.13 with HTTP; Tue, 13 Jul 2010 09:43:55 -0700 (PDT) In-Reply-To: <201007131506.o6DF6Des072558@svn.freebsd.org> References: <201007131506.o6DF6Des072558@svn.freebsd.org> Date: Tue, 13 Jul 2010 20:43:55 +0400 Message-ID: From: pluknet To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209995 - in head/sys: amd64/include i386/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 16:44:00 -0000 On 13 July 2010 19:06, Warner Losh wrote: > Author: imp > Date: Tue Jul 13 15:06:13 2010 > New Revision: 209995 > URL: http://svn.freebsd.org/changeset/base/209995 > > Log: > =A0Remove obsolete undef of COPY_SIGCODE. =A0It appears to have not been > =A0used in FreeBSD in quite some time (maybe since before 4.4-lite :) > > =A0Submitted by: bde > Yeah, I didn't quite get at all why it was ever undefed in those arches whi= ch didn't use it in "excessively bogus" proprietary parts... --=20 wbr, pluknet From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 16:47:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72DEC1065673; Tue, 13 Jul 2010 16:47:30 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47EA08FC29; Tue, 13 Jul 2010 16:47:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DGlUBC095302; Tue, 13 Jul 2010 16:47:30 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DGlUSw095300; Tue, 13 Jul 2010 16:47:30 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201007131647.o6DGlUSw095300@svn.freebsd.org> From: "Simon L. Nielsen" Date: Tue, 13 Jul 2010 16:47:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210004 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 16:47:30 -0000 Author: simon Date: Tue Jul 13 16:47:29 2010 New Revision: 210004 URL: http://svn.freebsd.org/changeset/base/210004 Log: Bump document for content change in r210002. Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Tue Jul 13 16:35:41 2010 (r210003) +++ head/share/man/man5/rc.conf.5 Tue Jul 13 16:47:29 2010 (r210004) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 27, 2010 +.Dd July 13, 2010 .Dt RC.CONF 5 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 16:57:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1C94106566B; Tue, 13 Jul 2010 16:57:52 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF4948FC15; Tue, 13 Jul 2010 16:57:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DGvqd4097596; Tue, 13 Jul 2010 16:57:52 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DGvq9L097594; Tue, 13 Jul 2010 16:57:52 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007131657.o6DGvq9L097594@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 13 Jul 2010 16:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210005 - head/sys/modules/acpi/acpi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 16:57:52 -0000 Author: jkim Date: Tue Jul 13 16:57:52 2010 New Revision: 210005 URL: http://svn.freebsd.org/changeset/base/210005 Log: Define SMP unconditionally for amd64 and remove opt_global.h from SRCS. Note it is done just for correctness sake because we do not build, ship, or support acpi.ko on amd64. Prodded by: bde Modified: head/sys/modules/acpi/acpi/Makefile Modified: head/sys/modules/acpi/acpi/Makefile ============================================================================== --- head/sys/modules/acpi/acpi/Makefile Tue Jul 13 16:47:29 2010 (r210004) +++ head/sys/modules/acpi/acpi/Makefile Tue Jul 13 16:57:52 2010 (r210005) @@ -99,7 +99,10 @@ SRCS+= assym.s madt.c CLEANFILES+= acpi_wakecode.bin acpi_wakecode.h acpi_wakecode.o .if ${MACHINE_ARCH} == "amd64" -SRCS+= acpi_switch.S acpi_wakedata.h opt_global.h +.if !defined(KERNBUILDDIR) +CFLAGS+=-DSMP +.endif +SRCS+= acpi_switch.S acpi_wakedata.h CLEANFILES+= acpi_wakedata.h ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} acpi_switch.o: acpi_switch.S From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 17:21:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 404201065673; Tue, 13 Jul 2010 17:21:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E5718FC20; Tue, 13 Jul 2010 17:21:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DHLGvf002948; Tue, 13 Jul 2010 17:21:16 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DHLGSp002946; Tue, 13 Jul 2010 17:21:16 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007131721.o6DHLGSp002946@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 17:21:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210007 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 17:21:16 -0000 Author: imp Date: Tue Jul 13 17:21:15 2010 New Revision: 210007 URL: http://svn.freebsd.org/changeset/base/210007 Log: Use the cpuregs.h spellings for these registers rather than the cpu.h spelling. Modified: head/sys/mips/mips/locore.S Modified: head/sys/mips/mips/locore.S ============================================================================== --- head/sys/mips/mips/locore.S Tue Jul 13 17:19:57 2010 (r210006) +++ head/sys/mips/mips/locore.S Tue Jul 13 17:21:15 2010 (r210007) @@ -85,8 +85,8 @@ GLOBAL(fenvp) GLOBAL(btext) ASM_ENTRY(_start) VECTOR(_locore, unknown) - /* UNSAFE TO USE a0..a3, since some bootloaders pass that to us */ - mtc0 zero, COP_0_CAUSE_REG # Clear soft interrupts + /* UNSAFE TO USE a0..a3, need to preserve the args from boot loader */ + mtc0 zero, MIPS_COP_0_CAUSE # Clear soft interrupts #if defined(TARGET_OCTEON) /* @@ -123,14 +123,14 @@ VECTOR(_locore, unknown) * preserved (namely, clearing interrupt bits), and set * bits we want to explicitly set. */ - mfc0 t2, COP_0_STATUS_REG + mfc0 t2, MIPS_COP_0_STATUS and t2, t0 or t2, t1 - mtc0 t2, COP_0_STATUS_REG + mtc0 t2, MIPS_COP_0_STATUS COP0_SYNC /* Make sure KSEG0 is cached */ - li t0, CFG_K0_CACHED + li t0, MIPS_CCA_CNC mtc0 t0, MIPS_COP_0_CONFIG COP0_SYNC From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 17:24:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 341DD106564A; Tue, 13 Jul 2010 17:24:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 227BA8FC0A; Tue, 13 Jul 2010 17:24:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DHOUXa003730; Tue, 13 Jul 2010 17:24:31 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DHOUac003728; Tue, 13 Jul 2010 17:24:30 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007131724.o6DHOUac003728@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 17:24:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210009 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 17:24:31 -0000 Author: imp Date: Tue Jul 13 17:24:30 2010 New Revision: 210009 URL: http://svn.freebsd.org/changeset/base/210009 Log: Define break value for ddb. Use int32/intptr casts for exception vector names. Define MIPS_SR_INT_MASK again Change MIPS_XKPHYS_CCA_* to MIPS_CCA_* since we can use them in many contexts Minor gratuitous whitespace churn Modified: head/sys/mips/include/cpuregs.h Modified: head/sys/mips/include/cpuregs.h ============================================================================== --- head/sys/mips/include/cpuregs.h Tue Jul 13 17:21:42 2010 (r210008) +++ head/sys/mips/include/cpuregs.h Tue Jul 13 17:24:30 2010 (r210009) @@ -81,7 +81,7 @@ #define MIPS_KSEG0_LARGEST_PHYS (0x20000000) #define MIPS_PHYS_MASK (0x1fffffff) -#if !defined(_LOCORE) +#ifndef LOCORE #define MIPS_KUSEG_START 0x00000000 #define MIPS_KSEG0_START ((intptr_t)(int32_t)0x80000000) #define MIPS_KSEG0_END ((intptr_t)(int32_t)0x9fffffff) @@ -91,9 +91,9 @@ #define MIPS_KSSEG_END ((intptr_t)(int32_t)0xdfffffff) #define MIPS_KSEG3_START ((intptr_t)(int32_t)0xe0000000) #define MIPS_KSEG3_END ((intptr_t)(int32_t)0xffffffff) - #define MIPS_KSEG2_START MIPS_KSSEG_START #define MIPS_KSEG2_END MIPS_KSSEG_END +#endif #define MIPS_PHYS_TO_KSEG0(x) ((uintptr_t)(x) | MIPS_KSEG0_START) #define MIPS_PHYS_TO_KSEG1(x) ((uintptr_t)(x) | MIPS_KSEG1_START) @@ -112,15 +112,15 @@ #define MIPS_XKPHYS_START 0x8000000000000000 #define MIPS_XKPHYS_END 0xbfffffffffffffff -#define MIPS_XKPHYS_CCA_UC 0x02 /* Uncached. */ -#define MIPS_XKPHYS_CCA_CNC 0x03 /* Cacheable non-coherent. */ +#define MIPS_CCA_UC 0x02 /* Uncached. */ +#define MIPS_CCA_CNC 0x03 /* Cacheable non-coherent. */ #define MIPS_PHYS_TO_XKPHYS(cca,x) \ ((0x2ULL << 62) | ((unsigned long long)(cca) << 59) | (x)) #define MIPS_PHYS_TO_XKPHYS_CACHED(x) \ - ((0x2ULL << 62) | ((unsigned long long)(MIPS_XKPHYS_CCA_CNC) << 59) | (x)) + ((0x2ULL << 62) | ((unsigned long long)(MIPS_CCA_CNC) << 59) | (x)) #define MIPS_PHYS_TO_XKPHYS_UNCACHED(x) \ - ((0x2ULL << 62) | ((unsigned long long)(MIPS_XKPHYS_CCA_UC) << 59) | (x)) + ((0x2ULL << 62) | ((unsigned long long)(MIPS_CCA_UC) << 59) | (x)) #define MIPS_XKPHYS_TO_PHYS(x) ((x) & 0x07ffffffffffffffULL) @@ -130,8 +130,6 @@ #define MIPS_XKSEG_START 0xc000000000000000 #define MIPS_XKSEG_END 0xc00000ff80000000 -#endif - /* CPU dependent mtc0 hazard hook */ #ifdef TARGET_OCTEON #define COP0_SYNC nop; nop; nop; nop; nop; @@ -197,7 +195,7 @@ #define MIPS_SR_INT_IE 0x00000001 /*#define MIPS_SR_MBZ 0x0f8000c0*/ /* Never used, true for r3k */ -/*#define MIPS_SR_INT_MASK 0x0000ff00*/ +#define MIPS_SR_INT_MASK 0x0000ff00 /* * The R2000/R3000-specific status register bit definitions. @@ -476,20 +474,20 @@ * * Common vectors: reset and UTLB miss. */ -#define MIPS_RESET_EXC_VEC 0xBFC00000 -#define MIPS_UTLB_MISS_EXC_VEC 0x80000000 +#define MIPS_RESET_EXC_VEC ((intptr_t)(int32_t)0xBFC00000) +#define MIPS_UTLB_MISS_EXC_VEC ((intptr_t)(int32_t)0x80000000) /* * MIPS-1 general exception vector (everything else) */ -#define MIPS1_GEN_EXC_VEC 0x80000080 +#define MIPS1_GEN_EXC_VEC ((intptr_t)(int32_t)0x80000080) /* * MIPS-III exception vectors */ -#define MIPS3_XTLB_MISS_EXC_VEC 0x80000080 -#define MIPS3_CACHE_ERR_EXC_VEC 0x80000100 -#define MIPS3_GEN_EXC_VEC 0x80000180 +#define MIPS3_XTLB_MISS_EXC_VEC ((intptr_t)(int32_t)0x80000080) +#define MIPS3_CACHE_ERR_EXC_VEC ((intptr_t)(int32_t)0x80000100) +#define MIPS3_GEN_EXC_VEC ((intptr_t)(int32_t)0x80000180) /* * TX79 (R5900) exception vectors @@ -643,6 +641,7 @@ #define MIPS_BREAK_SSTEP_VAL 513 #define MIPS_BREAK_BRKPT_VAL 514 #define MIPS_BREAK_SOVER_VAL 515 +#define MIPS_BREAK_DDB_VAL 516 #define MIPS_BREAK_KDB (MIPS_BREAK_INSTR | \ (MIPS_BREAK_KDB_VAL << MIPS_BREAK_VAL_SHIFT)) #define MIPS_BREAK_SSTEP (MIPS_BREAK_INSTR | \ @@ -651,6 +650,8 @@ (MIPS_BREAK_BRKPT_VAL << MIPS_BREAK_VAL_SHIFT)) #define MIPS_BREAK_SOVER (MIPS_BREAK_INSTR | \ (MIPS_BREAK_SOVER_VAL << MIPS_BREAK_VAL_SHIFT)) +#define MIPS_BREAK_DDB (MIPS_BREAK_INSTR | \ + (MIPS_BREAK_DDB_VAL << MIPS_BREAK_VAL_SHIFT)) /* * Mininum and maximum cache sizes. From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 19:27:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56923106566B; Tue, 13 Jul 2010 19:27:21 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45A7C8FC26; Tue, 13 Jul 2010 19:27:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DJRLG9032744; Tue, 13 Jul 2010 19:27:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DJRLBG032742; Tue, 13 Jul 2010 19:27:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007131927.o6DJRLBG032742@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 19:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210010 - head/sys/dev/bktr X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 19:27:21 -0000 Author: nwhitehorn Date: Tue Jul 13 19:27:20 2010 New Revision: 210010 URL: http://svn.freebsd.org/changeset/base/210010 Log: Fix build on architectures where PAGE_SIZE is a long (sparc64, powerpc). Modified: head/sys/dev/bktr/bktr_core.c Modified: head/sys/dev/bktr/bktr_core.c ============================================================================== --- head/sys/dev/bktr/bktr_core.c Tue Jul 13 17:24:30 2010 (r210009) +++ head/sys/dev/bktr/bktr_core.c Tue Jul 13 19:27:20 2010 (r210010) @@ -538,7 +538,7 @@ bktr_store_address(unit, BKTR_MEM_BUF, if ( bootverbose ) { printf("%s: buffer size %d, addr %p\n", - bktr_name(bktr), BROOKTREE_ALLOC, + bktr_name(bktr), (int)BROOKTREE_ALLOC, (void *)(uintptr_t)vtophys(buf)); } @@ -1808,9 +1808,8 @@ video_ioctl( bktr_ptr_t bktr, int unit, bktr->bigbuf = buf; bktr->alloc_pages = temp; if (bootverbose) - printf( - "%s: ioctl: Allocating %d bytes\n", - bktr_name(bktr), temp*PAGE_SIZE); + printf("%s: ioctl: Allocating %d bytes\n", + bktr_name(bktr), (int)(temp*PAGE_SIZE)); } else error = ENOMEM; From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 19:33:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F5AB1065673; Tue, 13 Jul 2010 19:33:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E52B8FC1A; Tue, 13 Jul 2010 19:33:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DJXlJA034209; Tue, 13 Jul 2010 19:33:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DJXle1034207; Tue, 13 Jul 2010 19:33:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007131933.o6DJXle1034207@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 13 Jul 2010 19:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210011 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 19:33:47 -0000 Author: yongari Date: Tue Jul 13 19:33:46 2010 New Revision: 210011 URL: http://svn.freebsd.org/changeset/base/210011 Log: Make bge_stop_fw() static. While I'm here use ANSI function definitions. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Jul 13 19:27:20 2010 (r210010) +++ head/sys/dev/bge/if_bge.c Tue Jul 13 19:33:46 2010 (r210011) @@ -436,6 +436,7 @@ static int bge_poll(struct ifnet *ifp, e static void bge_sig_post_reset(struct bge_softc *, int); static void bge_sig_legacy(struct bge_softc *, int); static void bge_sig_pre_reset(struct bge_softc *, int); +static void bge_stop_fw(struct bge_softc *); static int bge_reset(struct bge_softc *); static void bge_link_upd(struct bge_softc *); @@ -1237,10 +1238,9 @@ bge_setvlan(struct bge_softc *sc) } static void -bge_sig_pre_reset(sc, type) - struct bge_softc *sc; - int type; +bge_sig_pre_reset(struct bge_softc *sc, int type) { + /* * Some chips don't like this so only do this if ASF is enabled */ @@ -1260,10 +1260,9 @@ bge_sig_pre_reset(sc, type) } static void -bge_sig_post_reset(sc, type) - struct bge_softc *sc; - int type; +bge_sig_post_reset(struct bge_softc *sc, int type) { + if (sc->bge_asf_mode & ASF_NEW_HANDSHAKE) { switch (type) { case BGE_RESET_START: @@ -1278,10 +1277,9 @@ bge_sig_post_reset(sc, type) } static void -bge_sig_legacy(sc, type) - struct bge_softc *sc; - int type; +bge_sig_legacy(struct bge_softc *sc, int type) { + if (sc->bge_asf_mode) { switch (type) { case BGE_RESET_START: @@ -1294,10 +1292,8 @@ bge_sig_legacy(sc, type) } } -void bge_stop_fw(struct bge_softc *); -void -bge_stop_fw(sc) - struct bge_softc *sc; +static void +bge_stop_fw(struct bge_softc *sc) { int i; From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 19:37:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF1AD1065676; Tue, 13 Jul 2010 19:37:45 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD8D18FC16; Tue, 13 Jul 2010 19:37:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DJbj5P035093; Tue, 13 Jul 2010 19:37:45 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DJbjxk035090; Tue, 13 Jul 2010 19:37:45 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201007131937.o6DJbjxk035090@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 13 Jul 2010 19:37:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210012 - head/sys/dev/hwpmc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 19:37:45 -0000 Author: gnn Date: Tue Jul 13 19:37:45 2010 New Revision: 210012 URL: http://svn.freebsd.org/changeset/base/210012 Log: Fix a panic brought about by writing an MSR without a proper mask. All of the necessary wrmsr calls are now preceded by a rdmsr and we leave the reserved bits alone. Document the bits in the relevant registers for future reference. Tested by: mdf MFC after: 1 week Modified: head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_core.h Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Tue Jul 13 19:33:46 2010 (r210011) +++ head/sys/dev/hwpmc/hwpmc_core.c Tue Jul 13 19:37:45 2010 (r210012) @@ -147,6 +147,7 @@ core_pcpu_fini(struct pmc_mdep *md, int int core_ri, n, npmc; struct pmc_cpu *pc; struct core_cpu *cc; + uint64_t msr = 0; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] insane cpu number (%d)", __LINE__, cpu)); @@ -166,11 +167,14 @@ core_pcpu_fini(struct pmc_mdep *md, int npmc = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_num; core_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_ri; - for (n = 0; n < npmc; n++) - wrmsr(IAP_EVSEL0 + n, 0); + for (n = 0; n < npmc; n++) { + msr = rdmsr(IAP_EVSEL0 + n); + wrmsr(IAP_EVSEL0 + n, msr & ~IAP_EVSEL_MASK); + } if (core_cputype != PMC_CPU_INTEL_CORE) { - wrmsr(IAF_CTRL, 0); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK); npmc += md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAF].pcd_num; } @@ -374,6 +378,7 @@ iaf_start_pmc(int cpu, int ri) { struct pmc *pm; struct core_cpu *iafc; + uint64_t msr = 0; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal CPU value %d", __LINE__, cpu)); @@ -387,12 +392,15 @@ iaf_start_pmc(int cpu, int ri) iafc->pc_iafctrl |= pm->pm_md.pm_iaf.pm_iaf_ctrl; - wrmsr(IAF_CTRL, iafc->pc_iafctrl); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK)); do { iafc->pc_resync = 0; iafc->pc_globalctrl |= (1ULL << (ri + IAF_OFFSET)); - wrmsr(IA_GLOBAL_CTRL, iafc->pc_globalctrl); + msr = rdmsr(IA_GLOBAL_CTRL); + wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & + IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); PMCDBG(MDP,STA,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", @@ -407,6 +415,7 @@ iaf_stop_pmc(int cpu, int ri) { uint32_t fc; struct core_cpu *iafc; + uint64_t msr = 0; PMCDBG(MDP,STO,1,"iaf-stop cpu=%d ri=%d", cpu, ri); @@ -425,12 +434,15 @@ iaf_stop_pmc(int cpu, int ri) iafc->pc_iafctrl &= ~fc; PMCDBG(MDP,STO,1,"iaf-stop iafctrl=%x", iafc->pc_iafctrl); - wrmsr(IAF_CTRL, iafc->pc_iafctrl); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK)); do { iafc->pc_resync = 0; iafc->pc_globalctrl &= ~(1ULL << (ri + IAF_OFFSET)); - wrmsr(IA_GLOBAL_CTRL, iafc->pc_globalctrl); + msr = rdmsr(IA_GLOBAL_CTRL); + wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & + IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); PMCDBG(MDP,STO,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", @@ -445,6 +457,7 @@ iaf_write_pmc(int cpu, int ri, pmc_value { struct core_cpu *cc; struct pmc *pm; + uint64_t msr; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal cpu value %d", __LINE__, cpu)); @@ -460,9 +473,11 @@ iaf_write_pmc(int cpu, int ri, pmc_value if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = iaf_reload_count_to_perfctr_value(v); - wrmsr(IAF_CTRL, 0); /* Turn off fixed counters */ - wrmsr(IAF_CTR0 + ri, v); - wrmsr(IAF_CTRL, cc->pc_iafctrl); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK); + wrmsr(IAF_CTR0 + ri, v & ((1ULL << core_iaf_width) - 1)); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr | (cc->pc_iafctrl & IAF_CTRL_MASK)); PMCDBG(MDP,WRI,1, "iaf-write cpu=%d ri=%d msr=0x%x v=%jx iafctrl=%jx " "pmc=%jx", cpu, ri, IAF_RI_TO_MSR(ri), v, @@ -1879,6 +1894,7 @@ iap_stop_pmc(int cpu, int ri) { struct pmc *pm; struct core_cpu *cc; + uint64_t msr; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal cpu value %d", __LINE__, cpu)); @@ -1894,7 +1910,8 @@ iap_stop_pmc(int cpu, int ri) PMCDBG(MDP,STO,1, "iap-stop cpu=%d ri=%d", cpu, ri); - wrmsr(IAP_EVSEL0 + ri, 0); /* stop hw */ + msr = rdmsr(IAP_EVSEL0 + ri); + wrmsr(IAP_EVSEL0 + ri, msr & IAP_EVSEL_MASK); /* stop hw */ if (core_cputype == PMC_CPU_INTEL_CORE) return (0); @@ -1937,7 +1954,7 @@ iap_write_pmc(int cpu, int ri, pmc_value * a stopped state when the pcd_write() entry point is called. */ - wrmsr(IAP_PMC0 + ri, v); + wrmsr(IAP_PMC0 + ri, v & ((1ULL << core_iap_width) - 1)); return (0); } @@ -1987,6 +2004,7 @@ core_intr(int cpu, struct trapframe *tf) struct pmc *pm; struct core_cpu *cc; int error, found_interrupt, ri; + uint64_t msr = 0; PMCDBG(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf, TRAPF_USERMODE(tf)); @@ -2018,7 +2036,8 @@ core_intr(int cpu, struct trapframe *tf) * Stop the counter, reload it but only restart it if * the PMC is not stalled. */ - wrmsr(IAP_EVSEL0 + ri, 0); + msr = rdmsr(IAP_EVSEL0 + ri); + wrmsr(IAP_EVSEL0 + ri, msr & ~IAP_EVSEL_MASK); wrmsr(IAP_PMC0 + ri, v); if (error) Modified: head/sys/dev/hwpmc/hwpmc_core.h ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.h Tue Jul 13 19:33:46 2010 (r210011) +++ head/sys/dev/hwpmc/hwpmc_core.h Tue Jul 13 19:37:45 2010 (r210012) @@ -67,20 +67,59 @@ struct pmc_md_iap_op_pmcallocate { /* * Fixed-function counters. */ + #define IAF_MASK 0xF +#define IAF_COUNTER_MASK 0x0000ffffffffffff #define IAF_CTR0 0x309 #define IAF_CTR1 0x30A #define IAF_CTR2 0x30B +/* + * The IAF_CTRL MSR is laid out in the following way. + * + * Bit Position Use + * 63 - 12 Reserved (do not touch) + * 11 Ctr 2 PMI + * 10 Reserved (do not touch) + * 9-8 Ctr 2 Enable + * 7 Ctr 1 PMI + * 6 Reserved (do not touch) + * 5-4 Ctr 1 Enable + * 3 Ctr 0 PMI + * 2 Reserved (do not touch) + * 1-0 Ctr 0 Enable (3: All Levels, 2: User, 1: OS, 0: Disable) + */ + #define IAF_OFFSET 32 #define IAF_CTRL 0x38D +#define IAF_CTRL_MASK 0x0000000000000bbb /* * Programmable counters. */ #define IAP_PMC0 0x0C1 + +/* + * IAP_EVSEL(n) is laid out in the following way. + * + * Bit Position Use + * 63-31 Reserved (do not touch) + * 31-24 Counter Mask + * 23 Invert + * 22 Enable + * 21 Reserved (do not touch) + * 20 APIC Interrupt Enable + * 19 Pin Control + * 18 Edge Detect + * 17 OS + * 16 User + * 15-8 Unit Mask + * 7-0 Event Select + */ + +#define IAP_EVSEL_MASK 0x00000000ffdfffff #define IAP_EVSEL0 0x186 /* @@ -90,6 +129,21 @@ struct pmc_md_iap_op_pmcallocate { #define IA_GLOBAL_STATUS 0x38E #define IA_GLOBAL_CTRL 0x38F + +/* + * IA_GLOBAL_CTRL is layed out in the following way. + * + * Bit Position Use + * 63-35 Reserved (do not touch) + * 34 IAF Counter 2 Enable + * 33 IAF Counter 1 Enable + * 32 IAF Counter 0 Enable + * 31-0 Depends on programmable counters + */ + +/* The mask is only for the fixed porttion of the register. */ +#define IAF_GLOBAL_CTRL_MASK 0x0000000700000000 + #define IA_GLOBAL_OVF_CTRL 0x390 #define IA_GLOBAL_STATUS_FLAG_CONDCHG (1ULL << 63) From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 19:39:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38DED106566B; Tue, 13 Jul 2010 19:39:52 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EA128FC0C; Tue, 13 Jul 2010 19:39:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DJdpH8035580; Tue, 13 Jul 2010 19:39:51 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DJdpjF035578; Tue, 13 Jul 2010 19:39:51 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007131939.o6DJdpjF035578@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 13 Jul 2010 19:39:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210013 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 19:39:52 -0000 Author: yongari Date: Tue Jul 13 19:39:51 2010 New Revision: 210013 URL: http://svn.freebsd.org/changeset/base/210013 Log: style. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Jul 13 19:37:45 2010 (r210012) +++ head/sys/dev/bge/if_bge.c Tue Jul 13 19:39:51 2010 (r210013) @@ -833,7 +833,7 @@ bge_miibus_writereg(device_t dev, int ph if (sc->bge_asicrev == BGE_ASICREV_BCM5906 && (reg == BRGPHY_MII_1000CTL || reg == BRGPHY_MII_AUXCTL)) - return(0); + return (0); /* Reading with autopolling on may trigger PCI errors */ autopoll = CSR_READ_4(sc, BGE_MI_MODE); @@ -3088,7 +3088,7 @@ bge_reset(struct bge_softc *sc) if (sc->bge_asicrev == BGE_ASICREV_BCM5752 || BGE_IS_5755_PLUS(sc)) { if (bootverbose) - device_printf(sc->bge_dev, "Disabling fastboot\n"); + device_printf(dev, "Disabling fastboot\n"); CSR_WRITE_4(sc, BGE_FASTBOOT_PC, 0x0); } @@ -3209,7 +3209,7 @@ bge_reset(struct bge_softc *sc) DELAY(100); } if (i == BGE_TIMEOUT) { - device_printf(sc->bge_dev, "reset timed out\n"); + device_printf(dev, "reset timed out\n"); return (1); } } else { @@ -3227,8 +3227,9 @@ bge_reset(struct bge_softc *sc) } if ((sc->bge_flags & BGE_FLAG_EADDR) && i == BGE_TIMEOUT) - device_printf(sc->bge_dev, "firmware handshake timed out, " - "found 0x%08x\n", val); + device_printf(dev, + "firmware handshake timed out, found 0x%08x\n", + val); } /* @@ -3280,7 +3281,7 @@ bge_reset(struct bge_softc *sc) } DELAY(10000); - return(0); + return (0); } static __inline void @@ -4268,7 +4269,8 @@ bge_init_locked(struct bge_softc *sc) if (ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN > (MCLBYTES - ETHER_ALIGN)) { if (bge_init_rx_ring_jumbo(sc) != 0) { - device_printf(sc->bge_dev, "no memory for std Rx buffers.\n"); + device_printf(sc->bge_dev, + "no memory for std Rx buffers.\n"); bge_stop(sc); return; } From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 19:42:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AD64106566B; Tue, 13 Jul 2010 19:42:55 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A3E78FC0A; Tue, 13 Jul 2010 19:42:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DJgtTg036401; Tue, 13 Jul 2010 19:42:55 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DJgt6l036399; Tue, 13 Jul 2010 19:42:55 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007131942.o6DJgt6l036399@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 13 Jul 2010 19:42:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210014 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 19:42:55 -0000 Author: yongari Date: Tue Jul 13 19:42:55 2010 New Revision: 210014 URL: http://svn.freebsd.org/changeset/base/210014 Log: Fix error message for jumbo buffer allocation failure. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Jul 13 19:39:51 2010 (r210013) +++ head/sys/dev/bge/if_bge.c Tue Jul 13 19:42:55 2010 (r210014) @@ -4270,7 +4270,7 @@ bge_init_locked(struct bge_softc *sc) (MCLBYTES - ETHER_ALIGN)) { if (bge_init_rx_ring_jumbo(sc) != 0) { device_printf(sc->bge_dev, - "no memory for std Rx buffers.\n"); + "no memory for jumbo Rx buffers.\n"); bge_stop(sc); return; } From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 19:45:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E46631065673; Tue, 13 Jul 2010 19:45:40 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3B0B8FC1D; Tue, 13 Jul 2010 19:45:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DJjeYd037291; Tue, 13 Jul 2010 19:45:40 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DJjetO037289; Tue, 13 Jul 2010 19:45:40 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007131945.o6DJjetO037289@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 13 Jul 2010 19:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210015 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 19:45:41 -0000 Author: yongari Date: Tue Jul 13 19:45:40 2010 New Revision: 210015 URL: http://svn.freebsd.org/changeset/base/210015 Log: Prefer PCIR_BAR macro over BGE_PCI_BAR0. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Jul 13 19:42:55 2010 (r210014) +++ head/sys/dev/bge/if_bge.c Tue Jul 13 19:45:40 2010 (r210015) @@ -2533,7 +2533,7 @@ bge_attach(device_t dev) */ pci_enable_busmaster(dev); - rid = BGE_PCI_BAR0; + rid = PCIR_BAR(0); sc->bge_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); @@ -3044,7 +3044,7 @@ bge_release_resources(struct bge_softc * if (sc->bge_res != NULL) bus_release_resource(dev, SYS_RES_MEMORY, - BGE_PCI_BAR0, sc->bge_res); + PCIR_BAR(0), sc->bge_res); if (sc->bge_ifp != NULL) if_free(sc->bge_ifp); From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 19:48:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B76DA106564A; Tue, 13 Jul 2010 19:48:20 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5E148FC0C; Tue, 13 Jul 2010 19:48:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DJmKil038157; Tue, 13 Jul 2010 19:48:20 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DJmKnY038155; Tue, 13 Jul 2010 19:48:20 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007131948.o6DJmKnY038155@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 13 Jul 2010 19:48:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210016 - head/sys/dev/fb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 19:48:20 -0000 Author: jkim Date: Tue Jul 13 19:48:20 2010 New Revision: 210016 URL: http://svn.freebsd.org/changeset/base/210016 Log: Preallocate buffers for palette and state. Do not save DAC registers as we reset DAC mode and restore palette data while we are resuming always. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Tue Jul 13 19:45:40 2010 (r210015) +++ head/sys/dev/fb/vesa.c Tue Jul 13 19:48:20 2010 (r210016) @@ -73,9 +73,16 @@ struct adp_state { }; typedef struct adp_state adp_state_t; +static void *vesa_state_buf = NULL; +static uint32_t vesa_state_buf_offs = 0; +static ssize_t vesa_state_buf_size = 0; + +static u_char *vesa_palette = NULL; +static uint32_t vesa_palette_offs = 0; +#define VESA_PALETTE_SIZE (256 * 4) + /* VESA video adapter */ static video_adapter_t *vesa_adp = NULL; -static ssize_t vesa_state_buf_size = -1; /* VESA functions */ #if 0 @@ -188,7 +195,7 @@ static int vesa_bios_load_palette2(int s #define STATE_MOST (STATE_HW | STATE_DATA | STATE_REG) #define STATE_ALL (STATE_HW | STATE_DATA | STATE_DAC | STATE_REG) static ssize_t vesa_bios_state_buf_size(void); -static int vesa_bios_save_restore(int code, void *p, size_t size); +static int vesa_bios_save_restore(int code, void *p); #ifdef MODE_TABLE_BROKEN static int vesa_bios_get_line_length(void); #endif @@ -363,37 +370,28 @@ static int vesa_bios_save_palette(int start, int colors, u_char *palette, int bits) { x86regs_t regs; - uint32_t offs; - u_char *p; int i; - p = (u_char *)x86bios_alloc(&offs, colors * 4, M_NOWAIT); - if (p == NULL) - return (1); - x86bios_init_regs(®s); regs.R_AX = 0x4f09; regs.R_BL = 1; regs.R_CX = colors; regs.R_DX = start; - regs.R_ES = X86BIOS_PHYSTOSEG(offs); - regs.R_DI = X86BIOS_PHYSTOOFF(offs); + regs.R_ES = X86BIOS_PHYSTOSEG(vesa_palette_offs); + regs.R_DI = X86BIOS_PHYSTOOFF(vesa_palette_offs); x86bios_intr(®s, 0x10); - if (regs.R_AX != 0x004f) { - x86bios_free(p, colors * 4); + if (regs.R_AX != 0x004f) return (1); - } bits = 8 - bits; for (i = 0; i < colors; ++i) { - palette[i * 3] = p[i * 4 + 2] << bits; - palette[i * 3 + 1] = p[i * 4 + 1] << bits; - palette[i * 3 + 2] = p[i * 4] << bits; + palette[i * 3] = vesa_palette[i * 4 + 2] << bits; + palette[i * 3 + 1] = vesa_palette[i * 4 + 1] << bits; + palette[i * 3 + 2] = vesa_palette[i * 4] << bits; } - x86bios_free(p, colors * 4); return (0); } @@ -403,37 +401,28 @@ vesa_bios_save_palette2(int start, int c int bits) { x86regs_t regs; - uint32_t offs; - u_char *p; int i; - p = (u_char *)x86bios_alloc(&offs, colors * 4, M_NOWAIT); - if (p == NULL) - return (1); - x86bios_init_regs(®s); regs.R_AX = 0x4f09; regs.R_BL = 1; regs.R_CX = colors; regs.R_DX = start; - regs.R_ES = X86BIOS_PHYSTOSEG(offs); - regs.R_DI = X86BIOS_PHYSTOOFF(offs); + regs.R_ES = X86BIOS_PHYSTOSEG(vesa_palette_offs); + regs.R_DI = X86BIOS_PHYSTOOFF(vesa_palette_offs); x86bios_intr(®s, 0x10); - if (regs.R_AX != 0x004f) { - x86bios_free(p, colors * 4); + if (regs.R_AX != 0x004f) return (1); - } bits = 8 - bits; for (i = 0; i < colors; ++i) { - r[i] = p[i * 4 + 2] << bits; - g[i] = p[i * 4 + 1] << bits; - b[i] = p[i * 4] << bits; + r[i] = vesa_palette[i * 4 + 2] << bits; + g[i] = vesa_palette[i * 4 + 1] << bits; + b[i] = vesa_palette[i * 4] << bits; } - x86bios_free(p, colors * 4); return (0); } @@ -442,32 +431,25 @@ static int vesa_bios_load_palette(int start, int colors, u_char *palette, int bits) { x86regs_t regs; - uint32_t offs; - u_char *p; int i; - p = (u_char *)x86bios_alloc(&offs, colors * 4, M_NOWAIT); - if (p == NULL) - return (1); - x86bios_init_regs(®s); regs.R_AX = 0x4f09; /* regs.R_BL = 0; */ regs.R_CX = colors; regs.R_DX = start; - regs.R_ES = X86BIOS_PHYSTOSEG(offs); - regs.R_DI = X86BIOS_PHYSTOOFF(offs); + regs.R_ES = X86BIOS_PHYSTOSEG(vesa_palette_offs); + regs.R_DI = X86BIOS_PHYSTOOFF(vesa_palette_offs); bits = 8 - bits; for (i = 0; i < colors; ++i) { - p[i * 4] = palette[i * 3 + 2] >> bits; - p[i * 4 + 1] = palette[i * 3 + 1] >> bits; - p[i * 4 + 2] = palette[i * 3] >> bits; - p[i * 4 + 3] = 0; + vesa_palette[i * 4] = palette[i * 3 + 2] >> bits; + vesa_palette[i * 4 + 1] = palette[i * 3 + 1] >> bits; + vesa_palette[i * 4 + 2] = palette[i * 3] >> bits; + vesa_palette[i * 4 + 3] = 0; } x86bios_intr(®s, 0x10); - x86bios_free(p, colors * 4); return (regs.R_AX != 0x004f); } @@ -477,32 +459,25 @@ vesa_bios_load_palette2(int start, int c int bits) { x86regs_t regs; - uint32_t offs; - u_char *p; int i; - p = (u_char *)x86bios_alloc(&offs, colors * 4, M_NOWAIT); - if (p == NULL) - return (1); - x86bios_init_regs(®s); regs.R_AX = 0x4f09; /* regs.R_BL = 0; */ regs.R_CX = colors; regs.R_DX = start; - regs.R_ES = X86BIOS_PHYSTOSEG(offs); - regs.R_DI = X86BIOS_PHYSTOOFF(offs); + regs.R_ES = X86BIOS_PHYSTOSEG(vesa_palette_offs); + regs.R_DI = X86BIOS_PHYSTOOFF(vesa_palette_offs); bits = 8 - bits; for (i = 0; i < colors; ++i) { - p[i * 4] = b[i] >> bits; - p[i * 4 + 1] = g[i] >> bits; - p[i * 4 + 2] = r[i] >> bits; - p[i * 4 + 3] = 0; + vesa_palette[i * 4] = b[i] >> bits; + vesa_palette[i * 4 + 1] = g[i] >> bits; + vesa_palette[i * 4 + 2] = r[i] >> bits; + vesa_palette[i * 4 + 3] = 0; } x86bios_intr(®s, 0x10); - x86bios_free(p, colors * 4); return (regs.R_AX != 0x004f); } @@ -515,7 +490,7 @@ vesa_bios_state_buf_size(void) x86bios_init_regs(®s); regs.R_AX = 0x4f04; /* regs.R_DL = STATE_SIZE; */ - regs.R_CX = STATE_ALL; + regs.R_CX = STATE_MOST; x86bios_intr(®s, 0x10); @@ -526,38 +501,31 @@ vesa_bios_state_buf_size(void) } static int -vesa_bios_save_restore(int code, void *p, size_t size) +vesa_bios_save_restore(int code, void *p) { x86regs_t regs; - uint32_t offs; - void *buf; if (code != STATE_SAVE && code != STATE_LOAD) return (1); - buf = x86bios_alloc(&offs, size, M_NOWAIT); - if (buf == NULL) - return (1); - x86bios_init_regs(®s); regs.R_AX = 0x4f04; regs.R_DL = code; - regs.R_CX = STATE_ALL; + regs.R_CX = STATE_MOST; - regs.R_ES = X86BIOS_PHYSTOSEG(offs); - regs.R_BX = X86BIOS_PHYSTOOFF(offs); + regs.R_ES = X86BIOS_PHYSTOSEG(vesa_state_buf_offs); + regs.R_BX = X86BIOS_PHYSTOOFF(vesa_state_buf_offs); switch (code) { case STATE_SAVE: x86bios_intr(®s, 0x10); - bcopy(buf, p, size); + bcopy(vesa_state_buf, p, vesa_state_buf_size); break; case STATE_LOAD: - bcopy(p, buf, size); + bcopy(p, vesa_state_buf, vesa_state_buf_size); x86bios_intr(®s, 0x10); break; } - x86bios_free(buf, size); return (regs.R_AX != 0x004f); } @@ -1017,6 +985,15 @@ vesa_bios_init(void) goto fail; x86bios_free(vmbuf, sizeof(*buf)); + + vesa_palette = x86bios_alloc(&vesa_palette_offs, + VESA_PALETTE_SIZE + vesa_state_buf_size, M_WAITOK); + vesa_state_buf_size = vesa_bios_state_buf_size(); + if (vesa_state_buf_size > 0) { + vesa_state_buf = vesa_palette + VESA_PALETTE_SIZE; + vesa_state_buf_offs = vesa_palette_offs + VESA_PALETTE_SIZE; + } + return (0); fail: @@ -1414,20 +1391,16 @@ vesa_save_state(video_adapter_t *adp, vo if (adp != vesa_adp) return ((*prevvidsw->save_state)(adp, p, size)); - if (vesa_state_buf_size == -1) { - vesa_state_buf_size = vesa_bios_state_buf_size(); - if (vesa_state_buf_size == 0) - return (1); - } + if (vesa_state_buf_size == 0) + return (1); if (size == 0) return (offsetof(adp_state_t, regs) + vesa_state_buf_size); - else if (size < (offsetof(adp_state_t, regs) + vesa_state_buf_size)) + if (size < (offsetof(adp_state_t, regs) + vesa_state_buf_size)) return (1); ((adp_state_t *)p)->sig = V_STATE_SIG; bzero(((adp_state_t *)p)->regs, vesa_state_buf_size); - return (vesa_bios_save_restore(STATE_SAVE, ((adp_state_t *)p)->regs, - vesa_state_buf_size)); + return (vesa_bios_save_restore(STATE_SAVE, ((adp_state_t *)p)->regs)); } static int @@ -1437,7 +1410,7 @@ vesa_load_state(video_adapter_t *adp, vo if ((adp != vesa_adp) || (((adp_state_t *)p)->sig != V_STATE_SIG)) return ((*prevvidsw->load_state)(adp, p)); - if (vesa_state_buf_size <= 0) + if (vesa_state_buf_size == 0) return (1); /* Try BIOS POST to restore a sane state. */ @@ -1445,8 +1418,7 @@ vesa_load_state(video_adapter_t *adp, vo (void)int10_set_mode(adp->va_initial_bios_mode); (void)vesa_set_mode(adp, adp->va_mode); - return (vesa_bios_save_restore(STATE_LOAD, ((adp_state_t *)p)->regs, - vesa_state_buf_size)); + return (vesa_bios_save_restore(STATE_LOAD, ((adp_state_t *)p)->regs)); } #if 0 @@ -1892,6 +1864,9 @@ vesa_unload(void) free(vesa_revstr, M_DEVBUF); if (vesa_vmode != &vesa_vmode_empty) free(vesa_vmode, M_DEVBUF); + if (vesa_palette != NULL) + x86bios_free(vesa_palette, + VESA_PALETTE_SIZE + vesa_state_buf_size); return (error); } From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 19:58:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 637BA106566C; Tue, 13 Jul 2010 19:58:08 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5304C8FC2D; Tue, 13 Jul 2010 19:58:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DJw6EU040671; Tue, 13 Jul 2010 19:58:06 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DJw6g1040669; Tue, 13 Jul 2010 19:58:06 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007131958.o6DJw6g1040669@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 13 Jul 2010 19:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210017 - head/sys/dev/fb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 19:58:08 -0000 Author: jkim Date: Tue Jul 13 19:58:06 2010 New Revision: 210017 URL: http://svn.freebsd.org/changeset/base/210017 Log: Initialize a variable before its use. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Tue Jul 13 19:48:20 2010 (r210016) +++ head/sys/dev/fb/vesa.c Tue Jul 13 19:58:06 2010 (r210017) @@ -986,9 +986,9 @@ vesa_bios_init(void) x86bios_free(vmbuf, sizeof(*buf)); + vesa_state_buf_size = vesa_bios_state_buf_size(); vesa_palette = x86bios_alloc(&vesa_palette_offs, VESA_PALETTE_SIZE + vesa_state_buf_size, M_WAITOK); - vesa_state_buf_size = vesa_bios_state_buf_size(); if (vesa_state_buf_size > 0) { vesa_state_buf = vesa_palette + VESA_PALETTE_SIZE; vesa_state_buf_offs = vesa_palette_offs + VESA_PALETTE_SIZE; From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 20:09:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F30971065675; Tue, 13 Jul 2010 20:09:14 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E25498FC12; Tue, 13 Jul 2010 20:09:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DK9EHO043193; Tue, 13 Jul 2010 20:09:14 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DK9Ea9043191; Tue, 13 Jul 2010 20:09:14 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <201007132009.o6DK9Ea9043191@svn.freebsd.org> From: Remko Lodder Date: Tue, 13 Jul 2010 20:09:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210018 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 20:09:15 -0000 Author: remko Date: Tue Jul 13 20:09:14 2010 New Revision: 210018 URL: http://svn.freebsd.org/changeset/base/210018 Log: Add a 4 and 7 port USB hub from NEC. PR: 148189 MFC after: 1 week Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jul 13 19:58:06 2010 (r210017) +++ head/sys/dev/usb/usbdevs Tue Jul 13 20:09:14 2010 (r210018) @@ -2160,6 +2160,8 @@ product NATIONAL BEARPAW1200 0x1000 Bear product NATIONAL BEARPAW2400 0x1001 BearPaw 2400 /* NEC products */ +product NEC HUB_0050 0x0050 USB 2.0 7-Port Hub +product NEC HUB_005A 0x005a USB 2.0 4-Port Hub product NEC HUB 0x55aa hub product NEC HUB_B 0x55ab hub From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 21:19:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F089106566B; Tue, 13 Jul 2010 21:19:59 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88FA78FC12; Tue, 13 Jul 2010 21:19:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DLJxGt058957; Tue, 13 Jul 2010 21:19:59 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DLJxUP058953; Tue, 13 Jul 2010 21:19:59 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007132119.o6DLJxUP058953@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 21:19:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210024 - in head: . include release X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 21:19:59 -0000 Author: nwhitehorn Date: Tue Jul 13 21:19:59 2010 New Revision: 210024 URL: http://svn.freebsd.org/changeset/base/210024 Log: Connect powerpc64 to the build. It is not presently part of make universe, which will be added soon. Reviewed by: imp Modified: head/Makefile.inc1 head/include/Makefile head/release/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Jul 13 21:15:18 2010 (r210023) +++ head/Makefile.inc1 Tue Jul 13 21:19:59 2010 (r210024) @@ -128,7 +128,7 @@ TARGET= ${TARGET_ARCH} TARGET?= ${MACHINE} TARGET_ARCH?= ${MACHINE_ARCH} -KNOWN_ARCHES?= amd64 arm i386 i386/pc98 ia64 mips powerpc sparc64 sparc64/sun4v +KNOWN_ARCHES?= amd64 arm i386 i386/pc98 ia64 mips powerpc powerpc64/powerpc sparc64 sparc64/sun4v .if ${TARGET} == ${TARGET_ARCH} _t= ${TARGET} .else @@ -262,34 +262,47 @@ WMAKEENV+= NO_CTF=1 .endif WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP} -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" # 32 bit world LIB32TMP= ${OBJTREE}${.CURDIR}/lib32 +.if ${TARGET_ARCH} == "amd64" .if empty(TARGET_CPUTYPE) LIB32CPUFLAGS= -march=i686 -mmmx -msse -msse2 .else LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} .endif -LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -mfancy-math-387 -DCOMPAT_32BIT \ +LIB32CPUFLAGS+= -mfancy-math-387 +LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \ + MACHINE_CPU="i686 mmx sse sse2" \ + LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ + AS="${AS} --32" + +.elif ${TARGET_ARCH} == "powerpc64" +.if empty(TARGET_CPUTYPE) +LIB32CPUFLAGS= -mcpu=powerpc +.else +LIB32CPUFLAGS= -mcpu=${TARGET_CPUTYPE} +.endif +LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc \ + LD="${LD} -m elf32ppc" +.endif + + +LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -DCOMPAT_32BIT \ -isystem ${LIB32TMP}/usr/include/ \ -L${LIB32TMP}/usr/lib32 \ -B${LIB32TMP}/usr/lib32 # Yes, the flags are redundant. -LIB32WMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \ +LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \ _SHLIBDIRPREFIX=${LIB32TMP} \ VERSION="${VERSION}" \ - MACHINE=i386 \ - MACHINE_ARCH=i386 \ - MACHINE_CPU="i686 mmx sse sse2" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} \ CC="${CC} ${LIB32FLAGS}" \ CXX="${CXX} ${LIB32FLAGS}" \ OBJC="${OBJC} ${LIB32FLAGS}" \ - LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ - AS="${AS} --32" \ LIBDIR=/usr/lib32 \ SHLIBDIR=/usr/lib32 @@ -336,7 +349,7 @@ _worldtmp: @echo "--------------------------------------------------------------" .if !defined(NO_CLEAN) rm -rf ${WORLDTMP} -.if ${TARGET_ARCH} == "amd64" +.if defined(LIB32TMP) rm -rf ${LIB32TMP} .endif .else @@ -380,7 +393,7 @@ _cleanobj: @echo ">>> stage 2.1: cleaning up the object tree" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/} -.if ${TARGET_ARCH} == "amd64" +.if defined(LIB32TMP) ${_+_}cd ${.CURDIR}; ${LIB32WMAKE} -f Makefile.inc1 ${CLEANDIR:S/^/par-/} .endif .endif @@ -428,7 +441,7 @@ everything: @echo ">>> stage 4.4: building everything" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} par-all -.if ${TARGET_ARCH} == "amd64" +.if defined(LIB32TMP) build32: @echo @echo "--------------------------------------------------------------" @@ -510,7 +523,7 @@ WMAKE_TGTS+= _cleanobj _obj _build-tools WMAKE_TGTS+= _cross-tools .endif WMAKE_TGTS+= _includes _libraries _depend everything -.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no" +.if defined(LIB32TMP) && ${MK_LIB32} != "no" WMAKE_TGTS+= build32 .endif @@ -660,7 +673,7 @@ reinstall: @echo ">>> Installing everything" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install -.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no" +.if defined(LIB32TMP) && ${MK_LIB32} != "no" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32 .endif @@ -669,7 +682,7 @@ redistribute: @echo ">>> Distributing everything" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute -.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no" +.if defined(LIB32TMP) && ${MK_LIB32} != "no" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 \ DISTRIBUTION=lib32 .endif @@ -705,8 +718,12 @@ KERNCONF=${KERNFAST} KERNCONF= ${KERNEL} KERNWARN= .else +.if ${TARGET_ARCH} == "powerpc64" +KERNCONF?= GENERIC64 +.else KERNCONF?= GENERIC .endif +.endif INSTKERNNAME?= kernel KERNSRCDIR?= ${.CURDIR}/sys @@ -1108,8 +1125,12 @@ _prereq_libs= gnu/lib/libssp/libssp_nons # all shared libraries for ELF. # _startup_libs= gnu/lib/csu -.if exists(${.CURDIR}/lib/csu/${MACHINE_CPUARCH}-elf) +.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf) +_startup_libs+= lib/csu/${MACHINE_ARCH}-elf +.elif exists(${.CURDIR}/lib/csu/${MACHINE_CPUARCH}-elf) _startup_libs+= lib/csu/${MACHINE_CPUARCH}-elf +.elif exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}) +_startup_libs+= lib/csu/${MACHINE_ARCH} .else _startup_libs+= lib/csu/${MACHINE_CPUARCH} .endif Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Tue Jul 13 21:15:18 2010 (r210023) +++ head/include/Makefile Tue Jul 13 21:19:59 2010 (r210024) @@ -56,7 +56,7 @@ LSUBDIRS= cam/ata cam/scsi \ LSUBSUBDIRS= dev/mpt/mpilib -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" _dev_powermac_nvram= dev/powermac_nvram .endif @@ -189,7 +189,7 @@ copies: ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/machine/pc .endif -.if defined(_MARCH) +.if defined(_MARCH) && exists(${.CURDIR}/../sys/${_MARCH}/include) ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ cd ${.CURDIR}/../sys/${_MARCH}/include; \ @@ -276,7 +276,7 @@ symlinks: ${DESTDIR}${INCLUDEDIR}/machine/pc; \ done .endif -.if defined(_MARCH) +.if defined(_MARCH) && exists(${.CURDIR}/../sys/${_MARCH}/include) ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ cd ${.CURDIR}/../sys/${_MARCH}/include; \ Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Tue Jul 13 21:15:18 2010 (r210023) +++ head/release/Makefile Tue Jul 13 21:19:59 2010 (r210024) @@ -203,10 +203,16 @@ DISTRIBUTIONS?= ${BASE_DISTS} ${OTHER_DI # Build and package both GENERIC and SMP kernels if the target # has both configuration files. Otherwise only GENERIC is done. # +.if ${TARGET_ARCH} == "powerpc64" +KERN_GENERIC?= GENERIC64 +.else +KERN_GENERIC?= GENERIC +.endif + .if exists(${.CURDIR}/../sys/${TARGET}/conf/SMP) -KERNELS_BASE?= GENERIC SMP +KERNELS_BASE?= ${KERN_GENERIC} SMP .else -KERNELS_BASE?= GENERIC +KERNELS_BASE?= ${KERN_GENERIC} .endif # mountpoint for filesystems. @@ -851,7 +857,7 @@ SMALLMFSROOTFLOPPYSET= ${RD}/floppyset/m # Build boot and install floppies. floppies.1: - @${ZIPPER} -c ${RD}/kernels/GENERIC/kernel > ${RD}/kernels/kernel.gz + @${ZIPPER} -c ${RD}/kernels/${KERN_GENERIC}/kernel > ${RD}/kernels/kernel.gz @echo "Making the kernel boot floppies..." @cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=kern \ FLOPPYDESC="Kernel" SPLITFILE=${RD}/kernels/kernel.gz @@ -985,7 +991,7 @@ cdrom.1: done .endif @echo "Copy GENERIC kernel to boot area" - @cp -Rp ${RD}/kernels/GENERIC/ ${CD_LIVEFS}/boot/kernel + @cp -Rp ${RD}/kernels/${KERN_GENERIC}/ ${CD_LIVEFS}/boot/kernel @rm -f ${CD_LIVEFS}/boot/kernel/*.symbols @rm -f ${CD_LIVEFS}/.profile @cp ${.CURDIR}/fixit.profile ${CD_LIVEFS}/.profile @@ -1003,7 +1009,7 @@ cdrom.1: .endif @echo "CD_VERSION = ${BUILDNAME}" > ${CD_LIVEFS}/cdrom.inf .if defined(MAKE_DVD) - @cp -Rp ${RD}/kernels/GENERIC/ ${CD_DVD1}/boot/kernel + @cp -Rp ${RD}/kernels/${KERN_GENERIC}/ ${CD_DVD1}/boot/kernel @rm -f ${CD_DVD1}/boot/kernel/*.symbols @rm -f ${CD_DVD1}/.profile @cp ${.CURDIR}/fixit.profile ${CD_DVD1}/.profile @@ -1321,7 +1327,7 @@ makeFloppySet: IMAGEDIR= ${RD}/image.${FSIMAGE} BOOTDIR= ${RD}/trees/base/boot HINTSFILE= ${BOOTDIR}/device.hints -ACPI_KO= ${RD}/kernels/GENERIC/acpi.ko +ACPI_KO= ${RD}/kernels/${KERN_GENERIC}/acpi.ko IMAGEFILE= ${RD}/floppies/${FSIMAGE}.flp .if defined(FDSIZE) && ${FDSIZE} == "SMALL" FLPSIZE= ${SMALLFLOPPYSIZE} From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 21:24:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC4F51065672; Tue, 13 Jul 2010 21:24:08 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91FCF8FC1B; Tue, 13 Jul 2010 21:24:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DLO89C059928; Tue, 13 Jul 2010 21:24:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DLO81D059926; Tue, 13 Jul 2010 21:24:08 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007132124.o6DLO81D059926@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 21:24:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210025 - head/sys/powerpc/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 21:24:08 -0000 Author: nwhitehorn Date: Tue Jul 13 21:24:08 2010 New Revision: 210025 URL: http://svn.freebsd.org/changeset/base/210025 Log: Add GENERIC kernel config for powerpc64. Added: head/sys/powerpc/conf/GENERIC64 - copied, changed from r209910, head/sys/powerpc/conf/GENERIC Copied and modified: head/sys/powerpc/conf/GENERIC64 (from r209910, head/sys/powerpc/conf/GENERIC) ============================================================================== --- head/sys/powerpc/conf/GENERIC Sun Jul 11 21:12:42 2010 (r209910, copy source) +++ head/sys/powerpc/conf/GENERIC64 Tue Jul 13 21:24:08 2010 (r210025) @@ -21,11 +21,12 @@ cpu AIM ident GENERIC +machine powerpc powerpc64 + makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols # Platform support options POWERMAC #NewWorld Apple PowerMacs -options PSIM #GDB PSIM ppc simulator options SCHED_ULE #ULE scheduler options INET #InterNETworking @@ -47,7 +48,7 @@ options PROCFS #Process filesystem (r options PSEUDOFS #Pseudo-filesystem framework options GEOM_PART_GPT #GUID Partition Tables. options GEOM_LABEL #Provides labelization -options COMPAT_FREEBSD4 #Keep this for a while +options COMPAT_FREEBSD32 #Compatible with FreeBSD/powerpc binaries options COMPAT_FREEBSD5 #Compatible with FreeBSD5 options COMPAT_FREEBSD6 #Compatible with FreeBSD6 options COMPAT_FREEBSD7 #Compatible with FreeBSD7 @@ -120,7 +121,6 @@ device uart # PCI Ethernet NICs that use the common MII bus controller code. device miibus # MII bus support device bge # Broadcom BCM570xx Gigabit Ethernet -device bm # Apple BMAC Ethernet device gem # Sun GEM/Sun ERI/Apple GMAC device dc # DEC/Intel 21143 and various workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) @@ -155,7 +155,6 @@ options KBD_INSTALL_CDEV # install a CD device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da0 device ums # Mouse -device atp # Apple USB touchpad device urio # Diamond Rio 500 MP3 player # USB Ethernet device aue # ADMtek USB Ethernet @@ -175,7 +174,6 @@ device smu # Apple System Management U # ADB support device adb -device cuda device pmu # Powermac I2C support From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 22:27:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 687BD1065672; Tue, 13 Jul 2010 22:27:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5816F8FC13; Tue, 13 Jul 2010 22:27:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DMRJGK073793; Tue, 13 Jul 2010 22:27:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DMRJLf073791; Tue, 13 Jul 2010 22:27:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007132227.o6DMRJLf073791@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 22:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210026 - head/sys/mips/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 22:27:19 -0000 Author: imp Date: Tue Jul 13 22:27:19 2010 New Revision: 210026 URL: http://svn.freebsd.org/changeset/base/210026 Log: Temp hack to N32 kernel: turn off debugger since n32 is too weird for ddb Modified: head/sys/mips/conf/XLRN32 Modified: head/sys/mips/conf/XLRN32 ============================================================================== --- head/sys/mips/conf/XLRN32 Tue Jul 13 21:24:08 2010 (r210025) +++ head/sys/mips/conf/XLRN32 Tue Jul 13 22:27:19 2010 (r210026) @@ -64,10 +64,10 @@ options NO_SWAPPING #Debugging options options KTRACE # ktrace(1) support -options DDB -options KDB -options GDB -options ALT_BREAK_TO_DEBUGGER +#options DDB +#options KDB +#options GDB +#options ALT_BREAK_TO_DEBUGGER #options DEADLKRES #Enable the deadlock resolver options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 22:30:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53FAE106567A; Tue, 13 Jul 2010 22:30:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 436FE8FC1D; Tue, 13 Jul 2010 22:30:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DMURPn074519; Tue, 13 Jul 2010 22:30:27 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DMURb6074517; Tue, 13 Jul 2010 22:30:27 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007132230.o6DMURb6074517@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 22:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210027 - head/sys/mips/sibyte X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 22:30:27 -0000 Author: imp Date: Tue Jul 13 22:30:27 2010 New Revision: 210027 URL: http://svn.freebsd.org/changeset/base/210027 Log: Remove redunant machine/cpuregs.h include. Also, spell things like in machine/cpuregs.h instead of machine/cpu.h. Modified: head/sys/mips/sibyte/sb_machdep.c Modified: head/sys/mips/sibyte/sb_machdep.c ============================================================================== --- head/sys/mips/sibyte/sb_machdep.c Tue Jul 13 22:27:19 2010 (r210026) +++ head/sys/mips/sibyte/sb_machdep.c Tue Jul 13 22:30:27 2010 (r210027) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include "opt_ddb.h" #include "opt_kdb.h" @@ -253,7 +252,7 @@ mips_init(void) * code to the XTLB exception vector. */ { - bcopy(MipsTLBMiss, (void *)XTLB_MISS_EXC_VEC, + bcopy(MipsTLBMiss, (void *)MIPS3_XTLB_MISS_EXC_VEC, MipsTLBMissEnd - MipsTLBMiss); mips_icache_sync_all(); @@ -314,7 +313,7 @@ kseg0_map_coherent(void) const int CFG_K0_COHERENT = 5; config = mips_rd_config(); - config &= ~CFG_K0_MASK; + config &= ~MIPS3_CONFIG_K0_MASK; config |= CFG_K0_COHERENT; mips_wr_config(config); } @@ -371,7 +370,7 @@ platform_init_ap(int cpuid) */ clock_int_mask = hard_int_mask(5); ipi_int_mask = hard_int_mask(platform_ipi_intrnum()); - set_intr_mask(ALL_INT_MASK & ~(ipi_int_mask | clock_int_mask)); + set_intr_mask(MIPS_SR_INT_MASK & ~(ipi_int_mask | clock_int_mask)); } int From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 22:35:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F262106566C; Tue, 13 Jul 2010 22:35:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E7768FC1F; Tue, 13 Jul 2010 22:35:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DMZ9md075583; Tue, 13 Jul 2010 22:35:09 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DMZ9O0075581; Tue, 13 Jul 2010 22:35:09 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007132235.o6DMZ9O0075581@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 22:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210028 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 22:35:10 -0000 Author: imp Date: Tue Jul 13 22:35:09 2010 New Revision: 210028 URL: http://svn.freebsd.org/changeset/base/210028 Log: Add INFO config register from mips32/64 land Modified: head/sys/mips/include/cpuregs.h Modified: head/sys/mips/include/cpuregs.h ============================================================================== --- head/sys/mips/include/cpuregs.h Tue Jul 13 22:30:27 2010 (r210027) +++ head/sys/mips/include/cpuregs.h Tue Jul 13 22:35:09 2010 (r210028) @@ -512,6 +512,7 @@ * 4 MIPS_COP_0_TLB_CONTEXT 3636 TLB Context. * 5 MIPS_COP_0_TLB_PG_MASK .333 TLB Page Mask register. * 6 MIPS_COP_0_TLB_WIRED .333 Wired TLB number. + * 7 MIPS_COP_0_INFO ..33 Info registers * 8 MIPS_COP_0_BAD_VADDR 3636 Bad virtual address. * 9 MIPS_COP_0_COUNT .333 Count register. * 10 MIPS_COP_0_TLB_HI 3636 TLB entry high. @@ -588,6 +589,7 @@ #define MIPS_COP_0_ERROR_PC _(30) /* MIPS32/64 */ +#define MIPS_COP_0_INFO _(7) #define MIPS_COP_0_DEBUG _(23) #define MIPS_COP_0_DEPC _(24) #define MIPS_COP_0_PERFCNT _(25) From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 22:36:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBF161065672; Tue, 13 Jul 2010 22:36:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBC278FC1C; Tue, 13 Jul 2010 22:36:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DMajQv075976; Tue, 13 Jul 2010 22:36:45 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DMaj1H075974; Tue, 13 Jul 2010 22:36:45 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007132236.o6DMaj1H075974@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 22:36:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210029 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 22:36:45 -0000 Author: imp Date: Tue Jul 13 22:36:45 2010 New Revision: 210029 URL: http://svn.freebsd.org/changeset/base/210029 Log: union cpuprid is also unused now Modified: head/sys/mips/include/cpu.h Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Tue Jul 13 22:35:09 2010 (r210028) +++ head/sys/mips/include/cpu.h Tue Jul 13 22:36:45 2010 (r210029) @@ -303,28 +303,6 @@ */ #define get_cyclecount() mips_rd_count() -/* - * CPU identification, from PRID register. - */ -union cpuprid { - int cpuprid; - struct { -#if BYTE_ORDER == BIG_ENDIAN - u_int pad1:8; /* reserved */ - u_int cp_vendor:8; /* company identifier */ - u_int cp_imp:8; /* implementation identifier */ - u_int cp_majrev:4; /* major revision identifier */ - u_int cp_minrev:4; /* minor revision identifier */ -#else - u_int cp_minrev:4; /* minor revision identifier */ - u_int cp_majrev:4; /* major revision identifier */ - u_int cp_imp:8; /* implementation identifier */ - u_int cp_vendor:8; /* company identifier */ - u_int pad1:8; /* reserved */ -#endif - } cpu; -}; - #endif /* !_LOCORE */ /* From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 22:44:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 093641065673; Tue, 13 Jul 2010 22:44:15 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC7CA8FC14; Tue, 13 Jul 2010 22:44:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DMiETN077650; Tue, 13 Jul 2010 22:44:14 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DMiExW077648; Tue, 13 Jul 2010 22:44:14 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007132244.o6DMiExW077648@svn.freebsd.org> From: Rick Macklem Date: Tue, 13 Jul 2010 22:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210030 - head/sys/fs/nfsserver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 22:44:15 -0000 Author: rmacklem Date: Tue Jul 13 22:44:14 2010 New Revision: 210030 URL: http://svn.freebsd.org/changeset/base/210030 Log: Fix a bogus comment that mentions lru lists that don't exist. Reported by: zack.kirsch at isilon.com MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Tue Jul 13 22:36:45 2010 (r210029) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Tue Jul 13 22:44:14 2010 (r210030) @@ -45,7 +45,7 @@ NFSV4ROOTLOCKMUTEX; NFSSTATESPINLOCK; /* - * Hash and lru lists for nfs V4. + * Hash lists for nfs V4. * (Some would put them in the .h file, but I don't like declaring storage * in a .h) */ From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 23:07:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7FCF1065672; Tue, 13 Jul 2010 23:07:32 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A794B8FC19; Tue, 13 Jul 2010 23:07:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DN7W6O082788; Tue, 13 Jul 2010 23:07:32 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DN7W8v082786; Tue, 13 Jul 2010 23:07:32 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007132307.o6DN7W8v082786@svn.freebsd.org> From: Rick Macklem Date: Tue, 13 Jul 2010 23:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210032 - head/sys/fs/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 23:07:32 -0000 Author: rmacklem Date: Tue Jul 13 23:07:32 2010 New Revision: 210032 URL: http://svn.freebsd.org/changeset/base/210032 Log: For the experimental NFSv4 client, do not use cached attributes that were invalidated, even when a delegation for the file is held. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clsubs.c Modified: head/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clsubs.c Tue Jul 13 22:55:12 2010 (r210031) +++ head/sys/fs/nfsclient/nfs_clsubs.c Tue Jul 13 23:07:32 2010 (r210032) @@ -230,7 +230,7 @@ ncl_getattrcache(struct vnode *vp, struc #endif if ((time_second - np->n_attrstamp) >= timeo && - mustflush != 0) { + (mustflush != 0 || np->n_attrstamp == 0)) { newnfsstats.attrcache_misses++; mtx_unlock(&np->n_mtx); #ifdef NFS_ACDEBUG From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 23:10:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD11B106564A; Tue, 13 Jul 2010 23:10:55 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC9848FC1A; Tue, 13 Jul 2010 23:10:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DNAtMJ083579; Tue, 13 Jul 2010 23:10:55 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DNAtQH083577; Tue, 13 Jul 2010 23:10:55 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007132310.o6DNAtQH083577@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Jul 2010 23:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210033 - head/sys/powerpc/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 23:10:55 -0000 Author: nwhitehorn Date: Tue Jul 13 23:10:55 2010 New Revision: 210033 URL: http://svn.freebsd.org/changeset/base/210033 Log: Remove obsolete code that sets SHMMAXPGS to a tiny value by default on PowerPC. Modified: head/sys/powerpc/include/vmparam.h Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Tue Jul 13 23:07:32 2010 (r210032) +++ head/sys/powerpc/include/vmparam.h Tue Jul 13 23:10:55 2010 (r210033) @@ -58,13 +58,6 @@ #endif /* - * Size of shared memory map - */ -#ifndef SHMMAXPGS -#define SHMMAXPGS 1024 -#endif - -/* * The time for a process to be blocked before being very swappable. * This is a number of seconds which the system takes as being a non-trivial * amount of real time. You probably shouldn't change this; From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 23:14:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE522106566B; Tue, 13 Jul 2010 23:14:39 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADA848FC08; Tue, 13 Jul 2010 23:14:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DNEdBm084434; Tue, 13 Jul 2010 23:14:39 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DNEdov084432; Tue, 13 Jul 2010 23:14:39 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007132314.o6DNEdov084432@svn.freebsd.org> From: Rick Macklem Date: Tue, 13 Jul 2010 23:14:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210034 - head/sys/fs/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 23:14:39 -0000 Author: rmacklem Date: Tue Jul 13 23:14:39 2010 New Revision: 210034 URL: http://svn.freebsd.org/changeset/base/210034 Log: For the experimental NFSv4 client, make sure that attributes that predate the issue of a delegation are not cached once the delegation is held. This is necessary, since cached attributes remain valid while the delegation is held. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Tue Jul 13 23:10:55 2010 (r210033) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Tue Jul 13 23:14:39 2010 (r210034) @@ -268,6 +268,14 @@ else printf(" fhl=0\n"); #else NFSLOCKNODE(np); np->n_flag &= ~NDELEGMOD; + /* + * Invalidate the attribute cache, so that + * attributes that pre-date the issue of a + * delegation are not cached, since the + * cached attributes will remain valid while + * the delegation is held. + */ + NFSINVALATTRCACHE(np); NFSUNLOCKNODE(np); #endif (void) nfscl_deleg(nmp->nm_mountp, @@ -1724,6 +1732,12 @@ nfsrpc_create(vnode_t dvp, char *name, i error = nfsrpc_createv4(dvp, name, namelen, vap, cverf, fmode, owp, &dp, cred, p, dnap, nnap, nfhpp, attrflagp, dattrflagp, dstuff, &unlocked); + /* + * There is no need to invalidate cached attributes here, + * since new post-delegation issue attributes are always + * returned by nfsrpc_createv4() and these will update the + * attribute cache. + */ if (dp != NULL) (void) nfscl_deleg(nmp->nm_mountp, owp->nfsow_clp, (*nfhpp)->nfh_fh, (*nfhpp)->nfh_len, cred, p, &dp); From owner-svn-src-head@FreeBSD.ORG Tue Jul 13 23:47:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4A581065673; Tue, 13 Jul 2010 23:47:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A204B8FC2D; Tue, 13 Jul 2010 23:47:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6DNlClF091633; Tue, 13 Jul 2010 23:47:12 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6DNlCg5091622; Tue, 13 Jul 2010 23:47:12 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007132347.o6DNlCg5091622@svn.freebsd.org> From: Warner Losh Date: Tue, 13 Jul 2010 23:47:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210036 - in head/usr.sbin/pc-sysinstall: backend backend-query doc pc-sysinstall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 23:47:12 -0000 Author: imp Date: Tue Jul 13 23:47:12 2010 New Revision: 210036 URL: http://svn.freebsd.org/changeset/base/210036 Log: Add support for packages. PR: 148584 Submitted by: John Hixon Added: head/usr.sbin/pc-sysinstall/backend-query/get-packages.sh (contents, props changed) head/usr.sbin/pc-sysinstall/backend-query/list-packages.sh (contents, props changed) head/usr.sbin/pc-sysinstall/backend/functions-packages.sh (contents, props changed) Modified: head/usr.sbin/pc-sysinstall/backend-query/Makefile head/usr.sbin/pc-sysinstall/backend-query/list-config.sh head/usr.sbin/pc-sysinstall/backend-query/list-mirrors.sh head/usr.sbin/pc-sysinstall/backend/Makefile head/usr.sbin/pc-sysinstall/backend/functions-ftp.sh head/usr.sbin/pc-sysinstall/doc/help-index head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Modified: head/usr.sbin/pc-sysinstall/backend-query/Makefile ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/Makefile Tue Jul 13 23:34:43 2010 (r210035) +++ head/usr.sbin/pc-sysinstall/backend-query/Makefile Tue Jul 13 23:47:12 2010 (r210036) @@ -1,11 +1,11 @@ # $FreeBSD$ FILES= detect-laptop.sh detect-nics.sh detect-emulation.sh disk-info.sh \ - disk-list.sh disk-part.sh enable-net.sh list-config.sh list-components.sh \ - list-mirrors.sh list-rsync-backups.sh list-tzones.sh query-langs.sh \ - send-logs.sh setup-ssh-keys.sh sys-mem.sh test-live.sh test-netup.sh \ - update-part-list.sh xkeyboard-layouts.sh xkeyboard-models.sh \ - xkeyboard-variants.sh + disk-list.sh disk-part.sh enable-net.sh get-packages.sh list-config.sh \ + list-components.sh list-mirrors.sh list-packages.sh list-rsync-backups.sh \ + list-tzones.sh query-langs.sh send-logs.sh setup-ssh-keys.sh sys-mem.sh \ + test-live.sh test-netup.sh update-part-list.sh xkeyboard-layouts.sh \ + xkeyboard-models.sh xkeyboard-variants.sh FILESMODE= ${BINMODE} FILESDIR=${SHAREDIR}/pc-sysinstall/backend-query NO_OBJ= Added: head/usr.sbin/pc-sysinstall/backend-query/get-packages.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pc-sysinstall/backend-query/get-packages.sh Tue Jul 13 23:47:12 2010 (r210036) @@ -0,0 +1,60 @@ +#!/bin/sh +#- +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +# Script which lists the available packages for this release +########################################################################### + +. ${PROGDIR}/backend/functions.sh +. ${PROGDIR}/backend/functions-packages.sh + +DEFAULT_FTP_SERVER="ftp.freebsd.org" +FTP_SERVER="${1}" +ID=`id -u` + +if [ "${ID}" -ne "0" ] +then + echo "Error: must be root!" + exit 1 +fi + +if [ -z "${FTP_SERVER}" ] +then + FTP_SERVER="${DEFAULT_FTP_SERVER}" +fi + +if [ ! -f "${PKGDIR}/INDEX" ] +then + get_package_index "${FTP_SERVER}" +fi + +if [ -f "${PKGDIR}/INDEX" ] +then + echo "${PKGDIR}/INDEX" + exit 0 +fi + +exit 1 Modified: head/usr.sbin/pc-sysinstall/backend-query/list-config.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/list-config.sh Tue Jul 13 23:34:43 2010 (r210035) +++ head/usr.sbin/pc-sysinstall/backend-query/list-config.sh Tue Jul 13 23:47:12 2010 (r210036) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/pc-sysinstall/backend-query/list-mirrors.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/list-mirrors.sh Tue Jul 13 23:34:43 2010 (r210035) +++ head/usr.sbin/pc-sysinstall/backend-query/list-mirrors.sh Tue Jul 13 23:47:12 2010 (r210036) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Added: head/usr.sbin/pc-sysinstall/backend-query/list-packages.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pc-sysinstall/backend-query/list-packages.sh Tue Jul 13 23:47:12 2010 (r210036) @@ -0,0 +1,74 @@ +#!/bin/sh +#- +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +# Script which lists the available packages for this release +########################################################################### + +. ${PROGDIR}/backend/functions.sh +. ${PROGDIR}/backend/functions-packages.sh + +PACKAGE_CATEGORY="${1}" +PACKAGE_NAME="${2}" +NARGS=0 + +if [ ! -f "${PKGDIR}/INDEX" ] +then + echo "Error: please fetch package index with get-packages!" + exit 1 +fi + +if [ ! -f "${PKGDIR}/INDEX.parsed" ] +then + parse_package_index +fi + +if [ -n "${PACKAGE_CATEGORY}" ] +then + NARGS=$((NARGS+1)) +fi + +if [ -n "${PACKAGE_NAME}" ] +then + NARGS=$((NARGS+1)) +fi + +echo "Available Packages:" +if [ "${NARGS}" -eq "0" ] +then + show_packages + +elif [ "${NARGS}" -eq "1" ] +then + show_packages_by_category "${PACKAGE_CATEGORY}" + +elif [ "${NARGS}" -eq "2" ] +then + show_package_by_name "${PACKAGE_CATEGORY}" "${PACKAGE_NAME}" + +else + show_packages +fi Modified: head/usr.sbin/pc-sysinstall/backend/Makefile ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/Makefile Tue Jul 13 23:34:43 2010 (r210035) +++ head/usr.sbin/pc-sysinstall/backend/Makefile Tue Jul 13 23:47:12 2010 (r210036) @@ -4,8 +4,9 @@ FILES= functions-bsdlabel.sh functions-c functions-extractimage.sh functions-ftp.sh functions-installcomponents.sh \ functions-localize.sh functions-mountdisk.sh \ functions-mountoptical.sh functions-networking.sh \ - functions-newfs.sh functions-parse.sh functions-runcommands.sh \ - functions-unmount.sh functions-upgrade.sh functions-users.sh \ + functions-newfs.sh functions-packages.sh functions-parse.sh \ + functions-runcommands.sh functions-unmount.sh \ + functions-upgrade.sh functions-users.sh \ functions.sh parseconfig.sh startautoinstall.sh FILESMODE= ${BINMODE} FILESDIR=${SHAREDIR}/pc-sysinstall/backend Modified: head/usr.sbin/pc-sysinstall/backend/functions-ftp.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-ftp.sh Tue Jul 13 23:34:43 2010 (r210035) +++ head/usr.sbin/pc-sysinstall/backend/functions-ftp.sh Tue Jul 13 23:47:12 2010 (r210036) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010 iX Systems, Inc. All rights reserved. +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Added: head/usr.sbin/pc-sysinstall/backend/functions-packages.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pc-sysinstall/backend/functions-packages.sh Tue Jul 13 23:47:12 2010 (r210036) @@ -0,0 +1,148 @@ +#!/bin/sh +#- +# Copyright (c) 2010 iXsystems, Inc. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +# Functions which runs commands on the system + +. ${BACKEND}/functions.sh +. ${BACKEND}/functions-parse.sh +. ${BACKEND}/functions-ftp.sh + + +get_package_index() +{ + FTP_SERVER="${1}" + FTP_DIR="ftp://${FTP_SERVER}/pub/FreeBSD/releases/${FBSD_ARCH}/${FBSD_BRANCH}/packages" + INDEX_FILE="INDEX" + USE_BZIP2=0 + + if [ -f "/usr/bin/bzip2" ] + then + INDEX_FILE="${INDEX_FILE}.bz2" + USE_BZIP2=1 + fi + + ftp "${FTP_DIR}/${INDEX_FILE}" + if [ -f "${INDEX_FILE}" ] + then + if [ "${USE_BZIP2}" -eq "1" ] + then + bzip2 -d "${INDEX_FILE}" + INDEX_FILE="${INDEX_FILE%.bz2}" + fi + + mv "${INDEX_FILE}" "${PKGDIR}" + fi +} + +parse_package_index() +{ + INDEX_FILE="${PKGDIR}/INDEX" + + exec 3<&0 + exec 0<"${INDEX_FILE}" + + while read -r line + do + CATEGORY="" + PACKAGE="" + DESC="" + i=0 + + SAVE_IFS="${IFS}" + IFS="|" + + for part in ${line} + do + if [ "${i}" -eq "1" ] + then + PACKAGE=`basename "${part}"` + + elif [ "${i}" -eq "3" ] + then + DESC="${part}" + + elif [ "${i}" -eq "6" ] + then + CATEGORY=`echo "${part}" | cut -f1 -d' '` + fi + + i=$((i+1)) + done + + echo "${CATEGORY}|${PACKAGE}|${DESC}" >> "${INDEX_FILE}.parsed" + IFS="${SAVE_IFS}" + done + + exec 0<&3 +} + +show_package_file() +{ + PKGFILE="${1}" + + exec 3<&0 + exec 0<"${PKGFILE}" + + while read -r line + do + CATEGORY=`echo "${line}" | cut -f1 -d'|'` + PACKAGE=`echo "${line}" | cut -f2 -d'|'` + DESC=`echo "${line}" | cut -f3 -d'|'` + + echo "${CATEGORY}/${PACKAGE}:${DESC}" + done + + exec 0<&3 +} + +show_packages_by_category() +{ + CATEGORY="${1}" + INDEX_FILE="${PKGDIR}/INDEX.parsed" + TMPFILE="/tmp/.pkg.cat" + + grep "^${CATEGORY}|" "${INDEX_FILE}" > "${TMPFILE}" + show_package_file "${TMPFILE}" + rm "${TMPFILE}" +} + +show_package_by_name() +{ + CATEGORY="${1}" + PACKAGE="${2}" + INDEX_FILE="${PKGDIR}/INDEX.parsed" + TMPFILE="/tmp/.pkg.cat.pak" + + grep "^${CATEGORY}|${PACKAGE}" "${INDEX_FILE}" > "${TMPFILE}" + show_package_file "${TMPFILE}" + rm "${TMPFILE}" +} + +show_packages() +{ + show_package_file "${PKGDIR}/INDEX.parsed" +} Modified: head/usr.sbin/pc-sysinstall/doc/help-index ============================================================================== --- head/usr.sbin/pc-sysinstall/doc/help-index Tue Jul 13 23:34:43 2010 (r210035) +++ head/usr.sbin/pc-sysinstall/doc/help-index Tue Jul 13 23:47:12 2010 (r210036) @@ -11,49 +11,55 @@ Help Commands System Query Commands disk-list - Provides a listing of the disk drives detected on this system + Provides a listing of the disk drives detected on this system disk-part - Queries the specified disk and returns information about its partitions + Queries the specified disk and returns information about its partitions disk-info - Returns information about the disks size, cyls, heads, and sectors + Returns information about the disks size, cyls, heads, and sectors detect-laptop - Tests to see if this system is a laptop or desktop + Tests to see if this system is a laptop or desktop detect-emulation - Tests to see if this system is actually running in an emulator such as VirtualBox + Tests to see if this system is actually running in an emulator such as VirtualBox detect-nics - Returns a listing of the detected network cards on this system + Returns a listing of the detected network cards on this system list-config Returns a listing of the pc-sysinstall configuration list-components - Returns a listing of the available components which can be installed + Returns a listing of the available components which can be installed list-mirrors - Returns a listing of the available FTP mirrors + Returns a listing of the available FTP mirrors + + list-packages + Returns a listing of the available packages list-rsync-backups - Returns a listing of available rsync-backups on the target server in the life-preserver/ dir + Returns a listing of available rsync-backups on the target server in the life-preserver/ dir list-tzones - Returns a listing of available timezones + Returns a listing of available timezones query-langs Return a list of languages that the installer supports + get-packages + Retrieves the list of packages from an FTP mirror + sys-mem - Return the size of installed system RAM in MegaBytes + Return the size of installed system RAM in MegaBytes test-netup - Test if an internet connection is available + Test if an internet connection is available update-part-list - Return a list of PC-BSD & FreeBSD installs on this system for updates + Return a list of PC-BSD & FreeBSD installs on this system for updates xkeyboard-layouts Return a list of keyboard layouts that xorg supports Modified: head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Tue Jul 13 23:34:43 2010 (r210035) +++ head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Tue Jul 13 23:47:12 2010 (r210036) @@ -43,6 +43,10 @@ export PROGDIR COMPDIR="${PROGDIR}/components" export COMPDIR +# Set this to the packages location +PKGDIR="${PROGDIR}/conf" +export PKGDIR + # End of user-editable configuration ##################################################################### @@ -156,6 +160,10 @@ case $1 in list-mirrors) ${QUERYDIR}/list-mirrors.sh "${2}" ;; + # Function which lists available packages + list-packages) ${QUERYDIR}/list-packages.sh "${2}" "${3}" + ;; + # Function which lists available backups on a rsync/ssh server list-rsync-backups) ${QUERYDIR}/list-rsync-backups.sh "${2}" "${3}" "${4}" ;; @@ -172,6 +180,10 @@ case $1 in send-logs) ${QUERYDIR}/send-logs.sh ${2} ;; + # Function to get package index + get-packages) ${QUERYDIR}/get-packages.sh "${2}" + ;; + # Function which allows setting up of SSH keys setup-ssh-keys) ${QUERYDIR}/setup-ssh-keys.sh "${2}" "${3}" "${4}" ;; @@ -209,4 +221,4 @@ case $1 in esac # Exit with success if we made it to the end -exit 0 +exit $? From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 00:41:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AADA1065673; Wed, 14 Jul 2010 00:41:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 782B68FC14; Wed, 14 Jul 2010 00:41:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6E0fN19003860; Wed, 14 Jul 2010 00:41:23 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6E0fNwY003856; Wed, 14 Jul 2010 00:41:23 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007140041.o6E0fNwY003856@svn.freebsd.org> From: Warner Losh Date: Wed, 14 Jul 2010 00:41:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210038 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 00:41:23 -0000 Author: imp Date: Wed Jul 14 00:41:22 2010 New Revision: 210038 URL: http://svn.freebsd.org/changeset/base/210038 Log: Prefer the cpuregs.h spellings of register and bit names over cpu.h. Modified: head/sys/mips/mips/exception.S head/sys/mips/mips/fp.S head/sys/mips/mips/machdep.c head/sys/mips/mips/mpboot.S head/sys/mips/mips/pm_machdep.c head/sys/mips/mips/psraccess.S head/sys/mips/mips/support.S head/sys/mips/mips/swtch.S head/sys/mips/mips/trap.c head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Tue Jul 13 23:58:10 2010 (r210037) +++ head/sys/mips/mips/exception.S Wed Jul 14 00:41:22 2010 (r210038) @@ -115,7 +115,7 @@ VECTOR(MipsTLBMiss, unknown) .set push .set noat j MipsDoTLBMiss - MFC0 k0, COP_0_BAD_VADDR # get the fault address + MFC0 k0, MIPS_COP_0_BAD_VADDR # get the fault address .set pop VECTOR_END(MipsTLBMiss) @@ -144,7 +144,7 @@ MipsDoTLBMiss: PTR_ADDU k1, k0, k1 #07: k1=seg entry address PTR_L k1, 0(k1) #08: k1=seg entry - MFC0 k0, COP_0_BAD_VADDR #09: k0=bad address (again) + MFC0 k0, MIPS_COP_0_BAD_VADDR #09: k0=bad address (again) beq k1, zero, 2f #0a: ==0 -- no page table srl k0, PAGE_SHIFT - 2 #0b: k0=VPN (aka va>>10) andi k0, k0, 0xff8 #0c: k0=page tab offset @@ -152,10 +152,10 @@ MipsDoTLBMiss: lw k0, 0(k1) #0e: k0=lo0 pte lw k1, 4(k1) #0f: k1=lo0 pte CLEAR_PTE_SWBITS(k0) - MTC0 k0, COP_0_TLB_LO0 #12: lo0 is loaded + MTC0 k0, MIPS_COP_0_TLB_LO0 #12: lo0 is loaded COP0_SYNC CLEAR_PTE_SWBITS(k1) - MTC0 k1, COP_0_TLB_LO1 #15: lo1 is loaded + MTC0 k1, MIPS_COP_0_TLB_LO1 #15: lo1 is loaded COP0_SYNC tlbwr #1a: write to tlb HAZARD_DELAY @@ -176,13 +176,13 @@ VECTOR(MipsException, unknown) * Find out what mode we came from and jump to the proper handler. */ .set noat - mfc0 k0, COP_0_STATUS_REG # Get the status register - mfc0 k1, COP_0_CAUSE_REG # Get the cause register value. + mfc0 k0, MIPS_COP_0_STATUS # Get the status register + mfc0 k1, MIPS_COP_0_CAUSE # Get the cause register value. and k0, k0, SR_KSU_USER # test for user mode # sneaky but the bits are # with us........ sll k0, k0, 3 # shift user bit for cause index - and k1, k1, CR_EXC_CODE # Mask out the cause bits. + and k1, k1, MIPS3_CR_EXC_CODE # Mask out the cause bits. or k1, k1, k0 # change index to user table #if defined(__mips_n64) PTR_SLL k1, k1, 1 # shift to get 8-byte offset @@ -207,7 +207,7 @@ VECTOR_END(MipsException) */ SlowFault: .set noat - mfc0 k0, COP_0_STATUS_REG + mfc0 k0, MIPS_COP_0_STATUS nop and k0, k0, SR_KSU_USER bne k0, zero, _C_LABEL(MipsUserGenException) @@ -237,28 +237,28 @@ SlowFault: #if defined(TARGET_OCTEON) #define CLEAR_STATUS \ - mfc0 a0, COP_0_STATUS_REG ;\ + mfc0 a0, MIPS_COP_0_STATUS ;\ li a2, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX) ; \ or a0, a0, a2 ; \ li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | SR_KSU_USER) ; \ and a0, a0, a2 ; \ - mtc0 a0, COP_0_STATUS_REG ; \ + mtc0 a0, MIPS_COP_0_STATUS ; \ ITLBNOPFIX #elif defined(TARGET_XLR_XLS) #define CLEAR_STATUS \ - mfc0 a0, COP_0_STATUS_REG ;\ + mfc0 a0, MIPS_COP_0_STATUS ;\ li a2, (MIPS_SR_KX | MIPS_SR_COP_2_BIT) ; \ or a0, a0, a2 ; \ li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | SR_KSU_USER) ; \ and a0, a0, a2 ; \ - mtc0 a0, COP_0_STATUS_REG ; \ + mtc0 a0, MIPS_COP_0_STATUS ; \ ITLBNOPFIX #else #define CLEAR_STATUS \ - mfc0 a0, COP_0_STATUS_REG ;\ + mfc0 a0, MIPS_COP_0_STATUS ;\ li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | SR_KSU_USER) ; \ and a0, a0, a2 ; \ - mtc0 a0, COP_0_STATUS_REG ; \ + mtc0 a0, MIPS_COP_0_STATUS ; \ ITLBNOPFIX #endif @@ -302,10 +302,10 @@ SlowFault: SAVE_REG(s8, S8, sp) ;\ mflo v0 ;\ mfhi v1 ;\ - mfc0 a0, COP_0_STATUS_REG ;\ - mfc0 a1, COP_0_CAUSE_REG ;\ - MFC0 a2, COP_0_BAD_VADDR ;\ - MFC0 a3, COP_0_EXC_PC ;\ + mfc0 a0, MIPS_COP_0_STATUS ;\ + mfc0 a1, MIPS_COP_0_CAUSE ;\ + MFC0 a2, MIPS_COP_0_BAD_VADDR;\ + MFC0 a3, MIPS_COP_0_EXC_PC ;\ SAVE_REG(v0, MULLO, sp) ;\ SAVE_REG(v1, MULHI, sp) ;\ SAVE_REG(a0, SR, sp) ;\ @@ -332,7 +332,7 @@ SlowFault: RESTORE_REG(t1, MULHI, sp) ;\ mtlo t0 ;\ mthi t1 ;\ - MTC0 v0, COP_0_EXC_PC ;\ + MTC0 v0, MIPS_COP_0_EXC_PC ;\ .set noat ;\ RESTORE_REG(AT, AST, sp) ;\ RESTORE_REG(v0, V0, sp) ;\ @@ -363,7 +363,7 @@ SlowFault: RESTORE_REG(gp, GP, sp) ;\ RESTORE_REG(ra, RA, sp) ;\ PTR_ADDU sp, sp, KERN_EXC_FRAME_SIZE;\ - mtc0 k0, COP_0_STATUS_REG + mtc0 k0, MIPS_COP_0_STATUS /* @@ -396,10 +396,10 @@ NNON_LEAF(MipsKernGenException, KERN_EXC * intr filters if interrupts are enabled later * in trap handler */ - mfc0 a0, COP_0_STATUS_REG - and a0, a0, SR_INT_MASK + mfc0 a0, MIPS_COP_0_STATUS + and a0, a0, MIPS_SR_INT_MASK RESTORE_REG(a1, SR, sp) - and a1, a1, ~SR_INT_MASK + and a1, a1, ~MIPS_SR_INT_MASK or a1, a1, a0 SAVE_REG(a1, SR, sp) RESTORE_CPU # v0 contains the return address. @@ -452,22 +452,22 @@ NNON_LEAF(MipsUserGenException, CALLFRAM SAVE_U_PCB_REG(t2, T2, k1) SAVE_U_PCB_REG(t3, T3, k1) SAVE_U_PCB_REG(ta0, TA0, k1) - mfc0 a0, COP_0_STATUS_REG # First arg is the status reg. + mfc0 a0, MIPS_COP_0_STATUS # First arg is the status reg. SAVE_U_PCB_REG(ta1, TA1, k1) SAVE_U_PCB_REG(ta2, TA2, k1) SAVE_U_PCB_REG(ta3, TA3, k1) SAVE_U_PCB_REG(s0, S0, k1) - mfc0 a1, COP_0_CAUSE_REG # Second arg is the cause reg. + mfc0 a1, MIPS_COP_0_CAUSE # Second arg is the cause reg. SAVE_U_PCB_REG(s1, S1, k1) SAVE_U_PCB_REG(s2, S2, k1) SAVE_U_PCB_REG(s3, S3, k1) SAVE_U_PCB_REG(s4, S4, k1) - MFC0 a2, COP_0_BAD_VADDR # Third arg is the fault addr + MFC0 a2, MIPS_COP_0_BAD_VADDR # Third arg is the fault addr SAVE_U_PCB_REG(s5, S5, k1) SAVE_U_PCB_REG(s6, S6, k1) SAVE_U_PCB_REG(s7, S7, k1) SAVE_U_PCB_REG(t8, T8, k1) - MFC0 a3, COP_0_EXC_PC # Fourth arg is the pc. + MFC0 a3, MIPS_COP_0_EXC_PC # Fourth arg is the pc. SAVE_U_PCB_REG(t9, T9, k1) SAVE_U_PCB_REG(gp, GP, k1) SAVE_U_PCB_REG(sp, SP, k1) @@ -483,13 +483,13 @@ NNON_LEAF(MipsUserGenException, CALLFRAM REG_S a3, CALLFRAME_RA(sp) # for debugging PTR_LA gp, _C_LABEL(_gp) # switch to kernel GP # Turn off fpu and enter kernel mode - and t0, a0, ~(SR_COP_1_BIT | SR_EXL | SR_KSU_MASK | SR_INT_ENAB) + and t0, a0, ~(MIPS_SR_COP_1_BIT | MIPS_SR_EXL | MIPS3_SR_KSU_MASK | MIPS_SR_INT_IE) #if defined(TARGET_OCTEON) - or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX | MIPS32_SR_PX) + or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX | MIPS_SR_PX) #elif defined(TARGET_XLR_XLS) or t0, t0, (MIPS_SR_KX | MIPS_SR_COP_2_BIT) #endif - mtc0 t0, COP_0_STATUS_REG + mtc0 t0, MIPS_COP_0_STATUS PTR_ADDU a0, k1, U_PCB_REGS ITLBNOPFIX @@ -521,10 +521,10 @@ NNON_LEAF(MipsUserGenException, CALLFRAM * Some of interrupts could be enabled by ithread * scheduled by ast() */ - mfc0 a0, COP_0_STATUS_REG - and a0, a0, SR_INT_MASK + mfc0 a0, MIPS_COP_0_STATUS + and a0, a0, MIPS_SR_INT_MASK RESTORE_U_PCB_REG(a1, SR, k1) - and a1, a1, ~SR_INT_MASK + and a1, a1, ~MIPS_SR_INT_MASK or a1, a1, a0 SAVE_U_PCB_REG(a1, SR, k1) @@ -534,7 +534,7 @@ NNON_LEAF(MipsUserGenException, CALLFRAM mthi t1 RESTORE_U_PCB_REG(a0, PC, k1) RESTORE_U_PCB_REG(v0, V0, k1) - MTC0 a0, COP_0_EXC_PC # set return address + MTC0 a0, MIPS_COP_0_EXC_PC # set return address RESTORE_U_PCB_REG(v1, V1, k1) RESTORE_U_PCB_REG(a0, A0, k1) RESTORE_U_PCB_REG(a1, A1, k1) @@ -566,7 +566,7 @@ NNON_LEAF(MipsUserGenException, CALLFRAM .set noat RESTORE_U_PCB_REG(AT, AST, k1) - mtc0 k0, COP_0_STATUS_REG # still exception level + mtc0 k0, MIPS_COP_0_STATUS # still exception level ITLBNOPFIX sync eret @@ -612,10 +612,10 @@ NNON_LEAF(MipsKernIntr, KERN_EXC_FRAME_S * intr filters if interrupts are enabled later * in trap handler */ - mfc0 a0, COP_0_STATUS_REG - and a0, a0, SR_INT_MASK + mfc0 a0, MIPS_COP_0_STATUS + and a0, a0, MIPS_SR_INT_MASK RESTORE_REG(a1, SR, sp) - and a1, a1, ~SR_INT_MASK + and a1, a1, ~MIPS_SR_INT_MASK or a1, a1, a0 SAVE_REG(a1, SR, sp) REG_L v0, CALLFRAME_RA + KERN_REG_SIZE(sp) @@ -689,9 +689,9 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r mflo v0 # get lo/hi late to avoid stall mfhi v1 - mfc0 a0, COP_0_STATUS_REG - mfc0 a1, COP_0_CAUSE_REG - MFC0 a3, COP_0_EXC_PC + mfc0 a0, MIPS_COP_0_STATUS + mfc0 a1, MIPS_COP_0_CAUSE + MFC0 a3, MIPS_COP_0_EXC_PC SAVE_U_PCB_REG(v0, MULLO, k1) SAVE_U_PCB_REG(v1, MULHI, k1) SAVE_U_PCB_REG(a0, SR, k1) @@ -701,13 +701,13 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r PTR_LA gp, _C_LABEL(_gp) # switch to kernel GP # Turn off fpu, disable interrupts, set kernel mode kernel mode, clear exception level. - and t0, a0, ~(SR_COP_1_BIT | SR_EXL | SR_INT_ENAB | SR_KSU_MASK) + and t0, a0, ~(MIPS_SR_COP_1_BIT | MIPS_SR_EXL | MIPS_SR_INT_IE | MIPS3_SR_KSU_MASK) #ifdef TARGET_OCTEON - or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX | MIPS32_SR_PX) + or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX | MIPS_SR_PX) #elif defined(TARGET_XLR_XLS) or t0, t0, (MIPS_SR_KX | MIPS_SR_COP_2_BIT) #endif - mtc0 t0, COP_0_STATUS_REG + mtc0 t0, MIPS_COP_0_STATUS ITLBNOPFIX PTR_ADDU a0, k1, U_PCB_REGS /* @@ -724,9 +724,9 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r * If that processor is also doing AST processing with interrupts disabled * then we may deadlock. */ - mfc0 a0, COP_0_STATUS_REG - or a0, a0, SR_INT_ENAB - mtc0 a0, COP_0_STATUS_REG + mfc0 a0, MIPS_COP_0_STATUS + or a0, a0, MIPS_SR_INT_IE + mtc0 a0, MIPS_COP_0_STATUS ITLBNOPFIX /* @@ -747,10 +747,10 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r * Some of interrupts could be disabled by * intr filters */ - mfc0 a0, COP_0_STATUS_REG - and a0, a0, SR_INT_MASK + mfc0 a0, MIPS_COP_0_STATUS + and a0, a0, MIPS_SR_INT_MASK RESTORE_U_PCB_REG(a1, SR, k1) - and a1, a1, ~SR_INT_MASK + and a1, a1, ~MIPS_SR_INT_MASK or a1, a1, a0 SAVE_U_PCB_REG(a1, SR, k1) @@ -768,7 +768,7 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r RESTORE_U_PCB_REG(t2, PC, k1) mtlo t0 mthi t1 - MTC0 t2, COP_0_EXC_PC # set return address + MTC0 t2, MIPS_COP_0_EXC_PC # set return address RESTORE_U_PCB_REG(v0, V0, k1) RESTORE_U_PCB_REG(v1, V1, k1) RESTORE_U_PCB_REG(a0, A0, k1) @@ -792,7 +792,7 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r .set noat RESTORE_U_PCB_REG(AT, AST, k1) - mtc0 k0, COP_0_STATUS_REG # SR with EXL set. + mtc0 k0, MIPS_COP_0_STATUS # SR with EXL set. ITLBNOPFIX sync eret @@ -804,7 +804,7 @@ NLEAF(MipsTLBInvalidException) .set noat .set noreorder - MFC0 k0, COP_0_BAD_VADDR + MFC0 k0, MIPS_COP_0_BAD_VADDR PTR_LI k1, VM_MAXUSER_ADDRESS sltu k1, k0, k1 bnez k1, 1f @@ -833,7 +833,7 @@ NLEAF(MipsTLBInvalidException) beqz k1, 3f nop - MFC0 k0, COP_0_BAD_VADDR # k0=bad address (again) + MFC0 k0, MIPS_COP_0_BAD_VADDR # k0=bad address (again) PTR_SRL k0, PAGE_SHIFT - 2 # k0=VPN andi k0, k0, 0xffc # k0=page tab offset PTR_ADDU k1, k1, k0 # k1=pte address @@ -852,10 +852,10 @@ NLEAF(MipsTLBInvalidException) lw k0, 0(k1) lw k1, 4(k1) CLEAR_PTE_SWBITS(k0) - MTC0 k0, COP_0_TLB_LO0 + MTC0 k0, MIPS_COP_0_TLB_LO0 COP0_SYNC CLEAR_PTE_SWBITS(k1) - MTC0 k1, COP_0_TLB_LO1 + MTC0 k1, MIPS_COP_0_TLB_LO1 COP0_SYNC b tlb_insert_entry @@ -865,16 +865,16 @@ odd_page: lw k0, -4(k1) lw k1, 0(k1) CLEAR_PTE_SWBITS(k0) - MTC0 k0, COP_0_TLB_LO0 + MTC0 k0, MIPS_COP_0_TLB_LO0 COP0_SYNC CLEAR_PTE_SWBITS(k1) - MTC0 k1, COP_0_TLB_LO1 + MTC0 k1, MIPS_COP_0_TLB_LO1 COP0_SYNC tlb_insert_entry: tlbp HAZARD_DELAY - mfc0 k0, COP_0_TLB_INDEX + mfc0 k0, MIPS_COP_0_TLB_INDEX bltz k0, tlb_insert_random nop tlbwi @@ -890,7 +890,7 @@ tlb_insert_random: /* * Branch to the comprehensive exception processing. */ - mfc0 k1, COP_0_STATUS_REG + mfc0 k1, MIPS_COP_0_STATUS andi k1, k1, SR_KSU_USER bnez k1, _C_LABEL(MipsUserGenException) nop @@ -980,7 +980,7 @@ END(MipsTLBInvalidException) */ NLEAF(MipsTLBMissException) .set noat - MFC0 k0, COP_0_BAD_VADDR # k0=bad address + MFC0 k0, MIPS_COP_0_BAD_VADDR # k0=bad address PTR_LI k1, VM_MAX_KERNEL_ADDRESS # check fault address against sltu k1, k1, k0 # upper bound of kernel_segmap bnez k1, MipsKernGenException # out of bound @@ -991,7 +991,7 @@ NLEAF(MipsTLBMissException) andi k0, k0, PTRMASK # k0=seg offset PTR_ADDU k1, k0, k1 # k1=seg entry address PTR_L k1, 0(k1) # k1=seg entry - MFC0 k0, COP_0_BAD_VADDR # k0=bad address (again) + MFC0 k0, MIPS_COP_0_BAD_VADDR # k0=bad address (again) beq k1, zero, MipsKernGenException # ==0 -- no page table PTR_SRL k0, PAGE_SHIFT - 2 # k0=VPN andi k0, k0, 0xff8 # k0=page tab offset @@ -999,10 +999,10 @@ NLEAF(MipsTLBMissException) lw k0, 0(k1) # k0=lo0 pte lw k1, 4(k1) # k1=lo1 pte CLEAR_PTE_SWBITS(k0) - MTC0 k0, COP_0_TLB_LO0 # lo0 is loaded + MTC0 k0, MIPS_COP_0_TLB_LO0 # lo0 is loaded COP0_SYNC CLEAR_PTE_SWBITS(k1) - MTC0 k1, COP_0_TLB_LO1 # lo1 is loaded + MTC0 k1, MIPS_COP_0_TLB_LO1 # lo1 is loaded COP0_SYNC tlbwr # write to tlb HAZARD_DELAY @@ -1031,15 +1031,15 @@ END(MipsTLBMissException) */ NON_LEAF(MipsFPTrap, CALLFRAME_SIZ, ra) PTR_SUBU sp, sp, CALLFRAME_SIZ - mfc0 t0, COP_0_STATUS_REG + mfc0 t0, MIPS_COP_0_STATUS REG_S ra, CALLFRAME_RA(sp) .mask 0x80000000, (CALLFRAME_RA - CALLFRAME_SIZ) - or t1, t0, SR_COP_1_BIT - mtc0 t1, COP_0_STATUS_REG + or t1, t0, MIPS_SR_COP_1_BIT + mtc0 t1, MIPS_COP_0_STATUS ITLBNOPFIX - cfc1 t1, FPC_CSR # stall til FP done - cfc1 t1, FPC_CSR # now get status + cfc1 t1, MIPS_FPU_CSR # stall til FP done + cfc1 t1, MIPS_FPU_CSR # now get status nop sll t2, t1, (31 - 17) # unimplemented operation? bgez t2, 3f # no, normal trap @@ -1087,8 +1087,8 @@ NON_LEAF(MipsFPTrap, CALLFRAME_SIZ, ra) * Check to see if the instruction to be emulated is a floating-point * instruction. */ - srl a3, a0, OPCODE_SHIFT - beq a3, OPCODE_C1, 4f # this should never fail + srl a3, a0, MIPS_OPCODE_SHIFT + beq a3, MIPS_OPCODE_C1, 4f # this should never fail nop /* * Send a floating point exception signal to the current process. @@ -1096,8 +1096,8 @@ NON_LEAF(MipsFPTrap, CALLFRAME_SIZ, ra) 3: GET_CPU_PCPU(a0) PTR_L a0, PC_CURTHREAD(a0) # get current thread - cfc1 a2, FPC_CSR # code = FP execptions - ctc1 zero, FPC_CSR # Clear exceptions + cfc1 a2, MIPS_FPU_CSR # code = FP execptions + ctc1 zero, MIPS_FPU_CSR # Clear exceptions PTR_LA t3, _C_LABEL(trapsignal) jalr t3 li a1, SIGFPE @@ -1116,10 +1116,10 @@ NON_LEAF(MipsFPTrap, CALLFRAME_SIZ, ra) * Turn off the floating point coprocessor and return. */ FPReturn: - mfc0 t0, COP_0_STATUS_REG + mfc0 t0, MIPS_COP_0_STATUS PTR_L ra, CALLFRAME_RA(sp) - and t0, t0, ~SR_COP_1_BIT - mtc0 t0, COP_0_STATUS_REG + and t0, t0, ~MIPS_SR_COP_1_BIT + mtc0 t0, MIPS_COP_0_STATUS ITLBNOPFIX j ra PTR_ADDU sp, sp, CALLFRAME_SIZ @@ -1168,15 +1168,15 @@ NESTED_NOPROFILE(MipsCacheException, KER .mask 0x80000000, -4 PTR_LA k0, _C_LABEL(panic) # return to panic PTR_LA a0, 9f # panicstr - MFC0 a1, COP_0_ERROR_PC - mfc0 a2, COP_0_CACHE_ERR # 3rd arg cache error + MFC0 a1, MIPS_COP_0_ERROR_PC + mfc0 a2, MIPS_COP_0_CACHE_ERR # 3rd arg cache error - MTC0 k0, COP_0_ERROR_PC # set return address + MTC0 k0, MIPS_COP_0_ERROR_PC # set return address - mfc0 k0, COP_0_STATUS_REG # restore status - li k1, SR_DIAG_DE # ignore further errors + mfc0 k0, MIPS_COP_0_STATUS # restore status + li k1, MIPS_SR_DIAG_PE # ignore further errors or k0, k1 - mtc0 k0, COP_0_STATUS_REG # restore status + mtc0 k0, MIPS_COP_0_STATUS # restore status COP0_SYNC eret Modified: head/sys/mips/mips/fp.S ============================================================================== --- head/sys/mips/mips/fp.S Tue Jul 13 23:58:10 2010 (r210037) +++ head/sys/mips/mips/fp.S Wed Jul 14 00:41:22 2010 (r210038) @@ -41,7 +41,7 @@ #include #include -#include +#include #include "assym.s" @@ -107,10 +107,10 @@ NON_LEAF(MipsEmulateFP, CALLFRAME_SIZ, r bgt v0, 4 << 2, ill # illegal format or v1, v1, v0 - cfc1 a1, FPC_CSR # get exception register + cfc1 a1, MIPS_FPU_CSR # get exception register lw a3, func_fmt_tbl(v1) # switch on FUNC & FMT - and a1, a1, ~FPC_EXCEPTION_UNIMPL # clear exception - ctc1 a1, FPC_CSR + and a1, a1, ~MIPS_FPU_EXCEPTION_UNIMPL # clear exception + ctc1 a1, MIPS_FPU_CSR j a3 .rdata @@ -665,8 +665,8 @@ add_sub_s: 3: bne ta1, zero, result_ft_s # if FT != 0, result=FT bne ta2, zero, result_ft_s - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - bne v0, FPC_ROUND_RM, 1f # round to -infinity? + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + bne v0, MIPS_FPU_ROUND_RM, 1f # round to -infinity? or t0, t0, ta0 # compute result sign b result_fs_s 1: @@ -724,8 +724,8 @@ add_sub_s: bne t2, ta2, 2f # if same, result=0 move t1, zero # result=0 move t2, zero - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - bne v0, FPC_ROUND_RM, 1f # round to -infinity? + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + bne v0, MIPS_FPU_ROUND_RM, 1f # round to -infinity? or t0, t0, ta0 # compute result sign b result_fs_s 1: @@ -788,8 +788,8 @@ add_sub_d: bne ta1, zero, result_ft_d # if FT != 0, result=FT bne ta2, zero, result_ft_d bne ta3, zero, result_ft_d - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - bne v0, FPC_ROUND_RM, 1f # round to -infinity? + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + bne v0, MIPS_FPU_ROUND_RM, 1f # round to -infinity? or t0, t0, ta0 # compute result sign b result_fs_d 1: @@ -882,8 +882,8 @@ add_sub_d: move t1, zero # result=0 move t2, zero move t3, zero - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - bne v0, FPC_ROUND_RM, 1f # round to -infinity? + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + bne v0, MIPS_FPU_ROUND_RM, 1f # round to -infinity? or t0, t0, ta0 # compute result sign b result_fs_d 1: @@ -1078,10 +1078,10 @@ div_s: 3: bne ta1, zero, 2f # is FT zero? bne ta2, zero, 1f - or a1, a1, FPC_EXCEPTION_DIV0 | FPC_STICKY_DIV0 - and v0, a1, FPC_ENABLE_DIV0 # trap enabled? + or a1, a1, MIPS_FPU_EXCEPTION_DIV0 | MIPS_FPU_STICKY_DIV0 + and v0, a1, MIPS_FPU_ENABLE_DIV0 # trap enabled? bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions li t1, SEXP_INF # result is infinity move t2, zero b result_fs_s @@ -1152,10 +1152,10 @@ div_d: bne ta1, zero, 2f # is FT zero? bne ta2, zero, 1f bne ta3, zero, 1f - or a1, a1, FPC_EXCEPTION_DIV0 | FPC_STICKY_DIV0 - and v0, a1, FPC_ENABLE_DIV0 # trap enabled? + or a1, a1, MIPS_FPU_EXCEPTION_DIV0 | MIPS_FPU_STICKY_DIV0 + and v0, a1, MIPS_FPU_ENABLE_DIV0 # trap enabled? bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # Save exceptions + ctc1 a1, MIPS_FPU_CSR # Save exceptions li t1, DEXP_INF # result is infinity move t2, zero move t3, zero @@ -1504,10 +1504,10 @@ cvt_w: * round result (t0 is sign, t2 is integer part, t3 is fractional part). */ 2: - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, 3f # round to nearest - beq v0, FPC_ROUND_RZ, 5f # round to zero (truncate) - beq v0, FPC_ROUND_RP, 1f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, 3f # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, 5f # round to zero (truncate) + beq v0, MIPS_FPU_ROUND_RP, 1f # round to +infinity beq t0, zero, 5f # if sign is positive, truncate b 2f 1: @@ -1536,10 +1536,10 @@ cvt_w: * Handle inexact exception. */ inexact_w: - or a1, a1, FPC_EXCEPTION_INEXACT | FPC_STICKY_INEXACT - and v0, a1, FPC_ENABLE_INEXACT + or a1, a1, MIPS_FPU_EXCEPTION_INEXACT | MIPS_FPU_STICKY_INEXACT + and v0, a1, MIPS_FPU_ENABLE_INEXACT bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions b result_fs_w /* @@ -1548,10 +1548,10 @@ inexact_w: * or generate an invalid exception. */ overflow_w: - or a1, a1, FPC_EXCEPTION_OVERFLOW | FPC_STICKY_OVERFLOW - and v0, a1, FPC_ENABLE_OVERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_OVERFLOW | MIPS_FPU_STICKY_OVERFLOW + and v0, a1, MIPS_FPU_ENABLE_OVERFLOW bne v0, zero, fpe_trap - and v0, a1, FPC_ENABLE_INEXACT + and v0, a1, MIPS_FPU_ENABLE_INEXACT bne v0, zero, inexact_w # inexact traps enabled? b invalid_w @@ -1561,10 +1561,10 @@ overflow_w: * or generate an invalid exception. */ underflow_w: - or a1, a1, FPC_EXCEPTION_UNDERFLOW | FPC_STICKY_UNDERFLOW - and v0, a1, FPC_ENABLE_UNDERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_UNDERFLOW | MIPS_FPU_STICKY_UNDERFLOW + and v0, a1, MIPS_FPU_ENABLE_UNDERFLOW bne v0, zero, fpe_trap - and v0, a1, FPC_ENABLE_INEXACT + and v0, a1, MIPS_FPU_ENABLE_INEXACT bne v0, zero, inexact_w # inexact traps enabled? b invalid_w @@ -1640,29 +1640,29 @@ test_cond: and v0, v0, a0 # condition match instruction? set_cond: bne v0, zero, 1f - and a1, a1, ~FPC_COND_BIT # clear condition bit + and a1, a1, ~MIPS_FPU_COND_BIT # clear condition bit b 2f 1: - or a1, a1, FPC_COND_BIT # set condition bit + or a1, a1, MIPS_FPU_COND_BIT # set condition bit 2: - ctc1 a1, FPC_CSR # save condition bit + ctc1 a1, MIPS_FPU_CSR # save condition bit b done unordered: and v0, a0, COND_UNORDERED # this cmp match unordered? bne v0, zero, 1f - and a1, a1, ~FPC_COND_BIT # clear condition bit + and a1, a1, ~MIPS_FPU_COND_BIT # clear condition bit b 2f 1: - or a1, a1, FPC_COND_BIT # set condition bit + or a1, a1, MIPS_FPU_COND_BIT # set condition bit 2: and v0, a0, COND_SIGNAL beq v0, zero, 1f # is this a signaling cmp? - or a1, a1, FPC_EXCEPTION_INVALID | FPC_STICKY_INVALID - and v0, a1, FPC_ENABLE_INVALID + or a1, a1, MIPS_FPU_EXCEPTION_INVALID | MIPS_FPU_STICKY_INVALID + and v0, a1, MIPS_FPU_ENABLE_INVALID bne v0, zero, fpe_trap 1: - ctc1 a1, FPC_CSR # save condition bit + ctc1 a1, MIPS_FPU_CSR # save condition bit b done /* @@ -1727,10 +1727,10 @@ norm_s: norm_noshift_s: move ta1, t1 # save unrounded exponent move ta2, t2 # save unrounded fraction - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, 3f # round to nearest - beq v0, FPC_ROUND_RZ, 5f # round to zero (truncate) - beq v0, FPC_ROUND_RP, 1f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, 3f # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, 5f # round to zero (truncate) + beq v0, MIPS_FPU_ROUND_RP, 1f # round to +infinity beq t0, zero, 5f # if sign is positive, truncate b 2f 1: @@ -1770,10 +1770,10 @@ inexact_s: and t2, t2, ~SIMPL_ONE # clear implied one bit inexact_nobias_s: jal set_fd_s # save result - or a1, a1, FPC_EXCEPTION_INEXACT | FPC_STICKY_INEXACT - and v0, a1, FPC_ENABLE_INEXACT + or a1, a1, MIPS_FPU_EXCEPTION_INEXACT | MIPS_FPU_STICKY_INEXACT + and v0, a1, MIPS_FPU_ENABLE_INEXACT bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions b done /* @@ -1782,18 +1782,18 @@ inexact_nobias_s: * or generate an infinity. */ overflow_s: - or a1, a1, FPC_EXCEPTION_OVERFLOW | FPC_STICKY_OVERFLOW - and v0, a1, FPC_ENABLE_OVERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_OVERFLOW | MIPS_FPU_STICKY_OVERFLOW + and v0, a1, MIPS_FPU_ENABLE_OVERFLOW beq v0, zero, 1f subu t1, t1, 192 # bias exponent and t2, t2, ~SIMPL_ONE # clear implied one bit jal set_fd_s # save result b fpe_trap 1: - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, 3f # round to nearest - beq v0, FPC_ROUND_RZ, 1f # round to zero (truncate) - beq v0, FPC_ROUND_RP, 2f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, 3f # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, 1f # round to zero (truncate) + beq v0, MIPS_FPU_ROUND_RP, 2f # round to +infinity bne t0, zero, 3f 1: li t1, SEXP_MAX # result is max finite @@ -1811,7 +1811,7 @@ overflow_s: * "loss of accuracy" is detected as "an inexact result". */ underflow_s: - and v0, a1, FPC_ENABLE_UNDERFLOW + and v0, a1, MIPS_FPU_ENABLE_UNDERFLOW beq v0, zero, 1f /* * Underflow is enabled so compute the result and trap. @@ -1819,7 +1819,7 @@ underflow_s: addu t1, t1, 192 # bias exponent and t2, t2, ~SIMPL_ONE # clear implied one bit jal set_fd_s # save result - or a1, a1, FPC_EXCEPTION_UNDERFLOW | FPC_STICKY_UNDERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_UNDERFLOW | MIPS_FPU_STICKY_UNDERFLOW b fpe_trap /* * Underflow is not enabled so compute the result, @@ -1833,15 +1833,15 @@ underflow_s: blt t9, SFRAC_BITS+2, 3f # shift all the bits out? move t1, zero # result is inexact zero move t2, zero - or a1, a1, FPC_EXCEPTION_UNDERFLOW | FPC_STICKY_UNDERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_UNDERFLOW | MIPS_FPU_STICKY_UNDERFLOW /* * Now round the zero result. * Only need to worry about rounding to +- infinity when the sign matches. */ - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, inexact_nobias_s # round to nearest - beq v0, FPC_ROUND_RZ, inexact_nobias_s # round to zero - beq v0, FPC_ROUND_RP, 1f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, inexact_nobias_s # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, inexact_nobias_s # round to zero + beq v0, MIPS_FPU_ROUND_RP, 1f # round to +infinity beq t0, zero, inexact_nobias_s # if sign is positive, truncate b 2f 1: @@ -1859,10 +1859,10 @@ underflow_s: /* * Now round the denormalized result. */ - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, 3f # round to nearest - beq v0, FPC_ROUND_RZ, 5f # round to zero (truncate) - beq v0, FPC_ROUND_RP, 1f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, 3f # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, 5f # round to zero (truncate) + beq v0, MIPS_FPU_ROUND_RP, 1f # round to +infinity beq t0, zero, 5f # if sign is positive, truncate b 2f 1: @@ -1884,11 +1884,11 @@ underflow_s: move t1, zero # denorm or zero exponent jal set_fd_s # save result beq t8, zero, done # check for exact result - or a1, a1, FPC_EXCEPTION_UNDERFLOW | FPC_STICKY_UNDERFLOW - or a1, a1, FPC_EXCEPTION_INEXACT | FPC_STICKY_INEXACT - and v0, a1, FPC_ENABLE_INEXACT + or a1, a1, MIPS_FPU_EXCEPTION_UNDERFLOW | MIPS_FPU_STICKY_UNDERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_INEXACT | MIPS_FPU_STICKY_INEXACT + and v0, a1, MIPS_FPU_ENABLE_INEXACT bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions b done /* @@ -1973,10 +1973,10 @@ norm_noshift_d: move ta1, t1 # save unrounded exponent move ta2, t2 # save unrounded fraction (MS) move ta3, t3 # save unrounded fraction (LS) - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, 3f # round to nearest - beq v0, FPC_ROUND_RZ, 5f # round to zero (truncate) - beq v0, FPC_ROUND_RP, 1f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, 3f # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, 5f # round to zero (truncate) + beq v0, MIPS_FPU_ROUND_RP, 1f # round to +infinity beq t0, zero, 5f # if sign is positive, truncate b 2f 1: @@ -2020,10 +2020,10 @@ inexact_d: and t2, t2, ~DIMPL_ONE # clear implied one bit inexact_nobias_d: jal set_fd_d # save result - or a1, a1, FPC_EXCEPTION_INEXACT | FPC_STICKY_INEXACT - and v0, a1, FPC_ENABLE_INEXACT + or a1, a1, MIPS_FPU_EXCEPTION_INEXACT | MIPS_FPU_STICKY_INEXACT + and v0, a1, MIPS_FPU_ENABLE_INEXACT bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions b done /* @@ -2032,18 +2032,18 @@ inexact_nobias_d: * or generate an infinity. */ overflow_d: - or a1, a1, FPC_EXCEPTION_OVERFLOW | FPC_STICKY_OVERFLOW - and v0, a1, FPC_ENABLE_OVERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_OVERFLOW | MIPS_FPU_STICKY_OVERFLOW + and v0, a1, MIPS_FPU_ENABLE_OVERFLOW beq v0, zero, 1f subu t1, t1, 1536 # bias exponent and t2, t2, ~DIMPL_ONE # clear implied one bit jal set_fd_d # save result b fpe_trap 1: - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, 3f # round to nearest - beq v0, FPC_ROUND_RZ, 1f # round to zero (truncate) - beq v0, FPC_ROUND_RP, 2f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, 3f # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, 1f # round to zero (truncate) + beq v0, MIPS_FPU_ROUND_RP, 2f # round to +infinity bne t0, zero, 3f 1: li t1, DEXP_MAX # result is max finite @@ -2063,7 +2063,7 @@ overflow_d: * "loss of accuracy" is detected as "an inexact result". */ underflow_d: - and v0, a1, FPC_ENABLE_UNDERFLOW + and v0, a1, MIPS_FPU_ENABLE_UNDERFLOW beq v0, zero, 1f /* * Underflow is enabled so compute the result and trap. @@ -2071,7 +2071,7 @@ underflow_d: addu t1, t1, 1536 # bias exponent and t2, t2, ~DIMPL_ONE # clear implied one bit jal set_fd_d # save result - or a1, a1, FPC_EXCEPTION_UNDERFLOW | FPC_STICKY_UNDERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_UNDERFLOW | MIPS_FPU_STICKY_UNDERFLOW b fpe_trap /* * Underflow is not enabled so compute the result, @@ -2087,15 +2087,15 @@ underflow_d: move t1, zero # result is inexact zero move t2, zero move t3, zero - or a1, a1, FPC_EXCEPTION_UNDERFLOW | FPC_STICKY_UNDERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_UNDERFLOW | MIPS_FPU_STICKY_UNDERFLOW /* * Now round the zero result. * Only need to worry about rounding to +- infinity when the sign matches. */ - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, inexact_nobias_d # round to nearest - beq v0, FPC_ROUND_RZ, inexact_nobias_d # round to zero - beq v0, FPC_ROUND_RP, 1f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, inexact_nobias_d # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, inexact_nobias_d # round to zero + beq v0, MIPS_FPU_ROUND_RP, 1f # round to +infinity beq t0, zero, inexact_nobias_d # if sign is positive, truncate b 2f 1: @@ -2127,10 +2127,10 @@ underflow_d: * Now round the denormalized result. */ 2: - and v0, a1, FPC_ROUNDING_BITS # get rounding mode - beq v0, FPC_ROUND_RN, 3f # round to nearest - beq v0, FPC_ROUND_RZ, 5f # round to zero (truncate) - beq v0, FPC_ROUND_RP, 1f # round to +infinity + and v0, a1, MIPS_FPU_ROUNDING_BITS # get rounding mode + beq v0, MIPS_FPU_ROUND_RN, 3f # round to nearest + beq v0, MIPS_FPU_ROUND_RZ, 5f # round to zero (truncate) + beq v0, MIPS_FPU_ROUND_RP, 1f # round to +infinity beq t0, zero, 5f # if sign is positive, truncate b 2f 1: @@ -2156,11 +2156,11 @@ underflow_d: move t1, zero # denorm or zero exponent jal set_fd_d # save result beq t8, zero, done # check for exact result - or a1, a1, FPC_EXCEPTION_UNDERFLOW | FPC_STICKY_UNDERFLOW - or a1, a1, FPC_EXCEPTION_INEXACT | FPC_STICKY_INEXACT - and v0, a1, FPC_ENABLE_INEXACT + or a1, a1, MIPS_FPU_EXCEPTION_UNDERFLOW | MIPS_FPU_STICKY_UNDERFLOW + or a1, a1, MIPS_FPU_EXCEPTION_INEXACT | MIPS_FPU_STICKY_INEXACT + and v0, a1, MIPS_FPU_ENABLE_INEXACT bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions b done /* @@ -2168,10 +2168,10 @@ underflow_d: * the result is a quiet NAN. */ invalid_s: # trap invalid operation - or a1, a1, FPC_EXCEPTION_INVALID | FPC_STICKY_INVALID - and v0, a1, FPC_ENABLE_INVALID + or a1, a1, MIPS_FPU_EXCEPTION_INVALID | MIPS_FPU_STICKY_INVALID + and v0, a1, MIPS_FPU_ENABLE_INVALID bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions move t0, zero # result is a quiet NAN li t1, SEXP_INF li t2, SQUIET_NAN @@ -2183,10 +2183,10 @@ invalid_s: # trap invalid operation * the result is a quiet NAN. */ invalid_d: # trap invalid operation - or a1, a1, FPC_EXCEPTION_INVALID | FPC_STICKY_INVALID - and v0, a1, FPC_ENABLE_INVALID + or a1, a1, MIPS_FPU_EXCEPTION_INVALID | MIPS_FPU_STICKY_INVALID + and v0, a1, MIPS_FPU_ENABLE_INVALID bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions move t0, zero # result is a quiet NAN li t1, DEXP_INF li t2, DQUIET_NAN0 @@ -2199,10 +2199,10 @@ invalid_d: # trap invalid operation * the result is INT_MAX or INT_MIN. */ invalid_w: # trap invalid operation - or a1, a1, FPC_EXCEPTION_INVALID | FPC_STICKY_INVALID - and v0, a1, FPC_ENABLE_INVALID + or a1, a1, MIPS_FPU_EXCEPTION_INVALID | MIPS_FPU_STICKY_INVALID + and v0, a1, MIPS_FPU_ENABLE_INVALID bne v0, zero, fpe_trap - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions bne t0, zero, 1f li t2, INT_MAX # result is INT_MAX b result_fs_w @@ -2215,14 +2215,14 @@ invalid_w: # trap invalid operation */ fpe_trap: move a2, a1 # code = FP CSR - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions break 0 /* * Send an illegal instruction signal to the current process. */ ill: - ctc1 a1, FPC_CSR # save exceptions + ctc1 a1, MIPS_FPU_CSR # save exceptions move a2, a0 # code = FP instruction break 0 Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Tue Jul 13 23:58:10 2010 (r210037) +++ head/sys/mips/mips/machdep.c Wed Jul 14 00:41:22 2010 (r210038) @@ -344,19 +344,19 @@ mips_vector_init(void) if (MipsCacheEnd - MipsCache > 0x80) panic("startup: Cache error code too large"); - bcopy(MipsTLBMiss, (void *)TLB_MISS_EXC_VEC, + bcopy(MipsTLBMiss, (void *)MIPS_UTLB_MISS_EXC_VEC, MipsTLBMissEnd - MipsTLBMiss); #if defined(TARGET_OCTEON) || defined(TARGET_XLR_XLS) /* Fake, but sufficient, for the 32-bit with 64-bit hardware addresses */ - bcopy(MipsTLBMiss, (void *)XTLB_MISS_EXC_VEC, + bcopy(MipsTLBMiss, (void *)MIPS3_XTLB_MISS_EXC_VEC, MipsTLBMissEnd - MipsTLBMiss); #endif - bcopy(MipsException, (void *)GEN_EXC_VEC, + bcopy(MipsException, (void *)MIPS3_GEN_EXC_VEC, MipsExceptionEnd - MipsException); - bcopy(MipsCache, (void *)CACHE_ERR_EXC_VEC, + bcopy(MipsCache, (void *)MIPS3_CACHE_ERR_EXC_VEC, MipsCacheEnd - MipsCache); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 00:47:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CB9E1065674; Wed, 14 Jul 2010 00:47:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C4558FC08; Wed, 14 Jul 2010 00:47:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6E0lbB1005261; Wed, 14 Jul 2010 00:47:37 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6E0lbb2005259; Wed, 14 Jul 2010 00:47:37 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007140047.o6E0lbb2005259@svn.freebsd.org> From: Warner Losh Date: Wed, 14 Jul 2010 00:47:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210039 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 00:47:37 -0000 Author: imp Date: Wed Jul 14 00:47:37 2010 New Revision: 210039 URL: http://svn.freebsd.org/changeset/base/210039 Log: Remove the unused part of cpu.h now that the rest of the tree has been transitioned to use cpuregs.h spellings. Now we're only 4x too big, according to the bde-ometer. Modified: head/sys/mips/include/cpu.h Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Wed Jul 14 00:41:22 2010 (r210038) +++ head/sys/mips/include/cpu.h Wed Jul 14 00:47:37 2010 (r210039) @@ -49,212 +49,17 @@ #include -/* - * Status register. - */ -#define SR_COP_USABILITY 0xf0000000 -#define SR_COP_0_BIT 0x10000000 -#define SR_COP_1_BIT 0x20000000 -#define SR_COP_2_BIT 0x40000000 -#define SR_RP 0x08000000 -#define SR_FR_32 0x04000000 -#define SR_RE 0x02000000 -#define SR_PX 0x00800000 -#define SR_BOOT_EXC_VEC 0x00400000 -#define SR_TLB_SHUTDOWN 0x00200000 -#define SR_SOFT_RESET 0x00100000 -#define SR_DIAG_CH 0x00040000 -#define SR_DIAG_CE 0x00020000 -#define SR_DIAG_DE 0x00010000 -#define SR_KX 0x00000080 -#define SR_SX 0x00000040 -#define SR_UX 0x00000020 +/* BEGIN: these are going away */ + #define SR_KSU_MASK 0x00000018 #define SR_KSU_USER 0x00000010 #define SR_KSU_SUPER 0x00000008 #define SR_KSU_KERNEL 0x00000000 -#define SR_ERL 0x00000004 -#define SR_EXL 0x00000002 -#define SR_INT_ENAB 0x00000001 - -#define SR_INT_MASK 0x0000ff00 -#define SOFT_INT_MASK_0 0x00000100 -#define SOFT_INT_MASK_1 0x00000200 -#define SR_INT_MASK_0 0x00000400 -#define SR_INT_MASK_1 0x00000800 -#define SR_INT_MASK_2 0x00001000 -#define SR_INT_MASK_3 0x00002000 -#define SR_INT_MASK_4 0x00004000 -#define SR_INT_MASK_5 0x00008000 -#define ALL_INT_MASK SR_INT_MASK -#define SOFT_INT_MASK (SOFT_INT_MASK_0 | SOFT_INT_MASK_1) -#define HW_INT_MASK (ALL_INT_MASK & ~SOFT_INT_MASK) #define soft_int_mask(softintr) (1 << ((softintr) + 8)) #define hard_int_mask(hardintr) (1 << ((hardintr) + 10)) -/* - * The bits in the cause register. - * - * CR_BR_DELAY Exception happened in branch delay slot. - * CR_COP_ERR Coprocessor error. - * CR_IP Interrupt pending bits defined below. - * CR_EXC_CODE The exception type (see exception codes below). - */ -#define CR_BR_DELAY 0x80000000 -#define CR_COP_ERR 0x30000000 -#define CR_EXC_CODE 0x0000007c -#define CR_EXC_CODE_SHIFT 2 -#define CR_IPEND 0x0000ff00 - -/* - * Cause Register Format: - * - * 31 30 29 28 27 26 25 24 23 8 7 6 2 1 0 - * ---------------------------------------------------------------------- - * | BD | 0| CE | 0| W2| W1| IV| IP15 - IP0 | 0| Exc Code | 0| - * |______________________________________________________________________ - */ - -#define CR_INT_SOFT0 0x00000100 -#define CR_INT_SOFT1 0x00000200 -#define CR_INT_0 0x00000400 -#define CR_INT_1 0x00000800 -#define CR_INT_2 0x00001000 -#define CR_INT_3 0x00002000 -#define CR_INT_4 0x00004000 -#define CR_INT_5 0x00008000 - -#define CR_INT_UART CR_INT_1 -#define CR_INT_IPI CR_INT_2 -#define CR_INT_CLOCK CR_INT_5 - -/* - * The bits in the CONFIG register - */ -#define CFG_K0_UNCACHED 2 -#define CFG_K0_CACHED 3 -#define CFG_K0_MASK 0x7 - -/* - * The bits in the context register. - */ -#define CNTXT_PTE_BASE 0xff800000 -#define CNTXT_BAD_VPN2 0x007ffff0 - -/* - * Location of exception vectors. - */ -#define RESET_EXC_VEC ((intptr_t)(int32_t)0xbfc00000) -#define TLB_MISS_EXC_VEC ((intptr_t)(int32_t)0x80000000) -#define XTLB_MISS_EXC_VEC ((intptr_t)(int32_t)0x80000080) -#define CACHE_ERR_EXC_VEC ((intptr_t)(int32_t)0x80000100) -#define GEN_EXC_VEC ((intptr_t)(int32_t)0x80000180) - -/* - * Coprocessor 0 registers: - */ -#define COP_0_TLB_INDEX $0 -#define COP_0_TLB_RANDOM $1 -#define COP_0_TLB_LO0 $2 -#define COP_0_TLB_LO1 $3 -#define COP_0_TLB_CONTEXT $4 -#define COP_0_TLB_PG_MASK $5 -#define COP_0_TLB_WIRED $6 -#define COP_0_INFO $7 -#define COP_0_BAD_VADDR $8 -#define COP_0_COUNT $9 -#define COP_0_TLB_HI $10 -#define COP_0_COMPARE $11 -#define COP_0_STATUS_REG $12 -#define COP_0_CAUSE_REG $13 -#define COP_0_EXC_PC $14 -#define COP_0_PRID $15 -#define COP_0_CONFIG $16 -#define COP_0_LLADDR $17 -#define COP_0_WATCH_LO $18 -#define COP_0_WATCH_HI $19 -#define COP_0_TLB_XCONTEXT $20 -#define COP_0_ECC $26 -#define COP_0_CACHE_ERR $27 -#define COP_0_TAG_LO $28 -#define COP_0_TAG_HI $29 -#define COP_0_ERROR_PC $30 - -/* - * Coprocessor 0 Set 1 - */ -#define C0P_1_IPLLO $18 -#define C0P_1_IPLHI $19 -#define C0P_1_INTCTL $20 -#define C0P_1_DERRADDR0 $26 -#define C0P_1_DERRADDR1 $27 - -/* - * Values for the code field in a break instruction. - */ -#define BREAK_INSTR 0x0000000d -#define BREAK_VAL_MASK 0x03ffffc0 -#define BREAK_VAL_SHIFT 16 -#define BREAK_KDB_VAL 512 -#define BREAK_SSTEP_VAL 513 -#define BREAK_BRKPT_VAL 514 -#define BREAK_SOVER_VAL 515 -#define BREAK_DDB_VAL 516 -#define BREAK_KDB (BREAK_INSTR | (BREAK_KDB_VAL << BREAK_VAL_SHIFT)) -#define BREAK_SSTEP (BREAK_INSTR | (BREAK_SSTEP_VAL << BREAK_VAL_SHIFT)) -#define BREAK_BRKPT (BREAK_INSTR | (BREAK_BRKPT_VAL << BREAK_VAL_SHIFT)) -#define BREAK_SOVER (BREAK_INSTR | (BREAK_SOVER_VAL << BREAK_VAL_SHIFT)) -#define BREAK_DDB (BREAK_INSTR | (BREAK_DDB_VAL << BREAK_VAL_SHIFT)) - -/* - * Mininum and maximum cache sizes. - */ -#define MIN_CACHE_SIZE (16 * 1024) -#define MAX_CACHE_SIZE (256 * 1024) - -/* - * The floating point version and status registers. - */ -#define FPC_ID $0 -#define FPC_CSR $31 - -/* - * The floating point coprocessor status register bits. - */ -#define FPC_ROUNDING_BITS 0x00000003 -#define FPC_ROUND_RN 0x00000000 -#define FPC_ROUND_RZ 0x00000001 -#define FPC_ROUND_RP 0x00000002 -#define FPC_ROUND_RM 0x00000003 -#define FPC_STICKY_BITS 0x0000007c -#define FPC_STICKY_INEXACT 0x00000004 -#define FPC_STICKY_UNDERFLOW 0x00000008 -#define FPC_STICKY_OVERFLOW 0x00000010 -#define FPC_STICKY_DIV0 0x00000020 -#define FPC_STICKY_INVALID 0x00000040 -#define FPC_ENABLE_BITS 0x00000f80 -#define FPC_ENABLE_INEXACT 0x00000080 -#define FPC_ENABLE_UNDERFLOW 0x00000100 -#define FPC_ENABLE_OVERFLOW 0x00000200 -#define FPC_ENABLE_DIV0 0x00000400 -#define FPC_ENABLE_INVALID 0x00000800 -#define FPC_EXCEPTION_BITS 0x0003f000 -#define FPC_EXCEPTION_INEXACT 0x00001000 -#define FPC_EXCEPTION_UNDERFLOW 0x00002000 -#define FPC_EXCEPTION_OVERFLOW 0x00004000 -#define FPC_EXCEPTION_DIV0 0x00008000 -#define FPC_EXCEPTION_INVALID 0x00010000 -#define FPC_EXCEPTION_UNIMPL 0x00020000 -#define FPC_COND_BIT 0x00800000 -#define FPC_FLUSH_BIT 0x01000000 -#define FPC_MBZ_BITS 0xfe7c0000 - -/* - * Constants to determine if have a floating point instruction. - */ -#define OPCODE_SHIFT 26 -#define OPCODE_C1 0x11 +/* END: These are going away */ /* * The first TLB entry that write random hits. @@ -302,7 +107,6 @@ * A machine-independent interface to the CPU's counter. */ #define get_cyclecount() mips_rd_count() - #endif /* !_LOCORE */ /* @@ -372,7 +176,6 @@ #define MIPS_VR5400 0x54 /* NEC Vr5400 FPU ISA IV+ */ #if defined(_KERNEL) && !defined(_LOCORE) - struct user; int Mips_ConfigCache(void); From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 00:48:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB3D61065674; Wed, 14 Jul 2010 00:48:53 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9BD58FC08; Wed, 14 Jul 2010 00:48:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6E0mrNj005594; Wed, 14 Jul 2010 00:48:53 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6E0mrgS005585; Wed, 14 Jul 2010 00:48:53 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201007140048.o6E0mrgS005585@svn.freebsd.org> From: Olivier Houchard Date: Wed, 14 Jul 2010 00:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210040 - in head/sys/arm: at91 conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 00:48:54 -0000 Author: cognet Date: Wed Jul 14 00:48:53 2010 New Revision: 210040 URL: http://svn.freebsd.org/changeset/base/210040 Log: Import preliminary support for Atmel AT91SAM9G20 cpu, and the Hot-e HL201. This fine work was done by Yohanes Nugroho Many thanks to John Nicholls and Thinlinx for providing sample hardware. Added: head/sys/arm/at91/at91_aicreg.h (contents, props changed) head/sys/arm/at91/at91_pio_sam9.h (contents, props changed) head/sys/arm/at91/at91_pit.c (contents, props changed) head/sys/arm/at91/at91_pitreg.h (contents, props changed) head/sys/arm/at91/at91sam9.c (contents, props changed) head/sys/arm/at91/at91sam9_machdep.c (contents, props changed) head/sys/arm/at91/at91sam9g20reg.h (contents, props changed) head/sys/arm/at91/board_hl201.c (contents, props changed) head/sys/arm/at91/files.at91sam9 (contents, props changed) head/sys/arm/at91/if_macb.c (contents, props changed) head/sys/arm/at91/if_macbreg.h (contents, props changed) head/sys/arm/at91/if_macbvar.h (contents, props changed) head/sys/arm/at91/std.at91sam9 (contents, props changed) head/sys/arm/at91/std.hl201 (contents, props changed) head/sys/arm/conf/HL201 (contents, props changed) head/sys/arm/conf/HL201.hints (contents, props changed) Modified: head/sys/arm/at91/at91_pmc.c head/sys/arm/at91/at91_pmcreg.h Added: head/sys/arm/at91/at91_aicreg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91_aicreg.h Wed Jul 14 00:48:53 2010 (r210040) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2009 Sylvestre Gallon. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* $FreeBSD$ */ + +#ifndef ARM_AT91_AT91_AICREG_H +#define ARM_AT91_AT91_AICREG_H + +/* Interrupt Controller */ +#define IC_SMR (0) /* Source mode register */ +#define IC_SVR (128) /* Source vector register */ +#define IC_IVR (256) /* IRQ vector register */ +#define IC_FVR (260) /* FIQ vector register */ +#define IC_ISR (264) /* Interrupt status register */ +#define IC_IPR (268) /* Interrupt pending register */ +#define IC_IMR (272) /* Interrupt status register */ +#define IC_CISR (276) /* Core interrupt status register */ +#define IC_IECR (288) /* Interrupt enable command register */ +#define IC_IDCR (292) /* Interrupt disable command register */ +#define IC_ICCR (296) /* Interrupt clear command register */ +#define IC_ISCR (300) /* Interrupt set command register */ +#define IC_EOICR (304) /* End of interrupt command register */ +#define IC_SPU (308) /* Spurious vector register */ +#define IC_DCR (312) /* Debug control register */ +#define IC_FFER (320) /* Fast forcing enable register */ +#define IC_FFDR (324) /* Fast forcing disable register */ +#define IC_FFSR (328) /* Fast forcing status register */ + +#endif /*ARM_AT91_AT91_AICREG_H*/ Added: head/sys/arm/at91/at91_pio_sam9.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91_pio_sam9.h Wed Jul 14 00:48:53 2010 (r210040) @@ -0,0 +1,291 @@ +/* + * Theses defines come from an atmel file that says specifically that it + * has no copyright. + */ + +/* $FreeBSD$ */ + +// ***************************************************************************** +// PIO DEFINITIONS FOR AT91SAM9261 +// ***************************************************************************** +#define AT91C_PIO_PA0 ((unsigned int) 1 << 0) // Pin Controlled by PA0 +#define AT91C_PA0_MISO0 ((unsigned int) AT91C_PIO_PA0) // SPI0 Master In Slave +#define AT91C_PA0_MCDA0 ((unsigned int) AT91C_PIO_PA0) // Multimedia Card A Data 0 +#define AT91C_PIO_PA1 ((unsigned int) 1 << 1) // Pin Controlled by PA1 +#define AT91C_PA1_MOSI0 ((unsigned int) AT91C_PIO_PA1) // SPI0 Master Out Slave +#define AT91C_PA1_MCCDA ((unsigned int) AT91C_PIO_PA1) // Multimedia Card A Command +#define AT91C_PIO_PA10 ((unsigned int) 1 << 10) // Pin Controlled by PA10 +#define AT91C_PA10_DTXD ((unsigned int) AT91C_PIO_PA10) // DBGU Debug Transmit Data +#define AT91C_PA10_PCK3 ((unsigned int) AT91C_PIO_PA10) // PMC Programmable clock Output 3 +#define AT91C_PIO_PA11 ((unsigned int) 1 << 11) // Pin Controlled by PA11 +#define AT91C_PA11_TSYNC ((unsigned int) AT91C_PIO_PA11) // Trace Synchronization Signal +#define AT91C_PA11_SCK1 ((unsigned int) AT91C_PIO_PA11) // USART1 Serial Clock +#define AT91C_PIO_PA12 ((unsigned int) 1 << 12) // Pin Controlled by PA12 +#define AT91C_PA12_TCLK ((unsigned int) AT91C_PIO_PA12) // Trace Clock +#define AT91C_PA12_RTS1 ((unsigned int) AT91C_PIO_PA12) // USART1 Ready To Send +#define AT91C_PIO_PA13 ((unsigned int) 1 << 13) // Pin Controlled by PA13 +#define AT91C_PA13_TPS0 ((unsigned int) AT91C_PIO_PA13) // Trace ARM Pipeline Status 0 +#define AT91C_PA13_CTS1 ((unsigned int) AT91C_PIO_PA13) // USART1 Clear To Send +#define AT91C_PIO_PA14 ((unsigned int) 1 << 14) // Pin Controlled by PA14 +#define AT91C_PA14_TPS1 ((unsigned int) AT91C_PIO_PA14) // Trace ARM Pipeline Status 1 +#define AT91C_PA14_SCK2 ((unsigned int) AT91C_PIO_PA14) // USART2 Serial Clock +#define AT91C_PIO_PA15 ((unsigned int) 1 << 15) // Pin Controlled by PA15 +#define AT91C_PA15_TPS2 ((unsigned int) AT91C_PIO_PA15) // Trace ARM Pipeline Status 2 +#define AT91C_PA15_RTS2 ((unsigned int) AT91C_PIO_PA15) // USART2 Ready To Send +#define AT91C_PIO_PA16 ((unsigned int) 1 << 16) // Pin Controlled by PA16 +#define AT91C_PA16_TPK0 ((unsigned int) AT91C_PIO_PA16) // Trace Packet Port 0 +#define AT91C_PA16_CTS2 ((unsigned int) AT91C_PIO_PA16) // USART2 Clear To Send +#define AT91C_PIO_PA17 ((unsigned int) 1 << 17) // Pin Controlled by PA17 +#define AT91C_PA17_TPK1 ((unsigned int) AT91C_PIO_PA17) // Trace Packet Port 1 +#define AT91C_PA17_TF1 ((unsigned int) AT91C_PIO_PA17) // SSC1 Transmit Frame Sync +#define AT91C_PIO_PA18 ((unsigned int) 1 << 18) // Pin Controlled by PA18 +#define AT91C_PA18_TPK2 ((unsigned int) AT91C_PIO_PA18) // Trace Packet Port 2 +#define AT91C_PA18_TK1 ((unsigned int) AT91C_PIO_PA18) // SSC1 Transmit Clock +#define AT91C_PIO_PA19 ((unsigned int) 1 << 19) // Pin Controlled by PA19 +#define AT91C_PA19_TPK3 ((unsigned int) AT91C_PIO_PA19) // Trace Packet Port 3 +#define AT91C_PA19_TD1 ((unsigned int) AT91C_PIO_PA19) // SSC1 Transmit Data +#define AT91C_PIO_PA2 ((unsigned int) 1 << 2) // Pin Controlled by PA2 +#define AT91C_PA2_SPCK0 ((unsigned int) AT91C_PIO_PA2) // SPI0 Serial Clock +#define AT91C_PA2_MCCK ((unsigned int) AT91C_PIO_PA2) // Multimedia Card Clock +#define AT91C_PIO_PA20 ((unsigned int) 1 << 20) // Pin Controlled by PA20 +#define AT91C_PA20_TPK4 ((unsigned int) AT91C_PIO_PA20) // Trace Packet Port 4 +#define AT91C_PA20_RD1 ((unsigned int) AT91C_PIO_PA20) // SSC1 Receive Data +#define AT91C_PIO_PA21 ((unsigned int) 1 << 21) // Pin Controlled by PA21 +#define AT91C_PA21_TPK5 ((unsigned int) AT91C_PIO_PA21) // Trace Packet Port 5 +#define AT91C_PA21_RK1 ((unsigned int) AT91C_PIO_PA21) // SSC1 Receive Clock +#define AT91C_PIO_PA22 ((unsigned int) 1 << 22) // Pin Controlled by PA22 +#define AT91C_PA22_TPK6 ((unsigned int) AT91C_PIO_PA22) // Trace Packet Port 6 +#define AT91C_PA22_RF1 ((unsigned int) AT91C_PIO_PA22) // SSC1 Receive Frame Sync +#define AT91C_PIO_PA23 ((unsigned int) 1 << 23) // Pin Controlled by PA23 +#define AT91C_PA23_TPK7 ((unsigned int) AT91C_PIO_PA23) // Trace Packet Port 7 +#define AT91C_PA23_RTS0 ((unsigned int) AT91C_PIO_PA23) // USART0 Ready To Send +#define AT91C_PIO_PA24 ((unsigned int) 1 << 24) // Pin Controlled by PA24 +#define AT91C_PA24_TPK8 ((unsigned int) AT91C_PIO_PA24) // Trace Packet Port 8 +#define AT91C_PA24_NPCS11 ((unsigned int) AT91C_PIO_PA24) // SPI1 Peripheral Chip Select 1 +#define AT91C_PIO_PA25 ((unsigned int) 1 << 25) // Pin Controlled by PA25 +#define AT91C_PA25_TPK9 ((unsigned int) AT91C_PIO_PA25) // Trace Packet Port 9 +#define AT91C_PA25_NPCS12 ((unsigned int) AT91C_PIO_PA25) // SPI1 Peripheral Chip Select 2 +#define AT91C_PIO_PA26 ((unsigned int) 1 << 26) // Pin Controlled by PA26 +#define AT91C_PA26_TPK10 ((unsigned int) AT91C_PIO_PA26) // Trace Packet Port 10 +#define AT91C_PA26_NPCS13 ((unsigned int) AT91C_PIO_PA26) // SPI1 Peripheral Chip Select 3 +#define AT91C_PIO_PA27 ((unsigned int) 1 << 27) // Pin Controlled by PA27 +#define AT91C_PA27_TPK11 ((unsigned int) AT91C_PIO_PA27) // Trace Packet Port 11 +#define AT91C_PA27_NPCS01 ((unsigned int) AT91C_PIO_PA27) // SPI0 Peripheral Chip Select 1 +#define AT91C_PIO_PA28 ((unsigned int) 1 << 28) // Pin Controlled by PA28 +#define AT91C_PA28_TPK12 ((unsigned int) AT91C_PIO_PA28) // Trace Packet Port 12 +#define AT91C_PA28_NPCS02 ((unsigned int) AT91C_PIO_PA28) // SPI0 Peripheral Chip Select 2 +#define AT91C_PIO_PA29 ((unsigned int) 1 << 29) // Pin Controlled by PA29 +#define AT91C_PA29_TPK13 ((unsigned int) AT91C_PIO_PA29) // Trace Packet Port 13 +#define AT91C_PA29_NPCS03 ((unsigned int) AT91C_PIO_PA29) // SPI0 Peripheral Chip Select 3 +#define AT91C_PIO_PA3 ((unsigned int) 1 << 3) // Pin Controlled by PA3 +#define AT91C_PA3_NPCS00 ((unsigned int) AT91C_PIO_PA3) // SPI0 Peripheral Chip Select 0 +#define AT91C_PIO_PA30 ((unsigned int) 1 << 30) // Pin Controlled by PA30 +#define AT91C_PA30_TPK14 ((unsigned int) AT91C_PIO_PA30) // Trace Packet Port 14 +#define AT91C_PA30_A23 ((unsigned int) AT91C_PIO_PA30) // Address Bus bit 23 +#define AT91C_PIO_PA31 ((unsigned int) 1 << 31) // Pin Controlled by PA31 +#define AT91C_PA31_TPK15 ((unsigned int) AT91C_PIO_PA31) // Trace Packet Port 15 +#define AT91C_PA31_A24 ((unsigned int) AT91C_PIO_PA31) // Address Bus bit 24 +#define AT91C_PIO_PA4 ((unsigned int) 1 << 4) // Pin Controlled by PA4 +#define AT91C_PA4_NPCS01 ((unsigned int) AT91C_PIO_PA4) // SPI0 Peripheral Chip Select 1 +#define AT91C_PA4_MCDA1 ((unsigned int) AT91C_PIO_PA4) // Multimedia Card A Data 1 +#define AT91C_PIO_PA5 ((unsigned int) 1 << 5) // Pin Controlled by PA5 +#define AT91C_PA5_NPCS02 ((unsigned int) AT91C_PIO_PA5) // SPI0 Peripheral Chip Select 2 +#define AT91C_PA5_MCDA2 ((unsigned int) AT91C_PIO_PA5) // Multimedia Card A Data 2 +#define AT91C_PIO_PA6 ((unsigned int) 1 << 6) // Pin Controlled by PA6 +#define AT91C_PA6_NPCS03 ((unsigned int) AT91C_PIO_PA6) // SPI0 Peripheral Chip Select 3 +#define AT91C_PA6_MCDA3 ((unsigned int) AT91C_PIO_PA6) // Multimedia Card A Data 3 +#define AT91C_PIO_PA7 ((unsigned int) 1 << 7) // Pin Controlled by PA7 +#define AT91C_PA7_TWD ((unsigned int) AT91C_PIO_PA7) // TWI Two-wire Serial Data +#define AT91C_PA7_PCK0 ((unsigned int) AT91C_PIO_PA7) // PMC Programmable clock Output 0 +#define AT91C_PIO_PA8 ((unsigned int) 1 << 8) // Pin Controlled by PA8 +#define AT91C_PA8_TWCK ((unsigned int) AT91C_PIO_PA8) // TWI Two-wire Serial Clock +#define AT91C_PA8_PCK1 ((unsigned int) AT91C_PIO_PA8) // PMC Programmable clock Output 1 +#define AT91C_PIO_PA9 ((unsigned int) 1 << 9) // Pin Controlled by PA9 +#define AT91C_PA9_DRXD ((unsigned int) AT91C_PIO_PA9) // DBGU Debug Receive Data +#define AT91C_PA9_PCK2 ((unsigned int) AT91C_PIO_PA9) // PMC Programmable clock Output 2 +#define AT91C_PIO_PB0 ((unsigned int) 1 << 0) // Pin Controlled by PB0 +#define AT91C_PB0_LCDVSYNC ((unsigned int) AT91C_PIO_PB0) // LCD Vertical Synchronization +#define AT91C_PIO_PB1 ((unsigned int) 1 << 1) // Pin Controlled by PB1 +#define AT91C_PB1_LCDHSYNC ((unsigned int) AT91C_PIO_PB1) // LCD Horizontal Synchronization +#define AT91C_PIO_PB10 ((unsigned int) 1 << 10) // Pin Controlled by PB10 +#define AT91C_PB10_LCDD5 ((unsigned int) AT91C_PIO_PB10) // LCD Data Bus Bit 5 +#define AT91C_PB10_LCDD10 ((unsigned int) AT91C_PIO_PB10) // LCD Data Bus Bit 10 +#define AT91C_PIO_PB11 ((unsigned int) 1 << 11) // Pin Controlled by PB11 +#define AT91C_PB11_LCDD6 ((unsigned int) AT91C_PIO_PB11) // LCD Data Bus Bit 6 +#define AT91C_PB11_LCDD11 ((unsigned int) AT91C_PIO_PB11) // LCD Data Bus Bit 11 +#define AT91C_PIO_PB12 ((unsigned int) 1 << 12) // Pin Controlled by PB12 +#define AT91C_PB12_LCDD7 ((unsigned int) AT91C_PIO_PB12) // LCD Data Bus Bit 7 +#define AT91C_PB12_LCDD12 ((unsigned int) AT91C_PIO_PB12) // LCD Data Bus Bit 12 +#define AT91C_PIO_PB13 ((unsigned int) 1 << 13) // Pin Controlled by PB13 +#define AT91C_PB13_LCDD8 ((unsigned int) AT91C_PIO_PB13) // LCD Data Bus Bit 8 +#define AT91C_PB13_LCDD13 ((unsigned int) AT91C_PIO_PB13) // LCD Data Bus Bit 13 +#define AT91C_PIO_PB14 ((unsigned int) 1 << 14) // Pin Controlled by PB14 +#define AT91C_PB14_LCDD9 ((unsigned int) AT91C_PIO_PB14) // LCD Data Bus Bit 9 +#define AT91C_PB14_LCDD14 ((unsigned int) AT91C_PIO_PB14) // LCD Data Bus Bit 14 +#define AT91C_PIO_PB15 ((unsigned int) 1 << 15) // Pin Controlled by PB15 +#define AT91C_PB15_LCDD10 ((unsigned int) AT91C_PIO_PB15) // LCD Data Bus Bit 10 +#define AT91C_PB15_LCDD15 ((unsigned int) AT91C_PIO_PB15) // LCD Data Bus Bit 15 +#define AT91C_PIO_PB16 ((unsigned int) 1 << 16) // Pin Controlled by PB16 +#define AT91C_PB16_LCDD11 ((unsigned int) AT91C_PIO_PB16) // LCD Data Bus Bit 11 +#define AT91C_PB16_LCDD19 ((unsigned int) AT91C_PIO_PB16) // LCD Data Bus Bit 19 +#define AT91C_PIO_PB17 ((unsigned int) 1 << 17) // Pin Controlled by PB17 +#define AT91C_PB17_LCDD12 ((unsigned int) AT91C_PIO_PB17) // LCD Data Bus Bit 12 +#define AT91C_PB17_LCDD20 ((unsigned int) AT91C_PIO_PB17) // LCD Data Bus Bit 20 +#define AT91C_PIO_PB18 ((unsigned int) 1 << 18) // Pin Controlled by PB18 +#define AT91C_PB18_LCDD13 ((unsigned int) AT91C_PIO_PB18) // LCD Data Bus Bit 13 +#define AT91C_PB18_LCDD21 ((unsigned int) AT91C_PIO_PB18) // LCD Data Bus Bit 21 +#define AT91C_PIO_PB19 ((unsigned int) 1 << 19) // Pin Controlled by PB19 +#define AT91C_PB19_LCDD14 ((unsigned int) AT91C_PIO_PB19) // LCD Data Bus Bit 14 +#define AT91C_PB19_LCDD22 ((unsigned int) AT91C_PIO_PB19) // LCD Data Bus Bit 22 +#define AT91C_PIO_PB2 ((unsigned int) 1 << 2) // Pin Controlled by PB2 +#define AT91C_PB2_LCDDOTCK ((unsigned int) AT91C_PIO_PB2) // LCD Dot Clock +#define AT91C_PB2_PCK0 ((unsigned int) AT91C_PIO_PB2) // PMC Programmable clock Output 0 +#define AT91C_PIO_PB20 ((unsigned int) 1 << 20) // Pin Controlled by PB20 +#define AT91C_PB20_LCDD15 ((unsigned int) AT91C_PIO_PB20) // LCD Data Bus Bit 15 +#define AT91C_PB20_LCDD23 ((unsigned int) AT91C_PIO_PB20) // LCD Data Bus Bit 23 +#define AT91C_PIO_PB21 ((unsigned int) 1 << 21) // Pin Controlled by PB21 +#define AT91C_PB21_TF0 ((unsigned int) AT91C_PIO_PB21) // SSC0 Transmit Frame Sync +#define AT91C_PB21_LCDD16 ((unsigned int) AT91C_PIO_PB21) // LCD Data Bus Bit 16 +#define AT91C_PIO_PB22 ((unsigned int) 1 << 22) // Pin Controlled by PB22 +#define AT91C_PB22_TK0 ((unsigned int) AT91C_PIO_PB22) // SSC0 Transmit Clock +#define AT91C_PB22_LCDD17 ((unsigned int) AT91C_PIO_PB22) // LCD Data Bus Bit 17 +#define AT91C_PIO_PB23 ((unsigned int) 1 << 23) // Pin Controlled by PB23 +#define AT91C_PB23_TD0 ((unsigned int) AT91C_PIO_PB23) // SSC0 Transmit Data +#define AT91C_PB23_LCDD18 ((unsigned int) AT91C_PIO_PB23) // LCD Data Bus Bit 18 +#define AT91C_PIO_PB24 ((unsigned int) 1 << 24) // Pin Controlled by PB24 +#define AT91C_PB24_RD0 ((unsigned int) AT91C_PIO_PB24) // SSC0 Receive Data +#define AT91C_PB24_LCDD19 ((unsigned int) AT91C_PIO_PB24) // LCD Data Bus Bit 19 +#define AT91C_PIO_PB25 ((unsigned int) 1 << 25) // Pin Controlled by PB25 +#define AT91C_PB25_RK0 ((unsigned int) AT91C_PIO_PB25) // SSC0 Receive Clock +#define AT91C_PB25_LCDD20 ((unsigned int) AT91C_PIO_PB25) // LCD Data Bus Bit 20 +#define AT91C_PIO_PB26 ((unsigned int) 1 << 26) // Pin Controlled by PB26 +#define AT91C_PB26_RF0 ((unsigned int) AT91C_PIO_PB26) // SSC0 Receive Frame Sync +#define AT91C_PB26_LCDD21 ((unsigned int) AT91C_PIO_PB26) // LCD Data Bus Bit 21 +#define AT91C_PIO_PB27 ((unsigned int) 1 << 27) // Pin Controlled by PB27 +#define AT91C_PB27_NPCS11 ((unsigned int) AT91C_PIO_PB27) // SPI1 Peripheral Chip Select 1 +#define AT91C_PB27_LCDD22 ((unsigned int) AT91C_PIO_PB27) // LCD Data Bus Bit 22 +#define AT91C_PIO_PB28 ((unsigned int) 1 << 28) // Pin Controlled by PB28 +#define AT91C_PB28_NPCS10 ((unsigned int) AT91C_PIO_PB28) // SPI1 Peripheral Chip Select 0 +#define AT91C_PB28_LCDD23 ((unsigned int) AT91C_PIO_PB28) // LCD Data Bus Bit 23 +#define AT91C_PIO_PB29 ((unsigned int) 1 << 29) // Pin Controlled by PB29 +#define AT91C_PB29_SPCK1 ((unsigned int) AT91C_PIO_PB29) // SPI1 Serial Clock +#define AT91C_PB29_IRQ2 ((unsigned int) AT91C_PIO_PB29) // Interrupt input 2 +#define AT91C_PIO_PB3 ((unsigned int) 1 << 3) // Pin Controlled by PB3 +#define AT91C_PB3_LCDDEN ((unsigned int) AT91C_PIO_PB3) // LCD Data Enable +#define AT91C_PIO_PB30 ((unsigned int) 1 << 30) // Pin Controlled by PB30 +#define AT91C_PB30_MISO1 ((unsigned int) AT91C_PIO_PB30) // SPI1 Master In Slave +#define AT91C_PB30_IRQ1 ((unsigned int) AT91C_PIO_PB30) // Interrupt input 1 +#define AT91C_PIO_PB31 ((unsigned int) 1 << 31) // Pin Controlled by PB31 +#define AT91C_PB31_MOSI1 ((unsigned int) AT91C_PIO_PB31) // SPI1 Master Out Slave +#define AT91C_PB31_PCK2 ((unsigned int) AT91C_PIO_PB31) // PMC Programmable clock Output 2 +#define AT91C_PIO_PB4 ((unsigned int) 1 << 4) // Pin Controlled by PB4 +#define AT91C_PB4_LCDCC ((unsigned int) AT91C_PIO_PB4) // LCD Contrast Control +#define AT91C_PB4_LCDD2 ((unsigned int) AT91C_PIO_PB4) // LCD Data Bus Bit 2 +#define AT91C_PIO_PB5 ((unsigned int) 1 << 5) // Pin Controlled by PB5 +#define AT91C_PB5_LCDD0 ((unsigned int) AT91C_PIO_PB5) // LCD Data Bus Bit 0 +#define AT91C_PB5_LCDD3 ((unsigned int) AT91C_PIO_PB5) // LCD Data Bus Bit 3 +#define AT91C_PIO_PB6 ((unsigned int) 1 << 6) // Pin Controlled by PB6 +#define AT91C_PB6_LCDD1 ((unsigned int) AT91C_PIO_PB6) // LCD Data Bus Bit 1 +#define AT91C_PB6_LCDD4 ((unsigned int) AT91C_PIO_PB6) // LCD Data Bus Bit 4 +#define AT91C_PIO_PB7 ((unsigned int) 1 << 7) // Pin Controlled by PB7 +#define AT91C_PB7_LCDD2 ((unsigned int) AT91C_PIO_PB7) // LCD Data Bus Bit 2 +#define AT91C_PB7_LCDD5 ((unsigned int) AT91C_PIO_PB7) // LCD Data Bus Bit 5 +#define AT91C_PIO_PB8 ((unsigned int) 1 << 8) // Pin Controlled by PB8 +#define AT91C_PB8_LCDD3 ((unsigned int) AT91C_PIO_PB8) // LCD Data Bus Bit 3 +#define AT91C_PB8_LCDD6 ((unsigned int) AT91C_PIO_PB8) // LCD Data Bus Bit 6 +#define AT91C_PIO_PB9 ((unsigned int) 1 << 9) // Pin Controlled by PB9 +#define AT91C_PB9_LCDD4 ((unsigned int) AT91C_PIO_PB9) // LCD Data Bus Bit 4 +#define AT91C_PB9_LCDD7 ((unsigned int) AT91C_PIO_PB9) // LCD Data Bus Bit 7 +#define AT91C_PIO_PC0 ((unsigned int) 1 << 0) // Pin Controlled by PC0 +#define AT91C_PC0_SMOE ((unsigned int) AT91C_PIO_PC0) // SmartMedia Output Enable +#define AT91C_PC0_NCS6 ((unsigned int) AT91C_PIO_PC0) // Chip Select 6 +#define AT91C_PIO_PC1 ((unsigned int) 1 << 1) // Pin Controlled by PC1 +#define AT91C_PC1_SMWE ((unsigned int) AT91C_PIO_PC1) // SmartMedia Write Enable +#define AT91C_PC1_NCS7 ((unsigned int) AT91C_PIO_PC1) // Chip Select 7 +#define AT91C_PIO_PC10 ((unsigned int) 1 << 10) // Pin Controlled by PC10 +#define AT91C_PC10_RTS0 ((unsigned int) AT91C_PIO_PC10) // USART0 Ready To Send +#define AT91C_PC10_SCK0 ((unsigned int) AT91C_PIO_PC10) // USART0 Serial Clock +#define AT91C_PIO_PC11 ((unsigned int) 1 << 11) // Pin Controlled by PC11 +#define AT91C_PC11_CTS0 ((unsigned int) AT91C_PIO_PC11) // USART0 Clear To Send +#define AT91C_PC11_FIQ ((unsigned int) AT91C_PIO_PC11) // AIC Fast Interrupt Input +#define AT91C_PIO_PC12 ((unsigned int) 1 << 12) // Pin Controlled by PC12 +#define AT91C_PC12_TXD1 ((unsigned int) AT91C_PIO_PC12) // USART1 Transmit Data +#define AT91C_PC12_NCS6 ((unsigned int) AT91C_PIO_PC12) // Chip Select 6 +#define AT91C_PIO_PC13 ((unsigned int) 1 << 13) // Pin Controlled by PC13 +#define AT91C_PC13_RXD1 ((unsigned int) AT91C_PIO_PC13) // USART1 Receive Data +#define AT91C_PC13_NCS7 ((unsigned int) AT91C_PIO_PC13) // Chip Select 7 +#define AT91C_PIO_PC14 ((unsigned int) 1 << 14) // Pin Controlled by PC14 +#define AT91C_PC14_TXD2 ((unsigned int) AT91C_PIO_PC14) // USART2 Transmit Data +#define AT91C_PC14_NPCS12 ((unsigned int) AT91C_PIO_PC14) // SPI1 Peripheral Chip Select 2 +#define AT91C_PIO_PC15 ((unsigned int) 1 << 15) // Pin Controlled by PC15 +#define AT91C_PC15_RXD2 ((unsigned int) AT91C_PIO_PC15) // USART2 Receive Data +#define AT91C_PC15_NPCS13 ((unsigned int) AT91C_PIO_PC15) // SPI1 Peripheral Chip Select 3 +#define AT91C_PIO_PC16 ((unsigned int) 1 << 16) // Pin Controlled by PC16 +#define AT91C_PC16_D16 ((unsigned int) AT91C_PIO_PC16) // Data Bus [16] +#define AT91C_PC16_TCLK0 ((unsigned int) AT91C_PIO_PC16) // Timer Counter 0 external clock input +#define AT91C_PIO_PC17 ((unsigned int) 1 << 17) // Pin Controlled by PC17 +#define AT91C_PC17_D17 ((unsigned int) AT91C_PIO_PC17) // Data Bus [17] +#define AT91C_PC17_TCLK1 ((unsigned int) AT91C_PIO_PC17) // Timer Counter 1 external clock input +#define AT91C_PIO_PC18 ((unsigned int) 1 << 18) // Pin Controlled by PC18 +#define AT91C_PC18_D18 ((unsigned int) AT91C_PIO_PC18) // Data Bus [18] +#define AT91C_PC18_TCLK2 ((unsigned int) AT91C_PIO_PC18) // Timer Counter 2 external clock input +#define AT91C_PIO_PC19 ((unsigned int) 1 << 19) // Pin Controlled by PC19 +#define AT91C_PC19_D19 ((unsigned int) AT91C_PIO_PC19) // Data Bus [19] +#define AT91C_PC19_TIOA0 ((unsigned int) AT91C_PIO_PC19) // Timer Counter 0 Multipurpose Timer I/O Pin A +#define AT91C_PIO_PC2 ((unsigned int) 1 << 2) // Pin Controlled by PC2 +#define AT91C_PC2_NWAIT ((unsigned int) AT91C_PIO_PC2) // NWAIT +#define AT91C_PC2_IRQ0 ((unsigned int) AT91C_PIO_PC2) // Interrupt input 0 +#define AT91C_PIO_PC20 ((unsigned int) 1 << 20) // Pin Controlled by PC20 +#define AT91C_PC20_D20 ((unsigned int) AT91C_PIO_PC20) // Data Bus [20] +#define AT91C_PC20_TIOB0 ((unsigned int) AT91C_PIO_PC20) // Timer Counter 0 Multipurpose Timer I/O Pin B +#define AT91C_PIO_PC21 ((unsigned int) 1 << 21) // Pin Controlled by PC21 +#define AT91C_PC21_D21 ((unsigned int) AT91C_PIO_PC21) // Data Bus [21] +#define AT91C_PC21_TIOA1 ((unsigned int) AT91C_PIO_PC21) // Timer Counter 1 Multipurpose Timer I/O Pin A +#define AT91C_PIO_PC22 ((unsigned int) 1 << 22) // Pin Controlled by PC22 +#define AT91C_PC22_D22 ((unsigned int) AT91C_PIO_PC22) // Data Bus [22] +#define AT91C_PC22_TIOB1 ((unsigned int) AT91C_PIO_PC22) // Timer Counter 1 Multipurpose Timer I/O Pin B +#define AT91C_PIO_PC23 ((unsigned int) 1 << 23) // Pin Controlled by PC23 +#define AT91C_PC23_D23 ((unsigned int) AT91C_PIO_PC23) // Data Bus [23] +#define AT91C_PC23_TIOA2 ((unsigned int) AT91C_PIO_PC23) // Timer Counter 2 Multipurpose Timer I/O Pin A +#define AT91C_PIO_PC24 ((unsigned int) 1 << 24) // Pin Controlled by PC24 +#define AT91C_PC24_D24 ((unsigned int) AT91C_PIO_PC24) // Data Bus [24] +#define AT91C_PC24_TIOB2 ((unsigned int) AT91C_PIO_PC24) // Timer Counter 2 Multipurpose Timer I/O Pin B +#define AT91C_PIO_PC25 ((unsigned int) 1 << 25) // Pin Controlled by PC25 +#define AT91C_PC25_D25 ((unsigned int) AT91C_PIO_PC25) // Data Bus [25] +#define AT91C_PC25_TF2 ((unsigned int) AT91C_PIO_PC25) // SSC2 Transmit Frame Sync +#define AT91C_PIO_PC26 ((unsigned int) 1 << 26) // Pin Controlled by PC26 +#define AT91C_PC26_D26 ((unsigned int) AT91C_PIO_PC26) // Data Bus [26] +#define AT91C_PC26_TK2 ((unsigned int) AT91C_PIO_PC26) // SSC2 Transmit Clock +#define AT91C_PIO_PC27 ((unsigned int) 1 << 27) // Pin Controlled by PC27 +#define AT91C_PC27_D27 ((unsigned int) AT91C_PIO_PC27) // Data Bus [27] +#define AT91C_PC27_TD2 ((unsigned int) AT91C_PIO_PC27) // SSC2 Transmit Data +#define AT91C_PIO_PC28 ((unsigned int) 1 << 28) // Pin Controlled by PC28 +#define AT91C_PC28_D28 ((unsigned int) AT91C_PIO_PC28) // Data Bus [28] +#define AT91C_PC28_RD2 ((unsigned int) AT91C_PIO_PC28) // SSC2 Receive Data +#define AT91C_PIO_PC29 ((unsigned int) 1 << 29) // Pin Controlled by PC29 +#define AT91C_PC29_D29 ((unsigned int) AT91C_PIO_PC29) // Data Bus [29] +#define AT91C_PC29_RK2 ((unsigned int) AT91C_PIO_PC29) // SSC2 Receive Clock +#define AT91C_PIO_PC3 ((unsigned int) 1 << 3) // Pin Controlled by PC3 +#define AT91C_PC3_A25_CFRNW ((unsigned int) AT91C_PIO_PC3) // Address Bus[25] / Compact Flash Read Not Write +#define AT91C_PIO_PC30 ((unsigned int) 1 << 30) // Pin Controlled by PC30 +#define AT91C_PC30_D30 ((unsigned int) AT91C_PIO_PC30) // Data Bus [30] +#define AT91C_PC30_RF2 ((unsigned int) AT91C_PIO_PC30) // SSC2 Receive Frame Sync +#define AT91C_PIO_PC31 ((unsigned int) 1 << 31) // Pin Controlled by PC31 +#define AT91C_PC31_D31 ((unsigned int) AT91C_PIO_PC31) // Data Bus [31] +#define AT91C_PC31_PCK1 ((unsigned int) AT91C_PIO_PC31) // PMC Programmable clock Output 1 +#define AT91C_PIO_PC4 ((unsigned int) 1 << 4) // Pin Controlled by PC4 +#define AT91C_PC4_NCS4_CFCS0 ((unsigned int) AT91C_PIO_PC4) // Chip Select 4 / CompactFlash Chip Select 0 +#define AT91C_PIO_PC5 ((unsigned int) 1 << 5) // Pin Controlled by PC5 +#define AT91C_PC5_NCS5_CFCS1 ((unsigned int) AT91C_PIO_PC5) // Chip Select 5 / CompactFlash Chip Select 1 +#define AT91C_PIO_PC6 ((unsigned int) 1 << 6) // Pin Controlled by PC6 +#define AT91C_PC6_CFCE1 ((unsigned int) AT91C_PIO_PC6) // CompactFlash Chip Enable 1 +#define AT91C_PIO_PC7 ((unsigned int) 1 << 7) // Pin Controlled by PC7 +#define AT91C_PC7_CFCE2 ((unsigned int) AT91C_PIO_PC7) // CompactFlash Chip Enable 2 +#define AT91C_PIO_PC8 ((unsigned int) 1 << 8) // Pin Controlled by PC8 +#define AT91C_PC8_TXD0 ((unsigned int) AT91C_PIO_PC8) // USART0 Transmit Data +#define AT91C_PC8_PCK2 ((unsigned int) AT91C_PIO_PC8) // PMC Programmable clock Output 2 +#define AT91C_PIO_PC9 ((unsigned int) 1 << 9) // Pin Controlled by PC9 +#define AT91C_PC9_RXD0 ((unsigned int) AT91C_PIO_PC9) // USART0 Receive Data +#define AT91C_PC9_PCK3 ((unsigned int) AT91C_PIO_PC9) // PMC Programmable clock Output 3 + + Added: head/sys/arm/at91/at91_pit.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91_pit.c Wed Jul 14 00:48:53 2010 (r210040) @@ -0,0 +1,233 @@ +/*- + * Copyright (c) 2010 Yohanes Nugroho. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +__FBSDID("$FreeBSD$"); + +static struct at91pit_softc { + bus_space_tag_t sc_st; + bus_space_handle_t sc_sh; + device_t sc_dev; +} *pit_softc; + +#define RD4(off) \ + bus_space_read_4(pit_softc->sc_st, pit_softc->sc_sh, (off)) +#define WR4(off, val) \ + bus_space_write_4(pit_softc->sc_st, pit_softc->sc_sh, (off), (val)) + +static unsigned at91pit_get_timecount(struct timecounter *tc); +static int clock_intr(void *arg); + +static struct timecounter at91pit_timecounter = { + at91pit_get_timecount, /* get_timecount */ + NULL, /* no poll_pps */ + 0xffffffffu, /* counter mask */ + 0, /* frequency */ + "AT91SAM9261 timer", /* name */ + 1000 /* quality */ +}; + + +uint32_t +at91_pit_base(void); + +uint32_t +at91_pit_size(void); + +static int +at91pit_probe(device_t dev) +{ + device_set_desc(dev, "PIT"); + return (0); +} + +uint32_t +at91_pit_base(void) +{ + return (AT91SAM9G20_PIT_BASE); +} + +uint32_t +at91_pit_size(void) +{ + return (AT91SAM9G20_PIT_SIZE); +} + +static int pit_rate; +static int pit_cycle; +static int pit_counter; + +static int +at91pit_attach(device_t dev) +{ + struct at91_softc *sc = device_get_softc(device_get_parent(dev)); + struct resource *irq; + int rid = 0; + void *ih; + + pit_softc = device_get_softc(dev); + pit_softc->sc_st = sc->sc_st; + pit_softc->sc_dev = dev; + if (bus_space_subregion(sc->sc_st, sc->sc_sh, at91_pit_base(), + at91_pit_size(), &pit_softc->sc_sh) != 0) + panic("couldn't subregion pit registers"); + + irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 1, 1, 1, + RF_ACTIVE | RF_SHAREABLE); + if (!irq) + panic("Unable to allocate IRQ for the system timer"); + else + bus_setup_intr(dev, irq, INTR_TYPE_CLK, + clock_intr, NULL, NULL, &ih); + + + device_printf(dev, "AT91SAM9x pit registered\n"); + return (0); +} + +static device_method_t at91pit_methods[] = { + DEVMETHOD(device_probe, at91pit_probe), + DEVMETHOD(device_attach, at91pit_attach), + {0,0}, +}; + +static driver_t at91pit_driver = { + "at91_pit", + at91pit_methods, + sizeof(struct at91pit_softc), +}; + +static devclass_t at91pit_devclass; + +DRIVER_MODULE(at91_pit, atmelarm, at91pit_driver, at91pit_devclass, 0, 0); + +static int +clock_intr(void *arg) +{ + + struct trapframe *fp = arg; + + if (RD4(PIT_SR) & PIT_PITS_DONE) { + uint32_t pivr = RD4(PIT_PIVR); + if (PIT_CNT(pivr)>1) { + printf("cnt = %d\n", PIT_CNT(pivr)); + } + pit_counter += pit_cycle; + hardclock(TRAPF_USERMODE(fp), TRAPF_PC(fp)); + return (FILTER_HANDLED); + } + return (FILTER_STRAY); +} + +static unsigned +at91pit_get_timecount(struct timecounter *tc) +{ + return pit_counter; +} + +/*todo: review this*/ +void +DELAY(int n) +{ + u_int32_t start, end, cur; + + start = RD4(PIT_PIIR); + n = (n * 1000) / (at91_master_clock / 12); + if (n <= 0) + n = 1; + end = (start + n); + cur = start; + if (start > end) { + while (cur >= start || cur < end) + cur = RD4(PIT_PIIR); + } else { + while (cur < end) + cur = RD4(PIT_PIIR); + } +} + +/* + * The 3 next functions must be implement with the futur PLL code. + */ +void +cpu_startprofclock(void) +{ +} + +void +cpu_stopprofclock(void) +{ +} + +#define HZ 100 + +void +cpu_initclocks(void) +{ + struct at91_pmc_clock *master; + + master = at91_pmc_clock_ref("mck"); + pit_rate = master->hz / 16; + pit_cycle = (pit_rate + HZ/2) / HZ; + at91pit_timecounter.tc_frequency = pit_rate; + WR4(PIT_MR, 0); + + while (PIT_PIV(RD4(PIT_PIVR)) != 0); + + WR4(PIT_MR, (pit_cycle - 1) | PIT_IEN | PIT_EN); + tc_init(&at91pit_timecounter); +} + +void +cpu_reset(void) +{ + *(volatile int *)(AT91SAM9G20_BASE + AT91SAM9G20_RSTC_BASE + + RSTC_CR) = RSTC_PROCRST | RSTC_PERRST | RSTC_KEY; + while (1) + continue; +} Added: head/sys/arm/at91/at91_pitreg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91_pitreg.h Wed Jul 14 00:48:53 2010 (r210040) @@ -0,0 +1,45 @@ +/*- + * Copyright (c) 2009 Sylvestre Gallon. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* $FreeBSD$ */ + +#ifndef ARM_AT91_AT91PITREG_H +#define ARM_AT91_AT91PITREG_H + +#define PIT_MR 0x0 +#define PIT_SR 0x4 +#define PIT_PIVR 0x8 +#define PIT_PIIR 0xc + +/* PIT_MR */ +#define PIT_PIV(x) (x & 0xfffff) /* periodic interval value */ +#define PIT_CNT(x) ((x >>20) & 0xfff) /* periodic interval counter */ +#define PIT_EN (1 << 24) /* pit enable */ +#define PIT_IEN (1 << 25) /* pit interrupt enable */ + +/* PIT_SR */ +#define PIT_PITS_DONE 1 /* interrupt done */ + +#endif /* ARM_AT91_AT91PITREG_H */ Modified: head/sys/arm/at91/at91_pmc.c ============================================================================== --- head/sys/arm/at91/at91_pmc.c Wed Jul 14 00:47:37 2010 (r210039) +++ head/sys/arm/at91/at91_pmc.c Wed Jul 14 00:48:53 2010 (r210040) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -119,20 +120,54 @@ static struct at91_pmc_clock mck = { .refcnt = 0, }; +#ifdef AT91SAM9G20 +#define IRQ_UDP AT91SAM9G20_IRQ_UDP +#define IRQ_UHP AT91SAM9G20_IRQ_UHP +#else +#define IRQ_UDP AT91RM92_IRQ_UDP +#define IRQ_UHP AT91RM92_IRQ_UHP +#endif /* AT91SAM9G20 */ + static struct at91_pmc_clock udc_clk = { .name = "udc_clk", .parent = &mck, - .pmc_mask = 1 << AT91RM92_IRQ_UDP, + .pmc_mask = 1 << IRQ_UDP, .set_mode = &at91_pmc_set_periph_mode }; static struct at91_pmc_clock ohci_clk = { .name = "ohci_clk", .parent = &mck, - .pmc_mask = 1 << AT91RM92_IRQ_UHP, + .pmc_mask = 1 << IRQ_UHP, + .set_mode = &at91_pmc_set_periph_mode +}; + +#ifdef AT91SAM9G20 +static struct at91_pmc_clock macb_clk = { + .name = "macb_clk", + .parent = &mck, + + .pmc_mask = 1 << 21, + .set_mode = &at91_pmc_set_periph_mode +}; + +static struct at91_pmc_clock spi0_clk = { + .name = "spi0_clk", + .parent = &mck, + + .pmc_mask = 1 << 12, + .set_mode = &at91_pmc_set_periph_mode +}; + +static struct at91_pmc_clock spi1_clk = { + .name = "spi1_clk", + .parent = &mck, + .pmc_mask = 1 << 13, .set_mode = &at91_pmc_set_periph_mode }; +#endif /* AT91SAM9G20 */ + static struct at91_pmc_clock *const clock_list[] = { &slck, &main_ck, @@ -142,6 +177,11 @@ static struct at91_pmc_clock *const cloc &uhpck, &mck, &udc_clk, +#ifdef AT91SAM9G20 + &macb_clk, + &spi0_clk, + &spi1_clk, +#endif /* AT91SAM9G20 */ &ohci_clk }; @@ -257,15 +297,24 @@ at91_pmc_pll_rate(int freq, uint32_t reg uint32_t mul, div; div = reg & 0xff; +#ifdef AT91SAM9G20 + if (is_pllb) + mul = (reg >> 16) & 0x3f; + else + mul = (reg >> 16) & 0xff; +#else mul = (reg >> 16) & 0x7ff; +#endif if (div != 0 && mul != 0) { freq /= div; freq *= mul + 1; } else { freq = 0; } +#ifndef AT91SAM9G20 if (is_pllb && (reg & (1 << 28))) freq >>= 1; +#endif return (freq); } @@ -328,10 +377,12 @@ at91_pmc_init_clock(struct at91_pmc_soft */ sc->pllb_init = at91_pmc_pll_calc(main_clock, 48000000 * 2) |0x10000000; pllb.hz = at91_pmc_pll_rate(main_clock, sc->pllb_init, 1); - WR4(sc, PMC_PCDR, (1 << AT91RM92_IRQ_UHP) | (1 << AT91RM92_IRQ_UDP)); + WR4(sc, PMC_PCDR, (1 << IRQ_UHP) | (1 << IRQ_UDP)); WR4(sc, PMC_SCDR, PMC_SCER_UHP | PMC_SCER_UDP); WR4(sc, CKGR_PLLBR, 0); +#ifndef AT91SAM9G20 WR4(sc, PMC_SCER, PMC_SCER_MCKUDP); +#endif /* * MCK and PCU derive from one of the primary clocks. Initialize Modified: head/sys/arm/at91/at91_pmcreg.h ============================================================================== --- head/sys/arm/at91/at91_pmcreg.h Wed Jul 14 00:47:37 2010 (r210039) +++ head/sys/arm/at91/at91_pmcreg.h Wed Jul 14 00:48:53 2010 (r210040) @@ -58,6 +58,21 @@ #define PMC_SR 0x68 /* Status Register */ #define PMC_IMR 0x6c /* Interrupt Mask Register */ +#ifdef AT91SAM9G20 +/* PMC Specific AT91SAM9G20 */ + +/* PMC System Clock Enable Register */ +/* PMC System Clock Disable Register */ +/* PMC System Clock StatusRegister */ +#define PMC_SCER_UHP (1UL << 6) /* UHP: USB Host Port Clock Enable */ +#define PMC_SCER_UDP (1UL << 7) /* UDP: USB Device Port Clock Enable */ +#define PMC_SCER_PCK0 (1UL << 8) /* PCK0: Programmable Clock out en */ +#define PMC_SCER_PCK1 (1UL << 9) /* PCK1: Programmable Clock out en */ +#define PMC_SCER_PCK2 (1UL << 10) /* PCK2: Programmable Clock out en */ +#define PMC_SCER_PCK3 (1UL << 11) /* PCK3: Programmable Clock out en */ + +#else + /* PMC System Clock Enable Register */ /* PMC System Clock Disable Register */ /* PMC System Clock StatusRegister */ @@ -70,6 +85,7 @@ #define PMC_SCER_PCK2 (1UL << 11) /* PCK2: Programmable Clock out en */ #define PMC_SCER_PCK3 (1UL << 12) /* PCK3: Programmable Clock out en */ +#endif /* AT91SAM9G20 */ /* PMC Peripheral Clock Enable Register */ /* PMC Peripheral Clock Disable Register */ /* PMC Peripheral Clock Status Register */ Added: head/sys/arm/at91/at91sam9.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/at91/at91sam9.c Wed Jul 14 00:48:53 2010 (r210040) @@ -0,0 +1,717 @@ +/*- + * Copyright (c) 2005 Olivier Houchard. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#define _ARM32_BUS_DMA_PRIVATE +#include +#include +#include +#include +#include + +static struct at91_softc *at91_softc; + +static void at91_eoi(void *); + +uint32_t at91_master_clock = AT91C_MASTER_CLOCK; + +static int +at91_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, + bus_space_handle_t *bshp) +{ + vm_paddr_t pa, endpa; + + pa = trunc_page(bpa); + if (pa >= 0xfff00000) { + *bshp = pa - 0xf0000000 + 0xd0000000; + return (0); + } + if (pa >= 0xdff00000) + return (0); + endpa = round_page(bpa + size); + + *bshp = (vm_offset_t)pmap_mapdev(pa, endpa - pa); + + return (0); +} + +static void +at91_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size) +{ + vm_offset_t va, endva; + + va = trunc_page((vm_offset_t)t); + endva = va + round_page(size); + + /* Free the kernel virtual mapping. */ + kmem_free(kernel_map, va, endva - va); +} + +static int +at91_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset, + bus_size_t size, bus_space_handle_t *nbshp) +{ + + *nbshp = bsh + offset; + return (0); +} + +static void +at91_barrier(void *t, bus_space_handle_t bsh, bus_size_t size, bus_size_t b, + int a) +{ +} + +bs_protos(generic); +bs_protos(generic_armv4); + +struct bus_space at91_bs_tag = { + /* cookie */ + (void *) 0, + + /* mapping/unmapping */ + at91_bs_map, + at91_bs_unmap, + at91_bs_subregion, + + /* allocation/deallocation */ + NULL, + NULL, + + /* barrier */ + at91_barrier, + + /* read (single) */ + generic_bs_r_1, + generic_armv4_bs_r_2, + generic_bs_r_4, + NULL, + + /* read multiple */ + generic_bs_rm_1, + generic_armv4_bs_rm_2, + generic_bs_rm_4, + NULL, + + /* read region */ + generic_bs_rr_1, + generic_armv4_bs_rr_2, + generic_bs_rr_4, + NULL, + + /* write (single) */ + generic_bs_w_1, + generic_armv4_bs_w_2, + generic_bs_w_4, + NULL, + + /* write multiple */ + generic_bs_wm_1, + generic_armv4_bs_wm_2, + generic_bs_wm_4, + NULL, + + /* write region */ + NULL, + generic_armv4_bs_wr_2, + generic_bs_wr_4, + NULL, + + /* set multiple */ + NULL, + NULL, + NULL, + NULL, + + /* set region */ + NULL, + generic_armv4_bs_sr_2, + generic_bs_sr_4, + NULL, + + /* copy */ + NULL, + generic_armv4_bs_c_2, + NULL, + NULL, + + /* read (single) stream */ + generic_bs_r_1, + generic_armv4_bs_r_2, + generic_bs_r_4, + NULL, + + /* read multiple stream */ + generic_bs_rm_1, + generic_armv4_bs_rm_2, + generic_bs_rm_4, + NULL, + + /* read region stream */ + generic_bs_rr_1, + generic_armv4_bs_rr_2, + generic_bs_rr_4, + NULL, + + /* write (single) stream */ + generic_bs_w_1, + generic_armv4_bs_w_2, + generic_bs_w_4, + NULL, + + /* write multiple stream */ + generic_bs_wm_1, + generic_armv4_bs_wm_2, + generic_bs_wm_4, + NULL, + + /* write region stream */ + NULL, + generic_armv4_bs_wr_2, + generic_bs_wr_4, + NULL, +}; + +static int +at91_probe(device_t dev) +{ + device_set_desc(dev, "AT91 device bus"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 00:52:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A2D51065673; Wed, 14 Jul 2010 00:52:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A0A38FC16; Wed, 14 Jul 2010 00:52:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6E0qT3A006417; Wed, 14 Jul 2010 00:52:29 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6E0qTPS006415; Wed, 14 Jul 2010 00:52:29 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007140052.o6E0qTPS006415@svn.freebsd.org> From: Warner Losh Date: Wed, 14 Jul 2010 00:52:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210041 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 00:52:30 -0000 Author: imp Date: Wed Jul 14 00:52:29 2010 New Revision: 210041 URL: http://svn.freebsd.org/changeset/base/210041 Log: Use cpuregs.h spellings over the cpu.h spellings. Modified: head/sys/mips/include/db_machdep.h Modified: head/sys/mips/include/db_machdep.h ============================================================================== --- head/sys/mips/include/db_machdep.h Wed Jul 14 00:48:53 2010 (r210040) +++ head/sys/mips/include/db_machdep.h Wed Jul 14 00:52:29 2010 (r210041) @@ -55,7 +55,7 @@ typedef register_t db_expr_t; /* express #define SOFTWARE_SSTEP_EMUL /* next_instr_address() emulates 100% */ db_addr_t next_instr_address(db_addr_t, boolean_t); #define BKPT_SIZE (4) -#define BKPT_SET(ins) (BREAK_DDB) +#define BKPT_SET(ins) (MIPS_BREAK_DDB) #define DB_VALID_BREAKPOINT(addr) (((addr) & 3) == 0) #define IS_BREAKPOINT_TRAP(type, code) ((type) == T_BREAK) @@ -65,7 +65,7 @@ db_addr_t next_instr_address(db_addr_t, #define BKPT_SKIP \ do { \ if((db_get_value(kdb_frame->pc, sizeof(int), FALSE) & \ - ~BREAK_VAL_MASK) == BREAK_INSTR) { \ + ~MIPS_BREAK_VAL_MASK) == MIPS_BREAK_INSTR) { \ kdb_frame->pc += BKPT_SIZE; \ kdb_thrctx->pcb_regs.pc += BKPT_SIZE; \ } \ From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 06:37:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C8A91065679; Wed, 14 Jul 2010 06:37:43 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C3078FC1C; Wed, 14 Jul 2010 06:37:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6E6bhnf082431; Wed, 14 Jul 2010 06:37:43 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6E6bht4082430; Wed, 14 Jul 2010 06:37:43 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201007140637.o6E6bht4082430@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 14 Jul 2010 06:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210044 - head/cddl/contrib/opensolaris/lib/libzpool/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 06:37:43 -0000 Author: pjd Date: Wed Jul 14 06:37:43 2010 New Revision: 210044 URL: http://svn.freebsd.org/changeset/base/210044 Log: MFp4 180933: Initialize rw_count properly so that zdb(8) doesn't trigger assertion in rw_enter(): ASSERT(rwlp->rw_count == 0); While here, assert that rw_count is 0 when destroying the lock. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Wed Jul 14 01:55:24 2010 (r210043) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Wed Jul 14 06:37:43 2010 (r210044) @@ -174,11 +174,13 @@ rw_init(krwlock_t *rwlp, char *name, int rwlock_init(&rwlp->rw_lock, USYNC_THREAD, NULL); rwlp->rw_owner = NULL; rwlp->initialized = B_TRUE; + rwlp->rw_count = 0; } void rw_destroy(krwlock_t *rwlp) { + ASSERT(rwlp->rw_count == 0); rwlock_destroy(&rwlp->rw_lock); rwlp->rw_owner = (void *)-1UL; rwlp->initialized = B_FALSE; From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 08:22:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 009701065674; Wed, 14 Jul 2010 08:22:00 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E456B8FC1A; Wed, 14 Jul 2010 08:22:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6E8M00G005493; Wed, 14 Jul 2010 08:22:00 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6E8M0rA005491; Wed, 14 Jul 2010 08:22:00 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201007140822.o6E8M0rA005491@svn.freebsd.org> From: Ruslan Ermilov Date: Wed, 14 Jul 2010 08:22:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210046 - head/sys/geom/cache X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 08:22:01 -0000 Author: ru Date: Wed Jul 14 08:22:00 2010 New Revision: 210046 URL: http://svn.freebsd.org/changeset/base/210046 Log: Fixed cache size decoding read from a label. PR: kern/144732 Submitted by: Eugene Grosbein MFC after: 3 days Modified: head/sys/geom/cache/g_cache.h Modified: head/sys/geom/cache/g_cache.h ============================================================================== --- head/sys/geom/cache/g_cache.h Wed Jul 14 08:08:43 2010 (r210045) +++ head/sys/geom/cache/g_cache.h Wed Jul 14 08:22:00 2010 (r210046) @@ -139,7 +139,7 @@ cache_metadata_decode(const u_char *data md->md_version = le32dec(data + 16); bcopy(data + 20, md->md_name, sizeof(md->md_name)); md->md_bsize = le32dec(data + 36); - md->md_size = le16dec(data + 40); + md->md_size = le32dec(data + 40); md->md_provsize = le64dec(data + 44); } From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 10:49:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE352106567A; Wed, 14 Jul 2010 10:49:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDC218FC21; Wed, 14 Jul 2010 10:49:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6EAnE6E043061; Wed, 14 Jul 2010 10:49:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EAnErE043059; Wed, 14 Jul 2010 10:49:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007141049.o6EAnErE043059@svn.freebsd.org> From: Alexander Motin Date: Wed, 14 Jul 2010 10:49:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210052 - head/sys/x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 10:49:15 -0000 Author: mav Date: Wed Jul 14 10:49:14 2010 New Revision: 210052 URL: http://svn.freebsd.org/changeset/base/210052 Log: Remove some unneeded includes. Code now can be built on ARM. Modified: head/sys/x86/x86/timeevents.c Modified: head/sys/x86/x86/timeevents.c ============================================================================== --- head/sys/x86/x86/timeevents.c Wed Jul 14 08:58:50 2010 (r210051) +++ head/sys/x86/x86/timeevents.c Wed Jul 14 10:49:14 2010 (r210052) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); /* XEN has own timer routines now. */ #ifndef XEN -#include "opt_clock.h" #include "opt_kdtrace.h" #include @@ -53,8 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include #ifdef KDTRACE_HOOKS From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 13:03:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A77091065670; Wed, 14 Jul 2010 13:03:00 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 955468FC14; Wed, 14 Jul 2010 13:03:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6ED30Bn072421; Wed, 14 Jul 2010 13:03:00 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6ED30ur072416; Wed, 14 Jul 2010 13:03:00 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007141303.o6ED30ur072416@svn.freebsd.org> From: Rafal Jaworowski Date: Wed, 14 Jul 2010 13:03:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210053 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 13:03:00 -0000 Author: raj Date: Wed Jul 14 13:03:00 2010 New Revision: 210053 URL: http://svn.freebsd.org/changeset/base/210053 Log: Provide initial man pages for Flattened Device Tree support and the common drivers. Sponsored by: The FreeBSD Foundation Added: head/share/man/man4/fdt.4 (contents, props changed) head/share/man/man4/fdtbus.4 (contents, props changed) head/share/man/man4/simplebus.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Wed Jul 14 10:49:14 2010 (r210052) +++ head/share/man/man4/Makefile Wed Jul 14 13:03:00 2010 (r210053) @@ -110,6 +110,8 @@ MAN= aac.4 \ fatm.4 \ fd.4 \ fdc.4 \ + fdt.4 \ + fdtbus.4 \ firewire.4 \ fpa.4 \ fwe.4 \ @@ -358,6 +360,7 @@ MAN= aac.4 \ siba.4 \ siftr.4 \ siis.4 \ + simplebus.4 \ sio.4 \ sis.4 \ sk.4 \ @@ -527,6 +530,7 @@ MLINKS+=fatm.4 if_fatm.4 MLINKS+=fd.4 stderr.4 \ fd.4 stdin.4 \ fd.4 stdout.4 +MLINKS+=fdt.4 FDT.4 MLINKS+=firewire.4 ieee1394.4 MLINKS+=fpa.4 fea.4 MLINKS+=fwe.4 if_fwe.4 Added: head/share/man/man4/fdt.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/fdt.4 Wed Jul 14 13:03:00 2010 (r210053) @@ -0,0 +1,184 @@ +.\" +.\" Copyright (c) 2010 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This software was developed by Semihalf under sponsorship from +.\" the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 12, 2010 +.Dt FDT 4 +.Os +.Sh NAME +.Nm fdt +.Nd Flattened Device Tree support +.Sh SYNOPSIS +.Cd "options FDT" +.Cd "makeoptions FDT_DTS_FILE=.dts" +.Cd "options FDT_DTB_STATIC" +.Sh DESCRIPTION +.Em Flattened Device Tree +is a mechanism for describing computer hardware resources, which cannot be +probed or self enumerated, in a uniform and portable way. The primary +consumers of this technology are +.Em embedded systems, +where a lot of designs are based on similar chips, but have different +assignment of pins, memory layout, addresses bindings, interrupts routing and +other resources. +.Pp +Configuration data, which cannot be self discovered in run-time, has to be +supplied from external source. The concept of a flattened device tree is a +platform and architecture independent approach for resolving such problems. +The idea is inherited from Open Firmware IEEE 1275 device-tree notion, and has +been successfully adopted by the embedded industry. The scheme works in the +following way: +.Bl -bullet +.It +Hardware platform resources are +.Em manually +described in a human readable text source format, where all non +self-enumerating information is gathered. +.It +This source description is converted +.Em (compiled) +into a binary object i.e. a flattened device tree +.Em blob +which is passed to the kernel at boot time. +.It +The kernel (driver) learns about hardware resources details and dependencies +from this [externally supplied] blob, which eliminates the need for embedding +any information about the underlying platform hardware resources in the kernel. +.It +The flattened device tree mechanism in principle does not depend on any +particular first-stage bootloader or firmware features. The only overall +requirement for the environment is to provide a complete device tree +description to the kernel. +.El +.Pp +The +.Nm +layer allows any platform code in the kernel to retrieve information about +hardware resources from a unified origin, which brings advantages to the +embedded applications (eliminates hard-coded configuration approach, enforces +code to be data driven and extensible) leading to easier porting and +maintenance. +.Sh DEFINITIONS +.Bl -tag -width Ar +.It Va Device tree source (DTS) +The device tree source is a text file which describes hardware resources of a +computer system in a human-readable form, with certain hierarchical structure +(a tree). The default location for DTS files +in the +.Fx +source repository is +.Pa sys/boot/fdt/dts +directory. +.It Va Device tree blob (DTB) +The textual device tree description (DTS file) is first converted (compiled) +into a binary object (the device tree blob) i.e. the DTB, which is handed over +to the final consumer (typically kernel) for parsing and processing of its +contents. +.It Va Device tree compiler (DTC) +A utility program executed on the host, which transforms (compiles) a textual +description of a device tree (DTS) into a binary object (DTB). +.It Va Device tree bindings +While the device tree textual description and the binary object are media to +convey the hardware configuration information, an actual meaning and +interpretation of the contents are defined by the device tree +.Pa bindings . +They are certain conventions describing definitions (encoding) of particular +nodes in a device tree and their properties, allowed values, ranges and so on. +Such reference conventions were provided by the legacy Open Firmware bindings, +further supplemented by the ePAPR specification. +.El +.Sh "BUILDING THE WORLD" +In order for the system to support +.Nm +it is required that +.Fx +world be built with the +.Pa WITH_FDT +build knob supplied either via +.Xr src.conf 5 +or command line defined with -D. +.Pp +This creates the user space +.Pa dtc +compiler and enables +.Nm +support in +.Xr loader 8 . +.Sh "BUILDING KERNEL" +There is a couple of options for managing +.Nm +support at the +.Fx +kernel level. +.Bl -tag -width Ar +.It Va options FDT +The primary option for enabling +.Nm +support in the kernel. It covers all low-level and infrastructure parts of +.Nm +kernel support, which primarily are the +.Xr fdtbus 4 and +.Xr simplebus 4 drivers, as well as helper routines and libraries. +.It Va makeoptions FDT_DTS_FILE=.dts +Specifies a preferred (default) device tree source (DTS) file for a given +kernel. The indicated DTS file will be converted (compiled) into a binary form +along with building the kernel itself. The DTS file name is relative +to the default location of DTS sources i.e. +.Pa sys/boot/fdt/dts . +This makeoption is not mandatory unless FDT_DTB_STATIC is also defined (see +below). +.It Va options FDT_DTB_STATIC +Typically, the device tree blob (DTB) is a stand-alone file, physically +separate from the kernel, but this option lets statically embed a +DTB file into a kernel image. Note that when this is specified the +FDT_DTS_FILE makeoption becomes mandatory (as there needs to be a DTS file +specified in order to embed it into the kernel image). +.El +.Sh SEE ALSO +.Xr fdtbus 4 , +.Xr openfirm 4 , +.Xr simplebus 4 , +.Sh STANDARDS +IEEE Std 1275: IEEE Standard for Boot (Initialization Configuration) Firmware: +Core Requirements and Practices +.Pq Vt Open Firmware . +.Pp +Power.org Standard for Embedded Power Architecture Platform Requirements +.Pq Vt ePAPR . +.Sh HISTORY +The +.Nm +support first appeared in +.Fx 9.0 . +.Sh AUTHORS +The +.Nm +support was developed by Semihalf under sponsorship from the FreeBSD +Foundation. This manual page was written by +.An Rafal Jaworowski . Added: head/share/man/man4/fdtbus.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/fdtbus.4 Wed Jul 14 13:03:00 2010 (r210053) @@ -0,0 +1,87 @@ +.\" +.\" Copyright (c) 2010 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This software was developed by Semihalf under sponsorship from +.\" the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 12, 2010 +.Dt FDTBUS 4 +.Os +.Sh NAME +.Nm fdtbus +.Nd Flattened Device Tree bus driver +.Sh SYNOPSIS +.Cd "options FDT" +.Sh DESCRIPTION +The +.Nm +abstract bus driver is the primary connection and translation layer between +.Xr fdt 4 +hardware resources description and +.Fx +native newbus device drivers framework. For an embedded system +.Nm +represents peripherals typically found on a highly integrated chip +(system-on-chip). +.Pp +The +.Nm +driver provides generic, common infrastructure for all +.Xr fdt 4 oriented device drivers, and its main responsibilities are the +following: +.Bl -bullet +.It +Creating newbus children that reflect +.Xr fdt 4 +nodes in the flattened device tree. +.It +Managing SYS_RES_IRQ resources. +.It +Managing SYS_RES_MEMORY, SYS_RES_IOPORT resources. +.El +.Sh SEE ALSO +.Xr fdt 4 , +.Xr openfirm 4 , +.Xr simplebus 4 , +.Sh STANDARDS +IEEE Std 1275: IEEE Standard for Boot (Initialization Configuration) Firmware: +Core Requirements and Practices +.Pq Vt Open Firmware . +.Pp +Power.org Standard for Embedded Power Architecture Platform Requirements +.Pq Vt ePAPR . +.Sh HISTORY +The +.Nm +support first appeared in +.Fx 9.0 . +.Sh AUTHORS +The +.Nm +support was developed by Semihalf under sponsorship from the FreeBSD +Foundation. This manual page was written by +.An Rafal Jaworowski . Added: head/share/man/man4/simplebus.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/simplebus.4 Wed Jul 14 13:03:00 2010 (r210053) @@ -0,0 +1,81 @@ +.\" +.\" Copyright (c) 2010 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This software was developed by Semihalf under sponsorship from +.\" the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 12, 2010 +.Dt SIMPLEBUS 4 +.Os +.Sh NAME +.Nm simplebus +.Nd ePAPR simple-bus driver +.Sh SYNOPSIS +.Cd "options FDT" +.Sh DESCRIPTION +This bus driver is dedicated for the +.Pa simple-bus +node of a flattened device tree compliant with the +.Pa ePAPR +specification. +.Pp +The +.Nm +entity does not represent any physical element by itself, it is rather an +umbrella node grouping integrated on-chip peripherals like interrupt +controller, connectivity controllers, accelerating engines and so on. +.Pp +The driver is generic and common for all flattened device tree nodes claiming +.Pa simple-bus +compatibility. It iterates over direct descendants of the +.Pa simple-bus +node, instantiates newbus children and assigns resources to them, based on the +configuration data retrieved from the nodes properties in +.Xr fdt 4 . +.Pp +Note the +.Nm +does not manage device resources and passes through any requests to the +.Xr fdtbus 4 layer. +.Sh SEE ALSO +.Xr fdt 4 , +.Xr fdtbus 4 , +.Xr openfirm 4 , +.Sh STANDARDS +Power.org Standard for Embedded Power Architecture Platform Requirements +.Pq Vt ePAPR . +.Sh HISTORY +The +.Nm +support first appeared in +.Fx 9.0 . +.Sh AUTHORS +The +.Nm +support was developed by Semihalf under sponsorship from the FreeBSD +Foundation. This manual page was written by +.An Rafal Jaworowski . From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 13:31:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 534481065672; Wed, 14 Jul 2010 13:31:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 404BD8FC1D; Wed, 14 Jul 2010 13:31:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6EDVSoO078649; Wed, 14 Jul 2010 13:31:28 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EDVRp2078644; Wed, 14 Jul 2010 13:31:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007141331.o6EDVRp2078644@svn.freebsd.org> From: Alexander Motin Date: Wed, 14 Jul 2010 13:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210054 - in head/sys: conf kern x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 13:31:28 -0000 Author: mav Date: Wed Jul 14 13:31:27 2010 New Revision: 210054 URL: http://svn.freebsd.org/changeset/base/210054 Log: Move timeevents.c to MI code, as it is not x86-specific. I already have it working on Marvell ARM SoCs, and it would be nice to unify timer code between more platforms. Added: head/sys/kern/timeevents.c - copied unchanged from r210053, head/sys/x86/x86/timeevents.c Deleted: head/sys/x86/x86/timeevents.c Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.pc98 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Jul 14 13:03:00 2010 (r210053) +++ head/sys/conf/files.amd64 Wed Jul 14 13:31:27 2010 (r210054) @@ -230,6 +230,7 @@ dev/wpi/if_wpi.c optional wpi isa/syscons_isa.c optional sc isa/vga_isa.c optional vga kern/link_elf_obj.c standard +kern/timeevents.c standard # # IA32 binary support # @@ -315,4 +316,4 @@ x86/x86/io_apic.c standard x86/x86/local_apic.c standard x86/x86/mca.c standard x86/x86/msi.c optional pci -x86/x86/timeevents.c standard + Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Jul 14 13:03:00 2010 (r210053) +++ head/sys/conf/files.i386 Wed Jul 14 13:31:27 2010 (r210054) @@ -349,6 +349,7 @@ isa/syscons_isa.c optional sc isa/vga_isa.c optional vga kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip +kern/timeevents.c standard libkern/divdi3.c standard libkern/ffsl.c standard libkern/flsl.c standard @@ -390,4 +391,3 @@ x86/x86/io_apic.c optional apic x86/x86/local_apic.c optional apic x86/x86/mca.c standard x86/x86/msi.c optional apic pci -x86/x86/timeevents.c standard Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Wed Jul 14 13:03:00 2010 (r210053) +++ head/sys/conf/files.pc98 Wed Jul 14 13:31:27 2010 (r210054) @@ -215,6 +215,7 @@ i386/svr4/svr4_machdep.c optional compat # kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip +kern/timeevents.c standard libkern/divdi3.c standard libkern/ffsl.c standard libkern/flsl.c standard @@ -258,4 +259,3 @@ x86/x86/io_apic.c optional apic x86/x86/local_apic.c optional apic x86/x86/mca.c standard x86/x86/msi.c optional apic pci -x86/x86/timeevents.c standard Copied: head/sys/kern/timeevents.c (from r210053, head/sys/x86/x86/timeevents.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/kern/timeevents.c Wed Jul 14 13:31:27 2010 (r210054, copy of r210053, head/sys/x86/x86/timeevents.c) @@ -0,0 +1,508 @@ +/*- + * Copyright (c) 2010 Alexander Motin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification, immediately at the beginning of the file. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Common routines to manage event timers hardware. + */ + +/* XEN has own timer routines now. */ +#ifndef XEN + +#include "opt_kdtrace.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#ifdef KDTRACE_HOOKS +#include +cyclic_clock_func_t cyclic_clock_func[MAXCPU]; +#endif + +static void cpu_restartclocks(void); +static void timercheck(void); +inline static int doconfigtimer(int i); +static void configtimer(int i); + +static struct eventtimer *timer[2] = { NULL, NULL }; +static int timertest = 0; +static int timerticks[2] = { 0, 0 }; +static int profiling_on = 0; +static struct bintime timerperiod[2]; + +static char timername[2][32]; +TUNABLE_STR("kern.eventtimer.timer1", timername[0], sizeof(*timername)); +TUNABLE_STR("kern.eventtimer.timer2", timername[1], sizeof(*timername)); + +static u_int singlemul = 0; +TUNABLE_INT("kern.eventtimer.singlemul", &singlemul); +SYSCTL_INT(_kern_eventtimer, OID_AUTO, singlemul, CTLFLAG_RW, &singlemul, + 0, "Multiplier, used in single timer mode"); + +typedef u_int tc[2]; +static DPCPU_DEFINE(tc, configtimer); + +#define FREQ2BT(freq, bt) \ +{ \ + (bt)->sec = 0; \ + (bt)->frac = ((uint64_t)0x8000000000000000 / (freq)) << 1; \ +} +#define BT2FREQ(bt, freq) \ +{ \ + *(freq) = ((uint64_t)0x8000000000000000 + ((bt)->frac >> 2)) / \ + ((bt)->frac >> 1); \ +} + +/* Per-CPU timer1 handler. */ +static int +hardclockhandler(struct trapframe *frame) +{ + +#ifdef KDTRACE_HOOKS + /* + * If the DTrace hooks are configured and a callback function + * has been registered, then call it to process the high speed + * timers. + */ + int cpu = curcpu; + if (cyclic_clock_func[cpu] != NULL) + (*cyclic_clock_func[cpu])(frame); +#endif + + timer1clock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + return (FILTER_HANDLED); +} + +/* Per-CPU timer2 handler. */ +static int +statclockhandler(struct trapframe *frame) +{ + + timer2clock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + return (FILTER_HANDLED); +} + +/* timer1 broadcast IPI handler. */ +int +hardclockintr(struct trapframe *frame) +{ + + if (doconfigtimer(0)) + return (FILTER_HANDLED); + return (hardclockhandler(frame)); +} + +/* timer2 broadcast IPI handler. */ +int +statclockintr(struct trapframe *frame) +{ + + if (doconfigtimer(1)) + return (FILTER_HANDLED); + return (statclockhandler(frame)); +} + +/* timer1 callback. */ +static void +timer1cb(struct eventtimer *et, void *arg) +{ + +#ifdef SMP + /* Broadcast interrupt to other CPUs for non-per-CPU timers */ + if (smp_started && (et->et_flags & ET_FLAGS_PERCPU) == 0) + ipi_all_but_self(IPI_HARDCLOCK); +#endif + if (timertest) { + if ((et->et_flags & ET_FLAGS_PERCPU) == 0 || curcpu == 0) { + timerticks[0]++; + if (timerticks[0] >= timer1hz) { + ET_LOCK(); + timercheck(); + ET_UNLOCK(); + } + } + } + hardclockhandler(curthread->td_intr_frame); +} + +/* timer2 callback. */ +static void +timer2cb(struct eventtimer *et, void *arg) +{ + +#ifdef SMP + /* Broadcast interrupt to other CPUs for non-per-CPU timers */ + if (smp_started && (et->et_flags & ET_FLAGS_PERCPU) == 0) + ipi_all_but_self(IPI_STATCLOCK); +#endif + if (timertest) { + if ((et->et_flags & ET_FLAGS_PERCPU) == 0 || curcpu == 0) { + timerticks[1]++; + if (timerticks[1] >= timer2hz * 2) { + ET_LOCK(); + timercheck(); + ET_UNLOCK(); + } + } + } + statclockhandler(curthread->td_intr_frame); +} + +/* + * Check that both timers are running with at least 1/4 of configured rate. + * If not - replace the broken one. + */ +static void +timercheck(void) +{ + + if (!timertest) + return; + timertest = 0; + if (timerticks[0] * 4 < timer1hz) { + printf("Event timer \"%s\" is dead.\n", timer[0]->et_name); + timer1hz = 0; + configtimer(0); + et_ban(timer[0]); + et_free(timer[0]); + timer[0] = et_find(NULL, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[0] == NULL) { + timer2hz = 0; + configtimer(1); + et_free(timer[1]); + timer[1] = NULL; + timer[0] = timer[1]; + } + et_init(timer[0], timer1cb, NULL, NULL); + cpu_restartclocks(); + return; + } + if (timerticks[1] * 4 < timer2hz) { + printf("Event timer \"%s\" is dead.\n", timer[1]->et_name); + timer2hz = 0; + configtimer(1); + et_ban(timer[1]); + et_free(timer[1]); + timer[1] = et_find(NULL, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[1] != NULL) + et_init(timer[1], timer2cb, NULL, NULL); + cpu_restartclocks(); + return; + } +} + +/* + * Reconfigure specified per-CPU timer on other CPU. Called from IPI handler. + */ +inline static int +doconfigtimer(int i) +{ + tc *conf; + + conf = DPCPU_PTR(configtimer); + if (atomic_load_acq_int(*conf + i)) { + if (i == 0 ? timer1hz : timer2hz) + et_start(timer[i], NULL, &timerperiod[i]); + else + et_stop(timer[i]); + atomic_store_rel_int(*conf + i, 0); + return (1); + } + return (0); +} + +/* + * Reconfigure specified timer. + * For per-CPU timers use IPI to make other CPUs to reconfigure. + */ +static void +configtimer(int i) +{ +#ifdef SMP + tc *conf; + int cpu; + + critical_enter(); +#endif + /* Start/stop global timer or per-CPU timer of this CPU. */ + if (i == 0 ? timer1hz : timer2hz) + et_start(timer[i], NULL, &timerperiod[i]); + else + et_stop(timer[i]); +#ifdef SMP + if ((timer[i]->et_flags & ET_FLAGS_PERCPU) == 0 || !smp_started) { + critical_exit(); + return; + } + /* Set reconfigure flags for other CPUs. */ + CPU_FOREACH(cpu) { + conf = DPCPU_ID_PTR(cpu, configtimer); + atomic_store_rel_int(*conf + i, (cpu == curcpu) ? 0 : 1); + } + /* Send reconfigure IPI. */ + ipi_all_but_self(i == 0 ? IPI_HARDCLOCK : IPI_STATCLOCK); + /* Wait for reconfiguration completed. */ +restart: + cpu_spinwait(); + CPU_FOREACH(cpu) { + if (cpu == curcpu) + continue; + conf = DPCPU_ID_PTR(cpu, configtimer); + if (atomic_load_acq_int(*conf + i)) + goto restart; + } + critical_exit(); +#endif +} + +/* + * Configure and start event timers. + */ +void +cpu_initclocks_bsp(void) +{ + int base, div; + + timer[0] = et_find(timername[0], ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[0] == NULL) + timer[0] = et_find(NULL, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[0] == NULL) + panic("No usable event timer found!"); + et_init(timer[0], timer1cb, NULL, NULL); + timer[1] = et_find(timername[1][0] ? timername[1] : NULL, + ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[1]) + et_init(timer[1], timer2cb, NULL, NULL); + /* + * We honor the requested 'hz' value. + * We want to run stathz in the neighborhood of 128hz. + * We would like profhz to run as often as possible. + */ + if (singlemul == 0) { + if (hz >= 1500 || (hz % 128) == 0) + singlemul = 1; + else if (hz >= 750) + singlemul = 2; + else + singlemul = 4; + } + if (timer[1] == NULL) { + base = hz * singlemul; + if (base < 128) + stathz = base; + else { + div = base / 128; + if (div % 2 == 0) + div++; + stathz = base / div; + } + profhz = stathz; + while ((profhz + stathz) <= 8192) + profhz += stathz; + } else { + stathz = 128; + profhz = stathz * 64; + } + ET_LOCK(); + cpu_restartclocks(); + ET_UNLOCK(); +} + +/* Start per-CPU event timers on APs. */ +void +cpu_initclocks_ap(void) +{ + + ET_LOCK(); + if (timer[0]->et_flags & ET_FLAGS_PERCPU) + et_start(timer[0], NULL, &timerperiod[0]); + if (timer[1] && timer[1]->et_flags & ET_FLAGS_PERCPU) + et_start(timer[1], NULL, &timerperiod[1]); + ET_UNLOCK(); +} + +/* Reconfigure and restart event timers after configuration changes. */ +static void +cpu_restartclocks(void) +{ + + /* Stop all event timers. */ + timertest = 0; + if (timer1hz) { + timer1hz = 0; + configtimer(0); + } + if (timer[1] && timer2hz) { + timer2hz = 0; + configtimer(1); + } + /* Calculate new event timers parameters. */ + if (timer[1] == NULL) { + timer1hz = hz * singlemul; + while (timer1hz < (profiling_on ? profhz : stathz)) + timer1hz += hz; + timer2hz = 0; + } else { + timer1hz = hz; + timer2hz = profiling_on ? profhz : stathz; + } + printf("Starting kernel event timers: %s @ %dHz, %s @ %dHz\n", + timer[0]->et_name, timer1hz, + timer[1] ? timer[1]->et_name : "NONE", timer2hz); + /* Restart event timers. */ + FREQ2BT(timer1hz, &timerperiod[0]); + configtimer(0); + if (timer[1]) { + timerticks[0] = 0; + timerticks[1] = 0; + FREQ2BT(timer2hz, &timerperiod[1]); + configtimer(1); + timertest = 1; + } +} + +/* Switch to profiling clock rates. */ +void +cpu_startprofclock(void) +{ + + ET_LOCK(); + profiling_on = 1; + cpu_restartclocks(); + ET_UNLOCK(); +} + +/* Switch to regular clock rates. */ +void +cpu_stopprofclock(void) +{ + + ET_LOCK(); + profiling_on = 0; + cpu_restartclocks(); + ET_UNLOCK(); +} + +/* Report or change the active event timers hardware. */ +static int +sysctl_kern_eventtimer_timer1(SYSCTL_HANDLER_ARGS) +{ + char buf[32]; + struct eventtimer *et; + int error; + + ET_LOCK(); + et = timer[0]; + snprintf(buf, sizeof(buf), "%s", et->et_name); + ET_UNLOCK(); + error = sysctl_handle_string(oidp, buf, sizeof(buf), req); + ET_LOCK(); + et = timer[0]; + if (error != 0 || req->newptr == NULL || + strcmp(buf, et->et_name) == 0) { + ET_UNLOCK(); + return (error); + } + et = et_find(buf, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (et == NULL) { + ET_UNLOCK(); + return (ENOENT); + } + timer1hz = 0; + configtimer(0); + et_free(timer[0]); + timer[0] = et; + et_init(timer[0], timer1cb, NULL, NULL); + cpu_restartclocks(); + ET_UNLOCK(); + return (error); +} +SYSCTL_PROC(_kern_eventtimer, OID_AUTO, timer1, + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, + 0, 0, sysctl_kern_eventtimer_timer1, "A", "Primary event timer"); + +static int +sysctl_kern_eventtimer_timer2(SYSCTL_HANDLER_ARGS) +{ + char buf[32]; + struct eventtimer *et; + int error; + + ET_LOCK(); + et = timer[1]; + if (et == NULL) + snprintf(buf, sizeof(buf), "NONE"); + else + snprintf(buf, sizeof(buf), "%s", et->et_name); + ET_UNLOCK(); + error = sysctl_handle_string(oidp, buf, sizeof(buf), req); + ET_LOCK(); + et = timer[1]; + if (error != 0 || req->newptr == NULL || + strcmp(buf, et ? et->et_name : "NONE") == 0) { + ET_UNLOCK(); + return (error); + } + et = et_find(buf, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (et == NULL && strcasecmp(buf, "NONE") != 0) { + ET_UNLOCK(); + return (ENOENT); + } + if (timer[1] != NULL) { + timer2hz = 0; + configtimer(1); + et_free(timer[1]); + } + timer[1] = et; + if (timer[1] != NULL) + et_init(timer[1], timer2cb, NULL, NULL); + cpu_restartclocks(); + ET_UNLOCK(); + return (error); +} +SYSCTL_PROC(_kern_eventtimer, OID_AUTO, timer2, + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, + 0, 0, sysctl_kern_eventtimer_timer2, "A", "Secondary event timer"); + +#endif + From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 14:31:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 064B91065676; Wed, 14 Jul 2010 14:31:19 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DEDC58FC17; Wed, 14 Jul 2010 14:31:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6EEVIW4091777; Wed, 14 Jul 2010 14:31:18 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EEVIsj091773; Wed, 14 Jul 2010 14:31:18 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201007141431.o6EEVIsj091773@svn.freebsd.org> From: "Justin T. Gibbs" Date: Wed, 14 Jul 2010 14:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210055 - in head/sys/dev/aic7xxx: . aicasm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 14:31:19 -0000 Author: gibbs Date: Wed Jul 14 14:31:18 2010 New Revision: 210055 URL: http://svn.freebsd.org/changeset/base/210055 Log: Correct logic bug in aicasm's undefined register bit access detection code. The code in question verifies that all register write operations only change bits that are defined (in the register definition file) for that effected register. The bug effectively disabled this checking. o Fix the check by testing the opcode against all supported read ("and" based) operands. o Add missing bit definitions to the aic7xxx and aic79xx register definition files so that the warning (treated as a fatal error) does not spuriously fire. Reported by: Pawel Worach MFC after: 1 week Modified: head/sys/dev/aic7xxx/aic79xx.reg head/sys/dev/aic7xxx/aic7xxx.reg head/sys/dev/aic7xxx/aicasm/aicasm_gram.y Modified: head/sys/dev/aic7xxx/aic79xx.reg ============================================================================== --- head/sys/dev/aic7xxx/aic79xx.reg Wed Jul 14 13:31:27 2010 (r210054) +++ head/sys/dev/aic7xxx/aic79xx.reg Wed Jul 14 14:31:18 2010 (r210055) @@ -3813,6 +3813,7 @@ scb { SCB_RESIDUAL_SGPTR { size 4 field SG_ADDR_MASK 0xf8 /* In the last byte */ + field SG_ADDR_BIT 0x04 field SG_OVERRUN_RESID 0x02 /* In the first byte */ field SG_LIST_NULL 0x01 /* In the first byte */ } Modified: head/sys/dev/aic7xxx/aic7xxx.reg ============================================================================== --- head/sys/dev/aic7xxx/aic7xxx.reg Wed Jul 14 13:31:27 2010 (r210054) +++ head/sys/dev/aic7xxx/aic7xxx.reg Wed Jul 14 14:31:18 2010 (r210055) @@ -1448,6 +1448,7 @@ scratch_ram { mask EXIT_MSG_LOOP 0x08 mask CONT_MSG_LOOP 0x04 mask CONT_TARG_SESSION 0x02 + mask SPARE 0x01 alias RETURN_1 } ARG_2 { Modified: head/sys/dev/aic7xxx/aicasm/aicasm_gram.y ============================================================================== --- head/sys/dev/aic7xxx/aicasm/aicasm_gram.y Wed Jul 14 13:31:27 2010 (r210054) +++ head/sys/dev/aic7xxx/aicasm/aicasm_gram.y Wed Jul 14 14:31:18 2010 (r210055) @@ -1821,9 +1821,15 @@ type_check(symbol_t *symbol, expression_ { symbol_node_t *node; int and_op; + uint8_t invalid_bits; and_op = FALSE; - if (opcode == AIC_OP_AND || opcode == AIC_OP_JNZ || AIC_OP_JZ) + if (opcode == AIC_OP_AND + || opcode == AIC_OP_BMOV + || opcode == AIC_OP_JE + || opcode == AIC_OP_JNE + || opcode == AIC_OP_JNZ + || opcode == AIC_OP_JZ) and_op = TRUE; /* @@ -1831,12 +1837,11 @@ type_check(symbol_t *symbol, expression_ * that hasn't been defined. If this is an and operation, * this is a mask, so "undefined" bits are okay. */ - if (and_op == FALSE - && (expression->value & ~symbol->info.rinfo->valid_bitmask) != 0) { + invalid_bits = expression->value & ~symbol->info.rinfo->valid_bitmask; + if (and_op == FALSE && invalid_bits != 0) { snprintf(errbuf, sizeof(errbuf), "Invalid bit(s) 0x%x in immediate written to %s", - expression->value & ~symbol->info.rinfo->valid_bitmask, - symbol->name); + invalid_bits, symbol->name); stop(errbuf, EX_DATAERR); /* NOTREACHED */ } From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 15:14:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AC8010656A5; Wed, 14 Jul 2010 15:14:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE0258FC18; Wed, 14 Jul 2010 15:14:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6EFE01R001562; Wed, 14 Jul 2010 15:14:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EFE0SO001560; Wed, 14 Jul 2010 15:14:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007141514.o6EFE0SO001560@svn.freebsd.org> From: Alexander Motin Date: Wed, 14 Jul 2010 15:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210058 - head/sbin/geom/class/virstor X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 15:14:01 -0000 Author: mav Date: Wed Jul 14 15:14:00 2010 New Revision: 210058 URL: http://svn.freebsd.org/changeset/base/210058 Log: Do not bzero() NULL pointer on malloc() error. Submitted by: Dmitry Luhtionov Modified: head/sbin/geom/class/virstor/geom_virstor.c Modified: head/sbin/geom/class/virstor/geom_virstor.c ============================================================================== --- head/sbin/geom/class/virstor/geom_virstor.c Wed Jul 14 15:11:29 2010 (r210057) +++ head/sbin/geom/class/virstor/geom_virstor.c Wed Jul 14 15:14:00 2010 (r210058) @@ -459,9 +459,9 @@ virstor_label(struct gctl_req *req) strlcpy(md.provider, name, sizeof(md.provider)); } sect = malloc(ssize); - bzero(sect, ssize); if (sect == NULL) err(1, "Cannot allocate sector of %zu bytes", ssize); + bzero(sect, ssize); virstor_metadata_encode(&md, sect); error = my_g_metadata_store(name, sect, ssize); free(sect); From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 15:28:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2FCA106566B; Wed, 14 Jul 2010 15:28:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 73C828FC23; Wed, 14 Jul 2010 15:28:15 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 2472D46B45; Wed, 14 Jul 2010 11:28:15 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2F60F8A04E; Wed, 14 Jul 2010 11:28:11 -0400 (EDT) From: John Baldwin To: Alexander Motin Date: Wed, 14 Jul 2010 10:08:55 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007141331.o6EDVRp2078644@svn.freebsd.org> In-Reply-To: <201007141331.o6EDVRp2078644@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007141008.56110.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 14 Jul 2010 11:28:11 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210054 - in head/sys: conf kern x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 15:28:15 -0000 On Wednesday, July 14, 2010 9:31:27 am Alexander Motin wrote: > Author: mav > Date: Wed Jul 14 13:31:27 2010 > New Revision: 210054 > URL: http://svn.freebsd.org/changeset/base/210054 > > Log: > Move timeevents.c to MI code, as it is not x86-specific. I already have > it working on Marvell ARM SoCs, and it would be nice to unify timer code > between more platforms. > > Added: > head/sys/kern/timeevents.c > - copied unchanged from r210053, head/sys/x86/x86/timeevents.c > Deleted: > head/sys/x86/x86/timeevents.c > Modified: > head/sys/conf/files.amd64 > head/sys/conf/files.i386 > head/sys/conf/files.pc98 Can this be merged with kern_et.c, or perhaps called subr_eventtimers.c instead? -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 16:00:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2689106566C; Wed, 14 Jul 2010 16:00:48 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id B81378FC1B; Wed, 14 Jul 2010 16:00:47 +0000 (UTC) Received: by bwz12 with SMTP id 12so48441bwz.13 for ; Wed, 14 Jul 2010 09:00:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=CKSsy9GmcNspi656hTHFmepeTVNw3NGq8HYKH6IWtMU=; b=AJjjeAE0UIYyG0VJlirRJg8Y+B0O1h8UcibKpM5WM15ERnC7hI+p2E28ygpoN11C4E kcqEKcXOJV/EPsZWie6nvy2PFAAjTdoIBVkrtdY/oq1aZk0/VPeLRN6uEYjKF64Txwt+ jK5MscocCJkZvAxmbPK6TvFpwfSIXAK3m0n98= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=tMpSmA1Y03BXNhjDYeqlZjGSt3ci6Hc5PvxbJeZWY454H2eUT8+yRnidoSxqYPmwjw v/3gPJAdrhuWU3Ou9qxssG0UNcKnAc1UApG483WG4+ChV84LgRZOYyDClaIdGPTv05Qf U3euZqqprdhqA0m9K3iiWQcTHMZCuh0oUWd+0= Received: by 10.204.163.69 with SMTP id z5mr13600294bkx.167.1279123246508; Wed, 14 Jul 2010 09:00:46 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id f10sm33941229bkl.17.2010.07.14.09.00.44 (version=SSLv3 cipher=RC4-MD5); Wed, 14 Jul 2010 09:00:45 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C3DDEF2.4090309@FreeBSD.org> Date: Wed, 14 Jul 2010 18:59:46 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: John Baldwin References: <201007141331.o6EDVRp2078644@svn.freebsd.org> <201007141008.56110.jhb@freebsd.org> In-Reply-To: <201007141008.56110.jhb@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210054 - in head/sys: conf kern x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 16:00:48 -0000 John Baldwin wrote: > On Wednesday, July 14, 2010 9:31:27 am Alexander Motin wrote: >> Author: mav >> Date: Wed Jul 14 13:31:27 2010 >> New Revision: 210054 >> URL: http://svn.freebsd.org/changeset/base/210054 >> >> Log: >> Move timeevents.c to MI code, as it is not x86-specific. I already have >> it working on Marvell ARM SoCs, and it would be nice to unify timer code >> between more platforms. >> >> Added: >> head/sys/kern/timeevents.c >> - copied unchanged from r210053, head/sys/x86/x86/timeevents.c >> Deleted: >> head/sys/x86/x86/timeevents.c >> Modified: >> head/sys/conf/files.amd64 >> head/sys/conf/files.i386 >> head/sys/conf/files.pc98 > > Can this be merged with kern_et.c, They are different. kern_et.c provides event timer drivers API, timeevents.c consumes it to manage kernel clocks. kern_et.c theoretically can be used without timeevents.c if some other code consume timers, for example, exposing them to user-level. May be names indeed cryptic a bit, but I had no better ideas. > or perhaps called subr_eventtimers.c instead? Whatever you like, but why exactly so and why "subr_" important? -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 16:01:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBBD2106566C; Wed, 14 Jul 2010 16:01:43 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA6058FC17; Wed, 14 Jul 2010 16:01:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6EG1h9c012127; Wed, 14 Jul 2010 16:01:43 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EG1h5P012125; Wed, 14 Jul 2010 16:01:43 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007141601.o6EG1h5P012125@svn.freebsd.org> From: Benedict Reuschling Date: Wed, 14 Jul 2010 16:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210061 - head/usr.sbin/freebsd-update X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 16:01:43 -0000 Author: bcr (doc committer) Date: Wed Jul 14 16:01:43 2010 New Revision: 210061 URL: http://svn.freebsd.org/changeset/base/210061 Log: Update some release version numbers. The patch is based on the one from the PR, but the version numbers reflect the newer ones from http://security.freebsd.org/#sup PR: docs/145227 Submitted by: Glen Barber (glen dot j dot barber at gmail dot com) Reviewed by: cperciva Mentored by: jkois MFC after: 1 week Modified: head/usr.sbin/freebsd-update/freebsd-update.8 Modified: head/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.8 Wed Jul 14 15:18:22 2010 (r210060) +++ head/usr.sbin/freebsd-update/freebsd-update.8 Wed Jul 14 16:01:43 2010 (r210061) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 11, 2007 +.Dd July 14, 2010 .Dt FREEBSD-UPDATE 8 .Os FreeBSD .Sh NAME @@ -54,13 +54,13 @@ by the .Fx Release Engineering Team, e.g., .Fx -6.1-RELEASE and +7.3-RELEASE and .Fx -6.2-RC1, but not +8.0, but not .Fx -6.2-STABLE or +6.3-STABLE or .Fx -7.0-CURRENT. +9.0-CURRENT. .Sh OPTIONS The following options are supported .Bl -tag -width "-f conffile" From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 16:43:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 708051065672; Wed, 14 Jul 2010 16:43:20 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 40B9B8FC13; Wed, 14 Jul 2010 16:43:20 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id D32A746B82; Wed, 14 Jul 2010 12:43:19 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B6AAE8A03C; Wed, 14 Jul 2010 12:43:18 -0400 (EDT) From: John Baldwin To: Alexander Motin Date: Wed, 14 Jul 2010 12:41:36 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007141331.o6EDVRp2078644@svn.freebsd.org> <201007141008.56110.jhb@freebsd.org> <4C3DDEF2.4090309@FreeBSD.org> In-Reply-To: <4C3DDEF2.4090309@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007141241.36772.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 14 Jul 2010 12:43:18 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210054 - in head/sys: conf kern x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 16:43:20 -0000 On Wednesday, July 14, 2010 11:59:46 am Alexander Motin wrote: > John Baldwin wrote: > > On Wednesday, July 14, 2010 9:31:27 am Alexander Motin wrote: > >> Author: mav > >> Date: Wed Jul 14 13:31:27 2010 > >> New Revision: 210054 > >> URL: http://svn.freebsd.org/changeset/base/210054 > >> > >> Log: > >> Move timeevents.c to MI code, as it is not x86-specific. I already have > >> it working on Marvell ARM SoCs, and it would be nice to unify timer code > >> between more platforms. > >> > >> Added: > >> head/sys/kern/timeevents.c > >> - copied unchanged from r210053, head/sys/x86/x86/timeevents.c > >> Deleted: > >> head/sys/x86/x86/timeevents.c > >> Modified: > >> head/sys/conf/files.amd64 > >> head/sys/conf/files.i386 > >> head/sys/conf/files.pc98 > > > > Can this be merged with kern_et.c, > > They are different. kern_et.c provides event timer drivers API, > timeevents.c consumes it to manage kernel clocks. kern_et.c > theoretically can be used without timeevents.c if some other code > consume timers, for example, exposing them to user-level. > > May be names indeed cryptic a bit, but I had no better ideas. > > > or perhaps called subr_eventtimers.c instead? > > Whatever you like, but why exactly so and why "subr_" important? The vast majority of files in sys/kern use some sort of prefix, either sys_*, kern_*, subr_*, etc. subr_ was just a suggestion to avoid clashing with kern_et.c. If timeevents.c is specific to clocks then maybe it should have 'clock' in its name somehow? Right now having kern_et == kern_eventtimer.c and timeevents.c is a bit ambiguous. Somehow making it clear that timeevents.c is for clocks might help. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 17:00:35 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2ECD5106564A; Wed, 14 Jul 2010 17:00:35 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C39D58FC0A; Wed, 14 Jul 2010 17:00:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o6EGw0Bg065669; Wed, 14 Jul 2010 10:58:00 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 14 Jul 2010 10:58:19 -0600 (MDT) Message-Id: <20100714.105819.636794876120392123.imp@bsdimp.com> To: jhb@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <201007141241.36772.jhb@freebsd.org> References: <201007141008.56110.jhb@freebsd.org> <4C3DDEF2.4090309@FreeBSD.org> <201007141241.36772.jhb@freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, mav@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r210054 - in head/sys: conf kern x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 17:00:35 -0000 In message: <201007141241.36772.jhb@freebsd.org> John Baldwin writes: : On Wednesday, July 14, 2010 11:59:46 am Alexander Motin wrote: : > John Baldwin wrote: : > > On Wednesday, July 14, 2010 9:31:27 am Alexander Motin wrote: : > >> Author: mav : > >> Date: Wed Jul 14 13:31:27 2010 : > >> New Revision: 210054 : > >> URL: http://svn.freebsd.org/changeset/base/210054 : > >> : > >> Log: : > >> Move timeevents.c to MI code, as it is not x86-specific. I already have : > >> it working on Marvell ARM SoCs, and it would be nice to unify timer : code : > >> between more platforms. : > >> : > >> Added: : > >> head/sys/kern/timeevents.c : > >> - copied unchanged from r210053, head/sys/x86/x86/timeevents.c : > >> Deleted: : > >> head/sys/x86/x86/timeevents.c : > >> Modified: : > >> head/sys/conf/files.amd64 : > >> head/sys/conf/files.i386 : > >> head/sys/conf/files.pc98 : > > : > > Can this be merged with kern_et.c, : > : > They are different. kern_et.c provides event timer drivers API, : > timeevents.c consumes it to manage kernel clocks. kern_et.c : > theoretically can be used without timeevents.c if some other code : > consume timers, for example, exposing them to user-level. : > : > May be names indeed cryptic a bit, but I had no better ideas. : > : > > or perhaps called subr_eventtimers.c instead? : > : > Whatever you like, but why exactly so and why "subr_" important? : : The vast majority of files in sys/kern use some sort of prefix, either sys_*, : kern_*, subr_*, etc. subr_ was just a suggestion to avoid clashing with : kern_et.c. If timeevents.c is specific to clocks then maybe it should have : 'clock' in its name somehow? Right now having kern_et == kern_eventtimer.c : and timeevents.c is a bit ambiguous. Somehow making it clear that : timeevents.c is for clocks might help. Also, subr_ prefix helps prevent collisions in other parts of the tree for files with the same name. Warner From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 17:02:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DF8D1065690; Wed, 14 Jul 2010 17:02:16 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 596068FC3A; Wed, 14 Jul 2010 17:02:14 +0000 (UTC) Received: by bwz12 with SMTP id 12so94220bwz.13 for ; Wed, 14 Jul 2010 10:02:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=MabQD0BoupYdBimKR1oIDyDs5VOSWdgMEDY7Yp9p9GY=; b=jZ6Neb7p8Qhmh8cwLMc/apKmlbKSKV8cJGVFpWtYXYSXzGH5hVoyJTslFDs+HaWIoT UZkgxzN7reaTaOXiS4iJ4ofJNhRpjCc2PAO6MOLXfzkzflwHVnAgMgdfykQmVkUgtF0e BOW5m/4FmgK/3ru6ipgr/3Jf2LJ+r08EvPcm8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=vROtS5mRawwBSMj+PuoomdEftAqQrjlSqwY4xzZpmKkUQX4//91JtQmN5hG3kubE/f /wtsnNMZJqQS9bxy/5TDy4/2H9G0XOeyBPchX381jlsCPY+MVPlXKP68GTxdsOAkTNyL YyAVwf9uAqYEglCP08w6pPguEv7N0GQyHi7yY= Received: by 10.204.67.70 with SMTP id q6mr9284957bki.46.1279126933819; Wed, 14 Jul 2010 10:02:13 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id g11sm333282bkw.10.2010.07.14.10.02.12 (version=SSLv3 cipher=RC4-MD5); Wed, 14 Jul 2010 10:02:13 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C3DED5A.3080806@FreeBSD.org> Date: Wed, 14 Jul 2010 20:01:14 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: John Baldwin References: <201007141331.o6EDVRp2078644@svn.freebsd.org> <201007141008.56110.jhb@freebsd.org> <4C3DDEF2.4090309@FreeBSD.org> <201007141241.36772.jhb@freebsd.org> In-Reply-To: <201007141241.36772.jhb@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210054 - in head/sys: conf kern x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 17:02:16 -0000 John Baldwin wrote: > On Wednesday, July 14, 2010 11:59:46 am Alexander Motin wrote: >> John Baldwin wrote: >>> On Wednesday, July 14, 2010 9:31:27 am Alexander Motin wrote: >>>> Author: mav >>>> Date: Wed Jul 14 13:31:27 2010 >>>> New Revision: 210054 >>>> URL: http://svn.freebsd.org/changeset/base/210054 >>>> >>>> Log: >>>> Move timeevents.c to MI code, as it is not x86-specific. I already have >>>> it working on Marvell ARM SoCs, and it would be nice to unify timer > code >>>> between more platforms. >>>> >>>> Added: >>>> head/sys/kern/timeevents.c >>>> - copied unchanged from r210053, head/sys/x86/x86/timeevents.c >>>> Deleted: >>>> head/sys/x86/x86/timeevents.c >>>> Modified: >>>> head/sys/conf/files.amd64 >>>> head/sys/conf/files.i386 >>>> head/sys/conf/files.pc98 >>> Can this be merged with kern_et.c, >> They are different. kern_et.c provides event timer drivers API, >> timeevents.c consumes it to manage kernel clocks. kern_et.c >> theoretically can be used without timeevents.c if some other code >> consume timers, for example, exposing them to user-level. >> >> May be names indeed cryptic a bit, but I had no better ideas. >> >>> or perhaps called subr_eventtimers.c instead? >> Whatever you like, but why exactly so and why "subr_" important? > > The vast majority of files in sys/kern use some sort of prefix, either sys_*, > kern_*, subr_*, etc. subr_ was just a suggestion to avoid clashing with > kern_et.c. If timeevents.c is specific to clocks then maybe it should have > 'clock' in its name somehow? Right now having kern_et == kern_eventtimer.c > and timeevents.c is a bit ambiguous. Somehow making it clear that > timeevents.c is for clocks might help. We already have kern_clock.c and subr_clock.c. kern_clock.c is quite close by meaning. What's about kern_clocksource.c? -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 17:16:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F0BB106566C; Wed, 14 Jul 2010 17:16:25 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E0E58FC15; Wed, 14 Jul 2010 17:16:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6EHGPww028690; Wed, 14 Jul 2010 17:16:25 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EHGPga028685; Wed, 14 Jul 2010 17:16:25 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201007141716.o6EHGPga028685@svn.freebsd.org> From: Attilio Rao Date: Wed, 14 Jul 2010 17:16:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210063 - head/usr.bin/gcore X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 17:16:25 -0000 Author: attilio Date: Wed Jul 14 17:16:25 2010 New Revision: 210063 URL: http://svn.freebsd.org/changeset/base/210063 Log: Fix the way the segments are included in the gcore outputs (with the default invokation): - Right now if segments are not writable are not included. Remove this. - Right now if a segment is mapped with NOCORE the check is not honoured. Change this by checking the newly added flag, from libutil, KVME_FLAG_NOCOREDUMP. Besides that, add a new flag (-f) that forces a 'full' dump of all the segments excluding just the malformed ones. This might be used very carefully as, among the reported segments, there could be memory mapped areas that could be vital to program execution. Sponsored by: Sandvine Incorporated Discussed with: kib Reviewed by: emaste Tested by: Sandvine Incorporated MFC after: 2 weeks Modified: head/usr.bin/gcore/elfcore.c head/usr.bin/gcore/extern.h head/usr.bin/gcore/gcore.1 head/usr.bin/gcore/gcore.c Modified: head/usr.bin/gcore/elfcore.c ============================================================================== --- head/usr.bin/gcore/elfcore.c Wed Jul 14 16:31:22 2010 (r210062) +++ head/usr.bin/gcore/elfcore.c Wed Jul 14 17:16:25 2010 (r210063) @@ -488,12 +488,17 @@ readmap(pid_t pid) kve = &vmentl[i]; /* - * Ignore segments of the wrong kind and ones which are not - * readable and writable. + * Ignore 'malformed' segments or ones representing memory + * mapping with MAP_NOCORE on. + * If the 'full' support is disabled, just dump the most + * meaningful data segments. */ - if ((kve->kve_protection & KVME_PROT_WRITE) == 0 || - (kve->kve_protection & KVME_PROT_READ) == 0 || - (kve->kve_type != KVME_TYPE_DEFAULT && + if ((kve->kve_protection & KVME_PROT_READ) == 0 || + (kve->kve_flags & KVME_FLAG_NOCOREDUMP) != 0 || + kve->kve_type == KVME_TYPE_DEAD || + kve->kve_type == KVME_TYPE_UNKNOWN || + ((pflags & PFLAGS_FULL) == 0 && + kve->kve_type != KVME_TYPE_DEFAULT && kve->kve_type != KVME_TYPE_VNODE && kve->kve_type != KVME_TYPE_SWAP)) continue; Modified: head/usr.bin/gcore/extern.h ============================================================================== --- head/usr.bin/gcore/extern.h Wed Jul 14 16:31:22 2010 (r210062) +++ head/usr.bin/gcore/extern.h Wed Jul 14 17:16:25 2010 (r210063) @@ -34,8 +34,11 @@ * $FreeBSD$ */ +#define PFLAGS_FULL 0x01 +#define PFLAGS_RESUME 0x02 + struct dumpers { int (*ident)(int efd, pid_t pid, char *binfile); void (*dump)(int efd, int fd, pid_t pid); }; -extern int sflag; +extern int pflags; Modified: head/usr.bin/gcore/gcore.1 ============================================================================== --- head/usr.bin/gcore/gcore.1 Wed Jul 14 16:31:22 2010 (r210062) +++ head/usr.bin/gcore/gcore.1 Wed Jul 14 17:16:25 2010 (r210063) @@ -32,7 +32,7 @@ .\" @(#)gcore.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd November 18, 2009 +.Dd July 14, 2010 .Dt GCORE 1 .Os .Sh NAME @@ -40,6 +40,7 @@ .Nd get core images of running process .Sh SYNOPSIS .Nm +.Op Fl f .Op Fl s .Op Fl c Ar core .Op Ar executable @@ -61,6 +62,13 @@ The following options are available: .It Fl c Write the core file to the specified file instead of .Dq Pa core. . +.It Fl f +Dumps all the available segments, excluding only the malformed ones and +un-dumpable ones. Differently from the default invocation, it also dumps +device-mapped and sglist-mapped areas that may invalidate the state of +some transactions. This flag, then, may be used very carefully, when the +full behaviour of the application is full-understood and the fallouts can +be easilly controlled. .It Fl s Stop the process while gathering the core image, and resume it when done. Modified: head/usr.bin/gcore/gcore.c ============================================================================== --- head/usr.bin/gcore/gcore.c Wed Jul 14 16:31:22 2010 (r210062) +++ head/usr.bin/gcore/gcore.c Wed Jul 14 17:16:25 2010 (r210063) @@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$"); #include #include "extern.h" -int sflag; +int pflags; static void killed(int); static void usage(void) __dead2; @@ -89,15 +89,18 @@ main(int argc, char *argv[]) struct dumpers **d, *dumper; size_t len; - sflag = 0; + pflags = 0; corefile = NULL; - while ((ch = getopt(argc, argv, "c:s")) != -1) { + while ((ch = getopt(argc, argv, "c:fs")) != -1) { switch (ch) { case 'c': corefile = optarg; break; + case 'f': + pflags |= PFLAGS_FULL; + break; case 's': - sflag = 1; + pflags |= PFLAGS_RESUME; break; default: usage(); From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 17:38:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8269C1065678; Wed, 14 Jul 2010 17:38:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 71CEF8FC15; Wed, 14 Jul 2010 17:38:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6EHc2ur033485; Wed, 14 Jul 2010 17:38:02 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EHc2Yo033482; Wed, 14 Jul 2010 17:38:02 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007141738.o6EHc2Yo033482@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Jul 2010 17:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210064 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 17:38:02 -0000 Author: jhb Date: Wed Jul 14 17:38:01 2010 New Revision: 210064 URL: http://svn.freebsd.org/changeset/base/210064 Log: - Document layout of KTR_STRUCT payload in a comment. - Simplify ktrstruct() calling convention by having ktrstruct() use strlen() rather than requiring the caller to hand-code the length of constant strings. MFC after: 1 month Modified: head/sys/kern/kern_ktrace.c head/sys/sys/ktrace.h Modified: head/sys/kern/kern_ktrace.c ============================================================================== --- head/sys/kern/kern_ktrace.c Wed Jul 14 17:16:25 2010 (r210063) +++ head/sys/kern/kern_ktrace.c Wed Jul 14 17:38:01 2010 (r210064) @@ -596,9 +596,8 @@ ktrcsw(out, user) } void -ktrstruct(name, namelen, data, datalen) +ktrstruct(name, data, datalen) const char *name; - size_t namelen; void *data; size_t datalen; { @@ -608,11 +607,10 @@ ktrstruct(name, namelen, data, datalen) if (!data) datalen = 0; - buflen = namelen + 1 + datalen; + buflen = strlen(name) + 1 + datalen; buf = malloc(buflen, M_KTRACE, M_WAITOK); - bcopy(name, buf, namelen); - buf[namelen] = '\0'; - bcopy(data, buf + namelen + 1, datalen); + strcpy(buf, name); + bcopy(data, buf + strlen(name) + 1, datalen); if ((req = ktr_getrequest(KTR_STRUCT)) == NULL) { free(buf, M_KTRACE); return; Modified: head/sys/sys/ktrace.h ============================================================================== --- head/sys/sys/ktrace.h Wed Jul 14 17:16:25 2010 (r210063) +++ head/sys/sys/ktrace.h Wed Jul 14 17:38:01 2010 (r210064) @@ -154,6 +154,10 @@ struct ktr_csw { * KTR_STRUCT - misc. structs */ #define KTR_STRUCT 8 + /* + * record contains null-terminated struct name followed by + * struct contents + */ struct sockaddr; struct stat; @@ -202,11 +206,11 @@ void ktrsysctl(int *name, u_int namelen) void ktrsysret(int, int, register_t); void ktrprocexit(struct thread *); void ktruserret(struct thread *); -void ktrstruct(const char *, size_t, void *, size_t); +void ktrstruct(const char *, void *, size_t); #define ktrsockaddr(s) \ - ktrstruct("sockaddr", 8, (s), ((struct sockaddr *)(s))->sa_len) + ktrstruct("sockaddr", (s), ((struct sockaddr *)(s))->sa_len) #define ktrstat(s) \ - ktrstruct("stat", 4, (s), sizeof(struct stat)) + ktrstruct("stat", (s), sizeof(struct stat)) #else From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 17:46:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 309FD106567B; Wed, 14 Jul 2010 17:46:45 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1FFD08FC08; Wed, 14 Jul 2010 17:46:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6EHkjIU035445; Wed, 14 Jul 2010 17:46:45 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EHkjme035443; Wed, 14 Jul 2010 17:46:45 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201007141746.o6EHkjme035443@svn.freebsd.org> From: Attilio Rao Date: Wed, 14 Jul 2010 17:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210065 - head/usr.bin/gcore X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 17:46:45 -0000 Author: attilio Date: Wed Jul 14 17:46:44 2010 New Revision: 210065 URL: http://svn.freebsd.org/changeset/base/210065 Log: Fix spelling. Sponsored by: Sandvine Incorporated Submitted by: b.f. MFC after: 2 weeks X-MFC: 210063 Modified: head/usr.bin/gcore/gcore.1 Modified: head/usr.bin/gcore/gcore.1 ============================================================================== --- head/usr.bin/gcore/gcore.1 Wed Jul 14 17:38:01 2010 (r210064) +++ head/usr.bin/gcore/gcore.1 Wed Jul 14 17:46:44 2010 (r210065) @@ -64,11 +64,11 @@ Write the core file to the specified fil .Dq Pa core. . .It Fl f Dumps all the available segments, excluding only the malformed ones and -un-dumpable ones. Differently from the default invocation, it also dumps -device-mapped and sglist-mapped areas that may invalidate the state of -some transactions. This flag, then, may be used very carefully, when the -full behaviour of the application is full-understood and the fallouts can -be easilly controlled. +un-dumpable ones. Unlike the default invocation, it also dumps +device- and sglist-mapped areas that may invalidate the state of +some transactions. This flag must be used very carefully, when the +behavior of the application is fully understood and the fallouts can +be easily controlled. .It Fl s Stop the process while gathering the core image, and resume it when done. From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 18:06:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7ED6B106564A; Wed, 14 Jul 2010 18:06:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DFA98FC19; Wed, 14 Jul 2010 18:06:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6EI6L08039890; Wed, 14 Jul 2010 18:06:21 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EI6LWK039888; Wed, 14 Jul 2010 18:06:21 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007141806.o6EI6LWK039888@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Jul 2010 18:06:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210066 - head/sys/dev/ipmi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 18:06:21 -0000 Author: jhb Date: Wed Jul 14 18:06:21 2010 New Revision: 210066 URL: http://svn.freebsd.org/changeset/base/210066 Log: Rework the SMBIOS table walker to make it operate like other table walkers and remove a buffer overflow: - Remove the array of per-type dispatch functions. Instead, pass each structure to a single callback. The callback should check the type of each table entry to take appropriate action. This matches the behavior of other table walkers such as for the MP Table and MADT. - Don't attempt to save an array of string pointers for each structure entry. Instead, just skip the strings. If this code is reused to provide a generic SMBIOS table walker in the future we could provide a method that looks up a specific string N for a given structure record instead of pre-populating an array of pointers. This fixes a buffer overflow for structure entries with more than 20 strings. PR: kern/148546 Reported by: Spencer Minear @ McAfee MFC after: 3 days Modified: head/sys/dev/ipmi/ipmi_smbios.c Modified: head/sys/dev/ipmi/ipmi_smbios.c ============================================================================== --- head/sys/dev/ipmi/ipmi_smbios.c Wed Jul 14 17:46:44 2010 (r210065) +++ head/sys/dev/ipmi/ipmi_smbios.c Wed Jul 14 18:06:21 2010 (r210066) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #define pmap_unmapbios pmap_unmapdev #endif -struct smbios_table_entry { +struct smbios_table { uint8_t anchor_string[4]; uint8_t checksum; uint8_t length; @@ -108,27 +108,30 @@ struct ipmi_entry { #define SMBIOS_LEN 4 #define SMBIOS_SIG "_SM_" -typedef void (*dispatchproc_t)(uint8_t *p, char **table, - struct ipmi_get_info *info); +typedef void (*smbios_callback_t)(struct structure_header *, void *); static struct ipmi_get_info ipmi_info; static int ipmi_probed; static struct mtx ipmi_info_mtx; MTX_SYSINIT(ipmi_info, &ipmi_info_mtx, "ipmi info", MTX_DEF); -static char *get_strings(char *, char **); static void ipmi_smbios_probe(struct ipmi_get_info *); -static int smbios_cksum (struct smbios_table_entry *); -static void smbios_run_table(uint8_t *, int, dispatchproc_t *, - struct ipmi_get_info *); -static void smbios_t38_proc_info(uint8_t *, char **, - struct ipmi_get_info *); +static int smbios_cksum(struct smbios_table *); +static void smbios_walk_table(uint8_t *, int, smbios_callback_t, + void *); +static void smbios_ipmi_info(struct structure_header *, void *); static void -smbios_t38_proc_info(uint8_t *p, char **table, struct ipmi_get_info *info) +smbios_ipmi_info(struct structure_header *h, void *arg) { - struct ipmi_entry *s = (struct ipmi_entry *)p; + struct ipmi_get_info *info; + struct ipmi_entry *s; + if (h->type != 38 || h->length < + offsetof(struct ipmi_entry, interrupt_number)) + return; + s = (struct ipmi_entry *)h; + info = arg; bzero(info, sizeof(struct ipmi_get_info)); switch (s->interface_type) { case KCS_MODE: @@ -172,44 +175,28 @@ smbios_t38_proc_info(uint8_t *p, char ** info->iface_type = s->interface_type; } -static char * -get_strings(char *p, char **table) -{ - /* Scan for strings, stoping at a single null byte */ - while (*p != 0) { - *table++ = p; - p += strlen(p) + 1; - } - *table = 0; - - /* Skip past terminating null byte */ - return (p + 1); -} - - static void -smbios_run_table(uint8_t *p, int entries, dispatchproc_t *dispatchstatus, - struct ipmi_get_info *info) +smbios_walk_table(uint8_t *p, int entries, smbios_callback_t cb, void *arg) { struct structure_header *s; - char *table[20]; - uint8_t *nextp; - while(entries--) { - s = (struct structure_header *) p; - nextp = get_strings(p + s->length, table); + while (entries--) { + s = (struct structure_header *)p; + cb(s, arg); /* - * No strings still has a double-null at the end, - * skip over it + * Look for a double-nul after the end of the + * formatted area of this structure. */ - if (table[0] == 0) - nextp++; + p += s->length; + while (p[0] != 0 && p[1] != 0) + p++; - if (dispatchstatus[*p]) { - (dispatchstatus[*p])(p, table, info); - } - p = nextp; + /* + * Skip over the double-nul to the start of the next + * structure. + */ + p += 2; } } @@ -221,8 +208,7 @@ smbios_run_table(uint8_t *p, int entries static void ipmi_smbios_probe(struct ipmi_get_info *info) { - dispatchproc_t dispatch_smbios_ipmi[256]; - struct smbios_table_entry *header; + struct smbios_table *header; void *table; u_int32_t addr; @@ -239,9 +225,9 @@ ipmi_smbios_probe(struct ipmi_get_info * * length and then map it a second time with the actual length so * we can verify the checksum. */ - header = pmap_mapbios(addr, sizeof(struct smbios_table_entry)); + header = pmap_mapbios(addr, sizeof(struct smbios_table)); table = pmap_mapbios(addr, header->length); - pmap_unmapbios((vm_offset_t)header, sizeof(struct smbios_table_entry)); + pmap_unmapbios((vm_offset_t)header, sizeof(struct smbios_table)); header = table; if (smbios_cksum(header) != 0) { pmap_unmapbios((vm_offset_t)header, header->length); @@ -251,9 +237,7 @@ ipmi_smbios_probe(struct ipmi_get_info * /* Now map the actual table and walk it looking for an IPMI entry. */ table = pmap_mapbios(header->structure_table_address, header->structure_table_length); - bzero((void *)dispatch_smbios_ipmi, sizeof(dispatch_smbios_ipmi)); - dispatch_smbios_ipmi[38] = (void *)smbios_t38_proc_info; - smbios_run_table(table, header->number_structures, dispatch_smbios_ipmi, + smbios_walk_table(table, header->number_structures, smbios_ipmi_info, info); /* Unmap everything. */ @@ -298,7 +282,7 @@ ipmi_smbios_identify(struct ipmi_get_inf } static int -smbios_cksum (struct smbios_table_entry *e) +smbios_cksum(struct smbios_table *e) { u_int8_t *ptr; u_int8_t cksum; From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 18:20:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62AC9106566B; Wed, 14 Jul 2010 18:20:52 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 314238FC08; Wed, 14 Jul 2010 18:20:52 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id BECFE46B09; Wed, 14 Jul 2010 14:20:51 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E65928A03C; Wed, 14 Jul 2010 14:20:50 -0400 (EDT) From: John Baldwin To: Alexander Motin Date: Wed, 14 Jul 2010 14:20:05 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007141331.o6EDVRp2078644@svn.freebsd.org> <201007141241.36772.jhb@freebsd.org> <4C3DED5A.3080806@FreeBSD.org> In-Reply-To: <4C3DED5A.3080806@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007141420.05688.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 14 Jul 2010 14:20:50 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210054 - in head/sys: conf kern x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 18:20:52 -0000 On Wednesday, July 14, 2010 1:01:14 pm Alexander Motin wrote: > John Baldwin wrote: > > On Wednesday, July 14, 2010 11:59:46 am Alexander Motin wrote: > >> John Baldwin wrote: > >>> On Wednesday, July 14, 2010 9:31:27 am Alexander Motin wrote: > >>>> Author: mav > >>>> Date: Wed Jul 14 13:31:27 2010 > >>>> New Revision: 210054 > >>>> URL: http://svn.freebsd.org/changeset/base/210054 > >>>> > >>>> Log: > >>>> Move timeevents.c to MI code, as it is not x86-specific. I already have > >>>> it working on Marvell ARM SoCs, and it would be nice to unify timer > > code > >>>> between more platforms. > >>>> > >>>> Added: > >>>> head/sys/kern/timeevents.c > >>>> - copied unchanged from r210053, head/sys/x86/x86/timeevents.c > >>>> Deleted: > >>>> head/sys/x86/x86/timeevents.c > >>>> Modified: > >>>> head/sys/conf/files.amd64 > >>>> head/sys/conf/files.i386 > >>>> head/sys/conf/files.pc98 > >>> Can this be merged with kern_et.c, > >> They are different. kern_et.c provides event timer drivers API, > >> timeevents.c consumes it to manage kernel clocks. kern_et.c > >> theoretically can be used without timeevents.c if some other code > >> consume timers, for example, exposing them to user-level. > >> > >> May be names indeed cryptic a bit, but I had no better ideas. > >> > >>> or perhaps called subr_eventtimers.c instead? > >> Whatever you like, but why exactly so and why "subr_" important? > > > > The vast majority of files in sys/kern use some sort of prefix, either sys_*, > > kern_*, subr_*, etc. subr_ was just a suggestion to avoid clashing with > > kern_et.c. If timeevents.c is specific to clocks then maybe it should have > > 'clock' in its name somehow? Right now having kern_et == kern_eventtimer.c > > and timeevents.c is a bit ambiguous. Somehow making it clear that > > timeevents.c is for clocks might help. > > We already have kern_clock.c and subr_clock.c. kern_clock.c is quite > close by meaning. What's about kern_clocksource.c? Ok. I assume it would not be easy to just merge this file into kern_clock.c itself? -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 18:28:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 974D31065676; Wed, 14 Jul 2010 18:28:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 870A68FC0C; Wed, 14 Jul 2010 18:28:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6EISkS7044990; Wed, 14 Jul 2010 18:28:46 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EISkC4044988; Wed, 14 Jul 2010 18:28:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007141828.o6EISkC4044988@svn.freebsd.org> From: John Baldwin Date: Wed, 14 Jul 2010 18:28:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210068 - head/usr.bin/ktrace X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 18:28:46 -0000 Author: jhb Date: Wed Jul 14 18:28:46 2010 New Revision: 210068 URL: http://svn.freebsd.org/changeset/base/210068 Log: - Sort list of trace points. - Note that 'y' (sysctl requests) is in the default set of trace points. MFC after: 3 days Modified: head/usr.bin/ktrace/ktrace.1 Modified: head/usr.bin/ktrace/ktrace.1 ============================================================================== --- head/usr.bin/ktrace/ktrace.1 Wed Jul 14 18:23:19 2010 (r210067) +++ head/usr.bin/ktrace/ktrace.1 Wed Jul 14 18:28:46 2010 (r210068) @@ -112,11 +112,11 @@ The following table equates the letters .Bl -tag -width flag -compact .It Cm c trace system calls -.It Cm n -trace namei translations .It Cm i trace .Tn I/O +.It Cm n +trace namei translations .It Cm s trace signal processing .It Cm t @@ -131,7 +131,7 @@ trace requests .It Cm + trace the default set of trace points - -.Cm c , n , i , s , t , u +.Cm c , i , n , s , t , u , y .El .It Ar command Execute From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 18:36:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B742106564A; Wed, 14 Jul 2010 18:36:51 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4618D8FC16; Wed, 14 Jul 2010 18:36:49 +0000 (UTC) Received: by bwz12 with SMTP id 12so161082bwz.13 for ; Wed, 14 Jul 2010 11:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=W70lda3VcmbuqagSAbHaKvQ2BPntppeqyekF6ZAP9Nk=; b=umcmHCbSUbXllUxtZ4vo5W3tO03npOiG4a5QDsHWoUeK7xgSbFdDvIUxMJwgPP9XTL 1lyZ9pd6J19D8jgTOD9g9D1pKqrPzjMf9cS15jvPLqB/upW+YFhHGaQDbytOBNpU95dL XnnHT1dsSY9q5Y3j9YFPZAlyeJW39GT96yI/E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=AwAAgYUVGKmuZ7ZrtdFhbhJVfJsOsuRchT6Lykqz3MESw/y0fo/0mz+F3moAJMqC0f JQ1gwY5woP82o6ak5nMiNKX/YrwwsjC3Ol7MbDnRUEr7hSWOqg9xnHZeKCK1Zmf8O0U1 Oj92LSI2m32tAAC3XPjYeDg8EJ4pOUt4lvuVA= Received: by 10.204.34.17 with SMTP id j17mr6804548bkd.204.1279132608918; Wed, 14 Jul 2010 11:36:48 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 24sm982412bkr.19.2010.07.14.11.36.47 (version=SSLv3 cipher=RC4-MD5); Wed, 14 Jul 2010 11:36:48 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C3E0384.9090903@FreeBSD.org> Date: Wed, 14 Jul 2010 21:35:48 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: John Baldwin References: <201007141331.o6EDVRp2078644@svn.freebsd.org> <201007141241.36772.jhb@freebsd.org> <4C3DED5A.3080806@FreeBSD.org> <201007141420.05688.jhb@freebsd.org> In-Reply-To: <201007141420.05688.jhb@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210054 - in head/sys: conf kern x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 18:36:51 -0000 John Baldwin wrote: > On Wednesday, July 14, 2010 1:01:14 pm Alexander Motin wrote: >> John Baldwin wrote: >>> On Wednesday, July 14, 2010 11:59:46 am Alexander Motin wrote: >>>> John Baldwin wrote: >>>>> On Wednesday, July 14, 2010 9:31:27 am Alexander Motin wrote: >>>>>> Author: mav >>>>>> Date: Wed Jul 14 13:31:27 2010 >>>>>> New Revision: 210054 >>>>>> URL: http://svn.freebsd.org/changeset/base/210054 >>>>>> >>>>>> Log: >>>>>> Move timeevents.c to MI code, as it is not x86-specific. I already have >>>>>> it working on Marvell ARM SoCs, and it would be nice to unify timer >>> code >>>>>> between more platforms. >>>>>> >>>>>> Added: >>>>>> head/sys/kern/timeevents.c >>>>>> - copied unchanged from r210053, head/sys/x86/x86/timeevents.c >>>>>> Deleted: >>>>>> head/sys/x86/x86/timeevents.c >>>>>> Modified: >>>>>> head/sys/conf/files.amd64 >>>>>> head/sys/conf/files.i386 >>>>>> head/sys/conf/files.pc98 >>>>> Can this be merged with kern_et.c, >>>> They are different. kern_et.c provides event timer drivers API, >>>> timeevents.c consumes it to manage kernel clocks. kern_et.c >>>> theoretically can be used without timeevents.c if some other code >>>> consume timers, for example, exposing them to user-level. >>>> >>>> May be names indeed cryptic a bit, but I had no better ideas. >>>> >>>>> or perhaps called subr_eventtimers.c instead? >>>> Whatever you like, but why exactly so and why "subr_" important? >>> The vast majority of files in sys/kern use some sort of prefix, either sys_*, >>> kern_*, subr_*, etc. subr_ was just a suggestion to avoid clashing with >>> kern_et.c. If timeevents.c is specific to clocks then maybe it should have >>> 'clock' in its name somehow? Right now having kern_et == kern_eventtimer.c >>> and timeevents.c is a bit ambiguous. Somehow making it clear that >>> timeevents.c is for clocks might help. >> We already have kern_clock.c and subr_clock.c. kern_clock.c is quite >> close by meaning. What's about kern_clocksource.c? > > Ok. I assume it would not be easy to just merge this file into kern_clock.c > itself? At least not until all architectures will adapt to it. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 18:43:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF0731065675; Wed, 14 Jul 2010 18:43:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD62F8FC1C; Wed, 14 Jul 2010 18:43:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6EIhR3I048263; Wed, 14 Jul 2010 18:43:27 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EIhRoo048258; Wed, 14 Jul 2010 18:43:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007141843.o6EIhRoo048258@svn.freebsd.org> From: Alexander Motin Date: Wed, 14 Jul 2010 18:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210069 - in head/sys: conf kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 18:43:27 -0000 Author: mav Date: Wed Jul 14 18:43:27 2010 New Revision: 210069 URL: http://svn.freebsd.org/changeset/base/210069 Log: Rename timeevents.c to kern_clocksource.c. Suggested by: jhb@ Added: head/sys/kern/kern_clocksource.c - copied unchanged from r210068, head/sys/kern/timeevents.c Deleted: head/sys/kern/timeevents.c Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.pc98 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Jul 14 18:28:46 2010 (r210068) +++ head/sys/conf/files.amd64 Wed Jul 14 18:43:27 2010 (r210069) @@ -229,8 +229,8 @@ dev/uart/uart_cpu_amd64.c optional uart dev/wpi/if_wpi.c optional wpi isa/syscons_isa.c optional sc isa/vga_isa.c optional vga +kern/kern_clocksource.c standard kern/link_elf_obj.c standard -kern/timeevents.c standard # # IA32 binary support # Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Jul 14 18:28:46 2010 (r210068) +++ head/sys/conf/files.i386 Wed Jul 14 18:43:27 2010 (r210069) @@ -347,9 +347,9 @@ i386/svr4/svr4_machdep.c optional compat # isa/syscons_isa.c optional sc isa/vga_isa.c optional vga +kern/kern_clocksource.c standard kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip -kern/timeevents.c standard libkern/divdi3.c standard libkern/ffsl.c standard libkern/flsl.c standard Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Wed Jul 14 18:28:46 2010 (r210068) +++ head/sys/conf/files.pc98 Wed Jul 14 18:43:27 2010 (r210069) @@ -213,9 +213,9 @@ i386/svr4/svr4_locore.s optional compat warning "COMPAT_SVR4 is broken and should be avoided" i386/svr4/svr4_machdep.c optional compat_svr4 # +kern/kern_clocksource.c standard kern/imgact_aout.c optional compat_aout kern/imgact_gzip.c optional gzip -kern/timeevents.c standard libkern/divdi3.c standard libkern/ffsl.c standard libkern/flsl.c standard Copied: head/sys/kern/kern_clocksource.c (from r210068, head/sys/kern/timeevents.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/kern/kern_clocksource.c Wed Jul 14 18:43:27 2010 (r210069, copy of r210068, head/sys/kern/timeevents.c) @@ -0,0 +1,508 @@ +/*- + * Copyright (c) 2010 Alexander Motin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification, immediately at the beginning of the file. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Common routines to manage event timers hardware. + */ + +/* XEN has own timer routines now. */ +#ifndef XEN + +#include "opt_kdtrace.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#ifdef KDTRACE_HOOKS +#include +cyclic_clock_func_t cyclic_clock_func[MAXCPU]; +#endif + +static void cpu_restartclocks(void); +static void timercheck(void); +inline static int doconfigtimer(int i); +static void configtimer(int i); + +static struct eventtimer *timer[2] = { NULL, NULL }; +static int timertest = 0; +static int timerticks[2] = { 0, 0 }; +static int profiling_on = 0; +static struct bintime timerperiod[2]; + +static char timername[2][32]; +TUNABLE_STR("kern.eventtimer.timer1", timername[0], sizeof(*timername)); +TUNABLE_STR("kern.eventtimer.timer2", timername[1], sizeof(*timername)); + +static u_int singlemul = 0; +TUNABLE_INT("kern.eventtimer.singlemul", &singlemul); +SYSCTL_INT(_kern_eventtimer, OID_AUTO, singlemul, CTLFLAG_RW, &singlemul, + 0, "Multiplier, used in single timer mode"); + +typedef u_int tc[2]; +static DPCPU_DEFINE(tc, configtimer); + +#define FREQ2BT(freq, bt) \ +{ \ + (bt)->sec = 0; \ + (bt)->frac = ((uint64_t)0x8000000000000000 / (freq)) << 1; \ +} +#define BT2FREQ(bt, freq) \ +{ \ + *(freq) = ((uint64_t)0x8000000000000000 + ((bt)->frac >> 2)) / \ + ((bt)->frac >> 1); \ +} + +/* Per-CPU timer1 handler. */ +static int +hardclockhandler(struct trapframe *frame) +{ + +#ifdef KDTRACE_HOOKS + /* + * If the DTrace hooks are configured and a callback function + * has been registered, then call it to process the high speed + * timers. + */ + int cpu = curcpu; + if (cyclic_clock_func[cpu] != NULL) + (*cyclic_clock_func[cpu])(frame); +#endif + + timer1clock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + return (FILTER_HANDLED); +} + +/* Per-CPU timer2 handler. */ +static int +statclockhandler(struct trapframe *frame) +{ + + timer2clock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + return (FILTER_HANDLED); +} + +/* timer1 broadcast IPI handler. */ +int +hardclockintr(struct trapframe *frame) +{ + + if (doconfigtimer(0)) + return (FILTER_HANDLED); + return (hardclockhandler(frame)); +} + +/* timer2 broadcast IPI handler. */ +int +statclockintr(struct trapframe *frame) +{ + + if (doconfigtimer(1)) + return (FILTER_HANDLED); + return (statclockhandler(frame)); +} + +/* timer1 callback. */ +static void +timer1cb(struct eventtimer *et, void *arg) +{ + +#ifdef SMP + /* Broadcast interrupt to other CPUs for non-per-CPU timers */ + if (smp_started && (et->et_flags & ET_FLAGS_PERCPU) == 0) + ipi_all_but_self(IPI_HARDCLOCK); +#endif + if (timertest) { + if ((et->et_flags & ET_FLAGS_PERCPU) == 0 || curcpu == 0) { + timerticks[0]++; + if (timerticks[0] >= timer1hz) { + ET_LOCK(); + timercheck(); + ET_UNLOCK(); + } + } + } + hardclockhandler(curthread->td_intr_frame); +} + +/* timer2 callback. */ +static void +timer2cb(struct eventtimer *et, void *arg) +{ + +#ifdef SMP + /* Broadcast interrupt to other CPUs for non-per-CPU timers */ + if (smp_started && (et->et_flags & ET_FLAGS_PERCPU) == 0) + ipi_all_but_self(IPI_STATCLOCK); +#endif + if (timertest) { + if ((et->et_flags & ET_FLAGS_PERCPU) == 0 || curcpu == 0) { + timerticks[1]++; + if (timerticks[1] >= timer2hz * 2) { + ET_LOCK(); + timercheck(); + ET_UNLOCK(); + } + } + } + statclockhandler(curthread->td_intr_frame); +} + +/* + * Check that both timers are running with at least 1/4 of configured rate. + * If not - replace the broken one. + */ +static void +timercheck(void) +{ + + if (!timertest) + return; + timertest = 0; + if (timerticks[0] * 4 < timer1hz) { + printf("Event timer \"%s\" is dead.\n", timer[0]->et_name); + timer1hz = 0; + configtimer(0); + et_ban(timer[0]); + et_free(timer[0]); + timer[0] = et_find(NULL, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[0] == NULL) { + timer2hz = 0; + configtimer(1); + et_free(timer[1]); + timer[1] = NULL; + timer[0] = timer[1]; + } + et_init(timer[0], timer1cb, NULL, NULL); + cpu_restartclocks(); + return; + } + if (timerticks[1] * 4 < timer2hz) { + printf("Event timer \"%s\" is dead.\n", timer[1]->et_name); + timer2hz = 0; + configtimer(1); + et_ban(timer[1]); + et_free(timer[1]); + timer[1] = et_find(NULL, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[1] != NULL) + et_init(timer[1], timer2cb, NULL, NULL); + cpu_restartclocks(); + return; + } +} + +/* + * Reconfigure specified per-CPU timer on other CPU. Called from IPI handler. + */ +inline static int +doconfigtimer(int i) +{ + tc *conf; + + conf = DPCPU_PTR(configtimer); + if (atomic_load_acq_int(*conf + i)) { + if (i == 0 ? timer1hz : timer2hz) + et_start(timer[i], NULL, &timerperiod[i]); + else + et_stop(timer[i]); + atomic_store_rel_int(*conf + i, 0); + return (1); + } + return (0); +} + +/* + * Reconfigure specified timer. + * For per-CPU timers use IPI to make other CPUs to reconfigure. + */ +static void +configtimer(int i) +{ +#ifdef SMP + tc *conf; + int cpu; + + critical_enter(); +#endif + /* Start/stop global timer or per-CPU timer of this CPU. */ + if (i == 0 ? timer1hz : timer2hz) + et_start(timer[i], NULL, &timerperiod[i]); + else + et_stop(timer[i]); +#ifdef SMP + if ((timer[i]->et_flags & ET_FLAGS_PERCPU) == 0 || !smp_started) { + critical_exit(); + return; + } + /* Set reconfigure flags for other CPUs. */ + CPU_FOREACH(cpu) { + conf = DPCPU_ID_PTR(cpu, configtimer); + atomic_store_rel_int(*conf + i, (cpu == curcpu) ? 0 : 1); + } + /* Send reconfigure IPI. */ + ipi_all_but_self(i == 0 ? IPI_HARDCLOCK : IPI_STATCLOCK); + /* Wait for reconfiguration completed. */ +restart: + cpu_spinwait(); + CPU_FOREACH(cpu) { + if (cpu == curcpu) + continue; + conf = DPCPU_ID_PTR(cpu, configtimer); + if (atomic_load_acq_int(*conf + i)) + goto restart; + } + critical_exit(); +#endif +} + +/* + * Configure and start event timers. + */ +void +cpu_initclocks_bsp(void) +{ + int base, div; + + timer[0] = et_find(timername[0], ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[0] == NULL) + timer[0] = et_find(NULL, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[0] == NULL) + panic("No usable event timer found!"); + et_init(timer[0], timer1cb, NULL, NULL); + timer[1] = et_find(timername[1][0] ? timername[1] : NULL, + ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (timer[1]) + et_init(timer[1], timer2cb, NULL, NULL); + /* + * We honor the requested 'hz' value. + * We want to run stathz in the neighborhood of 128hz. + * We would like profhz to run as often as possible. + */ + if (singlemul == 0) { + if (hz >= 1500 || (hz % 128) == 0) + singlemul = 1; + else if (hz >= 750) + singlemul = 2; + else + singlemul = 4; + } + if (timer[1] == NULL) { + base = hz * singlemul; + if (base < 128) + stathz = base; + else { + div = base / 128; + if (div % 2 == 0) + div++; + stathz = base / div; + } + profhz = stathz; + while ((profhz + stathz) <= 8192) + profhz += stathz; + } else { + stathz = 128; + profhz = stathz * 64; + } + ET_LOCK(); + cpu_restartclocks(); + ET_UNLOCK(); +} + +/* Start per-CPU event timers on APs. */ +void +cpu_initclocks_ap(void) +{ + + ET_LOCK(); + if (timer[0]->et_flags & ET_FLAGS_PERCPU) + et_start(timer[0], NULL, &timerperiod[0]); + if (timer[1] && timer[1]->et_flags & ET_FLAGS_PERCPU) + et_start(timer[1], NULL, &timerperiod[1]); + ET_UNLOCK(); +} + +/* Reconfigure and restart event timers after configuration changes. */ +static void +cpu_restartclocks(void) +{ + + /* Stop all event timers. */ + timertest = 0; + if (timer1hz) { + timer1hz = 0; + configtimer(0); + } + if (timer[1] && timer2hz) { + timer2hz = 0; + configtimer(1); + } + /* Calculate new event timers parameters. */ + if (timer[1] == NULL) { + timer1hz = hz * singlemul; + while (timer1hz < (profiling_on ? profhz : stathz)) + timer1hz += hz; + timer2hz = 0; + } else { + timer1hz = hz; + timer2hz = profiling_on ? profhz : stathz; + } + printf("Starting kernel event timers: %s @ %dHz, %s @ %dHz\n", + timer[0]->et_name, timer1hz, + timer[1] ? timer[1]->et_name : "NONE", timer2hz); + /* Restart event timers. */ + FREQ2BT(timer1hz, &timerperiod[0]); + configtimer(0); + if (timer[1]) { + timerticks[0] = 0; + timerticks[1] = 0; + FREQ2BT(timer2hz, &timerperiod[1]); + configtimer(1); + timertest = 1; + } +} + +/* Switch to profiling clock rates. */ +void +cpu_startprofclock(void) +{ + + ET_LOCK(); + profiling_on = 1; + cpu_restartclocks(); + ET_UNLOCK(); +} + +/* Switch to regular clock rates. */ +void +cpu_stopprofclock(void) +{ + + ET_LOCK(); + profiling_on = 0; + cpu_restartclocks(); + ET_UNLOCK(); +} + +/* Report or change the active event timers hardware. */ +static int +sysctl_kern_eventtimer_timer1(SYSCTL_HANDLER_ARGS) +{ + char buf[32]; + struct eventtimer *et; + int error; + + ET_LOCK(); + et = timer[0]; + snprintf(buf, sizeof(buf), "%s", et->et_name); + ET_UNLOCK(); + error = sysctl_handle_string(oidp, buf, sizeof(buf), req); + ET_LOCK(); + et = timer[0]; + if (error != 0 || req->newptr == NULL || + strcmp(buf, et->et_name) == 0) { + ET_UNLOCK(); + return (error); + } + et = et_find(buf, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (et == NULL) { + ET_UNLOCK(); + return (ENOENT); + } + timer1hz = 0; + configtimer(0); + et_free(timer[0]); + timer[0] = et; + et_init(timer[0], timer1cb, NULL, NULL); + cpu_restartclocks(); + ET_UNLOCK(); + return (error); +} +SYSCTL_PROC(_kern_eventtimer, OID_AUTO, timer1, + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, + 0, 0, sysctl_kern_eventtimer_timer1, "A", "Primary event timer"); + +static int +sysctl_kern_eventtimer_timer2(SYSCTL_HANDLER_ARGS) +{ + char buf[32]; + struct eventtimer *et; + int error; + + ET_LOCK(); + et = timer[1]; + if (et == NULL) + snprintf(buf, sizeof(buf), "NONE"); + else + snprintf(buf, sizeof(buf), "%s", et->et_name); + ET_UNLOCK(); + error = sysctl_handle_string(oidp, buf, sizeof(buf), req); + ET_LOCK(); + et = timer[1]; + if (error != 0 || req->newptr == NULL || + strcmp(buf, et ? et->et_name : "NONE") == 0) { + ET_UNLOCK(); + return (error); + } + et = et_find(buf, ET_FLAGS_PERIODIC, ET_FLAGS_PERIODIC); + if (et == NULL && strcasecmp(buf, "NONE") != 0) { + ET_UNLOCK(); + return (ENOENT); + } + if (timer[1] != NULL) { + timer2hz = 0; + configtimer(1); + et_free(timer[1]); + } + timer[1] = et; + if (timer[1] != NULL) + et_init(timer[1], timer2cb, NULL, NULL); + cpu_restartclocks(); + ET_UNLOCK(); + return (error); +} +SYSCTL_PROC(_kern_eventtimer, OID_AUTO, timer2, + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, + 0, 0, sysctl_kern_eventtimer_timer2, "A", "Secondary event timer"); + +#endif + From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 18:51:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B7E21065675; Wed, 14 Jul 2010 18:51:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1BAAA8FC18; Wed, 14 Jul 2010 18:51:14 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id BDF0646B7F; Wed, 14 Jul 2010 14:51:13 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E7D408A04E; Wed, 14 Jul 2010 14:51:12 -0400 (EDT) From: John Baldwin To: Alexander Motin Date: Wed, 14 Jul 2010 14:51:07 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007141331.o6EDVRp2078644@svn.freebsd.org> <201007141420.05688.jhb@freebsd.org> <4C3E0384.9090903@FreeBSD.org> In-Reply-To: <4C3E0384.9090903@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007141451.07452.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 14 Jul 2010 14:51:12 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210054 - in head/sys: conf kern x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 18:51:14 -0000 On Wednesday, July 14, 2010 2:35:48 pm Alexander Motin wrote: > John Baldwin wrote: > > On Wednesday, July 14, 2010 1:01:14 pm Alexander Motin wrote: > >> John Baldwin wrote: > >>> On Wednesday, July 14, 2010 11:59:46 am Alexander Motin wrote: > >>>> John Baldwin wrote: > >>>>> On Wednesday, July 14, 2010 9:31:27 am Alexander Motin wrote: > >>>>>> Author: mav > >>>>>> Date: Wed Jul 14 13:31:27 2010 > >>>>>> New Revision: 210054 > >>>>>> URL: http://svn.freebsd.org/changeset/base/210054 > >>>>>> > >>>>>> Log: > >>>>>> Move timeevents.c to MI code, as it is not x86-specific. I already have > >>>>>> it working on Marvell ARM SoCs, and it would be nice to unify timer > >>> code > >>>>>> between more platforms. > >>>>>> > >>>>>> Added: > >>>>>> head/sys/kern/timeevents.c > >>>>>> - copied unchanged from r210053, head/sys/x86/x86/timeevents.c > >>>>>> Deleted: > >>>>>> head/sys/x86/x86/timeevents.c > >>>>>> Modified: > >>>>>> head/sys/conf/files.amd64 > >>>>>> head/sys/conf/files.i386 > >>>>>> head/sys/conf/files.pc98 > >>>>> Can this be merged with kern_et.c, > >>>> They are different. kern_et.c provides event timer drivers API, > >>>> timeevents.c consumes it to manage kernel clocks. kern_et.c > >>>> theoretically can be used without timeevents.c if some other code > >>>> consume timers, for example, exposing them to user-level. > >>>> > >>>> May be names indeed cryptic a bit, but I had no better ideas. > >>>> > >>>>> or perhaps called subr_eventtimers.c instead? > >>>> Whatever you like, but why exactly so and why "subr_" important? > >>> The vast majority of files in sys/kern use some sort of prefix, either sys_*, > >>> kern_*, subr_*, etc. subr_ was just a suggestion to avoid clashing with > >>> kern_et.c. If timeevents.c is specific to clocks then maybe it should have > >>> 'clock' in its name somehow? Right now having kern_et == kern_eventtimer.c > >>> and timeevents.c is a bit ambiguous. Somehow making it clear that > >>> timeevents.c is for clocks might help. > >> We already have kern_clock.c and subr_clock.c. kern_clock.c is quite > >> close by meaning. What's about kern_clocksource.c? > > > > Ok. I assume it would not be easy to just merge this file into kern_clock.c > > itself? > > At least not until all architectures will adapt to it. Do you think that is the long term goal? If so, you could put this code into kern_clock.c and selectively enable it with a macro defined in as a temporary measure until all platforms have adopted it. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 19:19:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 002C1106567E; Wed, 14 Jul 2010 19:19:45 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id E1A5D8FC12; Wed, 14 Jul 2010 19:19:44 +0000 (UTC) Received: by bwz12 with SMTP id 12so188520bwz.13 for ; Wed, 14 Jul 2010 12:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=erO1tHSp6Ic2ffVIoKUxEebJCUKk+xgwcfjpMqWFNj0=; b=tUFCJC5W8bRj+wqTFgUdqMbAkn1ACoqqG/CH34wEOybeG7eAmxaE4IrgZ0IgOHvCTf pgKeiTY0pg5Z270ofsOHvQeArddVttnuZttTznOYul2+MrPLHZZUAIV9W0bwEau1oc9b cvFBfw2rD1m31oVvugJw5b/qvTUPmbHGSjy98= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=GE7LyLdwn/EAEiEAiPWCrrTgjWZFayr4Sip7yqUY12Z7LfiP3KJ0xTEuqyN+YoNPwu IJVlqDwJQhD+DbIU2DGeC3X8heWGYP+SkD9ZbPo7vBPDWRyHskVCbOd1yL4l8sD002qm PIhMdqMbnFQ/TdnEd+6qGmA7ybeoCsiNrUUDg= Received: by 10.204.19.83 with SMTP id z19mr13745882bka.43.1279135183398; Wed, 14 Jul 2010 12:19:43 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id f10sm1275847bkl.17.2010.07.14.12.19.42 (version=SSLv3 cipher=RC4-MD5); Wed, 14 Jul 2010 12:19:42 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C3E0D93.1000009@FreeBSD.org> Date: Wed, 14 Jul 2010 22:18:43 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: John Baldwin References: <201007141331.o6EDVRp2078644@svn.freebsd.org> <201007141420.05688.jhb@freebsd.org> <4C3E0384.9090903@FreeBSD.org> <201007141451.07452.jhb@freebsd.org> In-Reply-To: <201007141451.07452.jhb@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210054 - in head/sys: conf kern x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 19:19:46 -0000 John Baldwin wrote: > On Wednesday, July 14, 2010 2:35:48 pm Alexander Motin wrote: >> John Baldwin wrote: >>> On Wednesday, July 14, 2010 1:01:14 pm Alexander Motin wrote: >>>> John Baldwin wrote: >>>>> On Wednesday, July 14, 2010 11:59:46 am Alexander Motin wrote: >>>>>> John Baldwin wrote: >>>>>>> On Wednesday, July 14, 2010 9:31:27 am Alexander Motin wrote: >>>>>>>> Author: mav >>>>>>>> Date: Wed Jul 14 13:31:27 2010 >>>>>>>> New Revision: 210054 >>>>>>>> URL: http://svn.freebsd.org/changeset/base/210054 >>>>>>>> >>>>>>>> Log: >>>>>>>> Move timeevents.c to MI code, as it is not x86-specific. I already have >>>>>>>> it working on Marvell ARM SoCs, and it would be nice to unify timer >>>>> code >>>>>>>> between more platforms. >>>>>>>> >>>>>>>> Added: >>>>>>>> head/sys/kern/timeevents.c >>>>>>>> - copied unchanged from r210053, head/sys/x86/x86/timeevents.c >>>>>>>> Deleted: >>>>>>>> head/sys/x86/x86/timeevents.c >>>>>>>> Modified: >>>>>>>> head/sys/conf/files.amd64 >>>>>>>> head/sys/conf/files.i386 >>>>>>>> head/sys/conf/files.pc98 >>>>>>> Can this be merged with kern_et.c, >>>>>> They are different. kern_et.c provides event timer drivers API, >>>>>> timeevents.c consumes it to manage kernel clocks. kern_et.c >>>>>> theoretically can be used without timeevents.c if some other code >>>>>> consume timers, for example, exposing them to user-level. >>>>>> >>>>>> May be names indeed cryptic a bit, but I had no better ideas. >>>>>> >>>>>>> or perhaps called subr_eventtimers.c instead? >>>>>> Whatever you like, but why exactly so and why "subr_" important? >>>>> The vast majority of files in sys/kern use some sort of prefix, either sys_*, >>>>> kern_*, subr_*, etc. subr_ was just a suggestion to avoid clashing with >>>>> kern_et.c. If timeevents.c is specific to clocks then maybe it should have >>>>> 'clock' in its name somehow? Right now having kern_et == kern_eventtimer.c >>>>> and timeevents.c is a bit ambiguous. Somehow making it clear that >>>>> timeevents.c is for clocks might help. >>>> We already have kern_clock.c and subr_clock.c. kern_clock.c is quite >>>> close by meaning. What's about kern_clocksource.c? >>> Ok. I assume it would not be easy to just merge this file into kern_clock.c >>> itself? >> At least not until all architectures will adapt to it. > > Do you think that is the long term goal? I think not, but timer code for the many arches need to be refactored, all of them are different and some I've never seen. > If so, you could put this code into > kern_clock.c and selectively enable it with a macro defined in > as a temporary measure until all platforms have adopted it. That's possible, but I am not sure it is reasonable. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 21:40:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1537106564A; Wed, 14 Jul 2010 21:40:53 +0000 (UTC) (envelope-from minimarmot@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4A48E8FC13; Wed, 14 Jul 2010 21:40:52 +0000 (UTC) Received: by gyd8 with SMTP id 8so267311gyd.13 for ; Wed, 14 Jul 2010 14:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=oWi89325yyKWMczYck6ujlEeW8T3jlSl2ufrOJk0NbQ=; b=YgmePokrJDYUzAsVyVw8WNmYsf9zsAKUJMDE3cc+1CmCkZ6zspuFOVl+mn/6OQJ0c/ 7ThYS/k5vNVuxdnD8udS9skbeIeAHnvsd7yWtiGzrOyMs+TikcuKlL4ZKvZjX7E7pwdT LCUpNaQuNM2ltdPlz1AgQZ61UplrQJskJY6kU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=t4v37SbCBpMm95bQaN8V7mwHiWhz+Dh7v2EzJ3vpxLRe2eIst+xM6qrQ3LRhJvKwJp hmV98M+fYr/W/Rw4nVemi/tmz//9WGuF/6AA6G66hvvgjqZr21AlEoLpxdhMOynQ2xYs vZXoilbfXPohh97qgA9NPx1VJCbCu+5bNyn3Q= MIME-Version: 1.0 Received: by 10.90.84.1 with SMTP id h1mr9928921agb.78.1279143652233; Wed, 14 Jul 2010 14:40:52 -0700 (PDT) Received: by 10.90.25.20 with HTTP; Wed, 14 Jul 2010 14:40:52 -0700 (PDT) In-Reply-To: <201007141746.o6EHkjme035443@svn.freebsd.org> References: <201007141746.o6EHkjme035443@svn.freebsd.org> Date: Wed, 14 Jul 2010 17:40:52 -0400 Message-ID: From: Ben Kaduk To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210065 - head/usr.bin/gcore X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 21:40:54 -0000 On Wed, Jul 14, 2010 at 1:46 PM, Attilio Rao wrote: > Author: attilio > Date: Wed Jul 14 17:46:44 2010 > New Revision: 210065 > URL: http://svn.freebsd.org/changeset/base/210065 > > Log: > =A0Fix spelling. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/usr.bin/gcore/gcore.1 =A0Wed Jul 14 17:38:01 2010 =A0 =A0 =A0 = =A0(r210064) > +++ head/usr.bin/gcore/gcore.1 =A0Wed Jul 14 17:46:44 2010 =A0 =A0 =A0 = =A0(r210065) > @@ -64,11 +64,11 @@ Write the core file to the specified fil > =A0.Dq Pa core. . > =A0.It Fl f > =A0Dumps all the available segments, excluding only the malformed ones an= d > -un-dumpable ones. Differently from the default invocation, it also dumps > -device-mapped and sglist-mapped areas that may invalidate the state of > -some transactions. This flag, then, may be used very carefully, when the > -full behaviour of the application is full-understood and the fallouts ca= n > -be easilly controlled. > +un-dumpable ones. Unlike the default invocation, it also dumps > +device- and sglist-mapped areas that may invalidate the state of > +some transactions. This flag must be used very carefully, when the > +behavior of the application is fully understood and the fallouts can > +be easily controlled. > =A0.It Fl s > =A0Stop the process while gathering the core image, and resume it > =A0when done. Still has the style bug of not starting new sentences on new lines. Also, "fallout" should be singular, here. -Ben Kaduk From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 21:47:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46B3B106566B; Wed, 14 Jul 2010 21:47:50 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35EEE8FC1F; Wed, 14 Jul 2010 21:47:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6ELloLL089608; Wed, 14 Jul 2010 21:47:50 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6ELloES089606; Wed, 14 Jul 2010 21:47:50 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007142147.o6ELloES089606@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 14 Jul 2010 21:47:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210083 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 21:47:50 -0000 Author: yongari Date: Wed Jul 14 21:47:49 2010 New Revision: 210083 URL: http://svn.freebsd.org/changeset/base/210083 Log: Remove enabling Data FIFO protection with indirect memory access. r165114 added that code and that change ignored the same logic committed in r135772. In addition, data FIFO protection should be selectively enabled instead of applying to all PCIe devices. While I'm here add BCM5785 to devices that do not require this fix. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Jul 14 21:24:18 2010 (r210082) +++ head/sys/dev/bge/if_bge.c Wed Jul 14 21:47:49 2010 (r210083) @@ -3246,11 +3246,6 @@ bge_reset(struct bge_softc *sc) DELAY(10); } - if (sc->bge_flags & BGE_FLAG_PCIE) { - reset = bge_readmem_ind(sc, 0x7C00); - bge_writemem_ind(sc, 0x7C00, reset | (1 << 25)); - } - /* Fix up byte swapping. */ CSR_WRITE_4(sc, BGE_MODE_CTL, BGE_DMA_SWAP_OPTIONS | BGE_MODECTL_BYTESWAP_DATA); @@ -3275,7 +3270,9 @@ bge_reset(struct bge_softc *sc) /* XXX: Broadcom Linux driver. */ if (sc->bge_flags & BGE_FLAG_PCIE && - sc->bge_chipid != BGE_CHIPID_BCM5750_A0) { + sc->bge_chipid != BGE_CHIPID_BCM5750_A0 && + sc->bge_asicrev != BGE_ASICREV_BCM5785) { + /* Enable Data FIFO protection. */ val = CSR_READ_4(sc, 0x7C00); CSR_WRITE_4(sc, 0x7C00, val | (1 << 25)); } From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 22:31:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5CAF106566B; Wed, 14 Jul 2010 22:31:45 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9526F8FC08; Wed, 14 Jul 2010 22:31:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6EMVjGN099509; Wed, 14 Jul 2010 22:31:45 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6EMVjGw099507; Wed, 14 Jul 2010 22:31:45 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201007142231.o6EMVjGw099507@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 14 Jul 2010 22:31:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210087 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 22:31:45 -0000 Author: jilles Date: Wed Jul 14 22:31:45 2010 New Revision: 210087 URL: http://svn.freebsd.org/changeset/base/210087 Log: sh: There cannot be a TNOT in simplecmd(), remove checks. simplecmd() only handles simple commands and function definitions, neither of which involves the ! keyword. The initial token on entry to simplecmd() is one of the following: TSEMI, TAND, TOR, TNL, TEOF, TWORD, TRP. Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Wed Jul 14 21:52:23 2010 (r210086) +++ head/bin/sh/parser.c Wed Jul 14 22:31:45 2010 (r210087) @@ -609,8 +609,7 @@ simplecmd(union node **rpp, union node * { union node *args, **app; union node **orig_rpp = rpp; - union node *n = NULL, *n2; - int negate = 0; + union node *n = NULL; /* If we don't have any redirections already, then we must reset */ /* rpp to be the address of the local redir variable. */ @@ -626,12 +625,6 @@ simplecmd(union node **rpp, union node * */ orig_rpp = rpp; - while (readtoken() == TNOT) { - TRACE(("command: TNOT recognized\n")); - negate = !negate; - } - tokpushback++; - for (;;) { if (readtoken() == TWORD) { n = (union node *)stalloc(sizeof (struct narg)); @@ -657,7 +650,7 @@ simplecmd(union node **rpp, union node * n->type = NDEFUN; n->narg.next = command(); funclinno = 0; - goto checkneg; + return n; } else { tokpushback++; break; @@ -670,16 +663,7 @@ simplecmd(union node **rpp, union node * n->ncmd.backgnd = 0; n->ncmd.args = args; n->ncmd.redirect = redir; - -checkneg: - if (negate) { - n2 = (union node *)stalloc(sizeof (struct nnot)); - n2->type = NNOT; - n2->nnot.com = n; - return n2; - } - else - return n; + return n; } STATIC union node * From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 00:04:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD4A81065673; Thu, 15 Jul 2010 00:04:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C4E08FC15; Thu, 15 Jul 2010 00:04:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F04Ecm019991; Thu, 15 Jul 2010 00:04:14 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F04EsS019988; Thu, 15 Jul 2010 00:04:14 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201007150004.o6F04EsS019988@svn.freebsd.org> From: Ed Maste Date: Thu, 15 Jul 2010 00:04:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210088 - in head/usr.bin: col netstat xlint/lint1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 00:04:14 -0000 Author: emaste Date: Thu Jul 15 00:04:14 2010 New Revision: 210088 URL: http://svn.freebsd.org/changeset/base/210088 Log: Remove more extraneous ;s. Modified: head/usr.bin/col/col.c head/usr.bin/netstat/if.c head/usr.bin/xlint/lint1/mem1.c Modified: head/usr.bin/col/col.c ============================================================================== --- head/usr.bin/col/col.c Wed Jul 14 22:31:45 2010 (r210087) +++ head/usr.bin/col/col.c Thu Jul 15 00:04:14 2010 (r210088) @@ -461,7 +461,7 @@ flush_line(LINE *l) if (compress_spaces && nspace > 1) { while (1) { - int tab_col, tab_size;; + int tab_col, tab_size; tab_col = (last_col + 8) & ~7; if (tab_col > this_col) Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Wed Jul 14 22:31:45 2010 (r210087) +++ head/usr.bin/netstat/if.c Thu Jul 15 00:04:14 2010 (r210088) @@ -562,7 +562,7 @@ sidewaysintpr(int interval1, u_long off) interesting = ip; interesting_off = off; } - snprintf(ip->ift_name, sizeof(ip->ift_name), "(%s)", name);; + snprintf(ip->ift_name, sizeof(ip->ift_name), "(%s)", name); if ((ipn = malloc(sizeof(struct iftot))) == NULL) { printf("malloc failed\n"); exit(1); Modified: head/usr.bin/xlint/lint1/mem1.c ============================================================================== --- head/usr.bin/xlint/lint1/mem1.c Wed Jul 14 22:31:45 2010 (r210087) +++ head/usr.bin/xlint/lint1/mem1.c Thu Jul 15 00:04:14 2010 (r210088) @@ -218,7 +218,7 @@ xgetblk(mbl_t **mbp, size_t s) frmblks = mb->nxt; } mb->ffree = mb->blk; - mb->nfree = mb->size;; + mb->nfree = mb->size; mb->nxt = *mbp; *mbp = mb; } From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 00:16:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 344541065676; Thu, 15 Jul 2010 00:16:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A01A8FC15; Thu, 15 Jul 2010 00:16:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F0G4ei022647; Thu, 15 Jul 2010 00:16:04 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F0G4GQ022644; Thu, 15 Jul 2010 00:16:04 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201007150016.o6F0G4GQ022644@svn.freebsd.org> From: Ed Maste Date: Thu, 15 Jul 2010 00:16:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210089 - head/games/pom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 00:16:05 -0000 Author: emaste Date: Thu Jul 15 00:16:04 2010 New Revision: 210089 URL: http://svn.freebsd.org/changeset/base/210089 Log: Add -p option to have pom(6) print just the percentage, without extra text. PR: bin/51070 Submitted by: Matt Koivisto mkoivisto sandvine com MFC after: 1 week Modified: head/games/pom/pom.6 head/games/pom/pom.c Modified: head/games/pom/pom.6 ============================================================================== --- head/games/pom/pom.6 Thu Jul 15 00:04:14 2010 (r210088) +++ head/games/pom/pom.6 Thu Jul 15 00:16:04 2010 (r210089) @@ -32,7 +32,7 @@ .\" @(#)pom.6 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd May 31, 1993 +.Dd July 14, 2010 .Dt POM 6 .Os .Sh NAME @@ -40,6 +40,7 @@ .Nd display the phase of the moon .Sh SYNOPSIS .Nm +.Op Fl p .Op Fl d Ar yyyy.mm.dd .Op Fl t Ar hh:mm:ss .Sh DESCRIPTION @@ -49,6 +50,10 @@ utility displays the current phase of th Useful for selecting software completion target dates and predicting managerial behavior. .Pp +Use the +.Fl p +option to print just the phase as a percentage. +.Pp Use the arguments .Fl d and Modified: head/games/pom/pom.c ============================================================================== --- head/games/pom/pom.c Thu Jul 15 00:04:14 2010 (r210088) +++ head/games/pom/pom.c Thu Jul 15 00:16:04 2010 (r210089) @@ -84,14 +84,17 @@ main(int argc, char **argv) time_t tt; struct tm GMT, tmd; double days, today, tomorrow; - int ch, cnt; + int ch, cnt, pflag = 0; char *odate = NULL, *otime = NULL; - while ((ch = getopt(argc, argv, "d:t:")) != -1) + while ((ch = getopt(argc, argv, "d:pt:")) != -1) switch (ch) { case 'd': odate = optarg; break; + case 'p': + pflag = 1; + break; case 't': otime = optarg; break; @@ -134,6 +137,10 @@ main(int argc, char **argv) for (cnt = EPOCH; cnt < GMT.tm_year; ++cnt) days += isleap(1900 + cnt) ? 366 : 365; today = potm(days) + .5; + if (pflag) { + (void)printf("%1.0f\n", today); + return (0); + } (void)printf("The Moon is "); if ((int)today == 100) (void)printf("Full\n"); @@ -227,6 +234,7 @@ static void usage(char *progname) { - fprintf(stderr, "Usage: %s [-d yyyy.mm.dd] [-t hh:mm:ss]\n", progname); + fprintf(stderr, "Usage: %s [-p] [-d yyyy.mm.dd] [-t hh:mm:ss]\n", + progname); exit(EX_USAGE); } From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 01:47:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 694A51065673; Thu, 15 Jul 2010 01:47:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EE968FC0C; Thu, 15 Jul 2010 01:47:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F1lmbM042958; Thu, 15 Jul 2010 01:47:48 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F1lmvX042954; Thu, 15 Jul 2010 01:47:48 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007150147.o6F1lmvX042954@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 01:47:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210096 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 01:47:48 -0000 Author: imp Date: Thu Jul 15 01:47:47 2010 New Revision: 210096 URL: http://svn.freebsd.org/changeset/base/210096 Log: Remove one layer of indirection. No need to call cpu_throw which then calls mips_cpu_call via an obfuscated assembler call. Instead, delete the current cpu_throw, and rename mips_cpu_throw to cpu_throw. This is nicer to the cache on each context switch (since fixed jumps can be prefected, while jumps through a register can't). Incidentally, it also saves about 5 or 6 instructions. Reviewed by: jmallet@ Modified: head/sys/mips/mips/db_trace.c head/sys/mips/mips/swtch.S head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/mips/db_trace.c ============================================================================== --- head/sys/mips/mips/db_trace.c Thu Jul 15 01:18:37 2010 (r210095) +++ head/sys/mips/mips/db_trace.c Thu Jul 15 01:47:47 2010 (r210096) @@ -168,9 +168,9 @@ loop: subr = (uintptr_t)MipsTLBInvalidException; else if (pcBetween(fork_trampoline, savectx)) subr = (uintptr_t)fork_trampoline; - else if (pcBetween(savectx, mips_cpu_throw)) + else if (pcBetween(savectx, cpu_throw)) subr = (uintptr_t)savectx; - else if (pcBetween(mips_cpu_throw, cpu_switch)) + else if (pcBetween(cpu_throw, cpu_switch)) subr = (uintptr_t)cpu_throw; else if (pcBetween(cpu_switch, MipsSwitchFPState)) subr = (uintptr_t)cpu_switch; Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Thu Jul 15 01:18:37 2010 (r210095) +++ head/sys/mips/mips/swtch.S Thu Jul 15 01:47:47 2010 (r210096) @@ -216,7 +216,7 @@ LEAF(savectx) move v0, zero END(savectx) -NON_LEAF(mips_cpu_throw, CALLFRAME_SIZ, ra) +NON_LEAF(cpu_throw, CALLFRAME_SIZ, ra) mfc0 t0, MIPS_COP_0_STATUS # t0 = saved status register nop nop @@ -227,7 +227,7 @@ NON_LEAF(mips_cpu_throw, CALLFRAME_SIZ, # thread's context, so jump # right to action nop # BDSLOT -END(mips_cpu_throw) +END(cpu_throw) /* * cpu_switch(struct thread *old, struct thread *new, struct mutex *mtx); Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Thu Jul 15 01:18:37 2010 (r210095) +++ head/sys/mips/mips/vm_machdep.c Thu Jul 15 01:47:47 2010 (r210096) @@ -543,14 +543,6 @@ cpu_set_user_tls(struct thread *td, void return (0); } -void -cpu_throw(struct thread *old, struct thread *new) -{ - - func_2args_asmmacro(&mips_cpu_throw, old, new); - panic("mips_cpu_throw() returned"); -} - #ifdef DDB #include From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 01:48:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADEFB1065672; Thu, 15 Jul 2010 01:48:30 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C6CE8FC14; Thu, 15 Jul 2010 01:48:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F1mUJG043158; Thu, 15 Jul 2010 01:48:30 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F1mUas043156; Thu, 15 Jul 2010 01:48:30 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007150148.o6F1mUas043156@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 15 Jul 2010 01:48:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210097 - head/release X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 01:48:30 -0000 Author: nwhitehorn Date: Thu Jul 15 01:48:30 2010 New Revision: 210097 URL: http://svn.freebsd.org/changeset/base/210097 Log: Get powerpc64 install CDs a little closer: some powerpc things should be used on powerpc64 as well (build scripts, for instance), and the MFS root must be adjusted upward on powerpc64 as well. This doesn't completely solve things: sysinstall stil needs some persuasion to deal with a default kernel named GENERIC64. Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Thu Jul 15 01:47:47 2010 (r210096) +++ head/release/Makefile Thu Jul 15 01:48:30 2010 (r210097) @@ -105,9 +105,11 @@ SVNBRANCH= head TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == ${MACHINE_ARCH} -TARGET?= ${MACHINE} +TARGET?= ${MACHINE} +TARGET_CPUARCH?= ${MACHINE_CPUARCH} .else -TARGET?= ${TARGET_ARCH} +TARGET?= ${TARGET_ARCH} +TARGET_CPUARCH?= ${TARGET_ARCH} .endif CROSSENV= TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} CROSSMAKE= ${MAKE} ${CROSSENV} @@ -194,7 +196,7 @@ DIST_DOCS_ARCH_DEP= # OTHER_DISTS?= catpages manpages games proflibs dict info doc ${ARCH_DISTS} BASE_DISTS?= base -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" ARCH_DISTS?= lib32 .endif DISTRIBUTIONS?= ${BASE_DISTS} ${OTHER_DISTS} @@ -274,6 +276,12 @@ MFSSIZE= 4096 MFSINODE= 8192 MFSLABEL= auto SEPARATE_LIVEFS= +.elif ${TARGET_ARCH} == "powerpc64" +DISKLABEL= "" +MFSSIZE= 8192 +MFSINODE= 8192 +MFSLABEL= auto +SEPARATE_LIVEFS= .endif .if defined(NO_FLOPPIES) .undef MAKE_FLOPPIES @@ -550,6 +558,7 @@ release rerelease: SEPARATE_LIVEFS \ TARGET \ TARGET_ARCH \ + TARGET_CPUARCH \ WORLD_FLAGS .if defined(${var}) echo "export ${var}=\"${${var}}\"" >> ${_MK} @@ -829,7 +838,7 @@ release.8: -test -f ${.CURDIR}/install.cfg \ && cp ${.CURDIR}/install.cfg ${RD}/mfsfd @mkdir -p ${RD}/mfsfd/boot -.if ${TARGET_ARCH} != "ia64" && ${TARGET_ARCH} != "powerpc" +.if ${TARGET_ARCH} != "ia64" && ${TARGET_CPUARCH} != "powerpc" @cp ${RD}/trees/base/boot/boot* ${RD}/mfsfd/boot .endif .if ${TARGET} == "i386" || ${TARGET_ARCH} == "amd64" @@ -1129,35 +1138,35 @@ CD_DVD1_PKGS= ${CD_PACKAGE_TREE}/dvd1 .endif iso.1: -.if exists(${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh) +.if exists(${.CURDIR}/${TARGET_CPUARCH}/mkisoimages.sh) @echo "Creating ISO images..." .if defined(CD_BOOT) - @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \ + @sh ${.CURDIR}/${TARGET_CPUARCH}/mkisoimages.sh ${BOOTABLE} \ FreeBSD_bootonly \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-bootonly.iso ${CD_BOOT} .endif - @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \ + @sh ${.CURDIR}/${TARGET_CPUARCH}/mkisoimages.sh ${BOOTABLE} \ FreeBSD_Install \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc1.iso ${CD_DISC1} \ ${CD_DISC1_PKGS} - @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh \ + @sh ${.CURDIR}/${TARGET_CPUARCH}/mkisoimages.sh \ FreeBSD_Packages \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc2.iso ${CD_DISC2} \ ${CD_DISC2_PKGS} .if defined(MAKE_DVD) - @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \ + @sh ${.CURDIR}/${TARGET_CPUARCH}/mkisoimages.sh ${BOOTABLE} \ FreeBSD_Install \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-dvd1.iso ${CD_DVD1} \ ${CD_DVD1_PKGS} .endif .if !defined(NODOC) - @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh \ + @sh ${.CURDIR}/${TARGET_CPUARCH}/mkisoimages.sh \ FreeBSD_Documentation \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc3.iso ${CD_DOCS} \ ${CD_DOCS_PKGS} .endif .if defined(SEPARATE_LIVEFS) - @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \ + @sh ${.CURDIR}/${TARGET_CPUARCH}/mkisoimages.sh ${BOOTABLE} \ FreeBSD_LiveFS \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-livefs.iso ${CD_LIVEFS} .endif @@ -1166,7 +1175,7 @@ iso.1: @(cd ${CD} && sha256 *.iso > FreeBSD-${BUILDNAME}-${TARGET}-iso.CHECKSUM.SHA256) touch ${.TARGET} .else - @echo "Do not know how to create an ISO for ${TARGET_ARCH}." + @echo "Do not know how to create an ISO for ${TARGET_CPUARCH}." .endif # From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 01:53:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6E6D1065672; Thu, 15 Jul 2010 01:53:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5CED8FC0A; Thu, 15 Jul 2010 01:53:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F1rHf2044206; Thu, 15 Jul 2010 01:53:17 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F1rHWO044204; Thu, 15 Jul 2010 01:53:17 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007150153.o6F1rHWO044204@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 01:53:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210098 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 01:53:17 -0000 Author: imp Date: Thu Jul 15 01:53:17 2010 New Revision: 210098 URL: http://svn.freebsd.org/changeset/base/210098 Log: Remove i386-ish sysctls. Also, make the bootinfo sysctl OID_AUTO. Modified: head/sys/mips/mips/machdep.c Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Thu Jul 15 01:48:30 2010 (r210097) +++ head/sys/mips/mips/machdep.c Thu Jul 15 01:53:17 2010 (r210098) @@ -253,24 +253,9 @@ cpu_halt(void) ; } -SYSCTL_STRUCT(_machdep, CPU_BOOTINFO, bootinfo, CTLFLAG_RD, &bootinfo, +SYSCTL_STRUCT(_machdep, OID_AUTO, bootinfo, CTLFLAG_RD, &bootinfo, bootinfo, "Bootinfo struct: kernel filename, BIOS harddisk geometry, etc"); -#ifdef PORT_TO_JMIPS -static int -sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS) -{ -} - -SYSCTL_PROC(_machdep, CPU_ADJKERNTZ, adjkerntz, CTLTYPE_INT | CTLFLAG_RW, - &adjkerntz, 0, sysctl_machdep_adjkerntz, "I", - "Local offset from GMT in seconds"); -SYSCTL_INT(_machdep, CPU_DISRTCSET, disable_rtc_set, CTLFLAG_RW, - &disable_rtc_set, 0, "Disable setting the real time clock to system time"); -SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock, CTLFLAG_RW, - &wall_cmos_clock, 0, "Wall CMOS clock assumed"); -#endif /* PORT_TO_JMIPS */ - /* * Initialize per cpu data structures, include curthread. */ From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 01:55:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF5F41065704; Thu, 15 Jul 2010 01:55:28 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9EAB58FC08; Thu, 15 Jul 2010 01:55:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F1tS5T044751; Thu, 15 Jul 2010 01:55:28 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F1tSfG044749; Thu, 15 Jul 2010 01:55:28 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007150155.o6F1tSfG044749@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 01:55:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210099 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 01:55:28 -0000 Author: imp Date: Thu Jul 15 01:55:28 2010 New Revision: 210099 URL: http://svn.freebsd.org/changeset/base/210099 Log: We don't need sys/cdefs.h for __CONCAT here. Modified: head/sys/mips/include/cpuregs.h Modified: head/sys/mips/include/cpuregs.h ============================================================================== --- head/sys/mips/include/cpuregs.h Thu Jul 15 01:53:17 2010 (r210098) +++ head/sys/mips/include/cpuregs.h Thu Jul 15 01:55:28 2010 (r210099) @@ -58,8 +58,6 @@ #ifndef _MIPS_CPUREGS_H_ #define _MIPS_CPUREGS_H_ -#include /* For __CONCAT() */ - #if defined(_KERNEL_OPT) #include "opt_cputype.h" #endif From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 01:58:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1C6B1065676; Thu, 15 Jul 2010 01:58:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B054D8FC12; Thu, 15 Jul 2010 01:58:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F1wK8R045411; Thu, 15 Jul 2010 01:58:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F1wKLT045406; Thu, 15 Jul 2010 01:58:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007150158.o6F1wKLT045406@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 01:58:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210100 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 01:58:20 -0000 Author: imp Date: Thu Jul 15 01:58:20 2010 New Revision: 210100 URL: http://svn.freebsd.org/changeset/base/210100 Log: Remove unused stuff from cpu.h. Move inappropriate stuff in cpu.h elsewhere: {s,g}et_intr_mask -> md_var.h num_tlbentries -> tlb.h Remove #define clockframe trapframe and fix clock, which was the only place this was used. All the rest of this stuff was unused. # we're not quite minimal yet, since we duplicate a few status register things # here... Inspired by: bde@ Modified: head/sys/mips/include/clock.h head/sys/mips/include/cpu.h head/sys/mips/include/md_var.h head/sys/mips/include/tlb.h Modified: head/sys/mips/include/clock.h ============================================================================== --- head/sys/mips/include/clock.h Thu Jul 15 01:55:28 2010 (r210099) +++ head/sys/mips/include/clock.h Thu Jul 15 01:58:20 2010 (r210100) @@ -17,7 +17,7 @@ extern int cpu_clock; -extern uint32_t clockintr(uint32_t, struct clockframe *); +extern uint32_t clockintr(uint32_t, struct trapframe *); #define wall_cmos_clock 0 #define adjkerntz 0 Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Thu Jul 15 01:55:28 2010 (r210099) +++ head/sys/mips/include/cpu.h Thu Jul 15 01:58:20 2010 (r210100) @@ -83,175 +83,34 @@ * Exported definitions unique to mips cpu support. */ -#define cpu_swapout(p) panic("cpu_swapout: can't get here"); - #ifndef _LOCORE #include #include -/* - * Arguments to hardclock and gatherstats encapsulate the previous - * machine state in an opaque clockframe. - */ -#define clockframe trapframe /* Use normal trap frame */ - -#define CLKF_USERMODE(framep) ((framep)->sr & SR_KSU_USER) -#define CLKF_PC(framep) ((framep)->pc) -#define CLKF_INTR(framep) (0) -#define MIPS_CLKF_INTR() (intr_nesting_level >= 1) #define TRAPF_USERMODE(framep) (((framep)->sr & SR_KSU_USER) != 0) #define TRAPF_PC(framep) ((framep)->pc) #define cpu_getstack(td) ((td)->td_frame->sp) +#define cpu_setstack(td, nsp) ((td)->td_frame->sp = (nsp)) +#define cpu_spinwait() /* nothing */ /* * A machine-independent interface to the CPU's counter. */ -#define get_cyclecount() mips_rd_count() -#endif /* !_LOCORE */ - -/* - * CTL_MACHDEP definitions. - */ -#define CPU_CONSDEV 1 /* dev_t: console terminal device */ -#define CPU_ADJKERNTZ 2 /* int: timezone offset (seconds) */ -#define CPU_DISRTCSET 3 /* int: disable resettodr() call */ -#define CPU_BOOTINFO 4 /* struct: bootinfo */ -#define CPU_WALLCLOCK 5 /* int: indicates wall CMOS clock */ -#define CPU_MAXID 6 /* number of valid machdep ids */ - -#define CTL_MACHDEP_NAMES { \ - { 0, 0 }, \ - { "console_device", CTLTYPE_STRUCT }, \ - { "adjkerntz", CTLTYPE_INT }, \ - { "disable_rtc_set", CTLTYPE_INT }, \ - { "bootinfo", CTLTYPE_STRUCT }, \ - { "wall_cmos_clock", CTLTYPE_INT }, \ +static __inline uint64_t +get_cyclecount(void) +{ + return (mips_rd_count()); } - -/* - * MIPS CPU types (cp_imp). - */ -#define MIPS_R2000 0x01 /* MIPS R2000 CPU ISA I */ -#define MIPS_R3000 0x02 /* MIPS R3000 CPU ISA I */ -#define MIPS_R6000 0x03 /* MIPS R6000 CPU ISA II */ -#define MIPS_R4000 0x04 /* MIPS R4000/4400 CPU ISA III */ -#define MIPS_R3LSI 0x05 /* LSI Logic R3000 derivate ISA I */ -#define MIPS_R6000A 0x06 /* MIPS R6000A CPU ISA II */ -#define MIPS_R3IDT 0x07 /* IDT R3000 derivate ISA I */ -#define MIPS_R10000 0x09 /* MIPS R10000/T5 CPU ISA IV */ -#define MIPS_R4200 0x0a /* MIPS R4200 CPU (ICE) ISA III */ -#define MIPS_R4300 0x0b /* NEC VR4300 CPU ISA III */ -#define MIPS_R4100 0x0c /* NEC VR41xx CPU MIPS-16 ISA III */ -#define MIPS_R8000 0x10 /* MIPS R8000 Blackbird/TFP ISA IV */ -#define MIPS_R4600 0x20 /* QED R4600 Orion ISA III */ -#define MIPS_R4700 0x21 /* QED R4700 Orion ISA III */ -#define MIPS_R3TOSH 0x22 /* Toshiba R3000 based CPU ISA I */ -#define MIPS_R5000 0x23 /* MIPS R5000 CPU ISA IV */ -#define MIPS_RM7000 0x27 /* QED RM7000 CPU ISA IV */ -#define MIPS_RM52X0 0x28 /* QED RM52X0 CPU ISA IV */ -#define MIPS_VR5400 0x54 /* NEC Vr5400 CPU ISA IV+ */ -#define MIPS_RM9000 0x34 /* E9000 CPU */ - -/* - * MIPS FPU types - */ -#define MIPS_SOFT 0x00 /* Software emulation ISA I */ -#define MIPS_R2360 0x01 /* MIPS R2360 FPC ISA I */ -#define MIPS_R2010 0x02 /* MIPS R2010 FPC ISA I */ -#define MIPS_R3010 0x03 /* MIPS R3010 FPC ISA I */ -#define MIPS_R6010 0x04 /* MIPS R6010 FPC ISA II */ -#define MIPS_R4010 0x05 /* MIPS R4000/R4400 FPC ISA II */ -#define MIPS_R31LSI 0x06 /* LSI Logic derivate ISA I */ -#define MIPS_R10010 0x09 /* MIPS R10000/T5 FPU ISA IV */ -#define MIPS_R4210 0x0a /* MIPS R4200 FPC (ICE) ISA III */ -#define MIPS_UNKF1 0x0b /* unnanounced product cpu ISA III */ -#define MIPS_R8000 0x10 /* MIPS R8000 Blackbird/TFP ISA IV */ -#define MIPS_R4600 0x20 /* QED R4600 Orion ISA III */ -#define MIPS_R3SONY 0x21 /* Sony R3000 based FPU ISA I */ -#define MIPS_R3TOSH 0x22 /* Toshiba R3000 based FPU ISA I */ -#define MIPS_R5010 0x23 /* MIPS R5000 based FPU ISA IV */ -#define MIPS_RM7000 0x27 /* QED RM7000 FPU ISA IV */ -#define MIPS_RM5230 0x28 /* QED RM52X0 based FPU ISA IV */ -#define MIPS_RM52XX 0x28 /* QED RM52X0 based FPU ISA IV */ -#define MIPS_VR5400 0x54 /* NEC Vr5400 FPU ISA IV+ */ +#endif /* !_LOCORE */ #if defined(_KERNEL) && !defined(_LOCORE) -struct user; - -int Mips_ConfigCache(void); -void Mips_SyncCache(void); -void Mips_SyncDCache(vm_offset_t, int); -void Mips_HitSyncDCache(vm_offset_t, int); -void Mips_HitSyncSCache(vm_offset_t, int); -void Mips_IOSyncDCache(vm_offset_t, int, int); -void Mips_HitInvalidateDCache(vm_offset_t, int); -void Mips_SyncICache(vm_offset_t, int); -void Mips_InvalidateICache(vm_offset_t, int); - -void wbflush(void); - -extern u_int32_t cpu_counter_interval; /* Number of counter ticks/tick */ -extern u_int32_t cpu_counter_last; /* Last compare value loaded */ -extern int num_tlbentries; extern char btext[]; extern char etext[]; -extern int intr_nesting_level; - -#define func_0args_asmmacro(func, in) \ - __asm __volatile ( "jalr %0" \ - : "=r" (in) /* outputs */ \ - : "r" (func) /* inputs */ \ - : "$31", "$4"); - -#define func_1args_asmmacro(func, arg0) \ - __asm __volatile ("move $4, %1;" \ - "jalr %0" \ - : /* outputs */ \ - : "r" (func), "r" (arg0) /* inputs */ \ - : "$31", "$4"); - -#define func_2args_asmmacro(func, arg0, arg1) \ - __asm __volatile ("move $4, %1;" \ - "move $5, %2;" \ - "jalr %0" \ - : /* outputs */ \ - : "r" (func), "r" (arg0), "r" (arg1) /* inputs */ \ - : "$31", "$4", "$5"); - -#define func_3args_asmmacro(func, arg0, arg1, arg2) \ - __asm __volatile ( "move $4, %1;" \ - "move $5, %2;" \ - "move $6, %3;" \ - "jalr %0" \ - : /* outputs */ \ - : "r" (func), "r" (arg0), "r" (arg1), "r" (arg2) /* inputs */ \ - : "$31", "$4", "$5", "$6"); - -/* - * Enable realtime clock (always enabled). - */ -#define enablertclock() - -/* - * Are we in an interrupt handler? required by JunOS - */ -#define IN_INT_HANDLER() \ - (curthread->td_intr_nesting_level != 0 || \ - (curthread->td_pflags & TDP_ITHREAD)) - -/* - * Low level access routines to CPU registers - */ void swi_vm(void *); void cpu_halt(void); void cpu_reset(void); -u_int32_t set_intr_mask(u_int32_t); -u_int32_t get_intr_mask(void); - -#define cpu_spinwait() /* nothing */ - #endif /* _KERNEL */ #endif /* !_MACHINE_CPU_H_ */ Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Thu Jul 15 01:55:28 2010 (r210099) +++ head/sys/mips/include/md_var.h Thu Jul 15 01:58:20 2010 (r210100) @@ -77,4 +77,7 @@ void platform_identify(void); extern int busdma_swi_pending; void busdma_swi(void); +u_int32_t set_intr_mask(u_int32_t); +u_int32_t get_intr_mask(void); + #endif /* !_MACHINE_MD_VAR_H_ */ Modified: head/sys/mips/include/tlb.h ============================================================================== --- head/sys/mips/include/tlb.h Thu Jul 15 01:55:28 2010 (r210099) +++ head/sys/mips/include/tlb.h Thu Jul 15 01:58:20 2010 (r210100) @@ -35,5 +35,6 @@ void tlb_invalidate_all(void); void tlb_invalidate_all_user(struct pmap *); void tlb_save(void); void tlb_update(struct pmap *, vm_offset_t, pt_entry_t); +extern int num_tlbentries; #endif /* !_MACHINE_TLB_H_ */ From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 02:22:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4296106566C; Thu, 15 Jul 2010 02:22:50 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D33B38FC1D; Thu, 15 Jul 2010 02:22:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F2Mooq050842; Thu, 15 Jul 2010 02:22:50 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F2MoNG050840; Thu, 15 Jul 2010 02:22:50 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201007150222.o6F2MoNG050840@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 15 Jul 2010 02:22:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210101 - head/gnu/usr.bin/dtc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 02:22:51 -0000 Author: marcel Date: Thu Jul 15 02:22:50 2010 New Revision: 210101 URL: http://svn.freebsd.org/changeset/base/210101 Log: Sanitize CFLAGS and add WARNS?=2. The hardcoding of -Os -fPIC as compiler options resulted in an invalid executable on PowerPC. Modified: head/gnu/usr.bin/dtc/Makefile Modified: head/gnu/usr.bin/dtc/Makefile ============================================================================== --- head/gnu/usr.bin/dtc/Makefile Thu Jul 15 01:58:20 2010 (r210100) +++ head/gnu/usr.bin/dtc/Makefile Thu Jul 15 02:22:50 2010 (r210101) @@ -13,7 +13,7 @@ SRCS= dtc.c checks.c fstree.c livetree.c fdt.c fdt_ro.c fdt_rw.c fdt_strerror.c \ fdt_sw.c fdt_wip.c ${DTCVERSIONFILE} -CFLAGS = -Wall -g -Os -fPIC -Wpointer-arith -Wcast-qual +WARNS?= 2 CFLAGS+= -I. -I${.CURDIR} -I${DTCDIR} -I${LIBFDTDIR} VERSIONMAJ!= awk '/^VERSION =/ { print $$3 }' ${DTCDIR}/Makefile From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 03:02:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD09A1065676; Thu, 15 Jul 2010 03:02:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC02B8FC12; Thu, 15 Jul 2010 03:02:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F32Amc059613; Thu, 15 Jul 2010 03:02:10 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F32AM3059611; Thu, 15 Jul 2010 03:02:10 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007150302.o6F32AM3059611@svn.freebsd.org> From: Rick Macklem Date: Thu, 15 Jul 2010 03:02:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210102 - head/sys/fs/nfsserver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 03:02:10 -0000 Author: rmacklem Date: Thu Jul 15 03:02:10 2010 New Revision: 210102 URL: http://svn.freebsd.org/changeset/base/210102 Log: This patch fixes a bug in the experimental NFSv4 server where it released a reference count on nfsv4rootfs_lock erroneously when administrative revocation of state was done. Submitted by: zack.kirsch at isilon.com MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Thu Jul 15 02:22:50 2010 (r210101) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Thu Jul 15 03:02:10 2010 (r210102) @@ -542,7 +542,6 @@ nfsrv_adminrevoke(struct nfsd_clid *revo * file. */ NFSLOCKV4ROOTMUTEX(); - nfsv4_relref(&nfsv4rootfs_lock); do { igotlock = nfsv4_lock(&nfsv4rootfs_lock, 1, NULL, NFSV4ROOTLOCKMUTEXPTR); From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 03:11:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 661281065670; Thu, 15 Jul 2010 03:11:04 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5518F8FC0A; Thu, 15 Jul 2010 03:11:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F3B4Hu061616; Thu, 15 Jul 2010 03:11:04 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F3B4bZ061614; Thu, 15 Jul 2010 03:11:04 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201007150311.o6F3B4bZ061614@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 15 Jul 2010 03:11:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210103 - head/lib/liblzma X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 03:11:04 -0000 Author: marcel Date: Thu Jul 15 03:11:04 2010 New Revision: 210103 URL: http://svn.freebsd.org/changeset/base/210103 Log: Unbreak xz (liblzma) on strong-aligned architectures (and without emulation of misaligned memory accesses). We cannot map the unaligned memory access functions to the ones used for aligned accesses, so do not define TUKLIB_FAST_UNALIGNED_ACCESS. Modified: head/lib/liblzma/config.h Modified: head/lib/liblzma/config.h ============================================================================== --- head/lib/liblzma/config.h Thu Jul 15 03:02:10 2010 (r210102) +++ head/lib/liblzma/config.h Thu Jul 15 03:11:04 2010 (r210103) @@ -66,7 +66,6 @@ #define SIZEOF_SIZE_T 8 #define STDC_HEADERS 1 #define TUKLIB_CPUCORES_SYSCONF 1 -#define TUKLIB_FAST_UNALIGNED_ACCESS 1 #define TUKLIB_PHYSMEM_SYSCONF 1 #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 03:36:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54B4D106566B; Thu, 15 Jul 2010 03:36:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AFC58FC0A; Thu, 15 Jul 2010 03:36:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F3aoo7067422; Thu, 15 Jul 2010 03:36:50 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F3aoGj067421; Thu, 15 Jul 2010 03:36:50 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007150336.o6F3aoGj067421@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 03:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210104 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 03:36:51 -0000 Author: imp Date: Thu Jul 15 03:36:50 2010 New Revision: 210104 URL: http://svn.freebsd.org/changeset/base/210104 Log: This file has been unused for a while now... Deleted: head/sys/mips/include/_bus_octeon.h From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 03:56:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28F051065677; Thu, 15 Jul 2010 03:56:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F2ECC8FC0C; Thu, 15 Jul 2010 03:56:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F3u8Aa071655; Thu, 15 Jul 2010 03:56:08 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F3u8Y9071652; Thu, 15 Jul 2010 03:56:08 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007150356.o6F3u8Y9071652@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 03:56:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210105 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 03:56:09 -0000 Author: imp Date: Thu Jul 15 03:56:08 2010 New Revision: 210105 URL: http://svn.freebsd.org/changeset/base/210105 Log: Move TLB definitions to tlb.h Modified: head/sys/mips/include/cpu.h head/sys/mips/include/tlb.h Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Thu Jul 15 03:36:50 2010 (r210104) +++ head/sys/mips/include/cpu.h Thu Jul 15 03:56:08 2010 (r210105) @@ -62,24 +62,6 @@ /* END: These are going away */ /* - * The first TLB entry that write random hits. - * TLB entry 0 maps the kernel stack of the currently running thread - * TLB entry 1 maps the pcpu area of processor (only for SMP builds) - */ -#define KSTACK_TLB_ENTRY 0 -#ifdef SMP -#define PCPU_TLB_ENTRY 1 -#define VMWIRED_ENTRIES 2 -#else -#define VMWIRED_ENTRIES 1 -#endif /* SMP */ - -/* - * The number of process id entries. - */ -#define VMNUM_PIDS 256 - -/* * Exported definitions unique to mips cpu support. */ Modified: head/sys/mips/include/tlb.h ============================================================================== --- head/sys/mips/include/tlb.h Thu Jul 15 03:36:50 2010 (r210104) +++ head/sys/mips/include/tlb.h Thu Jul 15 03:56:08 2010 (r210105) @@ -29,12 +29,31 @@ #ifndef _MACHINE_TLB_H_ #define _MACHINE_TLB_H_ +/* + * The first TLB entry that write random hits. + * TLB entry 0 maps the kernel stack of the currently running thread + * TLB entry 1 maps the pcpu area of processor (only for SMP builds) + */ +#define KSTACK_TLB_ENTRY 0 +#ifdef SMP +#define PCPU_TLB_ENTRY 1 +#define VMWIRED_ENTRIES 2 +#else +#define VMWIRED_ENTRIES 1 +#endif /* SMP */ + +/* + * The number of process id entries. + */ +#define VMNUM_PIDS 256 + +extern int num_tlbentries; + void tlb_insert_wired(unsigned, vm_offset_t, pt_entry_t, pt_entry_t); void tlb_invalidate_address(struct pmap *, vm_offset_t); void tlb_invalidate_all(void); void tlb_invalidate_all_user(struct pmap *); void tlb_save(void); void tlb_update(struct pmap *, vm_offset_t, pt_entry_t); -extern int num_tlbentries; #endif /* !_MACHINE_TLB_H_ */ From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 07:45:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BB94106566B; Thu, 15 Jul 2010 07:45:38 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B4A58FC16; Thu, 15 Jul 2010 07:45:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F7jb5i022084; Thu, 15 Jul 2010 07:45:37 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F7jb7H022082; Thu, 15 Jul 2010 07:45:37 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007150745.o6F7jb7H022082@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 15 Jul 2010 07:45:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210107 - head/sys/dev/iwn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 07:45:38 -0000 Author: bschmidt Date: Thu Jul 15 07:45:37 2010 New Revision: 210107 URL: http://svn.freebsd.org/changeset/base/210107 Log: Remove duplicate vendor:device entry. MFC after: 3 days Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Thu Jul 15 07:14:57 2010 (r210106) +++ head/sys/dev/iwn/if_iwn.c Thu Jul 15 07:45:37 2010 (r210107) @@ -310,7 +310,6 @@ static const struct iwn_ident iwn_ident_ { 0x8086, 0x423D, "Intel(R) PRO/Wireless 5150" }, { 0x8086, 0x4235, "Intel(R) PRO/Wireless 5300" }, { 0x8086, 0x4236, "Intel(R) PRO/Wireless 5300" }, - { 0x8086, 0x4236, "Intel(R) PRO/Wireless 5350" }, { 0x8086, 0x423A, "Intel(R) PRO/Wireless 5350" }, { 0x8086, 0x423B, "Intel(R) PRO/Wireless 5350" }, { 0x8086, 0x0083, "Intel(R) PRO/Wireless 1000" }, From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 08:05:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A8271065673; Thu, 15 Jul 2010 08:05:21 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D1818FC0C; Thu, 15 Jul 2010 08:05:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F85K7X026470; Thu, 15 Jul 2010 08:05:20 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F85K17026467; Thu, 15 Jul 2010 08:05:20 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007150805.o6F85K17026467@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 15 Jul 2010 08:05:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210108 - head/sys/dev/iwn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 08:05:21 -0000 Author: bschmidt Date: Thu Jul 15 08:05:20 2010 New Revision: 210108 URL: http://svn.freebsd.org/changeset/base/210108 Log: Fix some small whitespace nits. MFC after: 3 days Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnvar.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Thu Jul 15 07:45:37 2010 (r210107) +++ head/sys/dev/iwn/if_iwn.c Thu Jul 15 08:05:20 2010 (r210108) @@ -1665,7 +1665,7 @@ iwn5000_read_eeprom(struct iwn_softc *sc DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: calib version=%u pa type=%u voltage=%u\n", __func__, hdr.version, hdr.pa_type, le16toh(hdr.volt)); - sc->calib_ver = hdr.version; + sc->calib_ver = hdr.version; if (sc->hw_type == IWN_HW_REV_TYPE_5150) { /* Compute temperature offset. */ @@ -5867,9 +5867,9 @@ iwn5000_nic_config(struct iwn_softc *sc) /* Use internal power amplifier only. */ IWN_WRITE(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_RADIO_2X2_IPA); } - if (sc->hw_type == IWN_HW_REV_TYPE_6050 && sc->calib_ver >= 6) { - /* Indicate that ROM calibration version is >=6. */ - IWN_SETBITS(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_CALIB_VER6); + if (sc->hw_type == IWN_HW_REV_TYPE_6050 && sc->calib_ver >= 6) { + /* Indicate that ROM calibration version is >=6. */ + IWN_SETBITS(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_CALIB_VER6); } return 0; } Modified: head/sys/dev/iwn/if_iwnvar.h ============================================================================== --- head/sys/dev/iwn/if_iwnvar.h Thu Jul 15 07:45:37 2010 (r210107) +++ head/sys/dev/iwn/if_iwnvar.h Thu Jul 15 08:05:20 2010 (r210108) @@ -307,7 +307,7 @@ struct iwn_softc { #define IWN_LOCK_INIT(_sc) \ mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ - MTX_NETWORK_LOCK, MTX_DEF) + MTX_NETWORK_LOCK, MTX_DEF) #define IWN_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define IWN_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) #define IWN_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 09:30:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C495D106567D; Thu, 15 Jul 2010 09:30:54 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8E1F8FC1B; Thu, 15 Jul 2010 09:30:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F9UsY6045275; Thu, 15 Jul 2010 09:30:54 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F9UsjM045272; Thu, 15 Jul 2010 09:30:54 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007150930.o6F9UsjM045272@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 15 Jul 2010 09:30:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210109 - head/sys/dev/iwn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 09:30:55 -0000 Author: bschmidt Date: Thu Jul 15 09:30:54 2010 New Revision: 210109 URL: http://svn.freebsd.org/changeset/base/210109 Log: - Add new IDs for 6000 series devices. - The 6000 series WiMAX devices need a separate firmware. - The b-gen devices are not hooked because the hardware revision type is not know. Obtained from: OpenBSD MFC after: 1 week Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnreg.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Thu Jul 15 08:05:20 2010 (r210108) +++ head/sys/dev/iwn/if_iwn.c Thu Jul 15 09:30:54 2010 (r210109) @@ -320,8 +320,17 @@ static const struct iwn_ident iwn_ident_ { 0x8086, 0x4239, "Intel(R) PRO/Wireless 6000" }, { 0x8086, 0x422B, "Intel(R) PRO/Wireless 6000" }, { 0x8086, 0x422C, "Intel(R) PRO/Wireless 6000" }, - { 0x8086, 0x0086, "Intel(R) PRO/Wireless 6050" }, - { 0x8086, 0x0087, "Intel(R) PRO/Wireless 6050" }, + { 0x8086, 0x0087, "Intel(R) PRO/Wireless 6250" }, + { 0x8086, 0x0089, "Intel(R) PRO/Wireless 6250" }, + { 0x8086, 0x0082, "Intel(R) PRO/Wireless 6205a" }, + { 0x8086, 0x0085, "Intel(R) PRO/Wireless 6205a" }, +#ifdef notyet + { 0x8086, 0x008a, "Intel(R) PRO/Wireless 6205b" }, + { 0x8086, 0x008b, "Intel(R) PRO/Wireless 6205b" }, + { 0x8086, 0x008f, "Intel(R) PRO/Wireless 6205b" }, + { 0x8086, 0x0090, "Intel(R) PRO/Wireless 6205b" }, + { 0x8086, 0x0091, "Intel(R) PRO/Wireless 6205b" }, +#endif { 0, 0, NULL } }; @@ -734,7 +743,14 @@ iwn_hal_attach(struct iwn_softc *sc) case IWN_HW_REV_TYPE_6050: sc->sc_hal = &iwn5000_hal; sc->limits = &iwn6000_sensitivity_limits; - sc->fwname = "iwn6000fw"; + sc->fwname = "iwn6050fw"; + sc->txchainmask = IWN_ANT_AB; + sc->rxchainmask = IWN_ANT_AB; + break; + case IWN_HW_REV_TYPE_6005: + sc->sc_hal = &iwn5000_hal; + sc->limits = &iwn6000_sensitivity_limits; + sc->fwname = "iwn6005fw"; sc->txchainmask = IWN_ANT_AB; sc->rxchainmask = IWN_ANT_AB; break; @@ -5751,8 +5767,7 @@ iwn_apm_init(struct iwn_softc *sc) IWN_CLRBITS(sc, IWN_GIO, IWN_GIO_L0S_ENA); if (sc->hw_type != IWN_HW_REV_TYPE_4965 && - sc->hw_type != IWN_HW_REV_TYPE_6000 && - sc->hw_type != IWN_HW_REV_TYPE_6050) + sc->hw_type <= IWN_HW_REV_TYPE_1000) IWN_SETBITS(sc, IWN_ANA_PLL, IWN_ANA_PLL_INIT); /* Wait for clock stabilization before accessing prph. */ Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Thu Jul 15 08:05:20 2010 (r210108) +++ head/sys/dev/iwn/if_iwnreg.h Thu Jul 15 09:30:54 2010 (r210109) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $OpenBSD: if_iwnreg.h,v 1.37 2010/02/17 18:23:00 damien Exp $ */ +/* $OpenBSD: if_iwnreg.h,v 1.38 2010/04/10 08:37:36 damien Exp $ */ /*- * Copyright (c) 2007, 2008 @@ -204,6 +204,7 @@ #define IWN_HW_REV_TYPE_1000 6 #define IWN_HW_REV_TYPE_6000 7 #define IWN_HW_REV_TYPE_6050 8 +#define IWN_HW_REV_TYPE_6005 11 /* Possible flags for register IWN_GIO_CHICKEN. */ #define IWN_GIO_CHICKEN_L1A_NO_L0S_RX (1 << 23) From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 09:34:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B9B0106566C; Thu, 15 Jul 2010 09:34:01 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A92D8FC20; Thu, 15 Jul 2010 09:34:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6F9Y1Nw046007; Thu, 15 Jul 2010 09:34:01 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6F9Y1ib046005; Thu, 15 Jul 2010 09:34:01 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007150934.o6F9Y1ib046005@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 15 Jul 2010 09:34:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210110 - head/sys/dev/iwn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 09:34:01 -0000 Author: bschmidt Date: Thu Jul 15 09:34:00 2010 New Revision: 210110 URL: http://svn.freebsd.org/changeset/base/210110 Log: Detect active chains differently to work around a firmware bug which would mark non-existing chains as active. Obtained from: OpenBSD MFC after: 1 week Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Thu Jul 15 09:30:54 2010 (r210109) +++ head/sys/dev/iwn/if_iwn.c Thu Jul 15 09:34:00 2010 (r210110) @@ -4134,10 +4134,14 @@ iwn_collect_noise(struct iwn_softc *sc, val = MAX(calib->rssi[2], val); /* Determine which antennas are connected. */ - sc->chainmask = 0; + sc->chainmask = sc->rxchainmask; for (i = 0; i < 3; i++) - if (val - calib->rssi[i] <= 15 * 20) - sc->chainmask |= 1 << i; + if (val - calib->rssi[i] > 15 * 20) + sc->chainmask &= ~(1 << i); + DPRINTF(sc, IWN_DEBUG_CALIBRATE, + "%s: RX chains mask: theoretical=0x%x, actual=0x%x\n", + __func__, sc->rxchainmask, sc->chainmask); + /* If none of the TX antennas are connected, keep at least one. */ if ((sc->chainmask & sc->txchainmask) == 0) sc->chainmask |= IWN_LSB(sc->txchainmask); From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 10:37:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94FDA1065672; Thu, 15 Jul 2010 10:37:49 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82A308FC1B; Thu, 15 Jul 2010 10:37:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FAbntR061465; Thu, 15 Jul 2010 10:37:49 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FAbnmA061461; Thu, 15 Jul 2010 10:37:49 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007151037.o6FAbnmA061461@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 15 Jul 2010 10:37:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210111 - head/sys/dev/iwn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 10:37:49 -0000 Author: bschmidt Date: Thu Jul 15 10:37:49 2010 New Revision: 210111 URL: http://svn.freebsd.org/changeset/base/210111 Log: Add support for firmware images in "type-length-value" format. Obtained from: OpenBSD MFC after: 2 weeks Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnreg.h head/sys/dev/iwn/if_iwnvar.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Thu Jul 15 09:34:00 2010 (r210110) +++ head/sys/dev/iwn/if_iwn.c Thu Jul 15 10:37:49 2010 (r210111) @@ -231,6 +231,10 @@ static int iwn4965_load_firmware(struct static int iwn5000_load_firmware_section(struct iwn_softc *, uint32_t, const uint8_t *, int); static int iwn5000_load_firmware(struct iwn_softc *); +static int iwn_read_firmware_leg(struct iwn_softc *, + struct iwn_fw_info *); +static int iwn_read_firmware_tlv(struct iwn_softc *, + struct iwn_fw_info *, uint16_t); static int iwn_read_firmware(struct iwn_softc *); static int iwn_clock_wait(struct iwn_softc *); static int iwn_apm_init(struct iwn_softc *); @@ -5644,39 +5648,19 @@ iwn5000_load_firmware(struct iwn_softc * return 0; } +/* + * Extract text and data sections from a legacy firmware image. + */ static int -iwn_read_firmware(struct iwn_softc *sc) +iwn_read_firmware_leg(struct iwn_softc *sc, struct iwn_fw_info *fw) { - const struct iwn_hal *hal = sc->sc_hal; - struct iwn_fw_info *fw = &sc->fw; const uint32_t *ptr; + size_t hdrlen = 24; uint32_t rev; - size_t size; - - IWN_UNLOCK(sc); - - /* Read firmware image from filesystem. */ - sc->fw_fp = firmware_get(sc->fwname); - if (sc->fw_fp == NULL) { - device_printf(sc->sc_dev, - "%s: could not load firmare image \"%s\"\n", __func__, - sc->fwname); - IWN_LOCK(sc); - return EINVAL; - } - IWN_LOCK(sc); - - size = sc->fw_fp->datasize; - if (size < 28) { - device_printf(sc->sc_dev, - "%s: truncated firmware header: %zu bytes\n", - __func__, size); - return EINVAL; - } - /* Process firmware header. */ ptr = (const uint32_t *)sc->fw_fp->data; rev = le32toh(*ptr++); + /* Check firmware API version. */ if (IWN_FW_API(rev) <= 1) { device_printf(sc->sc_dev, @@ -5685,34 +5669,27 @@ iwn_read_firmware(struct iwn_softc *sc) } if (IWN_FW_API(rev) >= 3) { /* Skip build number (version 2 header). */ - size -= 4; + hdrlen += 4; ptr++; } + if (fw->size < hdrlen) { + device_printf(sc->sc_dev, + "%s: firmware file too short: %zu bytes\n", + __func__, fw->size); + return EINVAL; + } fw->main.textsz = le32toh(*ptr++); fw->main.datasz = le32toh(*ptr++); fw->init.textsz = le32toh(*ptr++); fw->init.datasz = le32toh(*ptr++); fw->boot.textsz = le32toh(*ptr++); - size -= 24; - - /* Sanity-check firmware header. */ - if (fw->main.textsz > hal->fw_text_maxsz || - fw->main.datasz > hal->fw_data_maxsz || - fw->init.textsz > hal->fw_text_maxsz || - fw->init.datasz > hal->fw_data_maxsz || - fw->boot.textsz > IWN_FW_BOOT_TEXT_MAXSZ || - (fw->boot.textsz & 3) != 0) { - device_printf(sc->sc_dev, "%s: invalid firmware header\n", - __func__); - return EINVAL; - } /* Check that all firmware sections fit. */ - if (fw->main.textsz + fw->main.datasz + fw->init.textsz + - fw->init.datasz + fw->boot.textsz > size) { + if (fw->size < hdrlen + fw->main.textsz + fw->main.datasz + + fw->init.textsz + fw->init.datasz + fw->boot.textsz) { device_printf(sc->sc_dev, "%s: firmware file too short: %zu bytes\n", - __func__, size); + __func__, fw->size); return EINVAL; } @@ -5726,6 +5703,151 @@ iwn_read_firmware(struct iwn_softc *sc) return 0; } +/* + * Extract text and data sections from a TLV firmware image. + */ +int +iwn_read_firmware_tlv(struct iwn_softc *sc, struct iwn_fw_info *fw, + uint16_t alt) +{ + const struct iwn_fw_tlv_hdr *hdr; + const struct iwn_fw_tlv *tlv; + const uint8_t *ptr, *end; + uint64_t altmask; + uint32_t len; + + if (fw->size < sizeof (*hdr)) { + device_printf(sc->sc_dev, + "%s: firmware file too short: %zu bytes\n", + __func__, fw->size); + return EINVAL; + } + hdr = (const struct iwn_fw_tlv_hdr *)fw->data; + if (hdr->signature != htole32(IWN_FW_SIGNATURE)) { + device_printf(sc->sc_dev, + "%s: bad firmware file signature 0x%08x\n", + __func__, le32toh(hdr->signature)); + return EINVAL; + } + + /* + * Select the closest supported alternative that is less than + * or equal to the specified one. + */ + altmask = le64toh(hdr->altmask); + while (alt > 0 && !(altmask & (1ULL << alt))) + alt--; /* Downgrade. */ + + ptr = (const uint8_t *)(hdr + 1); + end = (const uint8_t *)(fw->data + fw->size); + + /* Parse type-length-value fields. */ + while (ptr + sizeof (*tlv) <= end) { + tlv = (const struct iwn_fw_tlv *)ptr; + len = le32toh(tlv->len); + + ptr += sizeof (*tlv); + if (ptr + len > end) { + device_printf(sc->sc_dev, + "%s: firmware file too short: %zu bytes\n", + __func__, fw->size); + return EINVAL; + } + /* Skip other alternatives. */ + if (tlv->alt != 0 && tlv->alt != htole16(alt)) + goto next; + + switch (le16toh(tlv->type)) { + case IWN_FW_TLV_MAIN_TEXT: + fw->main.text = ptr; + fw->main.textsz = len; + break; + case IWN_FW_TLV_MAIN_DATA: + fw->main.data = ptr; + fw->main.datasz = len; + break; + case IWN_FW_TLV_INIT_TEXT: + fw->init.text = ptr; + fw->init.textsz = len; + break; + case IWN_FW_TLV_INIT_DATA: + fw->init.data = ptr; + fw->init.datasz = len; + break; + case IWN_FW_TLV_BOOT_TEXT: + fw->boot.text = ptr; + fw->boot.textsz = len; + break; + default: + DPRINTF(sc, IWN_DEBUG_RESET, + "%s: TLV type %d not handled\n", + __func__, le16toh(tlv->type)); + break; + } +next: /* TLV fields are 32-bit aligned. */ + ptr += (len + 3) & ~3; + } + return 0; +} + +static int +iwn_read_firmware(struct iwn_softc *sc) +{ + const struct iwn_hal *hal = sc->sc_hal; + struct iwn_fw_info *fw = &sc->fw; + int error; + + IWN_UNLOCK(sc); + + memset(fw, 0, sizeof (*fw)); + + /* Read firmware image from filesystem. */ + sc->fw_fp = firmware_get(sc->fwname); + if (sc->fw_fp == NULL) { + device_printf(sc->sc_dev, + "%s: could not load firmare image \"%s\"\n", __func__, + sc->fwname); + IWN_LOCK(sc); + return EINVAL; + } + IWN_LOCK(sc); + + fw->size = sc->fw_fp->datasize; + fw->data = (const uint8_t *)sc->fw_fp->data; + if (fw->size < sizeof (uint32_t)) { + device_printf(sc->sc_dev, + "%s: firmware file too short: %zu bytes\n", + __func__, fw->size); + return EINVAL; + } + + /* Retrieve text and data sections. */ + if (*(const uint32_t *)fw->data != 0) /* Legacy image. */ + error = iwn_read_firmware_leg(sc, fw); + else + error = iwn_read_firmware_tlv(sc, fw, 1); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: could not read firmware sections\n", __func__); + return error; + } + + /* Make sure text and data sections fit in hardware memory. */ + if (fw->main.textsz > hal->fw_text_maxsz || + fw->main.datasz > hal->fw_data_maxsz || + fw->init.textsz > hal->fw_text_maxsz || + fw->init.datasz > hal->fw_data_maxsz || + fw->boot.textsz > IWN_FW_BOOT_TEXT_MAXSZ || + (fw->boot.textsz & 3) != 0) { + device_printf(sc->sc_dev, + "%s: firmware sections too large\n", __func__); + return EINVAL; + } + + /* We can proceed with loading the firmware. */ + return 0; +} + static int iwn_clock_wait(struct iwn_softc *sc) { Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Thu Jul 15 09:34:00 2010 (r210110) +++ head/sys/dev/iwn/if_iwnreg.h Thu Jul 15 10:37:49 2010 (r210111) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $OpenBSD: if_iwnreg.h,v 1.38 2010/04/10 08:37:36 damien Exp $ */ +/* $OpenBSD: if_iwnreg.h,v 1.40 2010/05/05 19:41:57 damien Exp $ */ /*- * Copyright (c) 2007, 2008 @@ -1260,6 +1260,34 @@ struct iwn_fw_dump { uint32_t time[2]; } __packed; +/* TLV firmware header. */ +struct iwn_fw_tlv_hdr { + uint32_t zero; /* Always 0, to differentiate from legacy. */ + uint32_t signature; +#define IWN_FW_SIGNATURE 0x0a4c5749 /* "IWL\n" */ + + uint8_t descr[64]; + uint32_t rev; +#define IWN_FW_API(x) (((x) >> 8) & 0xff) + + uint32_t build; + uint64_t altmask; +} __packed; + +/* TLV header. */ +struct iwn_fw_tlv { + uint16_t type; +#define IWN_FW_TLV_MAIN_TEXT 1 +#define IWN_FW_TLV_MAIN_DATA 2 +#define IWN_FW_TLV_INIT_TEXT 3 +#define IWN_FW_TLV_INIT_DATA 4 +#define IWN_FW_TLV_BOOT_TEXT 5 +#define IWN_FW_TLV_PBREQ_MAXLEN 6 + + uint16_t alt; + uint32_t len; +} __packed; + #define IWN4965_FW_TEXT_MAXSZ ( 96 * 1024) #define IWN4965_FW_DATA_MAXSZ ( 40 * 1024) #define IWN5000_FW_TEXT_MAXSZ (256 * 1024) @@ -1268,8 +1296,6 @@ struct iwn_fw_dump { #define IWN4965_FWSZ (IWN4965_FW_TEXT_MAXSZ + IWN4965_FW_DATA_MAXSZ) #define IWN5000_FWSZ IWN5000_FW_TEXT_MAXSZ -#define IWN_FW_API(x) (((x) >> 8) & 0xff) - /* * Offsets into EEPROM. */ Modified: head/sys/dev/iwn/if_iwnvar.h ============================================================================== --- head/sys/dev/iwn/if_iwnvar.h Thu Jul 15 09:34:00 2010 (r210110) +++ head/sys/dev/iwn/if_iwnvar.h Thu Jul 15 10:37:49 2010 (r210111) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $OpenBSD: if_iwnvar.h,v 1.17 2010/02/17 18:23:00 damien Exp $ */ +/* $OpenBSD: if_iwnvar.h,v 1.18 2010/04/30 16:06:46 damien Exp $ */ /*- * Copyright (c) 2007, 2008 @@ -150,7 +150,8 @@ struct iwn_fw_part { }; struct iwn_fw_info { - u_char *data; + const uint8_t *data; + size_t size; struct iwn_fw_part init; struct iwn_fw_part main; struct iwn_fw_part boot; From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 10:49:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2BE61065673; Thu, 15 Jul 2010 10:49:07 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1D568FC16; Thu, 15 Jul 2010 10:49:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FAn7dr064023; Thu, 15 Jul 2010 10:49:07 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FAn72j064021; Thu, 15 Jul 2010 10:49:07 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007151049.o6FAn72j064021@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 15 Jul 2010 10:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210112 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 10:49:07 -0000 Author: raj Date: Thu Jul 15 10:49:07 2010 New Revision: 210112 URL: http://svn.freebsd.org/changeset/base/210112 Log: Fix FDT_DTS_FILE parsing to properly retrieve its value. This unbreaks the 'builddtb' target. Make the processing more robust against non-existent kernel config files (pointed out by imp@). Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jul 15 10:37:49 2010 (r210111) +++ head/Makefile.inc1 Thu Jul 15 10:49:07 2010 (r210112) @@ -1477,8 +1477,12 @@ _xi-links: DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF}/ .if !defined(FDT_DTS_FILE) || empty(FDT_DTS_FILE) -FDT_DTS_FILE!= awk '/^makeoptions[[:space:]]+FDT_DTS_FILE/ {FS="=|[ \t]+"; print $$3}' \ +.if exists(${KERNCONFDIR}/${KERNCONF}) +FDT_DTS_FILE!= awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $$2}' \ ${KERNCONFDIR}/${KERNCONF} +.else +.error ERROR: kernel config file not found. +.endif .endif .endif From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 11:20:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16178106566B; Thu, 15 Jul 2010 11:20:28 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id CAC998FC08; Thu, 15 Jul 2010 11:20:27 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:c197:bb60:d1b9:bf2e] (unknown [IPv6:2001:7b8:3a7:0:c197:bb60:d1b9:bf2e]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id C10975C59; Thu, 15 Jul 2010 13:20:26 +0200 (CEST) Message-ID: <4C3EEEFB.8020902@andric.com> Date: Thu, 15 Jul 2010 13:20:27 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.8pre) Gecko/20100713 Lanikai/3.1.2pre MIME-Version: 1.0 To: Marcel Moolenaar References: <201007150311.o6F3B4bZ061614@svn.freebsd.org> In-Reply-To: <201007150311.o6F3B4bZ061614@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210103 - head/lib/liblzma X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 11:20:28 -0000 On 2010-07-15 05:11, Marcel Moolenaar wrote: > Author: marcel > Date: Thu Jul 15 03:11:04 2010 > New Revision: 210103 > URL: http://svn.freebsd.org/changeset/base/210103 > > Log: > Unbreak xz (liblzma) on strong-aligned architectures (and without > emulation of misaligned memory accesses). We cannot map the unaligned > memory access functions to the ones used for aligned accesses, so do > not define TUKLIB_FAST_UNALIGNED_ACCESS. Is there no way to define or undefine this per arch? If this particular define gives a speed advantage on the 'weak-aligned' architectures, it might be worth it... From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 11:26:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD2A0106568A; Thu, 15 Jul 2010 11:26:07 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A94CB8FC1E; Thu, 15 Jul 2010 11:26:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FBQ7E9072215; Thu, 15 Jul 2010 11:26:07 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FBQ7wL072210; Thu, 15 Jul 2010 11:26:07 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007151126.o6FBQ7wL072210@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 15 Jul 2010 11:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210113 - in head/sys: amd64/conf conf contrib/dev/iwn i386/conf modules/iwnfw modules/iwnfw/iwn6000 modules/iwnfw/iwn6050 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 11:26:07 -0000 Author: bschmidt Date: Thu Jul 15 11:26:07 2010 New Revision: 210113 URL: http://svn.freebsd.org/changeset/base/210113 Log: - Update 6000 firmware to 9.221.4.1 - Add 6050 firmware MFC after: 2 weeks Added: head/sys/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu head/sys/contrib/dev/iwn/iwlwifi-6050-9.201.4.1.fw.uu head/sys/modules/iwnfw/iwn6050/ head/sys/modules/iwnfw/iwn6050/Makefile (contents, props changed) Deleted: head/sys/contrib/dev/iwn/iwlwifi-6000-9.193.4.1.fw.uu Modified: head/sys/amd64/conf/NOTES head/sys/conf/files head/sys/i386/conf/NOTES head/sys/modules/iwnfw/Makefile head/sys/modules/iwnfw/iwn6000/Makefile Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Thu Jul 15 10:49:07 2010 (r210112) +++ head/sys/amd64/conf/NOTES Thu Jul 15 11:26:07 2010 (r210113) @@ -328,6 +328,7 @@ device wpi # iwn5000fw: Specific module for the 5000 only # iwn5150fw: Specific module for the 5150 only # iwn6000fw: Specific module for the 6000 only +# iwn6050fw: Specific module for the 6050 only # mwlfw: Marvell 88W8363 firmware # wpifw: Intel 3945ABG Wireless LAN Controller firmware @@ -345,6 +346,7 @@ device iwn1000fw device iwn5000fw device iwn5150fw device iwn6000fw +device iwn6050fw device mwlfw device wpifw Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Jul 15 10:49:07 2010 (r210112) +++ head/sys/conf/files Thu Jul 15 11:26:07 2010 (r210113) @@ -1220,7 +1220,21 @@ iwn6000fw.fwo optional iwn6000fw | iwn clean "iwn6000fw.fwo" iwn6000.fw optional iwn6000fw | iwnfw \ dependency ".PHONY" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000-9.193.4.1.fw.uu" \ + compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu" \ + no-obj no-implicit-rule \ + clean "iwn6000.fw" +iwn6050fw.c optional iwn6050fw | iwnfw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6050.fw:iwn6050fw -miwn6050fw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "iwn6050fw.c" +iwn6050fw.fwo optional iwn6050fw | iwnfw \ + dependency "iwn6050.fw" \ + compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} iwn6050.fw" \ + no-implicit-rule \ + clean "iwn6050fw.fwo" +iwn6050.fw optional iwn6050fw | iwnfw \ + dependency ".PHONY" \ + compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6050-9.201.4.1.fw.uu" \ no-obj no-implicit-rule \ clean "iwn6000.fw" dev/ixgb/if_ixgb.c optional ixgb Added: head/sys/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu Thu Jul 15 11:26:07 2010 (r210113) @@ -0,0 +1,8017 @@ +Copyright (c) 2006-2010, Intel Corporation. +All rights reserved. + +Redistribution. Redistribution and use in binary form, without +modification, are permitted provided that the following conditions are +met: + +* Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. +* Neither the name of Intel Corporation nor the names of its suppliers + may be used to endorse or promote products derived from this software + without specific prior written permission. +* No reverse engineering, decompilation, or disassembly of this software + is permitted. + +Limited patent license. Intel Corporation grants a world-wide, +royalty-free, non-exclusive license under patents it now or hereafter +owns or controls to make, have made, use, import, offer to sell and +sell ("Utilize") this software, but solely to the extent that any +such patent is necessary to Utilize the software alone, or in +combination with an operating system licensed under an approved Open +Source license as listed by the Open Source Initiative at +http://opensource.org/licenses. The patent license shall not apply to +any other combinations which include this software. No hardware per +se is licensed hereunder. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. +begin-base64 644 iwlwifi-6000-9.221.4.1.fw.uu +AQTdCbxjAADQOAIAAEABAOQ2AgAAQAEAAAAAACAggA8AAEAAaSAAAGkgQABpIAAAaSBAACAggA8A +AOgAaSAAAGkgQABpIAAAaSBAACAggA8AAHAGaSAAAGkgQABpIAAASiAAAEohAABKIgAASiMAAEok +AABKJQAASiYAAEonAABKIAAQSiEAEEoiABBKIwAQSiQAEEolABBKJgAQSicAEEogACBKIQAgSiIA +IEojACBKJAAgSiUAIEomACBKJwAgSiAAMEohADAKJIA/gQAAQEEsnDBALJwwQiQcNAoigD+AAOSC +CiMANwYPAABKJgBwaSBAAEomAHBKJgBwSiYAcEomAHAAFgBwgABsBEB4ICBAhwAAAAAAAAAAAADP +caqqu7vPcJ8AuP82oDagNqA2oM9xoADIOw6BiLgOoWkgQAD+8eB48cClwUHAQsEMHAAxEBxAMc9x +gAD8gzQZwA8wGQAPLBnADigZgA4kGUAOz3CAAPyDIBhAC89wgAD8gxwYAAvPcIAA/IMYGMAKz3CA +APyDFBiACs9wgAD8gxAYwAjPcIAA/IMMGIAIz3CAAPyDCBhACM9xgACAg4AZAAh8GcAHeBmAB3QZ +QAdwGQAHbBkAB2gZgAZkGUAGYBkABlwZwAVYGYAFVBlABVAZAAVMGcAESBmABEQZQARAGQAE76HO +oa2hjKEsGcACKBmAAiQZQAIgGQACHBnAARgZgAEUGUABEBkAAWOhaiAAA9gZAABqIMAC1BkAAGog +gALQGQAAaiBAAcgZAABqIAABxBkAAGogwADAGQAAaiCAALwZAABqIEAAuBkAAGogAAC0GQAAaiCA +AcwZAABA2J+4z3GfALj/HaHPcKD+BQAWoVMjwAQFIIAPsP4AABahGIFTJ841UyXENVMmxTWUuBih +QMMBwALB17oMFAYwyXMA3boNIAAQFAcwz3CgALQPvKDPcaAAyDsugVINIAB92D4PAAAuCWAAqXAI +2ADZ2ghgAJm5z3CAADCNAJCO4MwgooLKIIEP4ADEMcohIQAEDmEAzyGhBQbx4HjhwOHB4cLPcaAA +yB8WEQCGz3KAAJiYAKISEQCGAaITEQCGAqIUEQCGA6IVEQCGBKIkEQCGBqLPcJ8AuP9WoIog/w8S +GRiAExkYgBQZGIAVGRiAJBkYgMHCwcHBwCAgQIcMyM9yoADIHw4aGIANyA8aGIAOyBAaGIAPEgE2 +AcgkeBEaGIAQyC0aGIDgfuHE/BzIvvwcSL7hwOHB4cLhw/wcCLH8HEix/ByIsfwcyLH8HAiy/BxI +svwciLL8HMiy/BwIv2okgBDhxGokwBDhxPHAz3CgANAbFIDPcYAAaAQEIICPz1EE4QChCvIvKQEA +z3CAAOhA8CBAAEB42v/RwMHEayTAEMHEaySAEMHEn3QEFAs0BBQKNAQUCTQEFAg0BBQHNAQUBjQE +FAU0BBQENMHDwcLBwcHAwcRFLH4QCiZAfsHEaySAFMHEICBAhwzIh7gMGhgwDcibuA0aGDAOyA4a +GDAPyIe4DxoYMBDIEBoYMOB+4HjxwAzIlbgMGhgwDcibuA0aGDAPyIq4jbiQuA8aGDDPcIAAOEIY +iIHgC/QPyM9xAABUGKy4DxoYMOoPYAAP2GfYXgsgAIohxwnRwOB+8cDPcIAAcMgAgIYg/oEO9A/I +BSCADwAAANQPGhgwAtgyCyAAiiHHC57/iiBVBSYLIACKIQcO5PHPcQMAQA3PcKAAqCAtoM9xgACo +BECBAWoAoc9woAA4LgWABCCAD8AAAADXcMAAAAAK8kjYz3GfALj/GqFboWnYGLgZoc9wgABoCCWA +I4EggcdxAACIE10EQAngeM9wgABoCO0DQAngePHAbgxAAYDgz3eAAGgEiHUF8oHgBfQB2ALwANgL +r4DhBfKB4QX0AdgC8ADYCq+A4gXygeIF9AHYAvAA2AyvANjPdqAAyB8YHhiQC4+A4IohEAAP8giP +gOAL8s9wAwBADUUeGBAwpgLYGB4YkALwMaYKj4DgGfIJj4DgF/LPcAIAzjggHhiQz3CAACgAIR4Y +kM9wgABkBCIeGJAYFgCWRSAAAxgeGJAMj4DgCPIYFgCWhSABBBgeGJCB4wf0GBYAloi4GB4YkM9w +gAAwjQCQjuDMIKKCBvQYFgCWgLgYHhiQgOUZ8gDYlLjPdYAAnAQApXHYBrhaDSAA/Nkghc9wAABM +HE4NIACfuRgWAJaFuBgeGJDFA0AB4HjxwHvYlgkgAPDZz3afALj/HYYKIcAnQN+fv/2mz3Gg/gQA +NqZTJsA0BSCAD7D+AAAWps91oADIHxkVEpbPcAAARBwqC2AACiDAL3pwGRUAllEgAIIh8j2G/abP +coAAAAAEggHg07gEogUggA/Q/gAAFqZYHoAXIRUAliIVAJbPcoAA0AQAghamAYIWpgjYGR0YkDam +PaYH2NIKYAAKuFMgQQcH2JIMIAAKuM9woADUCxiAQiAACEggAADPd4AAfD/PcYAAnAQggeAfABAL +IcCEyiUiE8ogYgAy9EwigKAP9FEjgKUJ8oDgB/RBK00lwL0c5QHYJPAE3SHwjCIEoBzyTCIAohTy +CvZMIkCgDvJMIgChFPQT3RPwTCIApAryjCIBoAz0Ft0L8A3dCfAU3QfwFd0F8BfdA/AP3QDYgeAG +9FgewBSuCgACcYepcApxKnIKJIAEZQHv/wolwAQlBc//8cB2CAAAddgyCCAAiiHLAloJgABKCIAC +F/82DUAACiHAD+tyBtiKIwsHSiQAAC0B7/8KJQAB4HjxwL4JQAHPc4AAFAlDgwDfz3WgACwgsIXS +atR+fmalpgSmAeKMIhCAJqZDo4X3AoPjowHgAqPxAUAB4HgA2M9xoADIHxihGaEB2A6h4H7gePHA +RglAAQh3unHacvpzCiIAIQojQCEKIYAhz3AAAMgbYglgAAogwCEbcM9wAADMG1IJQAA7cM9wAAAE +HEYJQADPdaAAyB+acAHYE6URFQCWBdjPdoAAgAjhpgCmDsAgHgAUCaYVhRweQBQKphiFGB7AFAum +GYUUHoAUDKagFQAQEB7AFQ2mpBUAEAwegBUOpqgVABAIHkAVD6bPcAEA3QkQpuIIYAAo2BGm2ghg +AADYEqZTJ8B1E6YCyFQeABcWphIVAJZQHgAXF6YTFQCWz3KAAIAIGKYUFQCWUyQBIxmmFRUAlhC5 +GqYkFQCWSiRAeRumFhUAlhymz3CAAHw/EYAdps9wgACACHgYgArPcIAAgAh8GMAKz3CAAPwIBBgA +C4QaQAvPcKAAyBwIgIgaAADPcIAA5AQAgIwaAAAvIAcGCLgFeS8gRwYleJAaAAAA2KggQAPwIgMA +z3GfALj/dqHgeOB44HjgeAHgHQBAAeB4iiRBfQDZqCAABM9wgAAkOfAgQAAAgOB44HjgeOB44Hjg +eAHh4H7geOB+4HjgfuB44H7geOB+4HjgfuB44H7geOB+4HjgfuB44H7geOB+4HjgfuB44H8B2PHA +z3GAAHw/EaHgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjR +wOB+4HjhxeHGQCkNAiV9QC0DFIjipXsIdZD3UyV+kAbyAR1SEGG6+/FBKo4AwbpCJk6QBB3QEP31 +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 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 11:52:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41DDC1065675; Thu, 15 Jul 2010 11:52:21 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 178038FC08; Thu, 15 Jul 2010 11:52:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FBqKKa077955; Thu, 15 Jul 2010 11:52:20 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FBqKoH077953; Thu, 15 Jul 2010 11:52:20 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007151152.o6FBqKoH077953@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 15 Jul 2010 11:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210114 - head/sys/dev/iwn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 11:52:21 -0000 Author: bschmidt Date: Thu Jul 15 11:52:20 2010 New Revision: 210114 URL: http://svn.freebsd.org/changeset/base/210114 Log: Handle RUN->ASSOC->RUN transition correctly, as in not trigger a firmware error. Convert if statements to a switch statement while I'm here. Tested by: Benjamin Kaduk MFC after: 2 weeks Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Thu Jul 15 11:26:07 2010 (r210113) +++ head/sys/dev/iwn/if_iwn.c Thu Jul 15 11:52:20 2010 (r210114) @@ -1940,27 +1940,44 @@ iwn_newstate(struct ieee80211vap *vap, e IWN_LOCK(sc); callout_stop(&sc->sc_timer_to); - if (nstate == IEEE80211_S_AUTH && vap->iv_state != IEEE80211_S_AUTH) { - /* !AUTH -> AUTH requires adapter config */ - /* Reset state to handle reassociations correctly. */ + switch (nstate) { + case IEEE80211_S_ASSOC: + if (vap->iv_state != IEEE80211_S_RUN) + break; + /* FALLTHROUGH */ + case IEEE80211_S_AUTH: + if (vap->iv_state == IEEE80211_S_AUTH) + break; + + /* + * !AUTH -> AUTH transition requires state reset to handle + * reassociations correctly. + */ sc->rxon.associd = 0; sc->rxon.filter &= ~htole32(IWN_FILTER_BSS); iwn_calib_reset(sc); error = iwn_auth(sc, vap); - } - if (nstate == IEEE80211_S_RUN && vap->iv_state != IEEE80211_S_RUN) { + break; + + case IEEE80211_S_RUN: + /* + * RUN -> RUN transition; Just restart the timers. + */ + if (vap->iv_state == IEEE80211_S_RUN) { + iwn_calib_reset(sc); + break; + } + /* * !RUN -> RUN requires setting the association id * which is done with a firmware cmd. We also defer * starting the timers until that work is done. */ error = iwn_run(sc, vap); - } - if (nstate == IEEE80211_S_RUN) { - /* - * RUN -> RUN transition; just restart the timers. - */ - iwn_calib_reset(sc); + break; + + default: + break; } IWN_UNLOCK(sc); IEEE80211_LOCK(ic); From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 12:04:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A22A8106567F; Thu, 15 Jul 2010 12:04:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 19CE38FC1F; Thu, 15 Jul 2010 12:04:22 +0000 (UTC) Received: from c122-106-145-25.carlnfd1.nsw.optusnet.com.au (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6FC4JTx022205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 Jul 2010 22:04:21 +1000 Date: Thu, 15 Jul 2010 22:04:19 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Jung-uk Kim In-Reply-To: <201007131657.o6DGvq9L097594@svn.freebsd.org> Message-ID: <20100715220012.X1719@delplex.bde.org> References: <201007131657.o6DGvq9L097594@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210005 - head/sys/modules/acpi/acpi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 12:04:23 -0000 On Tue, 13 Jul 2010, Jung-uk Kim wrote: > Log: > Define SMP unconditionally for amd64 and remove opt_global.h from SRCS. > Note it is done just for correctness sake because we do not build, ship, or > support acpi.ko on amd64. > > Prodded by: bde Thanks. It was much more interesting than I noticed. Modules are supposed to be independent of all configuration options, especially global ones, especially especially SMP. Perhaps this is too much to ask for acpi. Does it work now, after you removed an SMP ifdef from it? Bruce From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 13:21:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EA301065677; Thu, 15 Jul 2010 13:21:25 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EDBC8FC0A; Thu, 15 Jul 2010 13:21:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FDLPqv097610; Thu, 15 Jul 2010 13:21:25 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FDLPCW097608; Thu, 15 Jul 2010 13:21:25 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007151321.o6FDLPCW097608@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 15 Jul 2010 13:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210116 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 13:21:25 -0000 Author: raj Date: Thu Jul 15 13:21:25 2010 New Revision: 210116 URL: http://svn.freebsd.org/changeset/base/210116 Log: Relax FDT_DTS_FILE validation (and unbreak world build). Pointed out by: kib Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jul 15 12:17:17 2010 (r210115) +++ head/Makefile.inc1 Thu Jul 15 13:21:25 2010 (r210116) @@ -1480,8 +1480,6 @@ DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF} .if exists(${KERNCONFDIR}/${KERNCONF}) FDT_DTS_FILE!= awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $$2}' \ ${KERNCONFDIR}/${KERNCONF} -.else -.error ERROR: kernel config file not found. .endif .endif From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 13:46:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 862C3106566B; Thu, 15 Jul 2010 13:46:30 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 760848FC08; Thu, 15 Jul 2010 13:46:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FDkUlC003239; Thu, 15 Jul 2010 13:46:30 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FDkUpx003237; Thu, 15 Jul 2010 13:46:30 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <201007151346.o6FDkUpx003237@svn.freebsd.org> From: Ivan Voras Date: Thu, 15 Jul 2010 13:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210117 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 13:46:30 -0000 Author: ivoras Date: Thu Jul 15 13:46:30 2010 New Revision: 210117 URL: http://svn.freebsd.org/changeset/base/210117 Log: A cosmetic change - don't output empty . Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Thu Jul 15 13:21:25 2010 (r210116) +++ head/sys/kern/sched_ule.c Thu Jul 15 13:46:30 2010 (r210117) @@ -2656,16 +2656,16 @@ sysctl_kern_sched_topology_spec_internal } sbuf_printf(sb, "\n"); - sbuf_printf(sb, "%*s ", indent, ""); if (cg->cg_flags != 0) { + sbuf_printf(sb, "%*s ", indent, ""); if ((cg->cg_flags & CG_FLAG_HTT) != 0) sbuf_printf(sb, "HTT group"); if ((cg->cg_flags & CG_FLAG_THREAD) != 0) sbuf_printf(sb, "THREAD group"); if ((cg->cg_flags & CG_FLAG_SMT) != 0) sbuf_printf(sb, "SMT group"); + sbuf_printf(sb, "\n"); } - sbuf_printf(sb, "\n"); if (cg->cg_children > 0) { sbuf_printf(sb, "%*s \n", indent, ""); From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 14:30:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DC51106564A; Thu, 15 Jul 2010 14:30:37 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id BCADA8FC13; Thu, 15 Jul 2010 14:30:36 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 94EEE1FFC33; Thu, 15 Jul 2010 14:30:35 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 454258489D; Thu, 15 Jul 2010 16:28:22 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Dimitry Andric References: <201007150311.o6F3B4bZ061614@svn.freebsd.org> <4C3EEEFB.8020902@andric.com> Date: Thu, 15 Jul 2010 16:28:22 +0200 In-Reply-To: <4C3EEEFB.8020902@andric.com> (Dimitry Andric's message of "Thu, 15 Jul 2010 13:20:27 +0200") Message-ID: <86630g4y61.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org Subject: Re: svn commit: r210103 - head/lib/liblzma X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 14:30:37 -0000 Dimitry Andric writes: > Marcel Moolenaar writes: > > Unbreak xz (liblzma) on strong-aligned architectures (and without > > emulation of misaligned memory accesses). We cannot map the unaligned > > memory access functions to the ones used for aligned accesses, so do > > not define TUKLIB_FAST_UNALIGNED_ACCESS. > Is there no way to define or undefine this per arch? If this particular > define gives a speed advantage on the 'weak-aligned' architectures, it > might be worth it... Misaligned accesses, especially writes, are slow on all architectures - but Marcel knows this, so I guess he has a reason for doing it this way? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 14:34:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 997D81065674; Thu, 15 Jul 2010 14:34:57 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 702D28FC25; Thu, 15 Jul 2010 14:34:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FEYv0t013936; Thu, 15 Jul 2010 14:34:57 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FEYvLP013934; Thu, 15 Jul 2010 14:34:57 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201007151434.o6FEYvLP013934@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 15 Jul 2010 14:34:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210118 - head/sbin/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 14:34:57 -0000 Author: luigi Date: Thu Jul 15 14:34:56 2010 New Revision: 210118 URL: http://svn.freebsd.org/changeset/base/210118 Log: better printing of headers when listing flows Modified: head/sbin/ipfw/dummynet.c Modified: head/sbin/ipfw/dummynet.c ============================================================================== --- head/sbin/ipfw/dummynet.c Thu Jul 15 13:46:30 2010 (r210117) +++ head/sbin/ipfw/dummynet.c Thu Jul 15 14:34:56 2010 (r210118) @@ -146,10 +146,6 @@ print_mask(struct ipfw_flow_id *id) id->proto, id->src_ip, id->src_port, id->dst_ip, id->dst_port); - - printf("BKT Prot ___Source IP/port____ " - "____Dest. IP/port____ " - "Tot_pkt/bytes Pkt/Byte Drp\n"); } else { char buf[255]; printf("\n mask: %sproto: 0x%02x, flow_id: 0x%08x, ", @@ -159,22 +155,35 @@ print_mask(struct ipfw_flow_id *id) printf("%s/0x%04x -> ", buf, id->src_port); inet_ntop(AF_INET6, &(id->dst_ip6), buf, sizeof(buf)); printf("%s/0x%04x\n", buf, id->dst_port); + } +} +static void +print_header(struct ipfw_flow_id *id) +{ + if (!IS_IP6_FLOW_ID(id)) + printf("BKT Prot ___Source IP/port____ " + "____Dest. IP/port____ " + "Tot_pkt/bytes Pkt/Byte Drp\n"); + else printf("BKT ___Prot___ _flow-id_ " "______________Source IPv6/port_______________ " "_______________Dest. IPv6/port_______________ " "Tot_pkt/bytes Pkt/Byte Drp\n"); - } } static void -list_flow(struct dn_flow *ni) +list_flow(struct dn_flow *ni, int *print) { char buff[255]; - struct protoent *pe; + struct protoent *pe = NULL; struct in_addr ina; struct ipfw_flow_id *id = &ni->fid; + if (*print) { + print_header(&ni->fid); + *print = 0; + } pe = getprotobynumber(id->proto); /* XXX: Should check for IPv4 flows */ printf("%3u%c", (ni->oid.id) & 0xff, @@ -290,6 +299,7 @@ static void list_pipes(struct dn_id *oid, struct dn_id *end) { char buf[160]; /* pending buffer */ + int toPrint = 1; /* print header */ buf[0] = '\0'; for (; oid != end; oid = O_NEXT(oid, oid->len)) { @@ -333,7 +343,7 @@ list_pipes(struct dn_id *oid, struct dn_ break; case DN_FLOW: - list_flow((struct dn_flow *)oid); + list_flow((struct dn_flow *)oid, &toPrint); break; case DN_LINK: { From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 14:37:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47204106567A; Thu, 15 Jul 2010 14:37:03 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 373D08FC16; Thu, 15 Jul 2010 14:37:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FEb3D7014430; Thu, 15 Jul 2010 14:37:03 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FEb3cj014428; Thu, 15 Jul 2010 14:37:03 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201007151437.o6FEb3cj014428@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 15 Jul 2010 14:37:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210119 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 14:37:03 -0000 Author: luigi Date: Thu Jul 15 14:37:02 2010 New Revision: 210119 URL: http://svn.freebsd.org/changeset/base/210119 Log: fix a comment and final empty line Modified: head/sys/netinet/ipfw/dn_heap.c Modified: head/sys/netinet/ipfw/dn_heap.c ============================================================================== --- head/sys/netinet/ipfw/dn_heap.c Thu Jul 15 14:34:56 2010 (r210118) +++ head/sys/netinet/ipfw/dn_heap.c Thu Jul 15 14:37:02 2010 (r210119) @@ -514,9 +514,12 @@ dn_ht_scan(struct dn_ht *ht, int (*fn)(v } /* - * Similar to dn_ht_scan(), except thah the scan is performed only + * Similar to dn_ht_scan(), except that the scan is performed only * in the bucket 'bucket'. The function returns a correct bucket number if - * the original is invalid + * the original is invalid. + * If the callback returns DNHT_SCAN_END, the function move the ht->ht[i] + * pointer to the last entry processed. Moreover, the bucket number passed + * by caller is decremented, because usually the caller increment it. */ int dn_ht_scan_bucket(struct dn_ht *ht, int *bucket, int (*fn)(void *, void *), @@ -547,4 +550,3 @@ dn_ht_scan_bucket(struct dn_ht *ht, int } return found; } - From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 14:37:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9F8D1065680; Thu, 15 Jul 2010 14:37:59 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA5158FC0A; Thu, 15 Jul 2010 14:37:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FEbxNQ014660; Thu, 15 Jul 2010 14:37:59 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FEbxwA014658; Thu, 15 Jul 2010 14:37:59 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201007151437.o6FEbxwA014658@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 15 Jul 2010 14:37:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210120 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 14:37:59 -0000 Author: luigi Date: Thu Jul 15 14:37:59 2010 New Revision: 210120 URL: http://svn.freebsd.org/changeset/base/210120 Log: whitespace fixes Modified: head/sys/netinet/ipfw/ip_fw2.c Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Thu Jul 15 14:37:02 2010 (r210119) +++ head/sys/netinet/ipfw/ip_fw2.c Thu Jul 15 14:37:59 2010 (r210120) @@ -351,7 +351,7 @@ iface_match(struct ifnet *ifp, ipfw_insn return(1); } } else { -#ifdef __FreeBSD__ /* and OSX too ? */ +#ifdef __FreeBSD__ /* and OSX too ? */ struct ifaddr *ia; if_addr_rlock(ifp); @@ -1329,7 +1329,7 @@ do { \ /* For diverted packets, args->rule.info * contains the divert port (in host format) * reason and direction. - */ + */ uint32_t i = args->rule.info; match = (i&IPFW_IS_MASK) == IPFW_IS_DIVERT && cmd->arg1 & ((i & IPFW_INFO_IN) ? 1 : 2); From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 14:41:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E20721065670; Thu, 15 Jul 2010 14:41:06 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D26418FC1C; Thu, 15 Jul 2010 14:41:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FEf6Xu015450; Thu, 15 Jul 2010 14:41:06 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FEf6Lc015448; Thu, 15 Jul 2010 14:41:06 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201007151441.o6FEf6Lc015448@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 15 Jul 2010 14:41:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210121 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 14:41:07 -0000 Author: luigi Date: Thu Jul 15 14:41:06 2010 New Revision: 210121 URL: http://svn.freebsd.org/changeset/base/210121 Log: small portability fix to build on linux/windows Modified: head/sys/net/pfil.h Modified: head/sys/net/pfil.h ============================================================================== --- head/sys/net/pfil.h Thu Jul 15 14:37:59 2010 (r210120) +++ head/sys/net/pfil.h Thu Jul 15 14:41:06 2010 (r210121) @@ -69,7 +69,11 @@ struct pfil_head { pfil_list_t ph_out; int ph_type; int ph_nhooks; +#if defined( __linux__ ) || defined( _WIN32 ) + rwlock_t ph_mtx; +#else struct rmlock ph_lock; +#endif union { u_long phu_val; void *phu_ptr; From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 14:41:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66BDA106564A; Thu, 15 Jul 2010 14:41:59 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5721F8FC08; Thu, 15 Jul 2010 14:41:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FEfxWF015649; Thu, 15 Jul 2010 14:41:59 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FEfxeQ015647; Thu, 15 Jul 2010 14:41:59 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201007151441.o6FEfxeQ015647@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 15 Jul 2010 14:41:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210122 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 14:41:59 -0000 Author: luigi Date: Thu Jul 15 14:41:59 2010 New Revision: 210122 URL: http://svn.freebsd.org/changeset/base/210122 Log: whitespace cleanup Modified: head/sys/net/radix.c Modified: head/sys/net/radix.c ============================================================================== --- head/sys/net/radix.c Thu Jul 15 14:41:06 2010 (r210121) +++ head/sys/net/radix.c Thu Jul 15 14:41:59 2010 (r210122) @@ -50,8 +50,8 @@ #include #include #include -#define log(x, arg...) fprintf(stderr, ## arg) -#define panic(x) fprintf(stderr, "PANIC: %s", x), exit(1) +#define log(x, arg...) fprintf(stderr, ## arg) +#define panic(x) fprintf(stderr, "PANIC: %s", x), exit(1) #define min(a, b) ((a) < (b) ? (a) : (b) ) #include #endif /* !_KERNEL */ From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 14:43:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E9E31065672; Thu, 15 Jul 2010 14:43:13 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EF578FC08; Thu, 15 Jul 2010 14:43:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FEhDuY015985; Thu, 15 Jul 2010 14:43:13 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FEhDFs015983; Thu, 15 Jul 2010 14:43:13 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201007151443.o6FEhDFs015983@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 15 Jul 2010 14:43:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210123 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 14:43:13 -0000 Author: luigi Date: Thu Jul 15 14:43:12 2010 New Revision: 210123 URL: http://svn.freebsd.org/changeset/base/210123 Log: remove some conditional #ifdefs (no-op on FreeBSD); run the timer routine on cpu 0. Modified: head/sys/netinet/ipfw/ip_fw_dynamic.c Modified: head/sys/netinet/ipfw/ip_fw_dynamic.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_dynamic.c Thu Jul 15 14:41:59 2010 (r210122) +++ head/sys/netinet/ipfw/ip_fw_dynamic.c Thu Jul 15 14:43:12 2010 (r210123) @@ -894,10 +894,7 @@ struct mbuf * ipfw_send_pkt(struct mbuf *replyto, struct ipfw_flow_id *id, u_int32_t seq, u_int32_t ack, int flags) { -#ifndef __FreeBSD__ - return NULL; -#else - struct mbuf *m; + struct mbuf *m = NULL; /* stupid compiler */ int len, dir; struct ip *h = NULL; /* stupid compiler */ #ifdef INET6 @@ -1033,7 +1030,6 @@ ipfw_send_pkt(struct mbuf *replyto, stru } return (m); -#endif /* __FreeBSD__ */ } /* @@ -1131,8 +1127,8 @@ ipfw_tick(void * vnetx) } #endif done: - callout_reset(&V_ipfw_timeout, V_dyn_keepalive_period * hz, - ipfw_tick, vnetx); + callout_reset_on(&V_ipfw_timeout, V_dyn_keepalive_period * hz, + ipfw_tick, vnetx, 0); CURVNET_RESTORE(); } @@ -1173,7 +1169,7 @@ ipfw_dyn_init(void) V_dyn_max = 4096; /* max # of dynamic rules */ callout_init(&V_ipfw_timeout, CALLOUT_MPSAFE); - callout_reset(&V_ipfw_timeout, hz, ipfw_tick, curvnet); + callout_reset_on(&V_ipfw_timeout, hz, ipfw_tick, curvnet, 0); } void From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 15:03:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E8E0106564A; Thu, 15 Jul 2010 15:03:31 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3EDCD8FC19; Thu, 15 Jul 2010 15:03:31 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:c197:bb60:d1b9:bf2e] (unknown [IPv6:2001:7b8:3a7:0:c197:bb60:d1b9:bf2e]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 263C15C59; Thu, 15 Jul 2010 17:03:30 +0200 (CEST) Message-ID: <4C3F2342.1030706@andric.com> Date: Thu, 15 Jul 2010 17:03:30 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.8pre) Gecko/20100713 Lanikai/3.1.2pre MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <201007150311.o6F3B4bZ061614@svn.freebsd.org> <4C3EEEFB.8020902@andric.com> <86630g4y61.fsf@ds4.des.no> In-Reply-To: <86630g4y61.fsf@ds4.des.no> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org Subject: Re: svn commit: r210103 - head/lib/liblzma X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 15:03:31 -0000 On 2010-07-15 16:28, Dag-Erling Sm=C3=B8rgrav wrote: > Misaligned accesses, especially writes, are slow on all architectures -= > but Marcel knows this, so I guess he has a reason for doing it this way= ? I did some unscientific tests here, on an i386 box, and it did not turn out to make too much difference, if at all. I repeatedly compressed a tar file containing an svn export of head (~537 MiB), using an 'aligned' xz and an 'unaligned' one: $ for i in 1 2 3 4 5; do time xz-aligned -z -9 -c test.tar > /dev/null; d= one real 8m42.535s user 8m27.231s sys 0m14.375s real 8m39.049s user 8m25.645s sys 0m12.686s real 9m53.560s user 9m30.045s sys 0m22.208s real 8m49.051s user 8m29.796s sys 0m18.200s real 8m35.901s user 8m18.468s sys 0m16.705s $ for i in 1 2 3 4 5; do time xz-unaligned -z -9 -c test.tar > /dev/null;= done real 8m36.547s user 8m20.673s sys 0m15.016s real 8m43.048s user 8m26.418s sys 0m15.627s real 8m40.850s user 8m24.624s sys 0m15.401s real 8m33.000s user 8m15.823s sys 0m16.547s real 8m37.786s user 8m21.952s sys 0m14.983s I don't see too much difference, except one weird outlier; that was probably caused by something else running concurrently on the system. Maybe there is more difference when you use some other type of data, such as less-compressible files, or a much larger set, but I did not test that. From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 16:25:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A73A1106564A; Thu, 15 Jul 2010 16:25:51 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E0878FC08; Thu, 15 Jul 2010 16:25:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FGPpvA038541; Thu, 15 Jul 2010 16:25:51 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FGPp0D038539; Thu, 15 Jul 2010 16:25:51 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201007151625.o6FGPp0D038539@svn.freebsd.org> From: Alan Cox Date: Thu, 15 Jul 2010 16:25:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210124 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 16:25:51 -0000 Author: alc Date: Thu Jul 15 16:25:51 2010 New Revision: 210124 URL: http://svn.freebsd.org/changeset/base/210124 Log: Optimize pmap_remove()'s handling of PG_G mappings. Specifically, instead of calling pmap_invalidate_page() for each PG_G mapping, call pmap_invalidate_range() for each range of PG_G mappings. In addition, eliminate a redundant call to pmap_invalidate_page(). Both pmap_remove_pte() and pmap_remove_page() called pmap_invalidate_page() when the mapping had the PG_G attribute. Now, only pmap_remove_page() calls pmap_invalidate_page(). Altogether, these changes eliminate 53% of the TLB shootdowns for a "buildworld" on a ZFS file system. On FFS, the reduction is 3%. MFC after: 6 weeks Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Thu Jul 15 14:43:12 2010 (r210123) +++ head/sys/amd64/amd64/pmap.c Thu Jul 15 16:25:51 2010 (r210124) @@ -2602,12 +2602,6 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t oldpte = pte_load_clear(ptq); if (oldpte & PG_W) pmap->pm_stats.wired_count -= 1; - /* - * Machines that don't support invlpg, also don't support - * PG_G. - */ - if (oldpte & PG_G) - pmap_invalidate_page(kernel_pmap, va); pmap_resident_count_dec(pmap, 1); if (oldpte & PG_MANAGED) { m = PHYS_TO_VM_PAGE(oldpte & PG_FRAME); @@ -2647,7 +2641,7 @@ pmap_remove_page(pmap_t pmap, vm_offset_ void pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { - vm_offset_t va_next; + vm_offset_t va, va_next; pml4_entry_t *pml4e; pdp_entry_t *pdpe; pd_entry_t ptpaddr, *pde; @@ -2748,20 +2742,27 @@ pmap_remove(pmap_t pmap, vm_offset_t sva if (va_next > eva) va_next = eva; + va = va_next; for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++, sva += PAGE_SIZE) { - if (*pte == 0) + if (*pte == 0) { + if (va != va_next) { + pmap_invalidate_range(pmap, va, sva); + va = va_next; + } continue; - - /* - * The TLB entry for a PG_G mapping is invalidated - * by pmap_remove_pte(). - */ + } if ((*pte & PG_G) == 0) anyvalid = 1; - if (pmap_remove_pte(pmap, pte, sva, ptpaddr, &free)) + else if (va == va_next) + va = sva; + if (pmap_remove_pte(pmap, pte, sva, ptpaddr, &free)) { + sva += PAGE_SIZE; break; + } } + if (va != va_next) + pmap_invalidate_range(pmap, va, sva); } out: if (anyvalid) From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 16:32:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E425106566B; Thu, 15 Jul 2010 16:32:59 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 554788FC19; Thu, 15 Jul 2010 16:32:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FGWxpW040125; Thu, 15 Jul 2010 16:32:59 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FGWxEr040122; Thu, 15 Jul 2010 16:32:59 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201007151632.o6FGWxEr040122@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 15 Jul 2010 16:32:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210125 - head/release/picobsd/qemu X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 16:32:59 -0000 Author: luigi Date: Thu Jul 15 16:32:59 2010 New Revision: 210125 URL: http://svn.freebsd.org/changeset/base/210125 Log: add some modern stuff: SMP, SCHED_ULE, PREEMPTION and support for VIMAGE Modified: head/release/picobsd/qemu/PICOBSD head/release/picobsd/qemu/crunch.conf Modified: head/release/picobsd/qemu/PICOBSD ============================================================================== --- head/release/picobsd/qemu/PICOBSD Thu Jul 15 16:25:51 2010 (r210124) +++ head/release/picobsd/qemu/PICOBSD Thu Jul 15 16:32:59 2010 (r210125) @@ -19,10 +19,12 @@ cpu I586_CPU cpu I686_CPU ident PICOBSD -#options SMP -#device apic +# SMP seems to be needed for kern_et +options SMP +device apic -options SCHED_4BSD # mandatory to have one scheduler +options SCHED_ULE # mandatory to have one scheduler +options PREEMPTION # needed for decent interrupt processing #options MATH_EMULATE #Support for x87 emulation options INET #InterNETworking #options INET6 @@ -115,6 +117,7 @@ device md # Memory "disks" #device faith 1 # IPv6-to-IPv4 relaying (translation) device tap +#options VIMAGE # soner or later we may want to test this #options DEVICE_POLLING # The `bpf' device enables the Berkeley Packet Filter. Modified: head/release/picobsd/qemu/crunch.conf ============================================================================== --- head/release/picobsd/qemu/crunch.conf Thu Jul 15 16:25:51 2010 (r210124) +++ head/release/picobsd/qemu/crunch.conf Thu Jul 15 16:32:59 2010 (r210125) @@ -133,6 +133,7 @@ libs_so -lalias # natd progs tcpdump special tcpdump srcdir /usr/src/usr.sbin/tcpdump/tcpdump libs_so -lpcap # used by tcpdump +libs_so -lcrypto # used by tcpdump with inet6 # ppp is rather large. Note that as of Jan.01, RELEASE_CRUNCH # makes ppp not use libalias, so you cannot have aliasing. @@ -158,6 +159,9 @@ progs sed progs date progs time progs ping +progs ping6 +progs tar + #progs routed progs ipfw progs traceroute @@ -174,6 +178,8 @@ ln mount_cd9660 cd9660 # ln mount_msdosfs msdos # For a small ssh client/server use dropbear +progs jail jexec jls # why not... + # Now the libraries libs_so -lc # the C library @@ -189,3 +195,6 @@ libs_so -lz libs_so -lbsdxml libs_so -lsbuf libs_so -ljail # used by ifconfig +libs_so -lipsec -lmd # used with ipv6 +libs_so -larchive -lbz2 +libs_so -llzma # added after 207840 From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 16:39:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79AE01065670; Thu, 15 Jul 2010 16:39:17 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50BE48FC08; Thu, 15 Jul 2010 16:39:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FGdHNS041536; Thu, 15 Jul 2010 16:39:17 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FGdHdA041534; Thu, 15 Jul 2010 16:39:17 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007151639.o6FGdHdA041534@svn.freebsd.org> From: "Jayachandran C." Date: Thu, 15 Jul 2010 16:39:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210126 - head/sys/mips/rmi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 16:39:17 -0000 Author: jchandra Date: Thu Jul 15 16:39:17 2010 New Revision: 210126 URL: http://svn.freebsd.org/changeset/base/210126 Log: Fix for 64 bit compilation. RMI bootloader passes argv[] and envp[] as an array of 32 bit pointers. Convert the pointers to correct pointer type before use. Modified: head/sys/mips/rmi/xlr_machdep.c Modified: head/sys/mips/rmi/xlr_machdep.c ============================================================================== --- head/sys/mips/rmi/xlr_machdep.c Thu Jul 15 16:32:59 2010 (r210125) +++ head/sys/mips/rmi/xlr_machdep.c Thu Jul 15 16:39:17 2010 (r210126) @@ -89,7 +89,7 @@ struct boot1_info xlr_boot1_info; struct xlr_loader_info xlr_loader_info; /* FIXME : Unused */ int xlr_run_mode; int xlr_argc; -char **xlr_argv, **xlr_envp; +int32_t *xlr_argv, *xlr_envp; uint64_t cpu_mask_info; uint32_t xlr_online_cpumask; uint32_t xlr_core_cpu_mask = 0x1; /* Core 0 thread 0 is always there */ @@ -298,8 +298,11 @@ platform_start(__register_t a0 __unused, xlr_online_cpumask = read_c0_register32(MIPS_COP_0_OSSCRATCH, 2); xlr_run_mode = read_c0_register32(MIPS_COP_0_OSSCRATCH, 3); xlr_argc = read_c0_register32(MIPS_COP_0_OSSCRATCH, 4); - xlr_argv = (char **)(intptr_t)(int)read_c0_register32(MIPS_COP_0_OSSCRATCH, 5); - xlr_envp = (char **)(intptr_t)(int)read_c0_register32(MIPS_COP_0_OSSCRATCH, 6); + /* + * argv and envp are passed in array of 32bit pointers + */ + xlr_argv = (int32_t *)(intptr_t)(int)read_c0_register32(MIPS_COP_0_OSSCRATCH, 5); + xlr_envp = (int32_t *)(intptr_t)(int)read_c0_register32(MIPS_COP_0_OSSCRATCH, 6); /* TODO: Verify the magic number here */ /* FIXMELATER: xlr_boot1_info.magic_number */ @@ -331,14 +334,15 @@ platform_start(__register_t a0 __unused, if (xlr_argc == 1) printf("\tNone\n"); for (i = 1; i < xlr_argc; i++) { - char *n; + char *n, *arg; - printf("\t%s\n", xlr_argv[i]); - n = strsep(&xlr_argv[i], "="); - if (xlr_argv[i] == NULL) + arg = (char *)(intptr_t)xlr_argv[i]; + printf("\t%s\n", arg); + n = strsep(&arg, "="); + if (arg == NULL) setenv(n, "1"); else - setenv(n, xlr_argv[i]); + setenv(n, arg); } xlr_set_boot_flags(); From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 17:11:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 610601065678; Thu, 15 Jul 2010 17:11:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 377418FC1E; Thu, 15 Jul 2010 17:11:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FHBoEK048916; Thu, 15 Jul 2010 17:11:50 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FHBoJC048914; Thu, 15 Jul 2010 17:11:50 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007151711.o6FHBoJC048914@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 15 Jul 2010 17:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210129 - head/sys/dev/acpica/Osd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 17:11:50 -0000 Author: jkim Date: Thu Jul 15 17:11:49 2010 New Revision: 210129 URL: http://svn.freebsd.org/changeset/base/210129 Log: - AcpiOsReadMemory() needs similar fixes as r209965. [1] According to ACPICA User Guide and Programmer Reference, the read data must be zero extended to fill the 32-bit return value even if the bit width of the port is less than 32. - Remove 64-bit read/write from AcpiOsReadMemory() and AcpiOsWriteMemory(). These functions do not support 64-bit access (yet). Clean up style nits and unnecessary bit masking while I am here. Reported by: Liu, Jinsong (jinsong dot liu at intel dot com) via Lin Ming (ming dot m dot lin at intel dot com) [1] Modified: head/sys/dev/acpica/Osd/OsdMemory.c Modified: head/sys/dev/acpica/Osd/OsdMemory.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdMemory.c Thu Jul 15 17:07:12 2010 (r210128) +++ head/sys/dev/acpica/Osd/OsdMemory.c Thu Jul 15 17:11:49 2010 (r210129) @@ -103,19 +103,13 @@ AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS A switch (Width) { case 8: - *(u_int8_t *)Value = (*(volatile u_int8_t *)LogicalAddress); + *Value = *(volatile uint8_t *)LogicalAddress; break; case 16: - *(u_int16_t *)Value = (*(volatile u_int16_t *)LogicalAddress); + *Value = *(volatile uint16_t *)LogicalAddress; break; case 32: - *(u_int32_t *)Value = (*(volatile u_int32_t *)LogicalAddress); - break; - case 64: - *(u_int64_t *)Value = (*(volatile u_int64_t *)LogicalAddress); - break; - default: - /* debug trap goes here */ + *Value = *(volatile uint32_t *)LogicalAddress; break; } @@ -135,19 +129,13 @@ AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS switch (Width) { case 8: - (*(volatile u_int8_t *)LogicalAddress) = Value & 0xff; + *(volatile uint8_t *)LogicalAddress = Value; break; case 16: - (*(volatile u_int16_t *)LogicalAddress) = Value & 0xffff; + *(volatile uint16_t *)LogicalAddress = Value; break; case 32: - (*(volatile u_int32_t *)LogicalAddress) = Value & 0xffffffff; - break; - case 64: - (*(volatile u_int64_t *)LogicalAddress) = Value; - break; - default: - /* debug trap goes here */ + *(volatile uint32_t *)LogicalAddress = Value; break; } From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 17:49:36 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53D09106568C; Thu, 15 Jul 2010 17:49:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 299068FC2F; Thu, 15 Jul 2010 17:49:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FHna3l057351; Thu, 15 Jul 2010 17:49:36 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FHnaUI057347; Thu, 15 Jul 2010 17:49:36 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007151749.o6FHnaUI057347@svn.freebsd.org> From: Alexander Motin Date: Thu, 15 Jul 2010 17:49:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210131 - in head/sys: amd64/include i386/include sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 17:49:36 -0000 Author: mav Date: Thu Jul 15 17:49:35 2010 New Revision: 210131 URL: http://svn.freebsd.org/changeset/base/210131 Log: Move functions declaration to MI code, following implementation. Modified: head/sys/amd64/include/clock.h head/sys/i386/include/clock.h head/sys/sys/systm.h Modified: head/sys/amd64/include/clock.h ============================================================================== --- head/sys/amd64/include/clock.h Thu Jul 15 17:46:21 2010 (r210130) +++ head/sys/amd64/include/clock.h Thu Jul 15 17:49:35 2010 (r210131) @@ -23,11 +23,6 @@ extern int tsc_is_invariant; void i8254_init(void); -struct trapframe; - -int hardclockintr(struct trapframe *frame); -int statclockintr(struct trapframe *frame); - /* * Driver to clock driver interface. */ Modified: head/sys/i386/include/clock.h ============================================================================== --- head/sys/i386/include/clock.h Thu Jul 15 17:46:21 2010 (r210130) +++ head/sys/i386/include/clock.h Thu Jul 15 17:49:35 2010 (r210131) @@ -23,11 +23,6 @@ extern int tsc_is_invariant; void i8254_init(void); -struct trapframe; - -int hardclockintr(struct trapframe *frame); -int statclockintr(struct trapframe *frame); - /* * Driver to clock driver interface. */ Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Thu Jul 15 17:46:21 2010 (r210130) +++ head/sys/sys/systm.h Thu Jul 15 17:49:35 2010 (r210131) @@ -140,6 +140,7 @@ struct tty; struct ucred; struct uio; struct _jmp_buf; +struct trapframe; int setjmp(struct _jmp_buf *); void longjmp(struct _jmp_buf *, int) __dead2; @@ -243,6 +244,9 @@ void profclock(int usermode, uintfptr_t void timer1clock(int usermode, uintfptr_t pc); void timer2clock(int usermode, uintfptr_t pc); +int hardclockintr(struct trapframe *frame); +int statclockintr(struct trapframe *frame); + void startprofclock(struct proc *); void stopprofclock(struct proc *); void cpu_startprofclock(void); From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 18:44:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AFDB1065673; Thu, 15 Jul 2010 18:44:59 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49E348FC0C; Thu, 15 Jul 2010 18:44:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FIixEu069733; Thu, 15 Jul 2010 18:44:59 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FIixDP069732; Thu, 15 Jul 2010 18:44:59 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007151844.o6FIixDP069732@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 15 Jul 2010 18:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210132 - head/sys/compat/svr4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 18:44:59 -0000 Author: trasz Date: Thu Jul 15 18:44:58 2010 New Revision: 210132 URL: http://svn.freebsd.org/changeset/base/210132 Log: Make svr4(4) version of poll(2) use the same limit of file descriptors as the usual poll(2) does, instead of checking resource limits. Modified: head/sys/compat/svr4/svr4_filio.c Modified: head/sys/compat/svr4/svr4_filio.c ============================================================================== --- head/sys/compat/svr4/svr4_filio.c Thu Jul 15 17:49:35 2010 (r210131) +++ head/sys/compat/svr4/svr4_filio.c Thu Jul 15 18:44:58 2010 (r210132) @@ -40,8 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include @@ -67,8 +65,7 @@ svr4_sys_poll(td, uap) u_long siz; PROC_LOCK(td->td_proc); - if (uap->nfds > lim_cur(td->td_proc, RLIMIT_NOFILE) && - uap->nfds > FD_SETSIZE) { + if (uap->nfds > maxfilesperproc && uap->nfds > FD_SETSIZE) { PROC_UNLOCK(td->td_proc); return (EINVAL); } From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 19:21:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37ACF1065677; Thu, 15 Jul 2010 19:21:08 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25B9D8FC14; Thu, 15 Jul 2010 19:21:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FJL8UN077844; Thu, 15 Jul 2010 19:21:08 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FJL8AP077842; Thu, 15 Jul 2010 19:21:08 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201007151921.o6FJL8AP077842@svn.freebsd.org> From: Jamie Gritton Date: Thu, 15 Jul 2010 19:21:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210133 - head/lib/libjail X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 19:21:08 -0000 Author: jamie Date: Thu Jul 15 19:21:07 2010 New Revision: 210133 URL: http://svn.freebsd.org/changeset/base/210133 Log: Don't import parameter values in jail_getv, except for the search key. Remove the internal jailparam_vlist, in favor of using variants of its logic separately in jail_setv and jail_getv. Free the temporary parameter list and exported values in jail_setv and jail_getv. Noted by: Stanislav Uzunchev MFC after: 3 days Modified: head/lib/libjail/jail.c Modified: head/lib/libjail/jail.c ============================================================================== --- head/lib/libjail/jail.c Thu Jul 15 18:44:58 2010 (r210132) +++ head/lib/libjail/jail.c Thu Jul 15 19:21:07 2010 (r210133) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); static int jailparam_import_enum(const char **values, int nvalues, const char *valstr, size_t valsize, int *value); -static int jailparam_vlist(struct jailparam **jpp, va_list ap); static int jailparam_type(struct jailparam *jp); static char *noname(const char *name); static char *nononame(const char *name); @@ -74,16 +73,31 @@ static const char *jailsys_values[] = { int jail_setv(int flags, ...) { - va_list ap; + va_list ap, tap; struct jailparam *jp; - int njp; + const char *name, *value; + int njp, jid; + /* Create the parameter list and import the parameters. */ va_start(ap, flags); - njp = jailparam_vlist(&jp, ap); + va_copy(tap, ap); + for (njp = 0; va_arg(tap, char *) != NULL; njp++) + (void)va_arg(tap, char *); + va_end(tap); + jp = alloca(njp * sizeof(struct jailparam)); + for (njp = 0; (name = va_arg(ap, char *)) != NULL; njp++) { + value = va_arg(ap, char *); + if (jailparam_init(jp + njp, name) < 0 || + jailparam_import(jp + njp, value) < 0) { + jailparam_free(jp, njp); + va_end(ap); + return (-1); + } + } va_end(ap); - if (njp < 0) - return (njp); - return (jailparam_set(jp, njp, flags)); + jid = jailparam_set(jp, njp, flags); + jailparam_free(jp, njp); + return (jid); } /* @@ -94,48 +108,85 @@ int jail_getv(int flags, ...) { va_list ap, tap; - struct jailparam *jp; - char *valarg; - const char *value; - int njp, i, jid, namekey, zero; + struct jailparam *jp, *jp_lastjid, *jp_jid, *jp_name, *jp_key; + char *valarg, *value; + const char *name, *key_value, *lastjid_value, *jid_value, *name_value; + int njp, i, jid; + /* Create the parameter list and find the key. */ va_start(ap, flags); va_copy(tap, ap); - njp = jailparam_vlist(&jp, tap); + for (njp = 0; va_arg(tap, char *) != NULL; njp++) + (void)va_arg(tap, char *); va_end(tap); - if (njp < 0) - return (njp); - /* - * See if the name is the search key. If so, we don't want to write - * it back in case it's a read-only string. - */ - namekey = 1; - zero = 0; - for (i = 0; i < njp; i++) { - if (!strcmp(jp->jp_name, "lastjid") || - (!strcmp(jp->jp_name, "jid") && - memcmp(jp->jp_value, &zero, sizeof(zero)))) - namekey = 0; + + jp = alloca(njp * sizeof(struct jailparam)); + va_copy(tap, ap); + jp_lastjid = jp_jid = jp_name = NULL; + lastjid_value = jid_value = name_value = NULL; + for (njp = 0; (name = va_arg(tap, char *)) != NULL; njp++) { + value = va_arg(tap, char *); + if (jailparam_init(jp + njp, name) < 0) { + va_end(tap); + goto error; + } + if (!strcmp(jp[njp].jp_name, "lastjid")) { + jp_lastjid = jp + njp; + lastjid_value = value; + } else if (!strcmp(jp[njp].jp_name, "jid")) { + jp_jid = jp + njp; + jid_value = value; + } if (!strcmp(jp[njp].jp_name, "name")) { + jp_name = jp + njp; + name_value = value; + } } - jid = jailparam_get(jp, njp, flags); - if (jid < 0) { - va_end(ap); - return (-1); + va_end(tap); + /* Import the key parameter. */ + if (jp_lastjid != NULL) { + jp_key = jp_lastjid; + key_value = lastjid_value; + } else if (jp_jid != NULL && strtol(jid_value, NULL, 10) != 0) { + jp_key = jp_jid; + key_value = jid_value; + } else if (jp_name != NULL) { + jp_key = jp_name; + key_value = name_value; + } else { + strlcpy(jail_errmsg, "no jail specified", JAIL_ERRMSGLEN); + errno = ENOENT; + goto error; } + if (jailparam_import(jp_key, key_value) < 0) + goto error; + /* Get the jail and export the parameters. */ + jid = jailparam_get(jp, njp, flags); + if (jid < 0) + goto error; for (i = 0; i < njp; i++) { (void)va_arg(ap, char *); - value = jailparam_export(jp + i); - if (value == NULL) { - va_end(ap); - return (-1); - } valarg = va_arg(ap, char *); - if (!namekey || strcmp(jp[i].jp_name, "name")) + if (jp + i != jp_key) { /* It's up to the caller to ensure there's room. */ - strcpy(valarg, value); + if ((jp[i].jp_ctltype & CTLTYPE) == CTLTYPE_STRING) + strcpy(valarg, jp[i].jp_value); + else { + value = jailparam_export(jp + i); + if (value == NULL) + goto error; + strcpy(valarg, value); + free(value); + } + } } + jailparam_free(jp, njp); va_end(ap); return (jid); + + error: + jailparam_free(jp, njp); + va_end(ap); + return (-1); } /* @@ -794,41 +845,6 @@ jailparam_free(struct jailparam *jp, uns } /* - * Create and import an array of jail parameters, given a list of name and - * value strings, terminated by a null name. - */ -static int -jailparam_vlist(struct jailparam **jpp, va_list ap) -{ - va_list tap; - struct jailparam *jp; - char *name, *value; - int njp; - - va_copy(tap, ap); - for (njp = 0; va_arg(tap, char *) != NULL; njp++) - (void)va_arg(tap, char *); - va_end(tap); - jp = calloc(njp, sizeof(struct jailparam)); - if (jp == NULL) { - strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN); - return (-1); - } - - for (njp = 0; (name = va_arg(ap, char *)) != NULL; njp++) { - value = va_arg(ap, char *); - if (jailparam_init(jp + njp, name) < 0 || - jailparam_import(jp + njp, value) < 0) { - jailparam_free(jp, njp); - free(jp); - return (-1); - } - } - *jpp = jp; - return (njp); -} - -/* * Find a parameter's type and size from its MIB. */ static int From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 19:21:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7CB4106566B; Thu, 15 Jul 2010 19:21:33 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6F938FC16; Thu, 15 Jul 2010 19:21:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FJLXdk077976; Thu, 15 Jul 2010 19:21:33 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FJLX3H077974; Thu, 15 Jul 2010 19:21:33 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201007151921.o6FJLX3H077974@svn.freebsd.org> From: Jamie Gritton Date: Thu, 15 Jul 2010 19:21:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210134 - head/lib/libjail X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 19:21:34 -0000 Author: jamie Date: Thu Jul 15 19:21:33 2010 New Revision: 210134 URL: http://svn.freebsd.org/changeset/base/210134 Log: Don't copy and return a potentially unset buffer when jail_get fails. Modified: head/lib/libjail/jail_getid.c Modified: head/lib/libjail/jail_getid.c ============================================================================== --- head/lib/libjail/jail_getid.c Thu Jul 15 19:21:07 2010 (r210133) +++ head/lib/libjail/jail_getid.c Thu Jul 15 19:21:33 2010 (r210134) @@ -94,11 +94,15 @@ jail_getname(int jid) jiov[5].iov_len = JAIL_ERRMSGLEN; jail_errmsg[0] = 0; jid = jail_get(jiov, 6, 0); - if (jid < 0 && !jail_errmsg[0]) - snprintf(jail_errmsg, JAIL_ERRMSGLEN, "jail_get: %s", - strerror(errno)); - name = strdup(namebuf); - if (name == NULL) - strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN); + if (jid < 0) { + if (!jail_errmsg[0]) + snprintf(jail_errmsg, JAIL_ERRMSGLEN, "jail_get: %s", + strerror(errno)); + return NULL; + } else { + name = strdup(namebuf); + if (name == NULL) + strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN); + } return name; } From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 19:21:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFA041065680; Thu, 15 Jul 2010 19:21:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE65E8FC0A; Thu, 15 Jul 2010 19:21:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FJLmBO078076; Thu, 15 Jul 2010 19:21:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FJLmRR078074; Thu, 15 Jul 2010 19:21:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007151921.o6FJLmRR078074@svn.freebsd.org> From: John Baldwin Date: Thu, 15 Jul 2010 19:21:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210135 - head/sys/fs/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 19:21:48 -0000 Author: jhb Date: Thu Jul 15 19:21:48 2010 New Revision: 210135 URL: http://svn.freebsd.org/changeset/base/210135 Log: Merge 208603, 209946, and 209948 to the new NFS client: Move attribute cache flushes from VOP_OPEN() to VOP_LOOKUP() to provide more graceful recovery for stale filehandles and eliminate the need for conditionally clearing the attribute cache in the !NMODIFIED case in VOP_OPEN(). Reviewed by: rmacklem MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Thu Jul 15 19:21:33 2010 (r210134) +++ head/sys/fs/nfsclient/nfs_clvnops.c Thu Jul 15 19:21:48 2010 (r210135) @@ -505,9 +505,11 @@ nfs_open(struct vop_open_args *ap) (void) nfsrpc_close(vp, 0, ap->a_td); return (error); } + mtx_lock(&np->n_mtx); np->n_attrstamp = 0; if (vp->v_type == VDIR) np->n_direofoffset = 0; + mtx_unlock(&np->n_mtx); error = VOP_GETATTR(vp, &vattr, ap->a_cred); if (error) { if (NFS_ISV4(vp)) @@ -520,14 +522,6 @@ nfs_open(struct vop_open_args *ap) np->n_change = vattr.va_filerev; mtx_unlock(&np->n_mtx); } else { - struct thread *td = curthread; - - if (np->n_ac_ts_syscalls != td->td_syscalls || - np->n_ac_ts_tid != td->td_tid || - td->td_proc == NULL || - np->n_ac_ts_pid != td->td_proc->p_pid) { - np->n_attrstamp = 0; - } mtx_unlock(&np->n_mtx); error = VOP_GETATTR(vp, &vattr, ap->a_cred); if (error) { @@ -987,7 +981,7 @@ nfs_lookup(struct vop_lookup_args *ap) int flags = cnp->cn_flags; struct vnode *newvp; struct nfsmount *nmp; - struct nfsnode *np; + struct nfsnode *np, *newnp; int error = 0, attrflag, dattrflag, ltype; struct thread *td = cnp->cn_thread; struct nfsfh *nfhp; @@ -1023,11 +1017,27 @@ nfs_lookup(struct vop_lookup_args *ap) * change time of the file matches our cached copy. * Otherwise, we discard the cache entry and fallback * to doing a lookup RPC. + * + * To better handle stale file handles and attributes, + * clear the attribute cache of this node if it is a + * leaf component, part of an open() call, and not + * locally modified before fetching the attributes. + * This should allow stale file handles to be detected + * here where we can fall back to a LOOKUP RPC to + * recover rather than having nfs_open() detect the + * stale file handle and failing open(2) with ESTALE. */ newvp = *vpp; + newnp = VTONFS(newvp); + if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && + !(newnp->n_flag & NMODIFIED)) { + mtx_lock(&newnp->n_mtx); + newnp->n_attrstamp = 0; + mtx_unlock(&newnp->n_mtx); + } if (nfscl_nodeleg(newvp, 0) == 0 || - (!VOP_GETATTR(newvp, &vattr, cnp->cn_cred) - && vattr.va_ctime.tv_sec == VTONFS(newvp)->n_ctime)) { + (VOP_GETATTR(newvp, &vattr, cnp->cn_cred) == 0 && + vattr.va_ctime.tv_sec == newnp->n_ctime)) { NFSINCRGLOBAL(newnfsstats.lookupcache_hits); if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN)) @@ -1213,6 +1223,18 @@ nfs_lookup(struct vop_lookup_args *ap) if (attrflag) (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, 0, 1); + else if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && + !(np->n_flag & NMODIFIED)) { + /* + * Flush the attribute cache when opening a + * leaf node to ensure that fresh attributes + * are fetched in nfs_open() since we did not + * fetch attributes from the LOOKUP reply. + */ + mtx_lock(&np->n_mtx); + np->n_attrstamp = 0; + mtx_unlock(&np->n_mtx); + } } if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN)) cnp->cn_flags |= SAVENAME; From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 19:40:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E61031065680; Thu, 15 Jul 2010 19:40:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D46478FC1A; Thu, 15 Jul 2010 19:40:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FJemnN082326; Thu, 15 Jul 2010 19:40:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FJemFP082321; Thu, 15 Jul 2010 19:40:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007151940.o6FJemFP082321@svn.freebsd.org> From: John Baldwin Date: Thu, 15 Jul 2010 19:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210136 - in head/sys: fs/nfsclient nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 19:40:49 -0000 Author: jhb Date: Thu Jul 15 19:40:48 2010 New Revision: 210136 URL: http://svn.freebsd.org/changeset/base/210136 Log: Retire the NFS access cache timestamp structure. It was used in VOP_OPEN() to avoid sending multiple ACCESS/GETATTR RPCs during a single open() between VOP_LOOKUP() and VOP_OPEN(). Now we always send the RPC in VOP_LOOKUP() and not VOP_OPEN() in the cases that multiple RPCs could be sent. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/nfsclient/nfsnode.h head/sys/nfsclient/nfs_subs.c head/sys/nfsclient/nfsnode.h Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Thu Jul 15 19:21:48 2010 (r210135) +++ head/sys/fs/nfsclient/nfs_clport.c Thu Jul 15 19:40:48 2010 (r210136) @@ -340,7 +340,6 @@ nfscl_loadattrcache(struct vnode **vpp, struct nfsnode *np; struct nfsmount *nmp; struct timespec mtime_save; - struct thread *td = curthread; /* * If v_type == VNON it is a new node, so fill in the v_type, @@ -386,14 +385,6 @@ nfscl_loadattrcache(struct vnode **vpp, else vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; np->n_attrstamp = time_second; - /* Timestamp the NFS otw getattr fetch */ - if (td->td_proc) { - np->n_ac_ts_tid = td->td_tid; - np->n_ac_ts_pid = td->td_proc->p_pid; - np->n_ac_ts_syscalls = td->td_syscalls; - } else - bzero(&np->n_ac_ts, sizeof(struct nfs_attrcache_timestamp)); - if (vap->va_size != np->n_size) { if (vap->va_type == VREG) { if (dontshrink && vap->va_size < np->n_size) { Modified: head/sys/fs/nfsclient/nfsnode.h ============================================================================== --- head/sys/fs/nfsclient/nfsnode.h Thu Jul 15 19:21:48 2010 (r210135) +++ head/sys/fs/nfsclient/nfsnode.h Thu Jul 15 19:40:48 2010 (r210136) @@ -68,16 +68,6 @@ struct nfsdmap { #define ndm_cookies ndm_un1.ndmu3_cookies #define ndm4_cookies ndm_un1.ndmu4_cookies -#define n_ac_ts_tid n_ac_ts.nfs_ac_ts_tid -#define n_ac_ts_pid n_ac_ts.nfs_ac_ts_pid -#define n_ac_ts_syscalls n_ac_ts.nfs_ac_ts_syscalls - -struct nfs_attrcache_timestamp { - lwpid_t nfs_ac_ts_tid; - pid_t nfs_ac_ts_pid; - unsigned long nfs_ac_ts_syscalls; -}; - struct nfs_accesscache { u_int32_t mode; /* ACCESS mode cache */ uid_t uid; /* credentials having mode */ @@ -132,7 +122,6 @@ struct nfsnode { u_int32_t n_flag; /* Flag for locking.. */ int n_directio_opens; int n_directio_asyncwr; - struct nfs_attrcache_timestamp n_ac_ts; u_int64_t n_change; /* old Change attribute */ struct nfsv4node *n_v4; /* extra V4 stuff */ }; Modified: head/sys/nfsclient/nfs_subs.c ============================================================================== --- head/sys/nfsclient/nfs_subs.c Thu Jul 15 19:21:48 2010 (r210135) +++ head/sys/nfsclient/nfs_subs.c Thu Jul 15 19:40:48 2010 (r210136) @@ -470,7 +470,6 @@ nfs_loadattrcache(struct vnode **vpp, st u_short vmode; struct timespec mtime, mtime_save; int v3 = NFS_ISV3(vp); - struct thread *td = curthread; int error = 0; md = *mdp; @@ -574,14 +573,6 @@ nfs_loadattrcache(struct vnode **vpp, st vap->va_filerev = 0; } np->n_attrstamp = time_second; - /* Timestamp the NFS otw getattr fetch */ - if (td->td_proc) { - np->n_ac_ts_tid = td->td_tid; - np->n_ac_ts_pid = td->td_proc->p_pid; - np->n_ac_ts_syscalls = td->td_syscalls; - } else - bzero(&np->n_ac_ts, sizeof(struct nfs_attrcache_timestamp)); - if (vap->va_size != np->n_size) { if (vap->va_type == VREG) { if (dontshrink && vap->va_size < np->n_size) { Modified: head/sys/nfsclient/nfsnode.h ============================================================================== --- head/sys/nfsclient/nfsnode.h Thu Jul 15 19:21:48 2010 (r210135) +++ head/sys/nfsclient/nfsnode.h Thu Jul 15 19:40:48 2010 (r210136) @@ -74,16 +74,6 @@ struct nfsdmap { #define ndm_cookies ndm_un1.ndmu3_cookies #define ndm4_cookies ndm_un1.ndmu4_cookies -#define n_ac_ts_tid n_ac_ts.nfs_ac_ts_tid -#define n_ac_ts_pid n_ac_ts.nfs_ac_ts_pid -#define n_ac_ts_syscalls n_ac_ts.nfs_ac_ts_syscalls - -struct nfs_attrcache_timestamp { - lwpid_t nfs_ac_ts_tid; - pid_t nfs_ac_ts_pid; - unsigned long nfs_ac_ts_syscalls; -}; - struct nfs_accesscache { u_int32_t mode; /* ACCESS mode cache */ uid_t uid; /* credentials having mode */ @@ -140,7 +130,6 @@ struct nfsnode { uint32_t n_namelen; int n_directio_opens; int n_directio_asyncwr; - struct nfs_attrcache_timestamp n_ac_ts; }; #define n_atim n_un1.nf_atim From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 19:52:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 947B91065670; Thu, 15 Jul 2010 19:52:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 699BD8FC0A; Thu, 15 Jul 2010 19:52:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FJqtjU084992; Thu, 15 Jul 2010 19:52:55 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FJqtgH084988; Thu, 15 Jul 2010 19:52:55 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007151952.o6FJqtgH084988@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 15 Jul 2010 19:52:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210137 - head/sys/dev/acpica/Osd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 19:52:55 -0000 Author: jkim Date: Thu Jul 15 19:52:54 2010 New Revision: 210137 URL: http://svn.freebsd.org/changeset/base/210137 Log: - AcpiOsReadPciConfiguration() needs similar fixes as r209965 and r210129. According to ACPICA User Guide and Programmer Reference, the read data must be zero extended to fill the 64-bit return value even if the bit width of the location is less than 64. - Return error when 64-bit access is requested as we do not support 64-bit PCI register access (yet). XXX We may have to split it up into two 32-bit accesses if it is really required. Modified: head/sys/dev/acpica/Osd/OsdHardware.c Modified: head/sys/dev/acpica/Osd/OsdHardware.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdHardware.c Thu Jul 15 19:40:48 2010 (r210136) +++ head/sys/dev/acpica/Osd/OsdHardware.c Thu Jul 15 19:52:54 2010 (r210137) @@ -79,9 +79,6 @@ AcpiOsReadPort(ACPI_IO_ADDRESS InPort, U case 32: *Value = bus_space_read_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); break; - default: - /* debug trap goes here */ - break; } return (AE_OK); @@ -101,9 +98,6 @@ AcpiOsWritePort(ACPI_IO_ADDRESS OutPort, case 32: bus_space_write_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); break; - default: - /* debug trap goes here */ - break; } return (AE_OK); @@ -113,28 +107,15 @@ ACPI_STATUS AcpiOsReadPciConfiguration(ACPI_PCI_ID *PciId, UINT32 Register, void *Value, UINT32 Width) { - u_int32_t byte_width = Width / 8; - u_int32_t val; + + if (Width == 64) + return (AE_SUPPORT); if (!pci_cfgregopen()) return (AE_NOT_EXIST); - val = pci_cfgregread(PciId->Bus, PciId->Device, PciId->Function, Register, - byte_width); - switch (Width) { - case 8: - *(u_int8_t *)Value = val & 0xff; - break; - case 16: - *(u_int16_t *)Value = val & 0xffff; - break; - case 32: - *(u_int32_t *)Value = val; - break; - default: - /* debug trap goes here */ - break; - } + *(UINT64 *)Value = pci_cfgregread(PciId->Bus, PciId->Device, + PciId->Function, Register, Width / 8); return (AE_OK); } @@ -144,13 +125,15 @@ ACPI_STATUS AcpiOsWritePciConfiguration (ACPI_PCI_ID *PciId, UINT32 Register, UINT64 Value, UINT32 Width) { - u_int32_t byte_width = Width / 8; + + if (Width == 64) + return (AE_SUPPORT); if (!pci_cfgregopen()) return (AE_NOT_EXIST); pci_cfgregwrite(PciId->Bus, PciId->Device, PciId->Function, Register, - Value, byte_width); + Value, Width / 8); return (AE_OK); } From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 20:24:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06B751065678; Thu, 15 Jul 2010 20:24:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E95FE8FC12; Thu, 15 Jul 2010 20:24:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FKObIv092039; Thu, 15 Jul 2010 20:24:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FKObhM092035; Thu, 15 Jul 2010 20:24:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007152024.o6FKObhM092035@svn.freebsd.org> From: John Baldwin Date: Thu, 15 Jul 2010 20:24:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210138 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 20:24:38 -0000 Author: jhb Date: Thu Jul 15 20:24:37 2010 New Revision: 210138 URL: http://svn.freebsd.org/changeset/base/210138 Log: Retire td_syscalls now that it is no longer needed. Modified: head/sys/kern/kern_thread.c head/sys/kern/subr_trap.c head/sys/sys/proc.h Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Thu Jul 15 19:52:54 2010 (r210137) +++ head/sys/kern/kern_thread.c Thu Jul 15 20:24:37 2010 (r210138) @@ -96,7 +96,6 @@ thread_ctor(void *mem, int size, void *a td->td_oncpu = NOCPU; td->td_tid = alloc_unr(tid_unrhdr); - td->td_syscalls = 0; /* * Note that td_critnest begins life as 1 because the thread is not Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Thu Jul 15 19:52:54 2010 (r210137) +++ head/sys/kern/subr_trap.c Thu Jul 15 20:24:37 2010 (r210138) @@ -261,7 +261,6 @@ syscallenter(struct thread *td, struct s PCPU_INC(cnt.v_syscall); p = td->td_proc; - td->td_syscalls++; td->td_pticks = 0; if (td->td_ucred != p->p_ucred) Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Thu Jul 15 19:52:54 2010 (r210137) +++ head/sys/sys/proc.h Thu Jul 15 20:24:37 2010 (r210138) @@ -296,7 +296,6 @@ struct thread { struct mdthread td_md; /* (k) Any machine-dependent fields. */ struct td_sched *td_sched; /* (*) Scheduler-specific data. */ struct kaudit_record *td_ar; /* (k) Active audit record, if any. */ - int td_syscalls; /* per-thread syscall count (used by NFS :)) */ struct lpohead td_lprof[2]; /* (a) lock profiling objects. */ struct kdtrace_thread *td_dtrace; /* (*) DTrace-specific data. */ int td_errno; /* Error returned by last syscall. */ From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 21:56:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED34C1065670; Thu, 15 Jul 2010 21:56:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC52C8FC25; Thu, 15 Jul 2010 21:56:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FLuj4n012663; Thu, 15 Jul 2010 21:56:45 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FLuj9K012661; Thu, 15 Jul 2010 21:56:45 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007152156.o6FLuj9K012661@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 21:56:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210142 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 21:56:46 -0000 Author: imp Date: Thu Jul 15 21:56:45 2010 New Revision: 210142 URL: http://svn.freebsd.org/changeset/base/210142 Log: Better description of this file Modified: head/sys/mips/include/asmacros.h Modified: head/sys/mips/include/asmacros.h ============================================================================== --- head/sys/mips/include/asmacros.h Thu Jul 15 21:49:28 2010 (r210141) +++ head/sys/mips/include/asmacros.h Thu Jul 15 21:56:45 2010 (r210142) @@ -34,8 +34,11 @@ #include +/* + * This appears to be a verbatim copy of an old version of amd64's + * asmacros.h and has no prayer of acatually working on mips. + */ #if 0 -/* XXX too much duplication in various asm*.h's. */ /* * CNAME and HIDENAME manage the relationship between symbol names in C From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 22:28:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18BE11065675; Thu, 15 Jul 2010 22:28:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 067788FC0A; Thu, 15 Jul 2010 22:28:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FMSJBf019702; Thu, 15 Jul 2010 22:28:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FMSJi3019698; Thu, 15 Jul 2010 22:28:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007152228.o6FMSJi3019698@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 22:28:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210144 - head/usr.sbin/config X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 22:28:20 -0000 Author: imp Date: Thu Jul 15 22:28:19 2010 New Revision: 210144 URL: http://svn.freebsd.org/changeset/base/210144 Log: Put warnings out to stderr rather than stdout. MFC after: 3 days Modified: head/usr.sbin/config/config.y head/usr.sbin/config/mkmakefile.c head/usr.sbin/config/mkoptions.c Modified: head/usr.sbin/config/config.y ============================================================================== --- head/usr.sbin/config/config.y Thu Jul 15 22:15:44 2010 (r210143) +++ head/usr.sbin/config/config.y Thu Jul 15 22:28:19 2010 (r210144) @@ -365,7 +365,8 @@ newdev(char *name) struct device *np; if (finddev(&dtab, name)) { - printf("WARNING: duplicate device `%s' encountered.\n", name); + fprintf(stderr, + "WARNING: duplicate device `%s' encountered.\n", name); return; } @@ -425,7 +426,8 @@ newopt(struct opt_head *list, char *name op2 = findopt(list, name); if (op2 != NULL && !append) { - printf("WARNING: duplicate option `%s' encountered.\n", name); + fprintf(stderr, + "WARNING: duplicate option `%s' encountered.\n", name); return; } Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Thu Jul 15 22:15:44 2010 (r210143) +++ head/usr.sbin/config/mkmakefile.c Thu Jul 15 22:28:19 2010 (r210144) @@ -341,7 +341,8 @@ next: if (eq(wd, "include")) { next_quoted_word(fp, wd); if (wd == 0) { - printf("%s: missing include filename.\n", fname); + fprintf(stderr, "%s: missing include filename.\n", + fname); exit(1); } (void) snprintf(ifname, sizeof(ifname), "../../%s", wd); @@ -353,8 +354,7 @@ next: this = ns(wd); next_word(fp, wd); if (wd == 0) { - printf("%s: No type for %s.\n", - fname, this); + fprintf(stderr, "%s: No type for %s.\n", fname, this); exit(1); } tp = fl_lookup(this); @@ -381,8 +381,9 @@ next: } else if (eq(wd, "mandatory")) { mandatory = 1; } else if (!eq(wd, "optional")) { - printf("%s: %s must be optional, mandatory or standard\n", - fname, this); + fprintf(stderr, + "%s: %s must be optional, mandatory or standard\n", + fname, this); exit(1); } nextparam: @@ -395,7 +396,7 @@ nextparam: } if (eq(wd, "|")) { if (nreqs == 0) { - printf("%s: syntax error describing %s\n", + fprintf(stderr, "%s: syntax error describing %s\n", fname, this); exit(1); } @@ -410,9 +411,9 @@ nextparam: } if (eq(wd, "no-implicit-rule")) { if (compilewith == 0) { - printf("%s: alternate rule required when " - "\"no-implicit-rule\" is specified.\n", - fname); + fprintf(stderr, "%s: alternate rule required when " + "\"no-implicit-rule\" is specified.\n", + fname); } imp_rule++; goto nextparam; @@ -424,8 +425,9 @@ nextparam: if (eq(wd, "dependency")) { next_quoted_word(fp, wd); if (wd == 0) { - printf("%s: %s missing compile command string.\n", - fname, this); + fprintf(stderr, + "%s: %s missing compile command string.\n", + fname, this); exit(1); } depends = ns(wd); @@ -434,8 +436,8 @@ nextparam: if (eq(wd, "clean")) { next_quoted_word(fp, wd); if (wd == 0) { - printf("%s: %s missing clean file list.\n", - fname, this); + fprintf(stderr, "%s: %s missing clean file list.\n", + fname, this); exit(1); } clean = ns(wd); @@ -444,8 +446,9 @@ nextparam: if (eq(wd, "compile-with")) { next_quoted_word(fp, wd); if (wd == 0) { - printf("%s: %s missing compile command string.\n", - fname, this); + fprintf(stderr, + "%s: %s missing compile command string.\n", + fname, this); exit(1); } compilewith = ns(wd); @@ -454,8 +457,9 @@ nextparam: if (eq(wd, "warning")) { next_quoted_word(fp, wd); if (wd == 0) { - printf("%s: %s missing warning text string.\n", - fname, this); + fprintf(stderr, + "%s: %s missing warning text string.\n", + fname, this); exit(1); } warning = ns(wd); @@ -484,13 +488,14 @@ nextparam: goto nextparam; } if (mandatory) { - printf("%s: mandatory device \"%s\" not found\n", + fprintf(stderr, "%s: mandatory device \"%s\" not found\n", fname, wd); exit(1); } if (std) { - printf("standard entry %s has a device keyword - %s!\n", - this, wd); + fprintf(stderr, + "standard entry %s has a device keyword - %s!\n", + this, wd); exit(1); } SLIST_FOREACH(op, &opt, op_next) @@ -501,13 +506,13 @@ nextparam: doneparam: if (std == 0 && nreqs == 0) { - printf("%s: what is %s optional on?\n", + fprintf(stderr, "%s: what is %s optional on?\n", fname, this); exit(1); } if (wd) { - printf("%s: syntax error describing %s\n", + fprintf(stderr, "%s: syntax error describing %s\n", fname, this); exit(1); } @@ -687,7 +692,7 @@ do_rules(FILE *f) STAILQ_FOREACH(ftp, &ftab, f_next) { if (ftp->f_warn) - printf("WARNING: %s\n", ftp->f_warn); + fprintf(stderr, "WARNING: %s\n", ftp->f_warn); cp = (np = ftp->f_fn) + strlen(ftp->f_fn) - 1; och = *cp; if (ftp->f_flags & NO_IMPLCT_RULE) { @@ -732,7 +737,8 @@ do_rules(FILE *f) ftype = "PROFILE"; break; default: - printf("config: don't know rules for %s\n", np); + fprintf(stderr, + "config: don't know rules for %s\n", np); break; } snprintf(cmd, sizeof(cmd), Modified: head/usr.sbin/config/mkoptions.c ============================================================================== --- head/usr.sbin/config/mkoptions.c Thu Jul 15 22:15:44 2010 (r210143) +++ head/usr.sbin/config/mkoptions.c Thu Jul 15 22:28:19 2010 (r210144) @@ -77,12 +77,14 @@ options(void) } if (maxusers == 0) { - /* printf("maxusers not specified; will auto-size\n"); */ + /* fprintf(stderr, "maxusers not specified; will auto-size\n"); */ } else if (maxusers < users.u_min) { - printf("minimum of %d maxusers assumed\n", users.u_min); + fprintf(stderr, "minimum of %d maxusers assumed\n", + users.u_min); maxusers = users.u_min; } else if (maxusers > users.u_max) - printf("warning: maxusers > %d (%d)\n", users.u_max, maxusers); + fprintf(stderr, "warning: maxusers > %d (%d)\n", + users.u_max, maxusers); /* Fake MAXUSERS as an option. */ op = (struct opt *)calloc(1, sizeof(*op)); @@ -112,7 +114,7 @@ options(void) SLIST_FOREACH(ol, &otab, o_next) { if (eq(op->op_name, ol->o_name) && (ol->o_flags & OL_ALIAS)) { - printf("Mapping option %s to %s.\n", + fprintf(stderr, "Mapping option %s to %s.\n", op->op_name, ol->o_file); op->op_name = ol->o_file; break; @@ -123,7 +125,7 @@ options(void) do_option(ol->o_name); SLIST_FOREACH(op, &opt, op_next) { if (!op->op_ownfile && strncmp(op->op_name, "DEV_", 4)) { - printf("%s: unknown option \"%s\"\n", + fprintf(stderr, "%s: unknown option \"%s\"\n", PREFIX, op->op_name); exit(1); } @@ -160,7 +162,7 @@ do_option(char *name) if (value == NULL) value = ns("1"); if (oldvalue != NULL && !eq(value, oldvalue)) - printf( + fprintf(stderr, "%s: option \"%s\" redefined from %s to %s\n", PREFIX, op->op_name, oldvalue, value); @@ -218,12 +220,14 @@ do_option(char *name) if (eq(inw, ol->o_name)) break; if (!eq(inw, name) && !ol) { - printf("WARNING: unknown option `%s' removed from %s\n", - inw, file); + fprintf(stderr, + "WARNING: unknown option `%s' removed from %s\n", + inw, file); tidy++; } else if (ol != NULL && !eq(basefile, ol->o_file)) { - printf("WARNING: option `%s' moved from %s to %s\n", - inw, basefile, ol->o_file); + fprintf(stderr, + "WARNING: option `%s' moved from %s to %s\n", + inw, basefile, ol->o_file); tidy++; } else { op = (struct opt *) calloc(1, sizeof *op); @@ -312,8 +316,8 @@ check_duplicate(const char *fname, const SLIST_FOREACH(po, &otab, o_next) { if (eq(po->o_name, this)) { - printf("%s: Duplicate option %s.\n", - fname, this); + fprintf(stderr, "%s: Duplicate option %s.\n", + fname, this); exit(1); } } @@ -347,7 +351,8 @@ update_option(const char *this, char *va return; } } - printf("Compat option %s not listed in options file.\n", this); + fprintf(stderr, "Compat option %s not listed in options file.\n", + this); exit(1); } @@ -375,8 +380,8 @@ read_option_file(const char *fname, int return (1); if (val == 0) { if (flags) { - printf("%s: compat file requires two words " - "per line at %s\n", fname, this); + fprintf(stderr, "%s: compat file requires two" + " words per line at %s\n", fname, this); exit(1); } char *s = ns(this); From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 23:11:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C1FC106566B; Thu, 15 Jul 2010 23:11:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BEFE8FC12; Thu, 15 Jul 2010 23:11:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FNBpIG029805; Thu, 15 Jul 2010 23:11:51 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FNBplY029803; Thu, 15 Jul 2010 23:11:51 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007152311.o6FNBplY029803@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 15 Jul 2010 23:11:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210149 - head/sys/isa X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 23:11:51 -0000 Author: jkim Date: Thu Jul 15 23:11:51 2010 New Revision: 210149 URL: http://svn.freebsd.org/changeset/base/210149 Log: When we are not switching VTs, just mark all buffer to be updated. Modified: head/sys/isa/syscons_isa.c Modified: head/sys/isa/syscons_isa.c ============================================================================== --- head/sys/isa/syscons_isa.c Thu Jul 15 23:07:02 2010 (r210148) +++ head/sys/isa/syscons_isa.c Thu Jul 15 23:11:51 2010 (r210149) @@ -141,10 +141,16 @@ scresume(device_t dev) sc = &main_softc; + if (sc->cur_scp == NULL) + return (0); + sc->suspend_in_progress--; - if (sc->suspend_in_progress == 0) + if (sc->suspend_in_progress == 0) { if (!sc_no_suspend_vtswitch && sc_cur_scr != 0) sc_switch_scr(sc, sc_cur_scr); + else + mark_all(sc->cur_scp); + } return (0); } From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 23:24:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5071B1065676; Thu, 15 Jul 2010 23:24:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26A828FC13; Thu, 15 Jul 2010 23:24:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FNO73b032590; Thu, 15 Jul 2010 23:24:07 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FNO7gd032588; Thu, 15 Jul 2010 23:24:07 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007152324.o6FNO7gd032588@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 15 Jul 2010 23:24:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210150 - head/sys/dev/acpica X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 23:24:07 -0000 Author: jkim Date: Thu Jul 15 23:24:06 2010 New Revision: 210150 URL: http://svn.freebsd.org/changeset/base/210150 Log: If there is any pending sleep request, disallow entering S5 state. Otherwise, bad things may happen. ;-) Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Thu Jul 15 23:11:51 2010 (r210149) +++ head/sys/dev/acpica/acpi.c Thu Jul 15 23:24:06 2010 (r210150) @@ -2317,27 +2317,28 @@ acpi_ReqSleepState(struct acpi_softc *sc { #if defined(__amd64__) || defined(__i386__) struct apm_clone_data *clone; + ACPI_STATUS status; if (state < ACPI_STATE_S1 || state > ACPI_S_STATES_MAX) return (EINVAL); if (!acpi_sleep_states[state]) return (EOPNOTSUPP); - /* S5 (soft-off) should be entered directly with no waiting. */ - if (state == ACPI_STATE_S5) { - if (ACPI_SUCCESS(acpi_EnterSleepState(sc, state))) - return (0); - else - return (ENXIO); - } + ACPI_LOCK(acpi); /* If a suspend request is already in progress, just return. */ - ACPI_LOCK(acpi); if (sc->acpi_next_sstate != 0) { ACPI_UNLOCK(acpi); return (0); } + /* S5 (soft-off) should be entered directly with no waiting. */ + if (state == ACPI_STATE_S5) { + ACPI_UNLOCK(acpi); + status = acpi_EnterSleepState(sc, state); + return (ACPI_SUCCESS(status) ? 0 : ENXIO); + } + /* Record the pending state and notify all apm devices. */ sc->acpi_next_sstate = state; STAILQ_FOREACH(clone, &sc->apm_cdevs, entries) { @@ -2351,11 +2352,8 @@ acpi_ReqSleepState(struct acpi_softc *sc /* If devd(8) is not running, immediately enter the sleep state. */ if (!devctl_process_running()) { ACPI_UNLOCK(acpi); - if (ACPI_SUCCESS(acpi_EnterSleepState(sc, sc->acpi_next_sstate))) { - return (0); - } else { - return (ENXIO); - } + status = acpi_EnterSleepState(sc, state); + return (ACPI_SUCCESS(status) ? 0 : ENXIO); } /* @@ -2592,7 +2590,6 @@ acpi_EnterSleepState(struct acpi_softc * * process. This handles both the error and success cases. */ backout: - sc->acpi_next_sstate = 0; if (slp_state >= ACPI_SS_GPE_SET) { acpi_wake_prep_walk(state); sc->acpi_sstate = ACPI_STATE_S0; @@ -2603,6 +2600,7 @@ backout: DEVICE_RESUME(root_bus); if (slp_state >= ACPI_SS_SLEPT) acpi_enable_fixed_events(sc); + sc->acpi_next_sstate = 0; mtx_unlock(&Giant); From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 23:32:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB08C1065670; Thu, 15 Jul 2010 23:32:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAF9C8FC14; Thu, 15 Jul 2010 23:32:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FNWrLu034550; Thu, 15 Jul 2010 23:32:53 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FNWrbN034547; Thu, 15 Jul 2010 23:32:53 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007152332.o6FNWrbN034547@svn.freebsd.org> From: Warner Losh Date: Thu, 15 Jul 2010 23:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210151 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 23:32:54 -0000 Author: imp Date: Thu Jul 15 23:32:53 2010 New Revision: 210151 URL: http://svn.freebsd.org/changeset/base/210151 Log: Simple compatibility hacks for building on older systems where MACHINE_CPUARCH isn't defined. I believe that this will cover all options. I didn't define it in kern.mk because $M is set to MACHINE_CPUARCH and then is expanded for the genassym.o rule in kern.post.mk and kern.mk is included after this, so the expansion isn't quite right. I think this is a bug in make, but don't have the time to track it to ground (and even if I did, fixing it would require a MFC of the change to the very old systems we're targetting with this fix). Modified: head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Thu Jul 15 23:24:06 2010 (r210150) +++ head/sys/conf/kern.pre.mk Thu Jul 15 23:32:53 2010 (r210151) @@ -5,6 +5,9 @@ .include +# backwards compat option for older systems. +MACHINE_CPUARCH?=${MACHINE_ARCH:C/mipse[lb]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} + # Can be overridden by makeoptions or /etc/make.conf KERNEL_KO?= kernel KERNEL?= kernel @@ -151,6 +154,7 @@ SYSTEM_DEP+= ${LDSCRIPT} # them. MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} +MKMODULESENV+= MACHINE_CPUARCH=${MACHINE_CPUARCH} .if (${KERN_IDENT} == LINT) MKMODULESENV+= ALL_MODULES=LINT .endif Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Thu Jul 15 23:24:06 2010 (r210150) +++ head/sys/conf/kmod.mk Thu Jul 15 23:32:53 2010 (r210151) @@ -60,6 +60,9 @@ # Unload a module. # +# backwards compat option for older systems. +MACHINE_CPUARCH?=${MACHINE_ARCH:C/mipse[lb]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} + AWK?= awk KMODLOAD?= /sbin/kldload KMODUNLOAD?= /sbin/kldunload From owner-svn-src-head@FreeBSD.ORG Thu Jul 15 23:34:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4DCD1065670; Thu, 15 Jul 2010 23:34:58 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A49F58FC12; Thu, 15 Jul 2010 23:34:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6FNYwc4035063; Thu, 15 Jul 2010 23:34:58 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6FNYwq6035060; Thu, 15 Jul 2010 23:34:58 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007152334.o6FNYwq6035060@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 15 Jul 2010 23:34:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210152 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 23:34:58 -0000 Author: yongari Date: Thu Jul 15 23:34:58 2010 New Revision: 210152 URL: http://svn.freebsd.org/changeset/base/210152 Log: Use Miscellaneous Configuration Register bit definition instead of magic number. Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Thu Jul 15 23:32:53 2010 (r210151) +++ head/sys/dev/bge/if_bge.c Thu Jul 15 23:34:58 2010 (r210152) @@ -3117,7 +3117,7 @@ bge_reset(struct bge_softc *sc) * powered up in D0 uninitialized. */ if (BGE_IS_5705_PLUS(sc)) - reset |= 0x04000000; + reset |= BGE_MISCCFG_GPHY_PD_OVERRIDE; /* Issue global reset */ write_op(sc, BGE_MISC_CFG, reset); Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Thu Jul 15 23:32:53 2010 (r210151) +++ head/sys/dev/bge/if_bgereg.h Thu Jul 15 23:34:58 2010 (r210152) @@ -1823,6 +1823,7 @@ #define BGE_MISCCFG_BOARD_ID_5788 0x00010000 #define BGE_MISCCFG_BOARD_ID_5788M 0x00018000 #define BGE_MISCCFG_EPHY_IDDQ 0x00200000 +#define BGE_MISCCFG_GPHY_PD_OVERRIDE 0x04000000 #define BGE_32BITTIME_66MHZ (0x41 << 1) From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 01:44:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D06AC106564A; Fri, 16 Jul 2010 01:44:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A74058FC0C; Fri, 16 Jul 2010 01:44:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6G1in4M063588; Fri, 16 Jul 2010 01:44:49 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G1intY063586; Fri, 16 Jul 2010 01:44:49 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007160144.o6G1intY063586@svn.freebsd.org> From: Rick Macklem Date: Fri, 16 Jul 2010 01:44:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210154 - head/sys/fs/nfsserver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 01:44:49 -0000 Author: rmacklem Date: Fri Jul 16 01:44:49 2010 New Revision: 210154 URL: http://svn.freebsd.org/changeset/base/210154 Log: Delete comments related to soft clock interrupts that don't apply to the FreeBSD port of the experimental NFSv4 server. Submitted by: zack.kirsch at isilon.com MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Jul 16 00:56:17 2010 (r210153) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Jul 16 01:44:49 2010 (r210154) @@ -1015,7 +1015,6 @@ nfsrv_freedeleg(struct nfsstate *stp) /* * This function frees an open owner and all associated opens. - * Must be called with soft clock interrupts disabled. */ static void nfsrv_freeopenowner(struct nfsstate *stp, int cansleep, NFSPROC_T *p) @@ -1161,7 +1160,6 @@ nfsrv_freeallnfslocks(struct nfsstate *s /* * Free an nfslock structure. - * Must be called with soft clock interrupts disabled. */ static void nfsrv_freenfslock(struct nfslock *lop) @@ -1178,7 +1176,6 @@ nfsrv_freenfslock(struct nfslock *lop) /* * This function frees an nfslockfile structure. - * Must be called with soft clock interrupts disabled. */ static void nfsrv_freenfslockfile(struct nfslockfile *lfp) @@ -1358,11 +1355,6 @@ tryagain: } } - /* - * Since the code is manipulating lists that are also - * manipulated by nfsrv_servertimer(), soft clock interrupts - * must be masked off. - */ if (specialid == 0) { if (new_stp->ls_flags & NFSLCK_TEST) { /* @@ -1971,9 +1963,6 @@ tryagain: NFSLOCKSTATE(); /* * Get the nfsclient structure. - * Since the code is manipulating lists that are also - * manipulated by nfsrv_servertimer(), soft clock interrupts - * must be masked off. */ error = nfsrv_getclient(clientid, CLOPS_RENEW, &clp, (nfsquad_t)((u_quad_t)0), NULL, p); @@ -3176,7 +3165,6 @@ nfsrv_getlockfile(u_short flags, struct * This function adds a nfslock lock structure to the list for the associated * nfsstate and nfslockfile structures. It will be inserted after the * entry pointed at by insert_lop. - * Must be called with soft clock interrupts disabled. */ static void nfsrv_insertlock(struct nfslock *new_lop, struct nfslock *insert_lop, @@ -3228,7 +3216,6 @@ nfsrv_insertlock(struct nfslock *new_lop * are NFSLCK_READ or NFSLCK_WRITE and non-overlapping (aka POSIX style). * It always adds new_lop to the list and sometimes uses the one pointed * at by other_lopp. - * Must be called with soft clock interrupts disabled. */ static void nfsrv_updatelock(struct nfsstate *stp, struct nfslock **new_lopp, From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 03:59:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89E571065677; Fri, 16 Jul 2010 03:59:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 799168FC0C; Fri, 16 Jul 2010 03:59:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6G3xpRo093408; Fri, 16 Jul 2010 03:59:51 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G3xpn7093407; Fri, 16 Jul 2010 03:59:51 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007160359.o6G3xpn7093407@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 16 Jul 2010 03:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210155 - head/sys/dev/acpica/Osd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 03:59:51 -0000 Author: jkim Date: Fri Jul 16 03:59:50 2010 New Revision: 210155 URL: http://svn.freebsd.org/changeset/base/210155 Log: Use pmap_mapdev()/pmap_unmapdev() to map device memory instead of using AcpiOsMapMemory()/AcpiOsUnmapMemory() (-> pmap_mapbios()/pmap_unmapbios()) for AcpiOsReadMemory() and AcpiOsWriteMemory(). Although they do not sound too obvious, these functions are exclusively used to access memory mapped IO in ACPICA. Modified: head/sys/dev/acpica/Osd/OsdMemory.c Modified: head/sys/dev/acpica/Osd/OsdMemory.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdMemory.c Fri Jul 16 01:44:49 2010 (r210154) +++ head/sys/dev/acpica/Osd/OsdMemory.c Fri Jul 16 03:59:50 2010 (r210155) @@ -97,7 +97,7 @@ AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS A { void *LogicalAddress; - LogicalAddress = AcpiOsMapMemory(Address, Width / 8); + LogicalAddress = pmap_mapdev(Address, Width / 8); if (LogicalAddress == NULL) return (AE_NOT_EXIST); @@ -113,7 +113,7 @@ AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS A break; } - AcpiOsUnmapMemory(LogicalAddress, Width / 8); + pmap_unmapdev((vm_offset_t)LogicalAddress, Width / 8); return (AE_OK); } @@ -123,7 +123,7 @@ AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS { void *LogicalAddress; - LogicalAddress = AcpiOsMapMemory(Address, Width / 8); + LogicalAddress = pmap_mapdev(Address, Width / 8); if (LogicalAddress == NULL) return (AE_NOT_EXIST); @@ -139,7 +139,7 @@ AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS break; } - AcpiOsUnmapMemory(LogicalAddress, Width / 8); + pmap_unmapdev((vm_offset_t)LogicalAddress, Width / 8); return (AE_OK); } From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 04:26:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 829EE106564A; Fri, 16 Jul 2010 04:26:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 722228FC15; Fri, 16 Jul 2010 04:26:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6G4QcNl099303; Fri, 16 Jul 2010 04:26:38 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G4Qc4X099302; Fri, 16 Jul 2010 04:26:38 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201007160426.o6G4Qc4X099302@svn.freebsd.org> From: Adrian Chadd Date: Fri, 16 Jul 2010 04:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210156 - head/sys/dev/flash X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 04:26:38 -0000 Author: adrian Date: Fri Jul 16 04:26:37 2010 New Revision: 210156 URL: http://svn.freebsd.org/changeset/base/210156 Log: Fix KASSERT() messages to reflect reality. Modified: head/sys/dev/flash/mx25l.c (contents, props changed) Modified: head/sys/dev/flash/mx25l.c ============================================================================== --- head/sys/dev/flash/mx25l.c Fri Jul 16 03:59:50 2010 (r210155) +++ head/sys/dev/flash/mx25l.c Fri Jul 16 04:26:37 2010 (r210156) @@ -303,11 +303,11 @@ mx25l_read(device_t dev, off_t offset, c * Sanity checks */ KASSERT(count % sc->sc_sectorsize == 0, - ("count for BIO_WRITE is not sector size (%d bytes) aligned", + ("count for BIO_READ is not sector size (%d bytes) aligned", sc->sc_sectorsize)); KASSERT(offset % sc->sc_sectorsize == 0, - ("offset for BIO_WRITE is not sector size (%d bytes) aligned", + ("offset for BIO_READ is not sector size (%d bytes) aligned", sc->sc_sectorsize)); txBuf[0] = CMD_FAST_READ; From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 04:27:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 062031065672; Fri, 16 Jul 2010 04:27:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D09B48FC13; Fri, 16 Jul 2010 04:27:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6G4Rcx8099572; Fri, 16 Jul 2010 04:27:38 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G4RccJ099570; Fri, 16 Jul 2010 04:27:38 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007160427.o6G4RccJ099570@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 16 Jul 2010 04:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210157 - head/sys/dev/acpica/Osd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 04:27:39 -0000 Author: jkim Date: Fri Jul 16 04:27:38 2010 New Revision: 210157 URL: http://svn.freebsd.org/changeset/base/210157 Log: Simplify AcpiOsReadPort() and AcpiOsWritePort() with iodev_read_*() and iodev_write_*(). This removes unnecessary uses of temporary macros as well. There is no functional change after this (verified with md5(1) on amd64). Modified: head/sys/dev/acpica/Osd/OsdHardware.c Modified: head/sys/dev/acpica/Osd/OsdHardware.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdHardware.c Fri Jul 16 04:26:37 2010 (r210156) +++ head/sys/dev/acpica/Osd/OsdHardware.c Fri Jul 16 04:27:38 2010 (r210157) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include #include @@ -48,36 +48,21 @@ __FBSDID("$FreeBSD$"); * * In order to deal with this, we ignore resource ownership entirely, and simply * use the native I/O space accessor functionality. This is Evil, but it works. - * - * XXX use an intermediate #define for the tag/handle */ -#ifdef __i386__ -#define ACPI_BUS_SPACE_IO I386_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 -#endif -#ifdef __ia64__ -#define ACPI_BUS_SPACE_IO IA64_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 -#endif -#ifdef __amd64__ -#define ACPI_BUS_SPACE_IO AMD64_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 -#endif - ACPI_STATUS AcpiOsReadPort(ACPI_IO_ADDRESS InPort, UINT32 *Value, UINT32 Width) { switch (Width) { case 8: - *Value = bus_space_read_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); + *Value = iodev_read_1(InPort); break; case 16: - *Value = bus_space_read_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); + *Value = iodev_read_2(InPort); break; case 32: - *Value = bus_space_read_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); + *Value = iodev_read_4(InPort); break; } @@ -90,13 +75,13 @@ AcpiOsWritePort(ACPI_IO_ADDRESS OutPort, switch (Width) { case 8: - bus_space_write_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); + iodev_write_1(OutPort, Value); break; case 16: - bus_space_write_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); + iodev_write_2(OutPort, Value); break; case 32: - bus_space_write_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); + iodev_write_4(OutPort, Value); break; } From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 06:09:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C47161065670; Fri, 16 Jul 2010 06:09:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B360B8FC13; Fri, 16 Jul 2010 06:09:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6G69pS2022059; Fri, 16 Jul 2010 06:09:51 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G69p6v022058; Fri, 16 Jul 2010 06:09:51 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007160609.o6G69p6v022058@svn.freebsd.org> From: Warner Losh Date: Fri, 16 Jul 2010 06:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210158 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 06:09:51 -0000 Author: imp Date: Fri Jul 16 06:09:51 2010 New Revision: 210158 URL: http://svn.freebsd.org/changeset/base/210158 Log: Use #define for get_cyclecount rather than inline function. mips_rd_count() isn't defined in userland, and cpu.h is included there in alias_scpt.h (maybe they don't need it in the first place). Modified: head/sys/mips/include/cpu.h Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Fri Jul 16 04:27:38 2010 (r210157) +++ head/sys/mips/include/cpu.h Fri Jul 16 06:09:51 2010 (r210158) @@ -78,11 +78,7 @@ /* * A machine-independent interface to the CPU's counter. */ -static __inline uint64_t -get_cyclecount(void) -{ - return (mips_rd_count()); -} +#define get_cyclecount() mips_rd_count() #endif /* !_LOCORE */ #if defined(_KERNEL) && !defined(_LOCORE) From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 06:31:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB1F7106566C; Fri, 16 Jul 2010 06:31:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F3618FC14; Fri, 16 Jul 2010 06:31:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6G6Vbkn026815; Fri, 16 Jul 2010 06:31:37 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G6Vb5W026814; Fri, 16 Jul 2010 06:31:37 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007160631.o6G6Vb5W026814@svn.freebsd.org> From: Warner Losh Date: Fri, 16 Jul 2010 06:31:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210159 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 06:31:37 -0000 Author: imp Date: Fri Jul 16 06:31:37 2010 New Revision: 210159 URL: http://svn.freebsd.org/changeset/base/210159 Log: This file appears not to be used. Deleted: head/sys/mips/include/asmacros.h From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 06:32:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88D90106564A; Fri, 16 Jul 2010 06:32:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77E2A8FC16; Fri, 16 Jul 2010 06:32:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6G6Wc2t027089; Fri, 16 Jul 2010 06:32:38 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G6WcL7027087; Fri, 16 Jul 2010 06:32:38 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007160632.o6G6WcL7027087@svn.freebsd.org> From: Warner Losh Date: Fri, 16 Jul 2010 06:32:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210160 - head/sys/netinet/libalias X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 06:32:38 -0000 Author: imp Date: Fri Jul 16 06:32:38 2010 New Revision: 210160 URL: http://svn.freebsd.org/changeset/base/210160 Log: machine/cpu.h isn't appropriate for this file,so remove it Modified: head/sys/netinet/libalias/alias_sctp.h Modified: head/sys/netinet/libalias/alias_sctp.h ============================================================================== --- head/sys/netinet/libalias/alias_sctp.h Fri Jul 16 06:31:37 2010 (r210159) +++ head/sys/netinet/libalias/alias_sctp.h Fri Jul 16 06:32:38 2010 (r210160) @@ -80,7 +80,6 @@ * */ #include -#include /* The packed define for 64 bit platforms */ #ifndef SCTP_PACKED #define SCTP_PACKED __attribute__((packed)) From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 06:35:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A322106564A; Fri, 16 Jul 2010 06:35:17 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77B128FC17; Fri, 16 Jul 2010 06:35:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6G6ZHgw027739; Fri, 16 Jul 2010 06:35:17 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6G6ZHfl027733; Fri, 16 Jul 2010 06:35:17 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007160635.o6G6ZHfl027733@svn.freebsd.org> From: Warner Losh Date: Fri, 16 Jul 2010 06:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210161 - in head/sys/mips: include mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 06:35:17 -0000 Author: imp Date: Fri Jul 16 06:35:17 2010 New Revision: 210161 URL: http://svn.freebsd.org/changeset/base/210161 Log: Move common macros into asm.h. Replace MIPS_CPU_NOP_DELAY with HAZARD_DELAY. Move HAZARD_DELAY and ITLBNOPFIX into asm.h, for possible later optimization... Reviewed by: jmallet, jchandra Modified: head/sys/mips/include/asm.h head/sys/mips/mips/exception.S head/sys/mips/mips/support.S head/sys/mips/mips/swtch.S head/sys/mips/mips/tlb.S Modified: head/sys/mips/include/asm.h ============================================================================== --- head/sys/mips/include/asm.h Fri Jul 16 06:32:38 2010 (r210160) +++ head/sys/mips/include/asm.h Fri Jul 16 06:35:17 2010 (r210161) @@ -843,4 +843,18 @@ _C_LABEL(x): #define _JB_SIGMASK 13 +/* + * Various macros for dealing with TLB hazards + * (a) why so many? + * (b) when to use? + * (c) why not used everywhere? + */ +/* + * Assume that w alaways need nops to escape CP0 hazard + * TODO: Make hazard delays configurable. Stuck with 5 cycles on the moment + * For more info on CP0 hazards see Chapter 7 (p.99) of "MIPS32 Architecture + * For Programmers Volume III: The MIPS32 Privileged Resource Architecture" + */ +#define ITLBNOPFIX nop;nop;nop;nop;nop;nop;nop;nop;nop;nop; +#define HAZARD_DELAY nop;nop;nop;nop;nop; #endif /* !_MACHINE_ASM_H_ */ Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Fri Jul 16 06:32:38 2010 (r210160) +++ head/sys/mips/mips/exception.S Fri Jul 16 06:35:17 2010 (r210161) @@ -80,15 +80,6 @@ */ #define INTRCNT_COUNT 128 -/* - * Assume that w alaways need nops to escape CP0 hazard - * TODO: Make hazard delays configurable. Stuck with 5 cycles on the moment - * For more info on CP0 hazards see Chapter 7 (p.99) of "MIPS32 Architecture - * For Programmers Volume III: The MIPS32 Privileged Resource Architecture" - */ -#define ITLBNOPFIX nop;nop;nop;nop;nop;nop;nop;nop;nop;nop; -#define HAZARD_DELAY nop;nop;nop;nop;nop; - /* Pointer size and mask for n64 */ #if defined(__mips_n64) #define PTRSHIFT 3 Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Fri Jul 16 06:32:38 2010 (r210160) +++ head/sys/mips/mips/support.S Fri Jul 16 06:35:17 2010 (r210161) @@ -1353,8 +1353,6 @@ esym: .word 0 #endif /* DDB */ #endif /* DDB || DEBUG */ -#define ITLBNOPFIX nop;nop;nop;nop;nop;nop;nop;nop;nop;nop; - .text LEAF(breakpoint) break MIPS_BREAK_SOVER_VAL Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Fri Jul 16 06:32:38 2010 (r210160) +++ head/sys/mips/mips/swtch.S Fri Jul 16 06:35:17 2010 (r210161) @@ -67,17 +67,6 @@ .set noreorder # Noreorder is default style! -/* - * FREEBSD_DEVELOPERS_FIXME - * Some MIPS CPU may need delays using nops between executing CP0 Instructions - */ - -#if 1 -#define HAZARD_DELAY nop ; nop ; nop ; nop -#else -#define HAZARD_DELAY -#endif - #define SAVE_U_PCB_REG(reg, offs, base) \ REG_S reg, U_PCB_REGS + (SZREG * offs) (base) @@ -102,8 +91,6 @@ #define RESTORE_U_PCB_CONTEXT(reg, offs, base) \ REG_L reg, U_PCB_CONTEXT + (SZREG * offs) (base) -#define ITLBNOPFIX nop;nop;nop;nop;nop;nop;nop;nop;nop;nop; - /* * Setup for and return to user. */ Modified: head/sys/mips/mips/tlb.S ============================================================================== --- head/sys/mips/mips/tlb.S Fri Jul 16 06:32:38 2010 (r210160) +++ head/sys/mips/mips/tlb.S Fri Jul 16 06:35:17 2010 (r210161) @@ -97,14 +97,6 @@ .set mips3 #endif -#define ITLBNOPFIX nop;nop;nop;nop;nop;nop;nop;nop;nop;nop; - -/* - * FREEBSD_DEVELOPERS_FIXME - * Some MIPS CPU may need delays using nops between executing CP0 Instructions - */ -#define MIPS_CPU_NOP_DELAY nop;nop;nop;nop; - /*-------------------------------------------------------------------------- * * Mips_TLBWriteIndexed(unsigned index, tlb *tlb); @@ -134,9 +126,9 @@ LEAF(Mips_TLBWriteIndexed) mtc0 a0, COP_0_TLB_INDEX # Set the index. _MTC0 a2, COP_0_TLB_PG_MASK # Set up entry mask. _MTC0 a3, COP_0_TLB_HI # Set up entry high. - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbwi # Write the TLB - MIPS_CPU_NOP_DELAY + HAZARD_DELAY _MTC0 t0, COP_0_TLB_HI # Restore the PID. nop @@ -252,9 +244,9 @@ LEAF(Mips_TLBFlush) _MTC0 v0, COP_0_TLB_HI # Mark entry high as invalid addu t1, t1, 1 # Increment index. addu v0, v0, 8 * 1024 - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbwi # Write the TLB entry. - MIPS_CPU_NOP_DELAY + HAZARD_DELAY bne t1, a0, 1b nop _MTC0 t0, COP_0_TLB_HI # Restore the PID @@ -288,9 +280,9 @@ LEAF(Mips_TLBFlushAddr) _MFC0 t0, COP_0_TLB_HI # Get current PID mfc0 t3, COP_0_TLB_PG_MASK # Save current pgMask _MTC0 a0, COP_0_TLB_HI # look for addr & PID - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbp # Probe for the entry. - MIPS_CPU_NOP_DELAY + HAZARD_DELAY mfc0 v0, COP_0_TLB_INDEX # See what we got li t1, MIPS_KSEG0_START bltz v0, 1f # index < 0 => !found @@ -305,9 +297,9 @@ LEAF(Mips_TLBFlushAddr) _MTC0 zero, COP_0_TLB_LO0 # Zero out low entry. _MTC0 zero, COP_0_TLB_LO1 # Zero out low entry. - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbwi - MIPS_CPU_NOP_DELAY + HAZARD_DELAY 1: _MTC0 t0, COP_0_TLB_HI # restore PID mtc0 t3, COP_0_TLB_PG_MASK # Restore pgMask @@ -341,7 +333,7 @@ LEAF(Mips_TLBUpdate) _MFC0 t0, COP_0_TLB_HI # Save current PID _MTC0 a0, COP_0_TLB_HI # Init high reg and a2, a1, PTE_G # Copy global bit - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbp # Probe for the entry. _SLL a1, a1, WIRED_SHIFT _SRL a1, a1, WIRED_SHIFT @@ -351,12 +343,12 @@ LEAF(Mips_TLBUpdate) # EVEN nop bltz v0, 1f # index < 0 => !found - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbr # update, read entry first - MIPS_CPU_NOP_DELAY + HAZARD_DELAY _MTC0 a1, COP_0_TLB_LO0 # init low reg0. - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbwi # update slot found b 4f nop @@ -365,23 +357,23 @@ LEAF(Mips_TLBUpdate) _MTC0 a0, COP_0_TLB_HI # init high reg. _MTC0 a1, COP_0_TLB_LO0 # init low reg0. _MTC0 a2, COP_0_TLB_LO1 # init low reg1. - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbwr # enter into a random slot - MIPS_CPU_NOP_DELAY + HAZARD_DELAY b 4f nop # ODD 2: nop bltz v0, 3f # index < 0 => !found - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbr # read the entry first - MIPS_CPU_NOP_DELAY + HAZARD_DELAY _MTC0 a1, COP_0_TLB_LO1 # init low reg1. - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbwi # update slot found - MIPS_CPU_NOP_DELAY + HAZARD_DELAY b 4f nop 3: @@ -389,11 +381,11 @@ LEAF(Mips_TLBUpdate) _MTC0 a0, COP_0_TLB_HI # init high reg. _MTC0 a2, COP_0_TLB_LO0 # init low reg0. _MTC0 a1, COP_0_TLB_LO1 # init low reg1. - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbwr # enter into a random slot 4: # Make shure pipeline - MIPS_CPU_NOP_DELAY + HAZARD_DELAY _MTC0 t0, COP_0_TLB_HI # restore PID mtc0 v1, COP_0_STATUS_REG # Restore the status register ITLBNOPFIX @@ -422,15 +414,15 @@ LEAF(Mips_TLBRead) _MFC0 t0, COP_0_TLB_HI # Get current PID mtc0 a0, COP_0_TLB_INDEX # Set the index register - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbr # Read from the TLB - MIPS_CPU_NOP_DELAY + HAZARD_DELAY mfc0 t2, COP_0_TLB_PG_MASK # fetch the hi entry _MFC0 t3, COP_0_TLB_HI # fetch the hi entry _MFC0 ta0, COP_0_TLB_LO0 # See what we got _MFC0 ta1, COP_0_TLB_LO1 # See what we got _MTC0 t0, COP_0_TLB_HI # restore PID - MIPS_CPU_NOP_DELAY + HAZARD_DELAY mtc0 v1, COP_0_STATUS_REG # Restore the status register ITLBNOPFIX sw t2, 0(a1) @@ -491,9 +483,9 @@ LEAF(mips_TBIAP) # do {} while (t1 < t2) 1: mtc0 t1, COP_0_TLB_INDEX # set index - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbr # obtain an entry - MIPS_CPU_NOP_DELAY + HAZARD_DELAY _MFC0 a0, COP_0_TLB_LO1 and a0, a0, PTE_G # check to see it has G bit bnez a0, 2f @@ -503,7 +495,7 @@ LEAF(mips_TBIAP) _MTC0 zero, COP_0_TLB_LO0 # zero out entryLo0 _MTC0 zero, COP_0_TLB_LO1 # zero out entryLo1 mtc0 zero, COP_0_TLB_PG_MASK # zero out mask entry - MIPS_CPU_NOP_DELAY + HAZARD_DELAY tlbwi # invalidate the TLB entry 2: addu t1, t1, 1 @@ -513,7 +505,7 @@ LEAF(mips_TBIAP) _MTC0 ta0, COP_0_TLB_HI # restore PID mtc0 t3, COP_0_TLB_PG_MASK # restore pgMask - MIPS_CPU_NOP_DELAY + HAZARD_DELAY mtc0 v1, COP_0_STATUS_REG # restore status register j ra # new ASID will be set soon nop From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 06:45:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5590106566B; Fri, 16 Jul 2010 06:45:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 55A408FC0A; Fri, 16 Jul 2010 06:45:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 246A041C798; Fri, 16 Jul 2010 08:45:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id kLFZFdJZmjBm; Fri, 16 Jul 2010 08:45:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 77A5B41C796; Fri, 16 Jul 2010 08:45:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 3DB934448EC; Fri, 16 Jul 2010 06:44:40 +0000 (UTC) Date: Fri, 16 Jul 2010 06:44:39 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: John Baldwin In-Reply-To: <201007152024.o6FKObhM092035@svn.freebsd.org> Message-ID: <20100716064257.S14969@maildrop.int.zabbadoz.net> References: <201007152024.o6FKObhM092035@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210138 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 06:45:07 -0000 On Thu, 15 Jul 2010, John Baldwin wrote: > Author: jhb > Date: Thu Jul 15 20:24:37 2010 > New Revision: 210138 > URL: http://svn.freebsd.org/changeset/base/210138 > > Log: > Retire td_syscalls now that it is no longer needed. > > Modified: > head/sys/kern/kern_thread.c > head/sys/kern/subr_trap.c > head/sys/sys/proc.h Did you want to leave the field as a placehgolder or add a note somewhere that people should do a full recompile because the layout changed? > Modified: head/sys/sys/proc.h > ============================================================================== > --- head/sys/sys/proc.h Thu Jul 15 19:52:54 2010 (r210137) > +++ head/sys/sys/proc.h Thu Jul 15 20:24:37 2010 (r210138) > @@ -296,7 +296,6 @@ struct thread { > struct mdthread td_md; /* (k) Any machine-dependent fields. */ > struct td_sched *td_sched; /* (*) Scheduler-specific data. */ > struct kaudit_record *td_ar; /* (k) Active audit record, if any. */ > - int td_syscalls; /* per-thread syscall count (used by NFS :)) */ > struct lpohead td_lprof[2]; /* (a) lock profiling objects. */ > struct kdtrace_thread *td_dtrace; /* (*) DTrace-specific data. */ > int td_errno; /* Error returned by last syscall. */ > -- Bjoern A. Zeeb From August on I will have a life. It's now up to you to do the maths and count to 64. -- Bondorf, Germany, 14th June 2010 From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 07:17:01 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11DCC106566C; Fri, 16 Jul 2010 07:17:01 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail11.syd.optusnet.com.au (mail11.syd.optusnet.com.au [211.29.132.192]) by mx1.freebsd.org (Postfix) with ESMTP id 74F7B8FC13; Fri, 16 Jul 2010 07:17:00 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c211-30-160-13.belrs4.nsw.optusnet.com.au [211.30.160.13]) by mail11.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6G7GvbM018808 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Jul 2010 17:16:57 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.4/8.14.4) with ESMTP id o6G7Gsfc026495; Fri, 16 Jul 2010 17:16:54 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.4/8.14.4/Submit) id o6G7GsYU026494; Fri, 16 Jul 2010 17:16:54 +1000 (EST) (envelope-from peter) Date: Fri, 16 Jul 2010 17:16:54 +1000 From: Peter Jeremy To: Alan Cox Message-ID: <20100716071654.GA26367@server.vk2pj.dyndns.org> References: <201007151625.o6FGPp0D038539@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T4sUOijqQbZv57TR" Content-Disposition: inline In-Reply-To: <201007151625.o6FGPp0D038539@svn.freebsd.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r210124 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 07:17:01 -0000 --T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-Jul-15 16:25:51 +0000, Alan Cox wrote: >Log: > Optimize pmap_remove()'s handling of PG_G mappings. Specifically, =2E.. > calls pmap_invalidate_page(). Altogether, these changes eliminate 53% > of the TLB shootdowns for a "buildworld" on a ZFS file system. On > FFS, the reduction is 3%. I have no feeling for the cost of a TLB shootdown. What is the likely impact on buildworld on a ZFS filesystem? Barely noticable or several percent faster? --=20 Peter Jeremy --T4sUOijqQbZv57TR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iEYEARECAAYFAkxAB2YACgkQ/opHv/APuIejKACfapzvWvOpsRTr3n0UyJnJXKg1 GxcAn31m+gXHB2nAtV0tpVa4sSt/bNl6 =3Q7E -----END PGP SIGNATURE----- --T4sUOijqQbZv57TR-- From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 08:09:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA9CF1065670; Fri, 16 Jul 2010 08:09:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 5D0BA8FC13; Fri, 16 Jul 2010 08:09:47 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o6G89itv091667 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Jul 2010 11:09:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o6G89iap012105; Fri, 16 Jul 2010 11:09:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o6G89ixF012104; Fri, 16 Jul 2010 11:09:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 16 Jul 2010 11:09:44 +0300 From: Kostik Belousov To: "Bjoern A. Zeeb" Message-ID: <20100716080944.GA2381@deviant.kiev.zoral.com.ua> References: <201007152024.o6FKObhM092035@svn.freebsd.org> <20100716064257.S14969@maildrop.int.zabbadoz.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RUvhGz2nhX7DIu1B" Content-Disposition: inline In-Reply-To: <20100716064257.S14969@maildrop.int.zabbadoz.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin Subject: Re: svn commit: r210138 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 08:09:49 -0000 --RUvhGz2nhX7DIu1B Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 16, 2010 at 06:44:39AM +0000, Bjoern A. Zeeb wrote: > On Thu, 15 Jul 2010, John Baldwin wrote: >=20 > >Author: jhb > >Date: Thu Jul 15 20:24:37 2010 > >New Revision: 210138 > >URL: http://svn.freebsd.org/changeset/base/210138 > > > >Log: > > Retire td_syscalls now that it is no longer needed. > > > >Modified: > > head/sys/kern/kern_thread.c > > head/sys/kern/subr_trap.c > > head/sys/sys/proc.h >=20 > Did you want to leave the field as a placehgolder or add a note > somewhere that people should do a full recompile because the layout > changed? Make depend should do the magic, right ? I was surprised to see that mips/arm did not touched td_syscalls, and I wonder how much other bugs are lurking in their implementation. >=20 >=20 > >Modified: head/sys/sys/proc.h > >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > >--- head/sys/sys/proc.h Thu Jul 15 19:52:54 2010 (r210137) > >+++ head/sys/sys/proc.h Thu Jul 15 20:24:37 2010 (r210138) > >@@ -296,7 +296,6 @@ struct thread { > > struct mdthread td_md; /* (k) Any machine-dependent fields.=20 > > */ > > struct td_sched *td_sched; /* (*) Scheduler-specific data. */ > > struct kaudit_record *td_ar; /* (k) Active audit record, if any.=20 > > */ > >- int td_syscalls; /* per-thread syscall count (used by=20 > >NFS :)) */ > > struct lpohead td_lprof[2]; /* (a) lock profiling objects. */ > > struct kdtrace_thread *td_dtrace; /* (*) DTrace-specific data. */ > > int td_errno; /* Error returned by last syscall. */ > > >=20 > --=20 > Bjoern A. Zeeb From August on I will have a life. It's now up to you > to do the maths and count to 64. -- Bondorf, Germany, 14th June 2010 --RUvhGz2nhX7DIu1B Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEUEARECAAYFAkxAE8cACgkQC3+MBN1Mb4gK1wCYuwUHib+490sYpf2+ZF1ywgCo fgCghg5r1cK8QctlFnT6CJysfO3xmyY= =mOqy -----END PGP SIGNATURE----- --RUvhGz2nhX7DIu1B-- From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 10:05:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCA13106566B; Fri, 16 Jul 2010 10:05:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC4918FC15; Fri, 16 Jul 2010 10:05:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6GA50qR074305; Fri, 16 Jul 2010 10:05:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GA50vl074303; Fri, 16 Jul 2010 10:05:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007161005.o6GA50vl074303@svn.freebsd.org> From: Alexander Motin Date: Fri, 16 Jul 2010 10:05:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210165 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 10:05:00 -0000 Author: mav Date: Fri Jul 16 10:05:00 2010 New Revision: 210165 URL: http://svn.freebsd.org/changeset/base/210165 Log: Improve interrupt setup errors handling. Modified: head/sys/dev/ata/ata-pci.c Modified: head/sys/dev/ata/ata-pci.c ============================================================================== --- head/sys/dev/ata/ata-pci.c Fri Jul 16 09:12:47 2010 (r210164) +++ head/sys/dev/ata/ata-pci.c Fri Jul 16 10:05:00 2010 (r210165) @@ -806,17 +806,23 @@ ata_setup_interrupt(device_t dev, void * if (msi && pci_msi_count(dev) > 0 && pci_alloc_msi(dev, &msi) == 0) { ctlr->r_irq_rid = 0x1; } else { + msi = 0; ctlr->r_irq_rid = ATA_IRQ_RID; } if (!(ctlr->r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &ctlr->r_irq_rid, RF_SHAREABLE | RF_ACTIVE))) { device_printf(dev, "unable to map interrupt\n"); + if (msi) + pci_release_msi(dev); return ENXIO; } if ((bus_setup_intr(dev, ctlr->r_irq, ATA_INTR_FLAGS, NULL, intr_func, ctlr, &ctlr->handle))) { - /* SOS XXX release r_irq */ device_printf(dev, "unable to setup interrupt\n"); + bus_release_resource(dev, + SYS_RES_IRQ, ctlr->r_irq_rid, ctlr->r_irq); + if (msi) + pci_release_msi(dev); return ENXIO; } } From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 12:35:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C63821065674; Fri, 16 Jul 2010 12:35:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 54EB48FC18; Fri, 16 Jul 2010 12:35:08 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 5107341C758; Fri, 16 Jul 2010 14:35:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id IYg88a3xHmRz; Fri, 16 Jul 2010 14:35:06 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id EA6AD41C74D; Fri, 16 Jul 2010 14:35:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 357BA4448EC; Fri, 16 Jul 2010 12:30:50 +0000 (UTC) Date: Fri, 16 Jul 2010 12:30:50 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Kostik Belousov In-Reply-To: <20100716080944.GA2381@deviant.kiev.zoral.com.ua> Message-ID: <20100716122932.S14969@maildrop.int.zabbadoz.net> References: <201007152024.o6FKObhM092035@svn.freebsd.org> <20100716064257.S14969@maildrop.int.zabbadoz.net> <20100716080944.GA2381@deviant.kiev.zoral.com.ua> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin Subject: Re: svn commit: r210138 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 12:35:08 -0000 On Fri, 16 Jul 2010, Kostik Belousov wrote: > On Fri, Jul 16, 2010 at 06:44:39AM +0000, Bjoern A. Zeeb wrote: >> On Thu, 15 Jul 2010, John Baldwin wrote: >> >>> Author: jhb >>> Date: Thu Jul 15 20:24:37 2010 >>> New Revision: 210138 >>> URL: http://svn.freebsd.org/changeset/base/210138 >>> >>> Log: >>> Retire td_syscalls now that it is no longer needed. >>> >>> Modified: >>> head/sys/kern/kern_thread.c >>> head/sys/kern/subr_trap.c >>> head/sys/sys/proc.h >> >> Did you want to leave the field as a placehgolder or add a note >> somewhere that people should do a full recompile because the layout >> changed? > Make depend should do the magic, right ? right, I am more worried about (out of tree) modules. struct thread is basically everywhere with curthread and thread * passed around and modules will not refuse to load as freebsd_version hasn't changed. > I was surprised to see that mips/arm did not touched td_syscalls, and > I wonder how much other bugs are lurking in their implementation. >> >> >>> Modified: head/sys/sys/proc.h >>> ============================================================================== >>> --- head/sys/sys/proc.h Thu Jul 15 19:52:54 2010 (r210137) >>> +++ head/sys/sys/proc.h Thu Jul 15 20:24:37 2010 (r210138) >>> @@ -296,7 +296,6 @@ struct thread { >>> struct mdthread td_md; /* (k) Any machine-dependent fields. >>> */ >>> struct td_sched *td_sched; /* (*) Scheduler-specific data. */ >>> struct kaudit_record *td_ar; /* (k) Active audit record, if any. >>> */ >>> - int td_syscalls; /* per-thread syscall count (used by >>> NFS :)) */ >>> struct lpohead td_lprof[2]; /* (a) lock profiling objects. */ >>> struct kdtrace_thread *td_dtrace; /* (*) DTrace-specific data. */ >>> int td_errno; /* Error returned by last syscall. */ >>> >> >> -- >> Bjoern A. Zeeb From August on I will have a life. It's now up to you >> to do the maths and count to 64. -- Bondorf, Germany, 14th June 2010 > -- Bjoern A. Zeeb From August on I will have a life. It's now up to you to do the maths and count to 64. -- Bondorf, Germany, 14th June 2010 From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 12:35:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3938E106564A; Fri, 16 Jul 2010 12:35:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0B03A8FC0A; Fri, 16 Jul 2010 12:35:29 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 993C246B8B; Fri, 16 Jul 2010 08:35:28 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CF9788A03C; Fri, 16 Jul 2010 08:35:27 -0400 (EDT) From: John Baldwin To: Warner Losh Date: Fri, 16 Jul 2010 07:51:22 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007152332.o6FNWrbN034547@svn.freebsd.org> In-Reply-To: <201007152332.o6FNWrbN034547@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007160751.22355.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 16 Jul 2010 08:35:27 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210151 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 12:35:29 -0000 On Thursday, July 15, 2010 7:32:53 pm Warner Losh wrote: > Author: imp > Date: Thu Jul 15 23:32:53 2010 > New Revision: 210151 > URL: http://svn.freebsd.org/changeset/base/210151 > > Log: > Simple compatibility hacks for building on older systems where > MACHINE_CPUARCH isn't defined. I believe that this will cover all > options. > > I didn't define it in kern.mk because $M is set to MACHINE_CPUARCH and > then is expanded for the genassym.o rule in kern.post.mk and kern.mk > is included after this, so the expansion isn't quite right. I think > this is a bug in make, but don't have the time to track it to ground > (and even if I did, fixing it would require a MFC of the change to the > very old systems we're targetting with this fix). Thanks! -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 12:56:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AC511065673; Fri, 16 Jul 2010 12:56:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3A1058FC24; Fri, 16 Jul 2010 12:56:35 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id DA93946B86; Fri, 16 Jul 2010 08:56:34 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7AC028A03C; Fri, 16 Jul 2010 08:56:33 -0400 (EDT) From: John Baldwin To: "Bjoern A. Zeeb" Date: Fri, 16 Jul 2010 08:50:52 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007152024.o6FKObhM092035@svn.freebsd.org> <20100716080944.GA2381@deviant.kiev.zoral.com.ua> <20100716122932.S14969@maildrop.int.zabbadoz.net> In-Reply-To: <20100716122932.S14969@maildrop.int.zabbadoz.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201007160850.52601.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 16 Jul 2010 08:56:33 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210138 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 12:56:35 -0000 On Friday, July 16, 2010 8:30:50 am Bjoern A. Zeeb wrote: > On Fri, 16 Jul 2010, Kostik Belousov wrote: > > > On Fri, Jul 16, 2010 at 06:44:39AM +0000, Bjoern A. Zeeb wrote: > >> On Thu, 15 Jul 2010, John Baldwin wrote: > >> > >>> Author: jhb > >>> Date: Thu Jul 15 20:24:37 2010 > >>> New Revision: 210138 > >>> URL: http://svn.freebsd.org/changeset/base/210138 > >>> > >>> Log: > >>> Retire td_syscalls now that it is no longer needed. > >>> > >>> Modified: > >>> head/sys/kern/kern_thread.c > >>> head/sys/kern/subr_trap.c > >>> head/sys/sys/proc.h > >> > >> Did you want to leave the field as a placehgolder or add a note > >> somewhere that people should do a full recompile because the layout > >> changed? > > Make depend should do the magic, right ? > > right, I am more worried about (out of tree) modules. struct thread > is basically everywhere with curthread and thread * passed around and > modules will not refuse to load as freebsd_version hasn't changed. I could bump the version perhaps as those are cheap, but we generally don't care about preserving KBI in HEAD. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 17:01:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20929106566B; Fri, 16 Jul 2010 17:01:37 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C9838FC0A; Fri, 16 Jul 2010 17:01:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6GH1b1n067708; Fri, 16 Jul 2010 17:01:37 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GH1bKh067704; Fri, 16 Jul 2010 17:01:37 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201007161701.o6GH1bKh067704@svn.freebsd.org> From: Ed Maste Date: Fri, 16 Jul 2010 17:01:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210167 - head/share/doc/psd/15.yacc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 17:01:37 -0000 Author: emaste Date: Fri Jul 16 17:01:36 2010 New Revision: 210167 URL: http://svn.freebsd.org/changeset/base/210167 Log: Rename documentation source files to avoid filesystem case and restricted filename issues when checking out the source on other operating systems. I've verified the generated paper.ascii is identical before and after the change. Added: head/share/doc/psd/15.yacc/ss10 - copied unchanged from r210153, head/share/doc/psd/15.yacc/ssA head/share/doc/psd/15.yacc/ss11 - copied unchanged from r210153, head/share/doc/psd/15.yacc/ssB head/share/doc/psd/15.yacc/ss_ - copied unchanged from r210153, head/share/doc/psd/15.yacc/ss.. Deleted: head/share/doc/psd/15.yacc/ss.. head/share/doc/psd/15.yacc/ssA head/share/doc/psd/15.yacc/ssB Modified: head/share/doc/psd/15.yacc/Makefile Modified: head/share/doc/psd/15.yacc/Makefile ============================================================================== --- head/share/doc/psd/15.yacc/Makefile Fri Jul 16 14:31:24 2010 (r210166) +++ head/share/doc/psd/15.yacc/Makefile Fri Jul 16 17:01:36 2010 (r210167) @@ -2,8 +2,8 @@ # $FreeBSD$ VOLUME= psd/15.yacc -SRCS= stubs ss.. ss0 ss1 ss2 ss3 ss4 ss5 ss6 ss7 ss8 ss9 \ - ssA ssB ssa ssb ssc ssd +SRCS= stubs ss_ ss0 ss1 ss2 ss3 ss4 ss5 ss6 ss7 ss8 ss9 \ + ss10 ss11 ssa ssb ssc ssd EXTRA= ref.bib MACROS= -ms USE_REFER= Copied: head/share/doc/psd/15.yacc/ss10 (from r210153, head/share/doc/psd/15.yacc/ssA) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/doc/psd/15.yacc/ss10 Fri Jul 16 17:01:36 2010 (r210167, copy of r210153, head/share/doc/psd/15.yacc/ssA) @@ -0,0 +1,221 @@ +.\" Copyright (C) Caldera International Inc. 2001-2002. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" Redistributions of source code and documentation must retain the above +.\" copyright notice, this list of conditions and the following +.\" disclaimer. +.\" +.\" Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" +.\" This product includes software developed or owned by Caldera +.\" International, Inc. Neither the name of Caldera International, Inc. +.\" nor the names of other contributors may be used to endorse or promote +.\" products derived from this software without specific prior written +.\" permission. +.\" +.\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA +.\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +.\" DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE +.\" FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +.\" OR OTHERWISE) RISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" @(#)ssA 8.1 (Berkeley) 6/8/93 +.\" +.\" $FreeBSD$ +.SH +10: Advanced Topics +.PP +This section discusses a number of advanced features +of Yacc. +.SH +Simulating Error and Accept in Actions +.PP +The parsing actions of error and accept can be simulated +in an action by use of macros YYACCEPT and YYERROR. +YYACCEPT causes +.I yyparse +to return the value 0; +YYERROR causes +the parser to behave as if the current input symbol +had been a syntax error; +.I yyerror +is called, and error recovery takes place. +These mechanisms can be used to simulate parsers +with multiple endmarkers or context-sensitive syntax checking. +.SH +Accessing Values in Enclosing Rules. +.PP +An action may refer to values +returned by actions to the left of the current rule. +The mechanism is simply the same as with ordinary actions, +a dollar sign followed by a digit, but in this case the +digit may be 0 or negative. +Consider +.DS +sent : adj noun verb adj noun + { \fIlook at the sentence\fR . . . } + ; + +adj : THE { $$ = THE; } + | YOUNG { $$ = YOUNG; } + . . . + ; + +noun : DOG + { $$ = DOG; } + | CRONE + { if( $0 == YOUNG ){ + printf( "what?\en" ); + } + $$ = CRONE; + } + ; + . . . +.DE +In the action following the word CRONE, a check is made that the +preceding token shifted was not YOUNG. +Obviously, this is only possible when a great deal is known about +what might precede the symbol +.I noun +in the input. +There is also a distinctly unstructured flavor about this. +Nevertheless, at times this mechanism will save a great +deal of trouble, especially when a few combinations are to +be excluded from an otherwise regular structure. +.SH +Support for Arbitrary Value Types +.PP +By default, the values returned by actions and the lexical analyzer are integers. +Yacc can also support +values of other types, including structures. +In addition, Yacc keeps track of the types, and inserts +appropriate union member names so that the resulting parser will +be strictly type checked. +The Yacc value stack (see Section 4) +is declared to be a +.I union +of the various types of values desired. +The user declares the union, and associates union member names +to each token and nonterminal symbol having a value. +When the value is referenced through a $$ or $n construction, +Yacc will automatically insert the appropriate union name, so that +no unwanted conversions will take place. +In addition, type checking commands such as +.I Lint\| +.[ +Johnson Lint Checker 1273 +.] +will be far more silent. +.PP +There are three mechanisms used to provide for this typing. +First, there is a way of defining the union; this must be +done by the user since other programs, notably the lexical analyzer, +must know about the union member names. +Second, there is a way of associating a union member name with tokens +and nonterminals. +Finally, there is a mechanism for describing the type of those +few values where Yacc can not easily determine the type. +.PP +To declare the union, the user includes in the declaration section: +.DS +%union { + body of union ... + } +.DE +This declares the Yacc value stack, +and the external variables +.I yylval +and +.I yyval , +to have type equal to this union. +If Yacc was invoked with the +.B \-d +option, the union declaration +is copied onto the +.I y.tab.h +file. +Alternatively, +the union may be declared in a header file, and a typedef +used to define the variable YYSTYPE to represent +this union. +Thus, the header file might also have said: +.DS +typedef union { + body of union ... + } YYSTYPE; +.DE +The header file must be included in the declarations +section, by use of %{ and %}. +.PP +Once YYSTYPE is defined, +the union member names must be associated +with the various terminal and nonterminal names. +The construction +.DS +< name > +.DE +is used to indicate a union member name. +If this follows +one of the +keywords %token, +%left, %right, and %nonassoc, +the union member name is associated with the tokens listed. +Thus, saying +.DS +%left \'+\' \'\-\' +.DE +will cause any reference to values returned by these two tokens to be +tagged with +the union member name +.I optype . +Another keyword, %type, is +used similarly to associate +union member names with nonterminals. +Thus, one might say +.DS +%type expr stat +.DE +.PP +There remain a couple of cases where these mechanisms are insufficient. +If there is an action within a rule, the value returned +by this action has no +.I "a priori" +type. +Similarly, reference to left context values (such as $0 \- see the +previous subsection ) leaves Yacc with no easy way of knowing the type. +In this case, a type can be imposed on the reference by inserting +a union member name, between < and >, immediately after +the first $. +An example of this usage is +.DS +rule : aaa { $$ = 3; } bbb + { fun( $2, $0 ); } + ; +.DE +This syntax has little to recommend it, but the situation arises rarely. +.PP +A sample specification is given in Appendix C. +The facilities in this subsection are not triggered until they are used: +in particular, the use of %type will turn on these mechanisms. +When they are used, there is a fairly strict level of checking. +For example, use of $n or $$ to refer to something with no defined type +is diagnosed. +If these facilities are not triggered, the Yacc value stack is used to +hold +.I int' s, +as was true historically. Copied: head/share/doc/psd/15.yacc/ss11 (from r210153, head/share/doc/psd/15.yacc/ssB) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/doc/psd/15.yacc/ss11 Fri Jul 16 17:01:36 2010 (r210167, copy of r210153, head/share/doc/psd/15.yacc/ssB) @@ -0,0 +1,63 @@ +.\" Copyright (C) Caldera International Inc. 2001-2002. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" Redistributions of source code and documentation must retain the above +.\" copyright notice, this list of conditions and the following +.\" disclaimer. +.\" +.\" Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" +.\" This product includes software developed or owned by Caldera +.\" International, Inc. Neither the name of Caldera International, Inc. +.\" nor the names of other contributors may be used to endorse or promote +.\" products derived from this software without specific prior written +.\" permission. +.\" +.\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA +.\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +.\" DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE +.\" FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +.\" OR OTHERWISE) RISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" @(#)ssB 8.1 (Berkeley) 6/8/93 +.\" +.\" $FreeBSD$ +.SH +11: Acknowledgements +.PP +Yacc owes much to a +most stimulating collection of users, who have goaded +me beyond my inclination, and frequently beyond my +ability, in their endless search for ``one more feature''. +Their irritating unwillingness to learn how to +do things my way has usually led to my doing things their way; +most of the time, they have been right. +B. W. Kernighan, P. J. Plauger, S. I. Feldman, C. Imagna, +M. E. Lesk, +and A. Snyder will recognize some of their ideas in the current version +of Yacc. +C. B. Haley contributed to the error recovery algorithm. +D. M. Ritchie, B. W. Kernighan, and M. O. Harris helped translate this document into English. +Al Aho also deserves special credit for bringing +the mountain to Mohammed, and other favors. +.\" .SG "MH-1273-SCJ-unix" +.bp +.[ +$LIST$ +.] +.bp Copied: head/share/doc/psd/15.yacc/ss_ (from r210153, head/share/doc/psd/15.yacc/ss..) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/doc/psd/15.yacc/ss_ Fri Jul 16 17:01:36 2010 (r210167, copy of r210153, head/share/doc/psd/15.yacc/ss..) @@ -0,0 +1,94 @@ +.\" Copyright (C) Caldera International Inc. 2001-2002. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are +.\" met: +.\" +.\" Redistributions of source code and documentation must retain the above +.\" copyright notice, this list of conditions and the following +.\" disclaimer. +.\" +.\" Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" +.\" This product includes software developed or owned by Caldera +.\" International, Inc. Neither the name of Caldera International, Inc. +.\" nor the names of other contributors may be used to endorse or promote +.\" products derived from this software without specific prior written +.\" permission. +.\" +.\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA +.\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +.\" DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE +.\" FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +.\" OR OTHERWISE) RISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" @(#)ss.. 8.1 (Berkeley) 6/8/93 +.\" +.\" $FreeBSD$ +.EH 'PSD:15-%''Yacc: Yet Another Compiler-Compiler' +.OH 'Yacc: Yet Another Compiler-Compiler''PSD:15-%' +.\".RP +.ND "July 31, 1978" +.TL +Yacc: +Yet Another Compiler-Compiler +.AU "MH 2C-559" 3968 +Stephen C. Johnson +AT&T Bell Laboratories +Murray Hill, New Jersey 07974 +.AI +.AB +.PP +Computer program input generally has some structure; +in fact, every computer program that does input can be thought of as defining +an ``input language'' which it accepts. +An input language may be as complex as a programming language, or as simple as +a sequence of numbers. +Unfortunately, usual input facilities +are limited, difficult to use, +and often are lax about checking their inputs for validity. +.PP +Yacc provides a general tool for describing +the input to a computer program. +The Yacc user specifies the structures +of his input, together with code to be invoked as +each such structure is recognized. +Yacc turns such a specification into a subroutine that +handles the input process; +frequently, it is convenient and appropriate to have most +of the flow of control in the user's application +handled by this subroutine. +.PP +The input subroutine produced by Yacc calls a user-supplied routine to +return the next basic input item. +Thus, the user can specify his input in terms of individual input characters, or +in terms of higher level constructs such as names and numbers. +The user-supplied routine may also handle idiomatic features such as +comment and continuation conventions, which typically defy easy grammatical specification. +.PP +Yacc is written in portable C. +The class of specifications accepted is a very general one: LALR(1) +grammars with disambiguating rules. +.PP +In addition to compilers for C, APL, Pascal, RATFOR, etc., Yacc +has also been used for less conventional languages, +including a phototypesetter language, several desk calculator languages, a document retrieval system, +and a Fortran debugging system. +.AE +.\" .OK +.\"Computer Languages +.\"Compilers +.\"Formal Language Theory +.\" .CS 23 11 34 0 0 8 From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 17:27:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EA6E106566B; Fri, 16 Jul 2010 17:27:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CEF78FC17; Fri, 16 Jul 2010 17:27:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6GHRh9N073477; Fri, 16 Jul 2010 17:27:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GHRh33073475; Fri, 16 Jul 2010 17:27:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007161727.o6GHRh33073475@svn.freebsd.org> From: Alexander Motin Date: Fri, 16 Jul 2010 17:27:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210168 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 17:27:44 -0000 Author: mav Date: Fri Jul 16 17:27:43 2010 New Revision: 210168 URL: http://svn.freebsd.org/changeset/base/210168 Log: Make legacy ATA emulation detection more strict. This should fix false positive legacy detection and attach failure/panic for Marvell 88SX6141 controller and potentially some others. PR: kern/145064 Modified: head/sys/dev/ata/ata-pci.c Modified: head/sys/dev/ata/ata-pci.c ============================================================================== --- head/sys/dev/ata/ata-pci.c Fri Jul 16 17:01:36 2010 (r210167) +++ head/sys/dev/ata/ata-pci.c Fri Jul 16 17:27:43 2010 (r210168) @@ -769,7 +769,8 @@ DRIVER_MODULE(ata, atapci, ata_pcichanne int ata_legacy(device_t dev) { - return (((pci_read_config(dev, PCIR_PROGIF, 1)&PCIP_STORAGE_IDE_MASTERDEV)&& + return (((pci_read_config(dev, PCIR_SUBCLASS, 1) == PCIS_STORAGE_IDE) && + (pci_read_config(dev, PCIR_PROGIF, 1)&PCIP_STORAGE_IDE_MASTERDEV)&& ((pci_read_config(dev, PCIR_PROGIF, 1) & (PCIP_STORAGE_IDE_MODEPRIM | PCIP_STORAGE_IDE_MODESEC)) != (PCIP_STORAGE_IDE_MODEPRIM | PCIP_STORAGE_IDE_MODESEC))) || From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 18:06:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18CD1106566C; Fri, 16 Jul 2010 18:06:20 +0000 (UTC) (envelope-from jsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E17638FC0C; Fri, 16 Jul 2010 18:06:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6GI6Jga081971; Fri, 16 Jul 2010 18:06:19 GMT (envelope-from jsa@svn.freebsd.org) Received: (from jsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GI6JOS081968; Fri, 16 Jul 2010 18:06:19 GMT (envelope-from jsa@svn.freebsd.org) Message-Id: <201007161806.o6GI6JOS081968@svn.freebsd.org> From: "Joseph S. Atkinson" Date: Fri, 16 Jul 2010 18:06:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210169 - in head: share/misc usr.bin/calendar/calendars X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 18:06:20 -0000 Author: jsa (ports committer) Date: Fri Jul 16 18:06:19 2010 New Revision: 210169 URL: http://svn.freebsd.org/changeset/base/210169 Log: Nervously welcoming myself to the family. Add myself to all the appropriate places, upload my pgp key, and announce my arrival to the FreeBSD world. Approved by: wxs@ (mentor) Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Fri Jul 16 17:27:43 2010 (r210168) +++ head/share/misc/committers-ports.dot Fri Jul 16 18:06:19 2010 (r210169) @@ -96,6 +96,7 @@ joerg [label="Joerg Wunsch\njoerg@FreeBS johans [label="Johan Selst\njohans@FreeBSD.org\n2006/04/01"] josef [label="Josef El-Rayes\njosef@FreeBSD.org\n2004/12/20"] jpaetzel [label="Josh Paetzel\njpaetzel@FreeBSD.org\n2008/09/05"] +jsa [label="Joseph S. Atkinson\njsa@FreeBSD.org\n2010/07/15"] jylefort [label="Jean-Yves Lefort\njylefort@FreeBSD.org\n2005/04/12"] kevlo [label="Kevin Lo\nkevlo@FreeBSD.org\n2003/02/21"] knu [label="Akinori Musha\nknu@FreeBSD.org\n2000/03/22"] @@ -270,6 +271,8 @@ krion -> sat krion -> sem krion -> sergei +kwm -> jsa + lawrance -> itetcu leeym -> clsung @@ -365,6 +368,7 @@ tmclaugh -> xride will -> lioux +wxs -> jsa wxs -> sahil wxs -> skreuzer Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Fri Jul 16 17:27:43 2010 (r210168) +++ head/usr.bin/calendar/calendars/calendar.freebsd Fri Jul 16 18:06:19 2010 (r210169) @@ -92,6 +92,7 @@ 03/20 MANTANI Nobutaka born in Hiroshima, Japan, 1978 03/20 Cameron Grant died in Hemel Hempstead, United Kingdom, 2005 03/20 Henrik Brix Andersen born in Aarhus, Denmark, 1978 +03/20 Joseph S. Atkinson born in Batesville, Arkansas, United States, 1977 03/22 Brad Davis born in Farmington, New Mexico, United States, 1983 03/23 Daniel C. Sobral born in Brasilia, Distrito Federal, Brazil, 1971 03/23 Benno Rice born in Adelaide, South Australia, Australia, 1977 From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 19:14:12 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 75E911065677; Fri, 16 Jul 2010 19:14:12 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Bruce Evans Date: Fri, 16 Jul 2010 15:14:02 -0400 User-Agent: KMail/1.6.2 References: <201007131657.o6DGvq9L097594@svn.freebsd.org> <20100715220012.X1719@delplex.bde.org> In-Reply-To: <20100715220012.X1719@delplex.bde.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201007161514.04955.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r210005 - head/sys/modules/acpi/acpi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 19:14:12 -0000 On Thursday 15 July 2010 08:04 am, Bruce Evans wrote: > On Tue, 13 Jul 2010, Jung-uk Kim wrote: > > Log: > > Define SMP unconditionally for amd64 and remove opt_global.h > > from SRCS. Note it is done just for correctness sake because we > > do not build, ship, or support acpi.ko on amd64. > > > > Prodded by: bde > > Thanks. > > It was much more interesting than I noticed. Modules are supposed > to be independent of all configuration options, especially global > ones, especially especially SMP. Perhaps this is too much to ask > for acpi. Does it work now, after you removed an SMP ifdef from it? I removed "#ifdef SMP" from acpi.c because 'smp_started' is available for both UP and SMP kernels. On the other hand, I cannot remove these easily from sys/amd64/acpica/acpi_wakeup.c, i.e., it requires some symbols from sys/amd64/amd64/mp_machdep.c, which are only available in SMP case. FYI, we never had to worry about acpi.ko on i386 because we didn't implement suspend/resume for SMP case in the first place. X-) Jung-uk Kim From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 19:20:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 244FD106566B; Fri, 16 Jul 2010 19:20:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 096108FC0C; Fri, 16 Jul 2010 19:20:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6GJKKUS098281; Fri, 16 Jul 2010 19:20:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GJKKji098276; Fri, 16 Jul 2010 19:20:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007161920.o6GJKKji098276@svn.freebsd.org> From: John Baldwin Date: Fri, 16 Jul 2010 19:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210171 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/cd9660 fs/udf ufs/ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 19:20:21 -0000 Author: jhb Date: Fri Jul 16 19:20:20 2010 New Revision: 210171 URL: http://svn.freebsd.org/changeset/base/210171 Log: When the MNTK_EXTENDED_SHARED mount option was added, some filesystems were changed to defer the setting of VN_LOCK_ASHARE() (which clears LK_NOSHARE in the vnode lock's flags) until after they had determined if the vnode was a FIFO. This occurs after the vnode has been inserted a VFS hash or some similar table, so it is possible for another thread to find this vnode via vget() on an i-node number and block on the vnode lock. If the lockmgr interlock (vnode interlock for vnode locks) is not held when clearing the LK_NOSHARE flag, then the lk_flags field can be clobbered. As a result the thread blocked on the vnode lock may never get woken up. Fix this by holding the vnode interlock while modifying the lock flags in this case. MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/fs/cd9660/cd9660_vfsops.c head/sys/fs/udf/udf_vfsops.c head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Jul 16 18:57:45 2010 (r210170) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Jul 16 19:20:20 2010 (r210171) @@ -566,8 +566,11 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_bu } break; } - if (vp->v_type != VFIFO) + if (vp->v_type != VFIFO) { + VI_LOCK(vp); VN_LOCK_ASHARE(vp); + VI_UNLOCK(vp); + } mutex_enter(&zfsvfs->z_znodes_lock); list_insert_tail(&zfsvfs->z_all_znodes, zp); Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Fri Jul 16 18:57:45 2010 (r210170) +++ head/sys/fs/cd9660/cd9660_vfsops.c Fri Jul 16 19:20:20 2010 (r210171) @@ -814,7 +814,9 @@ cd9660_vget_internal(mp, ino, flags, vpp vp->v_op = &cd9660_fifoops; break; default: + VI_LOCK(vp); VN_LOCK_ASHARE(vp); + VI_UNLOCK(vp); break; } Modified: head/sys/fs/udf/udf_vfsops.c ============================================================================== --- head/sys/fs/udf/udf_vfsops.c Fri Jul 16 18:57:45 2010 (r210170) +++ head/sys/fs/udf/udf_vfsops.c Fri Jul 16 19:20:20 2010 (r210171) @@ -710,8 +710,11 @@ udf_vget(struct mount *mp, ino_t ino, in break; } - if (vp->v_type != VFIFO) + if (vp->v_type != VFIFO) { + VI_LOCK(vp); VN_LOCK_ASHARE(vp); + VI_UNLOCK(vp); + } if (ino == udf_getid(&udfmp->root_icb)) vp->v_vflag |= VV_ROOT; Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Fri Jul 16 18:57:45 2010 (r210170) +++ head/sys/ufs/ffs/ffs_vfsops.c Fri Jul 16 19:20:20 2010 (r210171) @@ -1577,7 +1577,9 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags */ if (vp->v_type != VFIFO) { /* FFS supports shared locking for all files except fifos. */ + VI_LOCK(vp); VN_LOCK_ASHARE(vp); + VI_UNLOCK(vp); } /* From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 19:52:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABCCE1065675; Fri, 16 Jul 2010 19:52:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A98F8FC13; Fri, 16 Jul 2010 19:52:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6GJq3sI005396; Fri, 16 Jul 2010 19:52:03 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GJq3Id005391; Fri, 16 Jul 2010 19:52:03 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201007161952.o6GJq3Id005391@svn.freebsd.org> From: John Baldwin Date: Fri, 16 Jul 2010 19:52:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210172 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/cd9660 fs/udf ufs/ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 19:52:03 -0000 Author: jhb Date: Fri Jul 16 19:52:03 2010 New Revision: 210172 URL: http://svn.freebsd.org/changeset/base/210172 Log: Revert the previous commit. The race is not applicable to the lockmgr implementation in 8.0 and later as its flags field does not hold dynamic state such as waiters flags, but is only modified in lockinit() aside from VN_LOCK_*(). Discussed with: attilio Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/fs/cd9660/cd9660_vfsops.c head/sys/fs/udf/udf_vfsops.c head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Jul 16 19:20:20 2010 (r210171) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Jul 16 19:52:03 2010 (r210172) @@ -566,11 +566,8 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_bu } break; } - if (vp->v_type != VFIFO) { - VI_LOCK(vp); + if (vp->v_type != VFIFO) VN_LOCK_ASHARE(vp); - VI_UNLOCK(vp); - } mutex_enter(&zfsvfs->z_znodes_lock); list_insert_tail(&zfsvfs->z_all_znodes, zp); Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Fri Jul 16 19:20:20 2010 (r210171) +++ head/sys/fs/cd9660/cd9660_vfsops.c Fri Jul 16 19:52:03 2010 (r210172) @@ -814,9 +814,7 @@ cd9660_vget_internal(mp, ino, flags, vpp vp->v_op = &cd9660_fifoops; break; default: - VI_LOCK(vp); VN_LOCK_ASHARE(vp); - VI_UNLOCK(vp); break; } Modified: head/sys/fs/udf/udf_vfsops.c ============================================================================== --- head/sys/fs/udf/udf_vfsops.c Fri Jul 16 19:20:20 2010 (r210171) +++ head/sys/fs/udf/udf_vfsops.c Fri Jul 16 19:52:03 2010 (r210172) @@ -710,11 +710,8 @@ udf_vget(struct mount *mp, ino_t ino, in break; } - if (vp->v_type != VFIFO) { - VI_LOCK(vp); + if (vp->v_type != VFIFO) VN_LOCK_ASHARE(vp); - VI_UNLOCK(vp); - } if (ino == udf_getid(&udfmp->root_icb)) vp->v_vflag |= VV_ROOT; Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Fri Jul 16 19:20:20 2010 (r210171) +++ head/sys/ufs/ffs/ffs_vfsops.c Fri Jul 16 19:52:03 2010 (r210172) @@ -1577,9 +1577,7 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags */ if (vp->v_type != VFIFO) { /* FFS supports shared locking for all files except fifos. */ - VI_LOCK(vp); VN_LOCK_ASHARE(vp); - VI_UNLOCK(vp); } /* From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 20:42:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 280891065675; Fri, 16 Jul 2010 20:42:21 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1667F8FC12; Fri, 16 Jul 2010 20:42:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6GKgKUe016699; Fri, 16 Jul 2010 20:42:20 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GKgKHJ016694; Fri, 16 Jul 2010 20:42:20 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201007162042.o6GKgKHJ016694@svn.freebsd.org> From: Bruce Cran Date: Fri, 16 Jul 2010 20:42:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210175 - head/usr.sbin/sysinstall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 20:42:21 -0000 Author: brucec Date: Fri Jul 16 20:42:20 2010 New Revision: 210175 URL: http://svn.freebsd.org/changeset/base/210175 Log: FreeBSD 8 doesn't support kernel PPP or SLIP; remove code for configuring and installing via such devices from sysinstall. Reviewed by: randi Approved by: rrs (mentor) MFC after: 1 month Modified: head/usr.sbin/sysinstall/devices.c head/usr.sbin/sysinstall/install.c head/usr.sbin/sysinstall/menus.c head/usr.sbin/sysinstall/network.c Modified: head/usr.sbin/sysinstall/devices.c ============================================================================== --- head/usr.sbin/sysinstall/devices.c Fri Jul 16 20:28:45 2010 (r210174) +++ head/usr.sbin/sysinstall/devices.c Fri Jul 16 20:42:20 2010 (r210175) @@ -321,14 +321,6 @@ deviceGetAll(void) if (!strncmp(ifptr->ifr_name, "lo", 2)) goto loopend; - /* If we have a slip device, don't register it */ - if (!strncmp(ifptr->ifr_name, "sl", 2)) { - goto loopend; - } - /* And the same for ppp */ - if (!strncmp(ifptr->ifr_name, "tun", 3) || !strncmp(ifptr->ifr_name, "ppp", 3)) { - goto loopend; - } /* Try and find its description */ for (i = 0, descr = NULL; device_names[i].name; i++) { int len = strlen(device_names[i].name); @@ -416,29 +408,6 @@ skipif: } break; - case DEVICE_TYPE_NETWORK: - fd = deviceTry(device_names[i], try, j); - /* The only network devices that you can open this way are serial ones */ - if (fd >= 0) { - char *newdesc, *cp; - - close(fd); - cp = device_names[i].description; - /* Serial devices get a slip and ppp device each, if supported */ - newdesc = safe_malloc(strlen(cp) + 40); - sprintf(newdesc, cp, "SLIP interface", try, j + 1); - deviceRegister("sl0", newdesc, strdup(try), DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, - NULL, mediaShutdownNetwork, NULL); - msgDebug("Add mapping for %s to sl0\n", try); - newdesc = safe_malloc(strlen(cp) + 50); - sprintf(newdesc, cp, "PPP interface", try, j + 1); - deviceRegister("ppp0", newdesc, strdup(try), DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, - NULL, mediaShutdownNetwork, NULL); - if (isDebug()) - msgDebug("Add mapping for %s to ppp0\n", try); - } - break; - default: break; } Modified: head/usr.sbin/sysinstall/install.c ============================================================================== --- head/usr.sbin/sysinstall/install.c Fri Jul 16 20:28:45 2010 (r210174) +++ head/usr.sbin/sysinstall/install.c Fri Jul 16 20:42:20 2010 (r210175) @@ -692,7 +692,7 @@ nodisks: "may do so by typing: /usr/sbin/sysinstall."); } if (mediaDevice->type != DEVICE_TYPE_FTP && mediaDevice->type != DEVICE_TYPE_NFS) { - if (!msgYesNo("Would you like to configure any Ethernet or SLIP/PPP network devices?")) { + if (!msgYesNo("Would you like to configure any Ethernet network devices?")) { Device *tmp = tcpDeviceSelect(); if (tmp && !((DevInfo *)tmp->private)->use_dhcp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name)) Modified: head/usr.sbin/sysinstall/menus.c ============================================================================== --- head/usr.sbin/sysinstall/menus.c Fri Jul 16 20:28:45 2010 (r210174) +++ head/usr.sbin/sysinstall/menus.c Fri Jul 16 20:42:20 2010 (r210175) @@ -882,13 +882,8 @@ DMenu MenuMediaFTP = { DMenu MenuNetworkDevice = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Network interface information required", - "If you are using PPP over a serial device, as opposed to a direct\n" - "ethernet connection, then you may first need to dial your Internet\n" - "Service Provider using the ppp utility we provide for that purpose.\n" - "If you're using SLIP over a serial device then the expectation is\n" - "that you have a HARDWIRED connection.\n\n" - "You can also install over a parallel port using a special \"laplink\"\n" - "cable to another machine running FreeBSD.", + "Please select the ethernet device to configure.\n\n" + "", "Press F1 to read network configuration manual", "network_device", { { NULL } }, Modified: head/usr.sbin/sysinstall/network.c ============================================================================== --- head/usr.sbin/sysinstall/network.c Fri Jul 16 20:28:45 2010 (r210174) +++ head/usr.sbin/sysinstall/network.c Fri Jul 16 20:42:20 2010 (r210175) @@ -45,9 +45,6 @@ #include static Boolean networkInitialized; -static pid_t startPPP(Device *devp); - -static pid_t pppPID; Boolean mediaInitNetwork(Device *dev) @@ -73,56 +70,6 @@ mediaInitNetwork(Device *dev) w = savescr(); dialog_clear_norefresh(); - /* Old PPP process lying around? */ - if (pppPID) { - msgConfirm("Killing previous PPP process %d.", pppPID); - kill(pppPID, SIGTERM); - pppPID = 0; - } - if (!strncmp("ppp", dev->name, 3)) { /* PPP? */ - if (!(pppPID = startPPP(dev))) { - msgConfirm("Unable to start PPP! This installation method cannot be used."); - return FALSE; - } - networkInitialized = TRUE; - return TRUE; - } - else if (!strncmp("sl", dev->name, 2)) { /* SLIP? */ - char *val; - char attach[256]; - - /* Cheesy slip attach */ - snprintf(attach, 256, "slattach -a -h -l -s 9600 %s", dev->devname); - val = msgGetInput(attach, - "Warning: SLIP is rather poorly supported in this revision\n" - "of the installation due to the lack of a dialing utility.\n" - "If you can use PPP for this instead then you're much better\n" - "off doing so, otherwise SLIP works fairly well for *hardwired*\n" - "links. Please edit the following slattach command for\n" - "correctness (default here is: VJ compression, Hardware flow-\n" - "control, ignore carrier and 9600 baud data rate). When you're\n" - "ready, press [ENTER] to execute it."); - if (!val) { - msgConfirm("slattach command was empty. Try again!"); - restorescr(w); - return FALSE; - } - else - SAFE_STRCPY(attach, val); - /* - * Doing this with vsystem() is actually bogus since we should be storing the pid of slattach - * for later killing. It's just too convenient to call vsystem(), however, rather than - * constructing a proper argument for exec() so we punt on doing slip right for now. - */ - if (vsystem("%s", attach)) { - msgConfirm("slattach returned a bad status! Please verify that\n" - "the command is correct and try this operation again."); - restorescr(w); - return FALSE; - } - restorescr(w); - } - snprintf(ifconfig, 255, "%s%s", VAR_IFCONFIG, dev->name); cp = variable_get(ifconfig); if (cp) { @@ -181,9 +128,7 @@ mediaShutdownNetwork(Device *dev) if (!RunningAsInit || !networkInitialized) return; - msgDebug("Shutdown called for network device %s\n", dev->name); - /* Not a serial device? */ - if (strncmp("sl", dev->name, 2) && strncmp("ppp", dev->name, 3)) { + msgDebug("Shutdown called for network device %s\n", dev->name); int i; char ifconfig[255]; @@ -200,172 +145,5 @@ mediaShutdownNetwork(Device *dev) msgDebug("Deleting default route.\n"); vsystem("route -n delete default"); } - } - else if (pppPID) { - msgConfirm("Killing previous PPP process %d.", pppPID); - kill(pppPID, SIGTERM); - pppPID = 0; - } - networkInitialized = FALSE; } -/* Start PPP on the 3rd screen */ -static pid_t -startPPP(Device *devp) -{ - int fd2, pulse; - FILE *fp; - char *val; - pid_t pid = 0; - char myaddr[16], provider[16], speed[16], authname[32], authkey[16]; - char phone[16]; - WINDOW *w = savescr(); - - /* These are needed to make ppp work */ - Mkdir("/var/log"); - Mkdir("/var/run"); - Mkdir("/var/spool/lock"); - Mkdir("/etc/ppp"); - - dialog_clear_norefresh(); - if (!variable_get(VAR_SERIAL_SPEED)) - variable_set2(VAR_SERIAL_SPEED, "115200", 0); - /* Get any important user values */ - val = variable_get_value(VAR_SERIAL_SPEED, - "Enter the baud rate for your modem - this can be higher than the actual\n" - "maximum data rate since most modems can talk at one speed to the\n" - "computer and at another speed to the remote end.\n\n" - "If you're not sure what to put here, just select the default.", 0); - SAFE_STRCPY(speed, (val && *val) ? val : "115200"); - - val = variable_get(VAR_GATEWAY); - SAFE_STRCPY(provider, (val && *val) ? val : "0"); - - dialog_clear_norefresh(); - val = msgGetInput(provider, "Enter the IP address of your service provider or 0 if you\n" - "don't know it and would prefer to negotiate it dynamically."); - SAFE_STRCPY(provider, (val && *val) ? val : "0"); - - if (devp->private && ((DevInfo *)devp->private)->ipaddr[0]) - SAFE_STRCPY(myaddr, ((DevInfo *)devp->private)->ipaddr); - else - strcpy(myaddr, "0"); - - if (!Fake) - fp = fopen("/etc/ppp/ppp.linkup", "w"); - else - fp = fopen("/dev/stderr", "w"); - if (fp != NULL) { - fprintf(fp, "MYADDR:\n"); - fprintf(fp, " delete ALL\n"); - fprintf(fp, " add 0 0 HISADDR\n"); - fchmod(fileno(fp), 0755); - fclose(fp); - } - if (!Fake) - fd2 = open("/etc/ppp/ppp.secret", O_CREAT); - else - fd2 = -1; - if (fd2 != -1) { - fchmod(fd2, 0700); - close(fd2); - } - if (!Fake) - fp = fopen("/etc/ppp/ppp.conf", "a"); - else - fp = fopen("/dev/stderr", "w"); - if (!fp) { - msgConfirm("Couldn't open /etc/ppp/ppp.conf file! This isn't going to work"); - restorescr(w); - return 0; - } - authname[0] = '\0'; - pulse = 0; - dialog_clear_norefresh(); - if (!dialog_yesno("", "Does your ISP support PAP or CHAP ppp logins?", -1, -1)) { - val = msgGetInput(NULL, "Enter the name you use to login to your provider."); - SAFE_STRCPY(authname, val); - dialog_clear_norefresh(); - val = msgGetInput(NULL, "Enter the password you use to login to your provider."); - SAFE_STRCPY(authkey, val); - dialog_clear_norefresh(); - val = msgGetInput(NULL, "Enter the your provider's login phone number."); - SAFE_STRCPY(phone, val); - dialog_clear_norefresh(); - pulse = dialog_yesno("", "Does your telephone line support tone dialing?", -1, -1); - } - fprintf(fp, "\ninstall:\n"); - fprintf(fp, " set speed %s\n", speed); - fprintf(fp, " set device %s\n", devp->devname); - fprintf(fp, " set ifaddr %s %s 255.255.255.0 0.0.0.0\n", myaddr, provider); - fprintf(fp, " add! default HISADDR\n"); - fprintf(fp, " set timeout 0\n"); - fprintf(fp, " enable dns\n"); - fprintf(fp, " set log local phase\n"); - if(authname[0] != '\0'){ - fprintf(fp, " set dial \"ABORT BUSY ABORT NO\\\\sCARRIER TIMEOUT 5 \\\"\\\" AT OK-AT-OK ATE1Q0 OK \\\\dATD%c\\\\T TIMEOUT 40 CONNECT\"\n", pulse ? 'P' : 'T'); - fprintf(fp, " set login\n"); - fprintf(fp, " set authname %s\n", authname); - fprintf(fp, " set authkey %s\n", authkey); - fprintf(fp, " set phone %s\n", phone); - } - if (fchmod(fileno(fp), 0600) != 0) - msgConfirm("Warning: Failed to fix permissions on /etc/ppp/ppp.conf !"); - fclose(fp); - - /* Make the ppp config persistent */ - variable_set2(VAR_PPP_ENABLE, "YES", 0); - variable_set2(VAR_PPP_PROFILE, "install", 0); - - if (!Fake && !file_readable("/dev/tun0")) { - msgConfirm("Warning: No /dev/tun0 device. PPP will not work!"); - restorescr(w); - return 0; - } - - if (isDebug()) - msgDebug("About to start PPP on device %s @ %s baud. Provider = %s\n", devp->devname, speed, provider); - - if (!Fake && !(pid = fork())) { - int i, fd; - struct termios foo; - extern int login_tty(int); - - for (i = getdtablesize(); i >= 0; i--) - close(i); - - /* We're going over to VTY2 */ - fd = open("/dev/ttyv2", O_RDWR); - ioctl(0, TIOCSCTTY, &fd); - dup2(0, 1); - dup2(0, 2); - DebugFD = 2; - if (login_tty(fd) == -1) - msgDebug("ppp: Can't set the controlling terminal.\n"); - signal(SIGTTOU, SIG_IGN); - if (tcgetattr(fd, &foo) != -1) { - foo.c_cc[VERASE] = '\010'; - if (tcsetattr(fd, TCSANOW, &foo) == -1) - msgDebug("ppp: Unable to set the erase character.\n"); - } - else - msgDebug("ppp: Unable to get the terminal attributes!\n"); - execlp("ppp", "ppp", "install", (char *)NULL); - msgDebug("PPP process failed to exec!\n"); - exit(1); - } - else { - dialog_clear_norefresh(); - msgConfirm("NOTICE: The PPP command is now started on VTY3 (type ALT-F3 to\n" - "interact with it, ALT-F1 to switch back here). If you are using\n" - "a PAP or CHAP login simply enter \"dial\", otherwise you'll need\n" - "to use the \"term\" command which starts a terminal emulator\n" - "which you can use to talk to your modem and dial the service\n" - "provider. Once you're connected, come back to this screen and\n" - "press return.\n\n" - "DO NOT PRESS [ENTER] HERE UNTIL THE CONNECTION IS FULLY\n" - "ESTABLISHED!"); - } - restorescr(w); - return pid; -} From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 21:41:55 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E1AD106566C; Fri, 16 Jul 2010 21:41:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 0AA038FC19; Fri, 16 Jul 2010 21:41:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o6GLfrAW003086; Fri, 16 Jul 2010 15:41:53 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 16 Jul 2010 15:42:16 -0600 (MDT) Message-Id: <20100716.154216.582095686063971712.imp@bsdimp.com> To: jkim@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <201007161514.04955.jkim@FreeBSD.org> References: <201007131657.o6DGvq9L097594@svn.freebsd.org> <20100715220012.X1719@delplex.bde.org> <201007161514.04955.jkim@FreeBSD.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, brde@optusnet.com.au Subject: Re: svn commit: r210005 - head/sys/modules/acpi/acpi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 21:41:55 -0000 In message: <201007161514.04955.jkim@FreeBSD.org> Jung-uk Kim writes: : On Thursday 15 July 2010 08:04 am, Bruce Evans wrote: : > On Tue, 13 Jul 2010, Jung-uk Kim wrote: : > > Log: : > > Define SMP unconditionally for amd64 and remove opt_global.h : > > from SRCS. Note it is done just for correctness sake because we : > > do not build, ship, or support acpi.ko on amd64. : > > : > > Prodded by: bde : > : > Thanks. : > : > It was much more interesting than I noticed. Modules are supposed : > to be independent of all configuration options, especially global : > ones, especially especially SMP. Perhaps this is too much to ask : > for acpi. Does it work now, after you removed an SMP ifdef from it? : : I removed "#ifdef SMP" from acpi.c because 'smp_started' is available : for both UP and SMP kernels. On the other hand, I cannot remove : these easily from sys/amd64/acpica/acpi_wakeup.c, i.e., it requires : some symbols from sys/amd64/amd64/mp_machdep.c, which are only : available in SMP case. : : FYI, we never had to worry about acpi.ko on i386 because we didn't : implement suspend/resume for SMP case in the first place. X-) Does this mean we do implement it on amd64 now? I may have to start trying to use it again... Warner From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 22:09:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3568106564A; Fri, 16 Jul 2010 22:09:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B84838FC0A; Fri, 16 Jul 2010 22:09:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6GM9T2H035766; Fri, 16 Jul 2010 22:09:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GM9Tqi035760; Fri, 16 Jul 2010 22:09:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007162209.o6GM9Tqi035760@svn.freebsd.org> From: Alexander Motin Date: Fri, 16 Jul 2010 22:09:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210176 - in head/sys: sparc64/include sparc64/sparc64 sun4v/include sun4v/sun4v X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 22:09:30 -0000 Author: mav Date: Fri Jul 16 22:09:29 2010 New Revision: 210176 URL: http://svn.freebsd.org/changeset/base/210176 Log: Allocate proper ammount of memory for interrupt names on sparc64 and sun4v, same as done on other architectures. This removes garbage from `vmstat -ia` output. Reviewed by: marius@ Modified: head/sys/sparc64/include/intr_machdep.h head/sys/sparc64/sparc64/exception.S head/sys/sparc64/sparc64/genassym.c head/sys/sun4v/include/intr_machdep.h head/sys/sun4v/sun4v/exception.S Modified: head/sys/sparc64/include/intr_machdep.h ============================================================================== --- head/sys/sparc64/include/intr_machdep.h Fri Jul 16 20:42:20 2010 (r210175) +++ head/sys/sparc64/include/intr_machdep.h Fri Jul 16 22:09:29 2010 (r210176) @@ -33,7 +33,6 @@ #define PIL_MAX (1 << 4) #define IV_MAX (1 << 11) -#define IV_NAMLEN 1024 #define IR_FREE (PIL_MAX * 2) Modified: head/sys/sparc64/sparc64/exception.S ============================================================================== --- head/sys/sparc64/sparc64/exception.S Fri Jul 16 20:42:20 2010 (r210175) +++ head/sys/sparc64/sparc64/exception.S Fri Jul 16 22:09:29 2010 (r210176) @@ -365,7 +365,7 @@ ENTRY(rsf_fatal) sir END(rsf_fatal) - .comm intrnames, IV_NAMLEN + .comm intrnames, IV_MAX * (MAXCOMLEN + 1) .comm eintrnames, 0 .comm intrcnt, IV_MAX * 8 Modified: head/sys/sparc64/sparc64/genassym.c ============================================================================== --- head/sys/sparc64/sparc64/genassym.c Fri Jul 16 20:42:20 2010 (r210175) +++ head/sys/sparc64/sparc64/genassym.c Fri Jul 16 22:09:29 2010 (r210176) @@ -160,6 +160,7 @@ ASSYM(HASH_ENTRY_SHIFT, HASH_ENTRY_SHIFT ASSYM(V_INTR, offsetof(struct vmmeter, v_intr)); +ASSYM(MAXCOMLEN, MAXCOMLEN); ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread)); ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb)); ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid)); Modified: head/sys/sun4v/include/intr_machdep.h ============================================================================== --- head/sys/sun4v/include/intr_machdep.h Fri Jul 16 20:42:20 2010 (r210175) +++ head/sys/sun4v/include/intr_machdep.h Fri Jul 16 22:09:29 2010 (r210176) @@ -33,7 +33,6 @@ #define PIL_MAX (1 << 4) #define IV_MAX (1 << 11) -#define IV_NAMLEN 1024 #define IR_FREE (PIL_MAX * 2) Modified: head/sys/sun4v/sun4v/exception.S ============================================================================== --- head/sys/sun4v/sun4v/exception.S Fri Jul 16 20:42:20 2010 (r210175) +++ head/sys/sun4v/sun4v/exception.S Fri Jul 16 22:09:29 2010 (r210176) @@ -1948,7 +1948,7 @@ END(fork_trampoline) - .comm intrnames, IV_NAMLEN + .comm intrnames, IV_MAX * (MAXCOMLEN + 1) .comm eintrnames, 0 .comm intrcnt, IV_MAX * 8 From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 23:13:04 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 4BCEF106566B; Fri, 16 Jul 2010 23:13:01 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: "M. Warner Losh" Date: Fri, 16 Jul 2010 19:12:45 -0400 User-Agent: KMail/1.6.2 References: <201007131657.o6DGvq9L097594@svn.freebsd.org> <201007161514.04955.jkim@FreeBSD.org> <20100716.154216.582095686063971712.imp@bsdimp.com> In-Reply-To: <20100716.154216.582095686063971712.imp@bsdimp.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201007161912.53042.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, brde@optusnet.com.au Subject: Re: svn commit: r210005 - head/sys/modules/acpi/acpi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 23:13:04 -0000 On Friday 16 July 2010 05:42 pm, M. Warner Losh wrote: > In message: <201007161514.04955.jkim@FreeBSD.org> > > Jung-uk Kim writes: > : On Thursday 15 July 2010 08:04 am, Bruce Evans wrote: > : > On Tue, 13 Jul 2010, Jung-uk Kim wrote: > : > > Log: > : > > Define SMP unconditionally for amd64 and remove opt_global.h > : > > from SRCS. Note it is done just for correctness sake because > : > > we do not build, ship, or support acpi.ko on amd64. > : > > > : > > Prodded by: bde > : > > : > Thanks. > : > > : > It was much more interesting than I noticed. Modules are > : > supposed to be independent of all configuration options, > : > especially global ones, especially especially SMP. Perhaps > : > this is too much to ask for acpi. Does it work now, after you > : > removed an SMP ifdef from it? > : > : I removed "#ifdef SMP" from acpi.c because 'smp_started' is > : available for both UP and SMP kernels. On the other hand, I > : cannot remove these easily from sys/amd64/acpica/acpi_wakeup.c, > : i.e., it requires some symbols from sys/amd64/amd64/mp_machdep.c, > : which are only available in SMP case. > : > : FYI, we never had to worry about acpi.ko on i386 because we > : didn't implement suspend/resume for SMP case in the first place. > : X-) > > Does this mean we do implement it on amd64 now? I may have to > start trying to use it again... Yes, I did that for a while ago. 8-) Jung-uk Kim From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 23:17:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89A3E1065672; Fri, 16 Jul 2010 23:17:05 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EC278FC13; Fri, 16 Jul 2010 23:17:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6GNH5KA050724; Fri, 16 Jul 2010 23:17:05 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GNH5X2050722; Fri, 16 Jul 2010 23:17:05 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007162317.o6GNH5X2050722@svn.freebsd.org> From: Rick Macklem Date: Fri, 16 Jul 2010 23:17:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210178 - head/sys/fs/nfsserver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 23:17:05 -0000 Author: rmacklem Date: Fri Jul 16 23:17:05 2010 New Revision: 210178 URL: http://svn.freebsd.org/changeset/base/210178 Log: Patch the experimental NFSv4 server so that it acquires a reference count on nfsv4rootfs_lock when dumping state, since these functions are not called by nfsd threads. Without this reference count, it is possible for an nfsd thread to acquire an exclusive lock on nfsv4rootfs_lock while the dump is in progress and then change the lists, potentially causing a crash. Reported by: zack.kirsch at isilon.com MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Jul 16 22:58:13 2010 (r210177) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Fri Jul 16 23:17:05 2010 (r210178) @@ -600,6 +600,13 @@ nfsrv_dumpclients(struct nfsd_dumpclient struct nfsclient *clp; int i = 0, cnt = 0; + /* + * First, get a reference on the nfsv4rootfs_lock so that an + * exclusive lock cannot be acquired while dumping the clients. + */ + NFSLOCKV4ROOTMUTEX(); + nfsv4_getref(&nfsv4rootfs_lock, NULL, NFSV4ROOTLOCKMUTEXPTR); + NFSUNLOCKV4ROOTMUTEX(); NFSLOCKSTATE(); /* * Rattle through the client lists until done. @@ -616,6 +623,9 @@ nfsrv_dumpclients(struct nfsd_dumpclient if (cnt < maxcnt) dumpp[cnt].ndcl_clid.nclid_idlen = 0; NFSUNLOCKSTATE(); + NFSLOCKV4ROOTMUTEX(); + nfsv4_relref(&nfsv4rootfs_lock); + NFSUNLOCKV4ROOTMUTEX(); } /* @@ -691,12 +701,22 @@ nfsrv_dumplocks(vnode_t vp, struct nfsd_ fhandle_t nfh; ret = nfsrv_getlockfh(vp, 0, NULL, &nfh, p); + /* + * First, get a reference on the nfsv4rootfs_lock so that an + * exclusive lock on it cannot be acquired while dumping the locks. + */ + NFSLOCKV4ROOTMUTEX(); + nfsv4_getref(&nfsv4rootfs_lock, NULL, NFSV4ROOTLOCKMUTEXPTR); + NFSUNLOCKV4ROOTMUTEX(); NFSLOCKSTATE(); if (!ret) ret = nfsrv_getlockfile(0, NULL, &lfp, &nfh, 0); if (ret) { ldumpp[0].ndlck_clid.nclid_idlen = 0; NFSUNLOCKSTATE(); + NFSLOCKV4ROOTMUTEX(); + nfsv4_relref(&nfsv4rootfs_lock); + NFSUNLOCKV4ROOTMUTEX(); return; } @@ -797,6 +817,9 @@ nfsrv_dumplocks(vnode_t vp, struct nfsd_ if (cnt < maxcnt) ldumpp[cnt].ndlck_clid.nclid_idlen = 0; NFSUNLOCKSTATE(); + NFSLOCKV4ROOTMUTEX(); + nfsv4_relref(&nfsv4rootfs_lock); + NFSUNLOCKV4ROOTMUTEX(); } /* From owner-svn-src-head@FreeBSD.ORG Fri Jul 16 23:21:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B423E1065672; Fri, 16 Jul 2010 23:21:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A2A278FC22; Fri, 16 Jul 2010 23:21:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6GNLkOE051765; Fri, 16 Jul 2010 23:21:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6GNLkFD051762; Fri, 16 Jul 2010 23:21:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007162321.o6GNLkFD051762@svn.freebsd.org> From: Alexander Motin Date: Fri, 16 Jul 2010 23:21:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210179 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 23:21:46 -0000 Author: mav Date: Fri Jul 16 23:21:46 2010 New Revision: 210179 URL: http://svn.freebsd.org/changeset/base/210179 Log: Add hints for i8254 timer on i386 and amd64. Some people report about systems with PnP/ACPI not reporting i8254 timer. In some cases it can be fatal, as i8254 can be the only available time counter hardware. From other side we are now heavily depend on i8254 timer and till the last time it's init/usage was completely hardcoded. So this change just restores previous behavior in more regular fashion. Modified: head/sys/amd64/conf/GENERIC.hints head/sys/i386/conf/GENERIC.hints Modified: head/sys/amd64/conf/GENERIC.hints ============================================================================== --- head/sys/amd64/conf/GENERIC.hints Fri Jul 16 23:17:05 2010 (r210178) +++ head/sys/amd64/conf/GENERIC.hints Fri Jul 16 23:21:46 2010 (r210179) @@ -27,3 +27,6 @@ hint.ppc.0.irq="7" hint.atrtc.0.at="isa" hint.atrtc.0.port="0x70" hint.atrtc.0.irq="8" +hint.attimer.0.at="isa" +hint.attimer.0.port="0x40" +hint.attimer.0.irq="0" Modified: head/sys/i386/conf/GENERIC.hints ============================================================================== --- head/sys/i386/conf/GENERIC.hints Fri Jul 16 23:17:05 2010 (r210178) +++ head/sys/i386/conf/GENERIC.hints Fri Jul 16 23:21:46 2010 (r210179) @@ -35,3 +35,6 @@ hint.ppc.0.irq="7" hint.atrtc.0.at="isa" hint.atrtc.0.port="0x70" hint.atrtc.0.irq="8" +hint.attimer.0.at="isa" +hint.attimer.0.port="0x40" +hint.attimer.0.irq="0" From owner-svn-src-head@FreeBSD.ORG Sat Jul 17 00:29:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CCAF106566C; Sat, 17 Jul 2010 00:29:38 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B3BE8FC1C; Sat, 17 Jul 2010 00:29:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6H0Tcft066741; Sat, 17 Jul 2010 00:29:38 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6H0TcJV066739; Sat, 17 Jul 2010 00:29:38 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201007170029.o6H0TcJV066739@svn.freebsd.org> From: Maxim Konovalov Date: Sat, 17 Jul 2010 00:29:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210181 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 00:29:38 -0000 Author: maxim Date: Sat Jul 17 00:29:38 2010 New Revision: 210181 URL: http://svn.freebsd.org/changeset/base/210181 Log: o Fix typo: "is is" -> "is". PR: docs/148697 Submitted by: Warren Block MFC after: 1 week Modified: head/share/man/man4/u3g.4 Modified: head/share/man/man4/u3g.4 ============================================================================== --- head/share/man/man4/u3g.4 Sat Jul 17 00:12:41 2010 (r210180) +++ head/share/man/man4/u3g.4 Sat Jul 17 00:29:38 2010 (r210181) @@ -93,7 +93,7 @@ device will attach temporarily to a 3G d force it to switch to modem mode, The attach and detach of .Xr u3gstub -and any driver disk device present on the 3G device is is hidden, unless the +and any driver disk device present on the 3G device is hidden, unless the machine was booted in verbose mode (see .Xr boot 8 ) . To temporarily unhide the device, set From owner-svn-src-head@FreeBSD.ORG Sat Jul 17 03:39:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF87A1065674; Sat, 17 Jul 2010 03:39:50 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9ECEF8FC17; Sat, 17 Jul 2010 03:39:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6H3do0m008731; Sat, 17 Jul 2010 03:39:50 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6H3dor1008729; Sat, 17 Jul 2010 03:39:50 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007170339.o6H3dor1008729@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 17 Jul 2010 03:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210184 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 03:39:50 -0000 Author: lstewart Date: Sat Jul 17 03:39:50 2010 New Revision: 210184 URL: http://svn.freebsd.org/changeset/base/210184 Log: Unbreak DPCPU_SUM() by dereferencing the pointer returned by DPCPU_ID_PTR(). MFC after: 3 days Modified: head/sys/sys/pcpu.h Modified: head/sys/sys/pcpu.h ============================================================================== --- head/sys/sys/pcpu.h Sat Jul 17 01:40:41 2010 (r210183) +++ head/sys/sys/pcpu.h Sat Jul 17 03:39:50 2010 (r210184) @@ -116,7 +116,7 @@ extern uintptr_t dpcpu_off[]; \ sum = 0; \ CPU_FOREACH(_i) { \ - sum += DPCPU_ID_PTR(_i, n); \ + sum += *DPCPU_ID_PTR(_i, n); \ } \ sum; \ }) From owner-svn-src-head@FreeBSD.ORG Sat Jul 17 12:53:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94510106564A; Sat, 17 Jul 2010 12:53:57 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 841EA8FC15; Sat, 17 Jul 2010 12:53:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6HCrvh9032710; Sat, 17 Jul 2010 12:53:57 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HCrvbJ032709; Sat, 17 Jul 2010 12:53:57 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007171253.o6HCrvbJ032709@svn.freebsd.org> From: Benedict Reuschling Date: Sat, 17 Jul 2010 12:53:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210191 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 12:53:57 -0000 Author: bcr (doc committer) Date: Sat Jul 17 12:53:57 2010 New Revision: 210191 URL: http://svn.freebsd.org/changeset/base/210191 Log: s/an struct/a struct PR: docs/148660 Submitted by: Warren Block (wblock at wonkity dot com) Reviewed by: Tim Kientzle Mentored by: jkois MFC after: 7 days Modified: head/lib/libarchive/libarchive.3 Modified: head/lib/libarchive/libarchive.3 ============================================================================== --- head/lib/libarchive/libarchive.3 Sat Jul 17 07:59:53 2010 (r210190) +++ head/lib/libarchive/libarchive.3 Sat Jul 17 12:53:57 2010 (r210191) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 19, 2006 +.Dd July 17, 2010 .Dt LIBARCHIVE 3 .Os .Sh NAME @@ -158,7 +158,7 @@ Each archive entry consists of a header amount of data. You can obtain the next header with .Fn archive_read_next_header , -which returns a pointer to an +which returns a pointer to a .Tn struct archive_entry structure with information about the current archive element. If the entry is a regular file, then the header will be followed @@ -324,7 +324,7 @@ or the arbitrary key/value pairs that ca pax interchange format archives. .Pp Conversely, of course, not all of the information that can be -stored in an +stored in a .Tn struct archive_entry is supported by all formats. For example, cpio formats do not support nanosecond timestamps; From owner-svn-src-head@FreeBSD.ORG Sat Jul 17 13:16:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE564106566B; Sat, 17 Jul 2010 13:16:02 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (unknown [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 784468FC16; Sat, 17 Jul 2010 13:16:02 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id C061A2A28CE6; Sat, 17 Jul 2010 15:16:01 +0200 (CEST) Date: Sat, 17 Jul 2010 15:16:01 +0200 From: Ed Schouten To: Benedict Reuschling Message-ID: <20100717131601.GX1742@hoeg.nl> References: <201007171253.o6HCrvbJ032709@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Zxhbmr+fMFEUWeNp" Content-Disposition: inline In-Reply-To: <201007171253.o6HCrvbJ032709@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210191 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 13:16:03 -0000 --Zxhbmr+fMFEUWeNp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Benedict, * Benedict Reuschling wrote: > amount of data. > You can obtain the next header with > .Fn archive_read_next_header , > -which returns a pointer to an > +which returns a pointer to a > .Tn struct archive_entry > structure with information about the current archive element. > If the entry is a regular file, then the header will be followed > @@ -324,7 +324,7 @@ or the arbitrary key/value pairs that ca > pax interchange format archives. > .Pp > Conversely, of course, not all of the information that can be > -stored in an > +stored in a > .Tn struct archive_entry > is supported by all formats. > For example, cpio formats do not support nanosecond timestamps; Wouldn't it be better to change it the other way around, by removing the `struct' word? "... which returns a pointer to an archive_entry structure with ..." --=20 Ed Schouten WWW: http://80386.nl/ --Zxhbmr+fMFEUWeNp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iEYEARECAAYFAkxBrREACgkQ52SDGA2eCwX2awCcCefnfPN1Ngus1QLVfXB0UZdj X78AnjkBrQu1ELBSyHyYwmhFYGp/byVW =LoE1 -----END PGP SIGNATURE----- --Zxhbmr+fMFEUWeNp-- From owner-svn-src-head@FreeBSD.ORG Sat Jul 17 13:21:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A3EE106566B; Sat, 17 Jul 2010 13:21:53 +0000 (UTC) (envelope-from rpaulo@freebsd.org) Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by mx1.freebsd.org (Postfix) with ESMTP id 6E5878FC0C; Sat, 17 Jul 2010 13:21:53 +0000 (UTC) Received: from e.earth.lavabit.com (e.earth.lavabit.com [192.168.111.14]) by karen.lavabit.com (Postfix) with ESMTP id 60DBC15755D; Sat, 17 Jul 2010 08:21:52 -0500 (CDT) Received: from 10.0.10.3 (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by lavabit.com with ESMTP id X7H3F9XV5HU0; Sat, 17 Jul 2010 08:21:52 -0500 Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <201007151441.o6FEf6Lc015448@svn.freebsd.org> Date: Sat, 17 Jul 2010 14:21:48 +0100 Content-Transfer-Encoding: 7bit Message-Id: References: <201007151441.o6FEf6Lc015448@svn.freebsd.org> To: Luigi Rizzo X-Mailer: Apple Mail (2.1081) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210121 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 13:21:55 -0000 On 15 Jul 2010, at 15:41, Luigi Rizzo wrote: > Author: luigi > Date: Thu Jul 15 14:41:06 2010 > New Revision: 210121 > URL: http://svn.freebsd.org/changeset/base/210121 > > Log: > small portability fix to build on linux/windows Do we really want this, especially on sys? Regards, -- Rui Paulo From owner-svn-src-head@FreeBSD.ORG Sat Jul 17 13:31:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2ACA1065679; Sat, 17 Jul 2010 13:31:27 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1C0B8FC08; Sat, 17 Jul 2010 13:31:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6HDVRBZ041007; Sat, 17 Jul 2010 13:31:27 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HDVRUT041005; Sat, 17 Jul 2010 13:31:27 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007171331.o6HDVRUT041005@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 17 Jul 2010 13:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210192 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 13:31:27 -0000 Author: nwhitehorn Date: Sat Jul 17 13:31:27 2010 New Revision: 210192 URL: http://svn.freebsd.org/changeset/base/210192 Log: Increase stack size for ZFS sync thread. This is required to make ZFS function on 64-bit PowerPC. Reviewed by: pjd Obtained from: OpenSolaris changeset 14653:7cf402a7f374 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Sat Jul 17 12:53:57 2010 (r210191) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Sat Jul 17 13:31:27 2010 (r210192) @@ -146,7 +146,7 @@ txg_sync_start(dsl_pool_t *dp) * 32-bit x86. This is due in part to nested pools and * scrub_visitbp() recursion. */ - tx->tx_sync_thread = thread_create(NULL, 12<<10, txg_sync_thread, + tx->tx_sync_thread = thread_create(NULL, 32<<10, txg_sync_thread, dp, 0, &p0, TS_RUN, minclsyspri); mutex_exit(&tx->tx_sync_lock); From owner-svn-src-head@FreeBSD.ORG Sat Jul 17 13:34:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7A431065670; Sat, 17 Jul 2010 13:34:01 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95A678FC1C; Sat, 17 Jul 2010 13:34:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6HDY14U041617; Sat, 17 Jul 2010 13:34:01 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HDY1Kr041612; Sat, 17 Jul 2010 13:34:01 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007171334.o6HDY1Kr041612@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 17 Jul 2010 13:34:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210193 - in head/sys: cddl/contrib/opensolaris/common/atomic/powerpc64 modules modules/opensolaris modules/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 13:34:01 -0000 Author: nwhitehorn Date: Sat Jul 17 13:34:01 2010 New Revision: 210193 URL: http://svn.freebsd.org/changeset/base/210193 Log: Add OpenSolaris atomics for powerpc64 and connect ZFS to the build on this platform. Reviewed by: pjd Added: head/sys/cddl/contrib/opensolaris/common/atomic/powerpc64/ head/sys/cddl/contrib/opensolaris/common/atomic/powerpc64/opensolaris_atomic.S (contents, props changed) Modified: head/sys/modules/Makefile head/sys/modules/opensolaris/Makefile head/sys/modules/zfs/Makefile Added: head/sys/cddl/contrib/opensolaris/common/atomic/powerpc64/opensolaris_atomic.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/cddl/contrib/opensolaris/common/atomic/powerpc64/opensolaris_atomic.S Sat Jul 17 13:34:01 2010 (r210193) @@ -0,0 +1,75 @@ +/*- + * Copyright (C) 2010 Nathan Whitehorn + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include + +ENTRY(atomic_add_64_nv) + 1: ldarx %r5,0,%r3 + add %r5,%r4,%r5 + stdcx. %r5,0,%r3 + bne- 1b + + mr %r3,%r5 + blr + +ENTRY(atomic_cas_64) + 1: ldarx %r6,0,%r3 + cmpld %r6,%r4 + bne 2f + stdcx. %r5,0,%r3 + bne- 1b + b 3f + + 2: stdcx. %r6,0,%r3 /* clear reservation */ + + 3: mr %r3,%r6 + blr + +ENTRY(atomic_or_8_nv) + li %r6,3 + andc. %r6,%r3,%r6 /* r6 = r3 & ~4 */ + addi %r7,%r6,3 + sub %r7,%r7,%r3 /* offset in r7 */ + sldi %r7,%r7,3 /* bits to shift in r7 */ + + rlwinm %r4,%r4,0,24,31 /* mask and rotate the argument */ + slw %r4,%r4,%r7 + + 1: lwarx %r5,0,%r6 + or %r5,%r4,%r5 + stwcx. %r5,0,%r6 + bne- 1b + + srw %r3,%r5,%r7 + rlwinm %r3,%r3,0,24,31 /* mask return value */ + + blr + +ENTRY(membar_producer) + eieio + blr + Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat Jul 17 13:31:27 2010 (r210192) +++ head/sys/modules/Makefile Sat Jul 17 13:34:01 2010 (r210193) @@ -624,6 +624,15 @@ _smbfs= smbfs _sound= sound .endif +.if ${MACHINE_ARCH} == "powerpc64" +.if ${MK_CDDL} != "no" || defined(ALL_MODULES) +_opensolaris= opensolaris +.endif +.if ${MK_ZFS} != "no" || defined(ALL_MODULES) +_zfs= zfs +.endif +.endif + .if ${MACHINE_ARCH} == "sparc64" _auxio= auxio _em= em Modified: head/sys/modules/opensolaris/Makefile ============================================================================== --- head/sys/modules/opensolaris/Makefile Sat Jul 17 13:31:27 2010 (r210192) +++ head/sys/modules/opensolaris/Makefile Sat Jul 17 13:34:01 2010 (r210193) @@ -8,7 +8,7 @@ SRCS= opensolaris.c \ opensolaris_kmem.c \ opensolaris_misc.c -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "powerpc64" .PATH: ${.CURDIR}/../../cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} SRCS+= opensolaris_atomic.S .else Modified: head/sys/modules/zfs/Makefile ============================================================================== --- head/sys/modules/zfs/Makefile Sat Jul 17 13:31:27 2010 (r210192) +++ head/sys/modules/zfs/Makefile Sat Jul 17 13:34:01 2010 (r210193) @@ -27,7 +27,7 @@ SRCS+= opensolaris_uio.c SRCS+= opensolaris_vfs.c SRCS+= opensolaris_zone.c -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "powerpc64" .PATH: ${SUNW}/common/atomic/${MACHINE_ARCH} SRCS+= opensolaris_atomic.S .else From owner-svn-src-head@FreeBSD.ORG Sat Jul 17 15:35:08 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15F771065673; Sat, 17 Jul 2010 15:35:08 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from mxout0.bln1.prohost.de (mxout0.bln1.prohost.de [213.160.84.46]) by mx1.freebsd.org (Postfix) with ESMTP id 970398FC17; Sat, 17 Jul 2010 15:35:07 +0000 (UTC) Received: from Macintosh.local (p4FC7523A.dip.t-dialin.net [79.199.82.58]) (authenticated bits=0) by mx1.bln1.prohost.de (8.14.1/8.14.1) with ESMTP id o6HFNepv023388 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 17 Jul 2010 17:23:41 +0200 Message-ID: <4C41CAFF.60208@FreeBSD.org> Date: Sat, 17 Jul 2010 17:23:43 +0200 From: Benedict Reuschling Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 MIME-Version: 1.0 To: Ed Schouten References: <201007171253.o6HCrvbJ032709@svn.freebsd.org> <20100717131601.GX1742@hoeg.nl> In-Reply-To: <20100717131601.GX1742@hoeg.nl> X-Enigmail-Version: 1.1.1 OpenPGP: id=4A819348 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Null-Tag: e76b737e49f26e068b3026fdd7ed1c34 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r210191 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bcr@FreeBSD.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 15:35:08 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Ed, Am 17.07.10 15:16, schrieb Ed Schouten: > Hi Benedict, > > * Benedict Reuschling wrote: >> amount of data. >> You can obtain the next header with >> .Fn archive_read_next_header , >> -which returns a pointer to an >> +which returns a pointer to a >> .Tn struct archive_entry >> structure with information about the current archive element. >> If the entry is a regular file, then the header will be followed >> @@ -324,7 +324,7 @@ or the arbitrary key/value pairs that ca >> pax interchange format archives. >> .Pp >> Conversely, of course, not all of the information that can be >> -stored in an >> +stored in a >> .Tn struct archive_entry >> is supported by all formats. >> For example, cpio formats do not support nanosecond timestamps; > > Wouldn't it be better to change it the other way around, by removing the > `struct' word? > > "... which returns a pointer to an archive_entry structure with ..." > the way I see it, "struct something structure" has a redundant struct (or structure) when read with my "normal english sentence" glasses on. However, in this case it is important for the understanding that archive_entry IS a struct and therefore the "struct archive_entry" must be read as a source code example within the text (partly looking through my source code glasses). There are more places in this man page where the struct is placed similarly, so for the sake of consistency, I would prefer to leave it as it is now. If that man page was not primarily written for developers (which I think it is), I would agree with you on that. Your suggestion is right, nonetheless. Regards (or "Groetjes", as I've learned recently) ;-) Benedict Reuschling The FreeBSD Documentation Project FreeBSD German Documentation Project - https://doc.bsdgroup.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxByvcACgkQTSZQLkqBk0i5wwCgpVzqlGPHSrMBluRBJFmktgFe gHEAnRpzUCz5JHirYYsIxeU/IM8b28fB =Lk3C -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Sat Jul 17 15:45:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76CFD106567B; Sat, 17 Jul 2010 15:45:20 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6647D8FC14; Sat, 17 Jul 2010 15:45:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6HFjKiw070605; Sat, 17 Jul 2010 15:45:20 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HFjKex070603; Sat, 17 Jul 2010 15:45:20 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007171545.o6HFjKex070603@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 17 Jul 2010 15:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210194 - head/sys/fs/unionfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 15:45:20 -0000 Author: trasz Date: Sat Jul 17 15:45:20 2010 New Revision: 210194 URL: http://svn.freebsd.org/changeset/base/210194 Log: Remove updating process count by unionfs. It serves no purpose, unionfs just needs root credentials for a moment. Modified: head/sys/fs/unionfs/union_subr.c Modified: head/sys/fs/unionfs/union_subr.c ============================================================================== --- head/sys/fs/unionfs/union_subr.c Sat Jul 17 13:34:01 2010 (r210193) +++ head/sys/fs/unionfs/union_subr.c Sat Jul 17 15:45:20 2010 (r210194) @@ -50,7 +50,6 @@ #include #include #include -#include #include @@ -775,7 +774,6 @@ unionfs_mkshadowdir(struct unionfs_mount /* Authority change to root */ rootinfo = uifind((uid_t)0); cred = crdup(cnp->cn_cred); - chgproccnt(cred->cr_ruidinfo, 1, 0); change_euid(cred, rootinfo); change_ruid(cred, rootinfo); change_svuid(cred, (uid_t)0); @@ -825,7 +823,6 @@ unionfs_mkshadowdir_free_out: unionfs_mkshadowdir_abort: cnp->cn_cred = credbk; - chgproccnt(cred->cr_ruidinfo, -1, 0); crfree(cred); return (error); From owner-svn-src-head@FreeBSD.ORG Sat Jul 17 15:52:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13C5A1065679; Sat, 17 Jul 2010 15:52:12 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 033DC8FC22; Sat, 17 Jul 2010 15:52:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6HFqBNK072225; Sat, 17 Jul 2010 15:52:11 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HFqBAl072223; Sat, 17 Jul 2010 15:52:11 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007171552.o6HFqBAl072223@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 17 Jul 2010 15:52:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210197 - head/sys/compat/svr4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 15:52:12 -0000 Author: trasz Date: Sat Jul 17 15:52:11 2010 New Revision: 210197 URL: http://svn.freebsd.org/changeset/base/210197 Log: Remove proc locking, it's not needed after r210132. Modified: head/sys/compat/svr4/svr4_filio.c Modified: head/sys/compat/svr4/svr4_filio.c ============================================================================== --- head/sys/compat/svr4/svr4_filio.c Sat Jul 17 15:47:28 2010 (r210196) +++ head/sys/compat/svr4/svr4_filio.c Sat Jul 17 15:52:11 2010 (r210197) @@ -64,12 +64,8 @@ svr4_sys_poll(td, uap) int idx = 0, cerr; u_long siz; - PROC_LOCK(td->td_proc); - if (uap->nfds > maxfilesperproc && uap->nfds > FD_SETSIZE) { - PROC_UNLOCK(td->td_proc); + if (uap->nfds > maxfilesperproc && uap->nfds > FD_SETSIZE) return (EINVAL); - } - PROC_UNLOCK(td->td_proc); pa.fds = uap->fds; pa.nfds = uap->nfds; From owner-svn-src-head@FreeBSD.ORG Sat Jul 17 18:05:37 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 214A41065677; Sat, 17 Jul 2010 18:05:37 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id D1B548FC0A; Sat, 17 Jul 2010 18:05:35 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 2DA3E730A1; Sat, 17 Jul 2010 20:16:31 +0200 (CEST) Date: Sat, 17 Jul 2010 20:16:31 +0200 From: Luigi Rizzo To: Rui Paulo Message-ID: <20100717181631.GA89827@onelab2.iet.unipi.it> References: <201007151441.o6FEf6Lc015448@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r210121 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 18:05:37 -0000 On Sat, Jul 17, 2010 at 02:21:48PM +0100, Rui Paulo wrote: > > On 15 Jul 2010, at 15:41, Luigi Rizzo wrote: > > > Author: luigi > > Date: Thu Jul 15 14:41:06 2010 > > New Revision: 210121 > > URL: http://svn.freebsd.org/changeset/base/210121 > > > > Log: > > small portability fix to build on linux/windows > > Do we really want this, especially on sys? the alternative would be to keep a separate tree with cross platform sources, and periodically import the code in FreeBSD. This seems largely overkill considering that 1. most of the development of ipfw/dummynet occurs within FreeBSD and there are several people besides myself contributing features and bugfixes; 2. as you can see, the number and size of OS-specific parts is very very small (this was one of my goals when porting it) so there is no loss of readability. Also, I am deliberately avoiding any change that would cause a loss of performance on FreeBSD: in case, i put the extra burden on other platforms. cheers luigi From owner-svn-src-head@FreeBSD.ORG Sat Jul 17 18:31:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81AA31065674; Sat, 17 Jul 2010 18:31:31 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 572878FC17; Sat, 17 Jul 2010 18:31:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6HIVVRH007210; Sat, 17 Jul 2010 18:31:31 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HIVVO0007209; Sat, 17 Jul 2010 18:31:31 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007171831.o6HIVVO0007209@svn.freebsd.org> From: Rui Paulo Date: Sat, 17 Jul 2010 18:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210199 - in head/cddl/contrib/opensolaris/lib/libdtrace: i386 sparc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 18:31:31 -0000 Author: rpaulo Date: Sat Jul 17 18:31:31 2010 New Revision: 210199 URL: http://svn.freebsd.org/changeset/base/210199 Log: Merge from vendor: libdtrace MD parts needed by fasttrap. Sponsored by: The FreeBSD Foundation Added: head/cddl/contrib/opensolaris/lib/libdtrace/i386/ - copied from r210198, vendor/opensolaris/dist/lib/libdtrace/i386/ head/cddl/contrib/opensolaris/lib/libdtrace/sparc/ - copied from r210198, vendor/opensolaris/dist/lib/libdtrace/sparc/ Modified: Directory Properties: head/cddl/contrib/opensolaris/ (props changed) From owner-svn-src-head@FreeBSD.ORG Sat Jul 17 18:35:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F26D1065670; Sat, 17 Jul 2010 18:35:39 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 640088FC12; Sat, 17 Jul 2010 18:35:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6HIZdR8008134; Sat, 17 Jul 2010 18:35:39 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6HIZdqL008131; Sat, 17 Jul 2010 18:35:39 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201007171835.o6HIZdqL008131@svn.freebsd.org> From: Tijl Coosemans Date: Sat, 17 Jul 2010 18:35:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210200 - in head: share/misc usr.bin/calendar/calendars X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 18:35:39 -0000 Author: tijl Date: Sat Jul 17 18:35:39 2010 New Revision: 210200 URL: http://svn.freebsd.org/changeset/base/210200 Log: - Add myself to committers-src.dot - Add myself to calendar.freebsd Approved by: kib (mentor) Modified: head/share/misc/committers-src.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Sat Jul 17 18:31:31 2010 (r210199) +++ head/share/misc/committers-src.dot Sat Jul 17 18:35:39 2010 (r210200) @@ -192,6 +192,7 @@ syrinx [label="Shteryana Shopova\nsyrinx takawata [label="Takanori Watanabe\ntakawata@FreeBSD.org\n2000/07/06"] thompsa [label="Andrew Thompson\nthompsa@FreeBSD.org\n2005/05/25"] ticso [label="Bernd Walter\nticso@FreeBSD.org\n2002/01/31"] +tijl [label="Tijl Coosemans\ntijl@FreeBSD.org\n2010/07/16"] trasz [label="Edward Tomasz Napierala\ntrasz@FreeBSD.org\n2008/08/22"] trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2002/05/28"] tuexen [label="Michael Tuexen\ntuexen@FreeBSD.org\n2009/06/06"] @@ -375,6 +376,7 @@ kib -> pho kib -> rdivacky kib -> rmacklem kib -> stas +kib -> tijl kmacy -> lstewart Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Sat Jul 17 18:31:31 2010 (r210199) +++ head/usr.bin/calendar/calendars/calendar.freebsd Sat Jul 17 18:35:39 2010 (r210200) @@ -289,6 +289,7 @@ 11/10 Gregory Neil Shapiro born in Providence, Rhode Island, United States, 1970 11/13 John Baldwin born in Stuart, Virginia, United States, 1977 11/15 Lars Engels born in Hilden, Nordrhein-Westfalen, Germany, 1980 +11/15 Tijl Coosemans born in Duffel, Belgium, 1983 11/16 Jose Maria Alcaide Salinas born in Madrid, Spain, 1962 11/17 Ralf S. Engelschall born in Dachau, Bavaria, Germany, 1972 11/18 Thomas Quinot born in Paris, France, 1977