From owner-svn-src-head@FreeBSD.ORG Sun May 27 01:24:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ADC80106567B; Sun, 27 May 2012 01:24:51 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 988638FC0A; Sun, 27 May 2012 01:24:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4R1Opvg018176; Sun, 27 May 2012 01:24:51 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4R1Opvc018174; Sun, 27 May 2012 01:24:51 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201205270124.q4R1Opvc018174@svn.freebsd.org> From: David Xu Date: Sun, 27 May 2012 01:24: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: r236135 - 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: Sun, 27 May 2012 01:24:51 -0000 Author: davidxu Date: Sun May 27 01:24:51 2012 New Revision: 236135 URL: http://svn.freebsd.org/changeset/base/236135 Log: Return EBUSY for PTHREAD_MUTEX_ADAPTIVE_NP too when the mutex could not be acquired. PR: 168317 MFC after: 3 days Modified: head/lib/libthr/thread/thr_mutex.c Modified: head/lib/libthr/thread/thr_mutex.c ============================================================================== --- head/lib/libthr/thread/thr_mutex.c Sun May 27 01:24:08 2012 (r236134) +++ head/lib/libthr/thread/thr_mutex.c Sun May 27 01:24:51 2012 (r236135) @@ -538,6 +538,7 @@ mutex_self_trylock(struct pthread_mutex switch (PMUTEX_TYPE(m->m_flags)) { case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_NORMAL: + case PTHREAD_MUTEX_ADAPTIVE_NP: ret = EBUSY; break; From owner-svn-src-head@FreeBSD.ORG Sun May 27 05:24:54 2012 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 BED0F106566B; Sun, 27 May 2012 05:24:54 +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 AAC338FC0A; Sun, 27 May 2012 05:24:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4R5Os87027901; Sun, 27 May 2012 05:24:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4R5Os5k027898; Sun, 27 May 2012 05:24:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205270524.q4R5Os5k027898@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 27 May 2012 05:24: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: r236136 - in head/sys: compat/freebsd32 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, 27 May 2012 05:24:54 -0000 Author: kib Date: Sun May 27 05:24:53 2012 New Revision: 236136 URL: http://svn.freebsd.org/changeset/base/236136 Log: Fix ki_cow for compat32 binaries. MFC after: 3 days Modified: head/sys/compat/freebsd32/freebsd32.h head/sys/kern/kern_proc.c Modified: head/sys/compat/freebsd32/freebsd32.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32.h Sun May 27 01:24:51 2012 (r236135) +++ head/sys/compat/freebsd32/freebsd32.h Sun May 27 05:24:53 2012 (r236136) @@ -306,7 +306,7 @@ struct kinfo_proc32 { u_int ki_estcpu; u_int ki_slptime; u_int ki_swtime; - int ki_spareint1; + u_int ki_cow; u_int64_t ki_runtime; struct timeval32 ki_start; struct timeval32 ki_childtime; Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sun May 27 01:24:51 2012 (r236135) +++ head/sys/kern/kern_proc.c Sun May 27 05:24:53 2012 (r236136) @@ -1136,6 +1136,7 @@ freebsd32_kinfo_proc_out(const struct ki CP(*ki, *ki32, ki_estcpu); CP(*ki, *ki32, ki_slptime); CP(*ki, *ki32, ki_swtime); + CP(*ki, *ki32, ki_cow); CP(*ki, *ki32, ki_runtime); TV_CP(*ki, *ki32, ki_start); TV_CP(*ki, *ki32, ki_childtime); From owner-svn-src-head@FreeBSD.ORG Sun May 27 05:27:48 2012 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 8CEC0106566B; Sun, 27 May 2012 05:27:48 +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 77EF68FC08; Sun, 27 May 2012 05:27:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4R5Rm0Q028059; Sun, 27 May 2012 05:27:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4R5Rm44028055; Sun, 27 May 2012 05:27:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205270527.q4R5Rm44028055@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 27 May 2012 05:27: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: r236137 - head/contrib/gcc/config/i386 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, 27 May 2012 05:27:48 -0000 Author: kib Date: Sun May 27 05:27:47 2012 New Revision: 236137 URL: http://svn.freebsd.org/changeset/base/236137 Log: Enable gnu hash generation for dynamic ELF binaries on x86. Reviewed by: kan Modified: head/contrib/gcc/config/i386/freebsd.h head/contrib/gcc/config/i386/freebsd64.h Modified: head/contrib/gcc/config/i386/freebsd.h ============================================================================== --- head/contrib/gcc/config/i386/freebsd.h Sun May 27 05:24:53 2012 (r236136) +++ head/contrib/gcc/config/i386/freebsd.h Sun May 27 05:27:47 2012 (r236137) @@ -49,6 +49,7 @@ Boston, MA 02110-1301, USA. */ %{rdynamic: -export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ %{static:-Bstatic}} \ + %{!static:--hash-style=both} \ %{symbolic:-Bsymbolic}" /* Reset our STARTFILE_SPEC which was properly set in config/freebsd.h Modified: head/contrib/gcc/config/i386/freebsd64.h ============================================================================== --- head/contrib/gcc/config/i386/freebsd64.h Sun May 27 05:24:53 2012 (r236136) +++ head/contrib/gcc/config/i386/freebsd64.h Sun May 27 05:27:47 2012 (r236137) @@ -54,4 +54,5 @@ Boston, MA 02110-1301, USA. */ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ %{static:-Bstatic}} \ + %{!static:--hash-style=both} \ %{symbolic:-Bsymbolic}" From owner-svn-src-head@FreeBSD.ORG Sun May 27 06:11:10 2012 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 010461065670; Sun, 27 May 2012 06:11:10 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5ED78FC0A; Sun, 27 May 2012 06:11:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4R6B94f029815; Sun, 27 May 2012 06:11:09 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4R6B9fO029809; Sun, 27 May 2012 06:11:09 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201205270611.q4R6B9fO029809@svn.freebsd.org> From: "Kenneth D. Merry" Date: Sun, 27 May 2012 06:11: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: r236138 - head/sys/cam/scsi 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, 27 May 2012 06:11:10 -0000 Author: ken Date: Sun May 27 06:11:09 2012 New Revision: 236138 URL: http://svn.freebsd.org/changeset/base/236138 Log: Work around a race condition in devfs by changing the way closes are handled in most CAM peripheral drivers that are not handled by GEOM's disk class. The usual character driver open and close semantics are that the driver gets N open calls, but only one close, when the last caller closes the device. CAM peripheral drivers expect that behavior to be honored to the letter, and the CAM peripheral driver code (specifically cam_periph_release_locked_busses()) panics if it is done incorrectly. Since devfs has to drop its locks while it calls a driver's close routine, and it does not have a way to delay or prevent open calls while it is calling the close routine, there is a race. The sequence of events, simplified a bit, is: - devfs acquires a lock - devfs checks the reference count, and if it is 1, continues to close. - devfs releases the lock - 2nd process open call on the device happens here - devfs calls the driver's close routine - devfs acquires a lock - devfs decrements the reference count - devfs releases the lock - 2nd process close call on the device happens here At the second close, we get a panic in cam_periph_release_locked_busses(), complaining that peripheral has been released when the reference count is already 0. This is because we have gotten two closes in a row, which should not happen. The fix is to add the D_TRACKCLOSE flag to the driver's cdevsw, so that we get a close() call for each open(). That does happen reliably, so we can make sure that our reference counts are correct. Note that the sa(4) and pt(4) drivers only allow one context through the open routine. So these drivers aren't exposed to the same race condition. scsi_ch.c, scsi_enc.c, scsi_enc_internal.h, scsi_pass.c, scsi_sg.c: For these drivers, change the open() routine to increment the reference count for every open, and just decrement the reference count in the close. Call cam_periph_release_locked() in some scenarios to avoid additional lock and unlock calls. scsi_pt.c: Call cam_periph_release_locked() in some scenarios to avoid additional lock and unlock calls. MFC after: 3 days Modified: head/sys/cam/scsi/scsi_ch.c head/sys/cam/scsi/scsi_enc.c head/sys/cam/scsi/scsi_pass.c head/sys/cam/scsi/scsi_pt.c head/sys/cam/scsi/scsi_sg.c Modified: head/sys/cam/scsi/scsi_ch.c ============================================================================== --- head/sys/cam/scsi/scsi_ch.c Sun May 27 05:27:47 2012 (r236137) +++ head/sys/cam/scsi/scsi_ch.c Sun May 27 06:11:09 2012 (r236138) @@ -107,8 +107,7 @@ static const u_int32_t CH_TIMEOUT_SEND_V static const u_int32_t CH_TIMEOUT_INITIALIZE_ELEMENT_STATUS = 500000; typedef enum { - CH_FLAG_INVALID = 0x001, - CH_FLAG_OPEN = 0x002 + CH_FLAG_INVALID = 0x001 } ch_flags; typedef enum { @@ -211,7 +210,7 @@ PERIPHDRIVER_DECLARE(ch, chdriver); static struct cdevsw ch_cdevsw = { .d_version = D_VERSION, - .d_flags = 0, + .d_flags = D_TRACKCLOSE, .d_open = chopen, .d_close = chclose, .d_ioctl = chioctl, @@ -404,16 +403,11 @@ chopen(struct cdev *dev, int flags, int cam_periph_lock(periph); if (softc->flags & CH_FLAG_INVALID) { + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return(ENXIO); } - if ((softc->flags & CH_FLAG_OPEN) == 0) - softc->flags |= CH_FLAG_OPEN; - else - cam_periph_release(periph); - if ((error = cam_periph_hold(periph, PRIBIO | PCATCH)) != 0) { cam_periph_unlock(periph); cam_periph_release(periph); @@ -424,9 +418,8 @@ chopen(struct cdev *dev, int flags, int * Load information about this changer device into the softc. */ if ((error = chgetparams(periph)) != 0) { - softc->flags &= ~CH_FLAG_OPEN; + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return(error); } @@ -451,11 +444,6 @@ chclose(struct cdev *dev, int flag, int softc = (struct ch_softc *)periph->softc; - cam_periph_lock(periph); - - softc->flags &= ~CH_FLAG_OPEN; - - cam_periph_unlock(periph); cam_periph_release(periph); return(0); Modified: head/sys/cam/scsi/scsi_enc.c ============================================================================== --- head/sys/cam/scsi/scsi_enc.c Sun May 27 05:27:47 2012 (r236137) +++ head/sys/cam/scsi/scsi_enc.c Sun May 27 06:11:09 2012 (r236138) @@ -93,7 +93,7 @@ static struct cdevsw enc_cdevsw = { .d_close = enc_close, .d_ioctl = enc_ioctl, .d_name = "ses", - .d_flags = 0, + .d_flags = D_TRACKCLOSE, }; static void @@ -254,12 +254,12 @@ enc_open(struct cdev *dev, int flags, in error = ENXIO; goto out; } - out: + if (error != 0) + cam_periph_release_locked(periph); + cam_periph_unlock(periph); - if (error) { - cam_periph_release(periph); - } + return (error); } @@ -267,17 +267,11 @@ static int enc_close(struct cdev *dev, int flag, int fmt, struct thread *td) { struct cam_periph *periph; - struct enc_softc *softc; periph = (struct cam_periph *)dev->si_drv1; if (periph == NULL) return (ENXIO); - cam_periph_lock(periph); - - softc = (struct enc_softc *)periph->softc; - - cam_periph_unlock(periph); cam_periph_release(periph); return (0); Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Sun May 27 05:27:47 2012 (r236137) +++ head/sys/cam/scsi/scsi_pass.c Sun May 27 06:11:09 2012 (r236138) @@ -111,7 +111,7 @@ PERIPHDRIVER_DECLARE(pass, passdriver); static struct cdevsw pass_cdevsw = { .d_version = D_VERSION, - .d_flags = 0, + .d_flags = D_TRACKCLOSE, .d_open = passopen, .d_close = passclose, .d_ioctl = passioctl, @@ -377,8 +377,8 @@ passopen(struct cdev *dev, int flags, in softc = (struct pass_softc *)periph->softc; if (softc->flags & PASS_FLAG_INVALID) { + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return(ENXIO); } @@ -387,8 +387,8 @@ passopen(struct cdev *dev, int flags, in */ error = securelevel_gt(td->td_ucred, 1); if (error) { + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return(error); } @@ -396,8 +396,8 @@ passopen(struct cdev *dev, int flags, in * Only allow read-write access. */ if (((flags & FWRITE) == 0) || ((flags & FREAD) == 0)) { + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return(EPERM); } @@ -406,19 +406,12 @@ passopen(struct cdev *dev, int flags, in */ if ((flags & O_NONBLOCK) != 0) { xpt_print(periph->path, "can't do nonblocking access\n"); + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return(EINVAL); } - if ((softc->flags & PASS_FLAG_OPEN) == 0) { - softc->flags |= PASS_FLAG_OPEN; - cam_periph_unlock(periph); - } else { - /* Device closes aren't symmertical, so fix up the refcount */ - cam_periph_unlock(periph); - cam_periph_release(periph); - } + cam_periph_unlock(periph); return (error); } @@ -427,18 +420,11 @@ static int passclose(struct cdev *dev, int flag, int fmt, struct thread *td) { struct cam_periph *periph; - struct pass_softc *softc; periph = (struct cam_periph *)dev->si_drv1; if (periph == NULL) return (ENXIO); - cam_periph_lock(periph); - - softc = (struct pass_softc *)periph->softc; - softc->flags &= ~PASS_FLAG_OPEN; - - cam_periph_unlock(periph); cam_periph_release(periph); return (0); Modified: head/sys/cam/scsi/scsi_pt.c ============================================================================== --- head/sys/cam/scsi/scsi_pt.c Sun May 27 05:27:47 2012 (r236137) +++ head/sys/cam/scsi/scsi_pt.c Sun May 27 06:11:09 2012 (r236138) @@ -148,8 +148,8 @@ ptopen(struct cdev *dev, int flags, int cam_periph_lock(periph); if (softc->flags & PT_FLAG_DEVICE_INVALID) { + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return(ENXIO); } @@ -182,8 +182,8 @@ ptclose(struct cdev *dev, int flag, int cam_periph_lock(periph); softc->flags &= ~PT_FLAG_OPEN; + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return (0); } Modified: head/sys/cam/scsi/scsi_sg.c ============================================================================== --- head/sys/cam/scsi/scsi_sg.c Sun May 27 05:27:47 2012 (r236137) +++ head/sys/cam/scsi/scsi_sg.c Sun May 27 06:11:09 2012 (r236138) @@ -61,9 +61,8 @@ __FBSDID("$FreeBSD$"); #include typedef enum { - SG_FLAG_OPEN = 0x01, - SG_FLAG_LOCKED = 0x02, - SG_FLAG_INVALID = 0x04 + SG_FLAG_LOCKED = 0x01, + SG_FLAG_INVALID = 0x02 } sg_flags; typedef enum { @@ -141,7 +140,7 @@ PERIPHDRIVER_DECLARE(sg, sgdriver); static struct cdevsw sg_cdevsw = { .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, + .d_flags = D_NEEDGIANT | D_TRACKCLOSE, .d_open = sgopen, .d_close = sgclose, .d_ioctl = sgioctl, @@ -415,19 +414,12 @@ sgopen(struct cdev *dev, int flags, int softc = (struct sg_softc *)periph->softc; if (softc->flags & SG_FLAG_INVALID) { + cam_periph_release_locked(periph); cam_periph_unlock(periph); - cam_periph_release(periph); return (ENXIO); } - if ((softc->flags & SG_FLAG_OPEN) == 0) { - softc->flags |= SG_FLAG_OPEN; - cam_periph_unlock(periph); - } else { - /* Device closes aren't symmetrical, fix up the refcount. */ - cam_periph_unlock(periph); - cam_periph_release(periph); - } + cam_periph_unlock(periph); return (error); } @@ -436,18 +428,11 @@ static int sgclose(struct cdev *dev, int flag, int fmt, struct thread *td) { struct cam_periph *periph; - struct sg_softc *softc; periph = (struct cam_periph *)dev->si_drv1; if (periph == NULL) return (ENXIO); - cam_periph_lock(periph); - - softc = (struct sg_softc *)periph->softc; - softc->flags &= ~SG_FLAG_OPEN; - - cam_periph_unlock(periph); cam_periph_release(periph); return (0); From owner-svn-src-head@FreeBSD.ORG Sun May 27 06:53:36 2012 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 9CF03106566C; Sun, 27 May 2012 06:53:36 +0000 (UTC) (envelope-from rea@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87A448FC0A; Sun, 27 May 2012 06:53:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4R6ra1i031525; Sun, 27 May 2012 06:53:36 GMT (envelope-from rea@svn.freebsd.org) Received: (from rea@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4R6raRU031519; Sun, 27 May 2012 06:53:36 GMT (envelope-from rea@svn.freebsd.org) Message-Id: <201205270653.q4R6raRU031519@svn.freebsd.org> From: Eygene Ryabinkin Date: Sun, 27 May 2012 06:53: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: r236139 - head/crypto/openssh 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, 27 May 2012 06:53:36 -0000 Author: rea (ports committer) Date: Sun May 27 06:53:35 2012 New Revision: 236139 URL: http://svn.freebsd.org/changeset/base/236139 Log: OpenSSH: allow VersionAddendum to be used again Prior to this, setting VersionAddendum will be a no-op: one will always have BASE_VERSION + " " + VERSION_HPN for VersionAddendum set in the config and a bare BASE_VERSION + VERSION_HPN when there is no VersionAddendum is set. HPN patch requires both parties to have the "hpn" inside their advertized versions, so we add VERSION_HPN to the VERSION_BASE if HPN is enabled and omitting it if HPN is disabled. VersionAddendum now uses the following logics: * unset (default value): append " " and VERSION_ADDENDUM; * VersionAddendum is set and isn't empty: append " " and VersionAddendum; * VersionAddendum is set and empty: don't append anything. Approved by: des Reviewed by: bz MFC after: 3 days Modified: head/crypto/openssh/ssh.c head/crypto/openssh/sshconnect.c head/crypto/openssh/sshd.c head/crypto/openssh/version.c head/crypto/openssh/version.h Modified: head/crypto/openssh/ssh.c ============================================================================== --- head/crypto/openssh/ssh.c Sun May 27 06:11:09 2012 (r236138) +++ head/crypto/openssh/ssh.c Sun May 27 06:53:35 2012 (r236139) @@ -437,7 +437,8 @@ main(int ac, char **av) /* FALLTHROUGH */ case 'V': fprintf(stderr, "%s, %s\n", - SSH_RELEASE, SSLeay_version(SSLEAY_VERSION)); + ssh_version_get(options.hpn_disabled), + SSLeay_version(SSLEAY_VERSION)); if (opt == 'V') exit(0); break; Modified: head/crypto/openssh/sshconnect.c ============================================================================== --- head/crypto/openssh/sshconnect.c Sun May 27 06:11:09 2012 (r236138) +++ head/crypto/openssh/sshconnect.c Sun May 27 06:53:35 2012 (r236139) @@ -585,7 +585,7 @@ ssh_exchange_identification(int timeout_ snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", compat20 ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1, compat20 ? PROTOCOL_MINOR_2 : minor1, - SSH_RELEASE, compat20 ? "\r\n" : "\n"); + ssh_version_get(options.hpn_disabled), compat20 ? "\r\n" : "\n"); if (roaming_atomicio(vwrite, connection_out, buf, strlen(buf)) != strlen(buf)) fatal("write: %.100s", strerror(errno)); Modified: head/crypto/openssh/sshd.c ============================================================================== --- head/crypto/openssh/sshd.c Sun May 27 06:11:09 2012 (r236138) +++ head/crypto/openssh/sshd.c Sun May 27 06:53:35 2012 (r236139) @@ -431,7 +431,7 @@ sshd_exchange_identification(int sock_in minor = PROTOCOL_MINOR_1; } snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", major, minor, - SSH_RELEASE, newline); + ssh_version_get(options.hpn_disabled), newline); server_version_string = xstrdup(buf); /* Send our protocol version identification. */ @@ -894,7 +894,7 @@ static void usage(void) { fprintf(stderr, "%s, %s\n", - SSH_RELEASE, SSLeay_version(SSLEAY_VERSION)); + ssh_version_get(0), SSLeay_version(SSLEAY_VERSION)); fprintf(stderr, "usage: sshd [-46DdeiqTt] [-b bits] [-C connection_spec] [-c host_cert_file]\n" " [-f config_file] [-g login_grace_time] [-h host_key_file]\n" @@ -1583,7 +1583,7 @@ main(int ac, char **av) exit(1); } - debug("sshd version %.100s", SSH_RELEASE); + debug("sshd version %.100s", ssh_version_get(options.hpn_disabled)); /* Store privilege separation user for later use if required. */ if ((privsep_pw = getpwnam(SSH_PRIVSEP_USER)) == NULL) { Modified: head/crypto/openssh/version.c ============================================================================== --- head/crypto/openssh/version.c Sun May 27 06:11:09 2012 (r236138) +++ head/crypto/openssh/version.c Sun May 27 06:53:35 2012 (r236139) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2001 Brian Fundakowski Feldman + * Copyright (c) 2012 Eygene Ryabinkin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,30 +36,60 @@ __RCSID("$FreeBSD$"); static char *version = NULL; +/* NULL means "use default value", empty string means "unset" */ +static const char *addendum = NULL; +static unsigned char update_version = 1; +/* + * Constructs the version string if it is empty or needs updating. + * + * HPN patch we're running requires both parties + * to have the "hpn" string inside the advertized version + * (see compat.c::compat_datafellows), so we should + * include it to the generated string if HPN is enabled. + */ const char * -ssh_version_get(void) { +ssh_version_get(int hpn_disabled) +{ + const char *hpn = NULL, *add = NULL; + char *newvers = NULL; + size_t size = 0; + + if (version != NULL && !update_version) + return (version); + + hpn = (hpn_disabled ? NULL : SSH_VERSION_HPN); + add = (addendum == NULL ? SSH_VERSION_ADDENDUM : + (addendum[0] == '\0' ? NULL : addendum)); + + size = strlen(SSH_VERSION_BASE) + (hpn ? strlen(hpn) : 0) + + (add ? strlen(add) + 1 : 0) + 1; + newvers = xmalloc(size); + strcpy(newvers, SSH_VERSION_BASE); + if (hpn) + strcat(newvers, hpn); + if (add) { + strcat(newvers, " "); + strcat(newvers, add); + } + + if (version) + xfree(version); + version = newvers; + update_version = 0; - if (version == NULL) - version = xstrdup(SSH_VERSION); return (version); } void -ssh_version_set_addendum(const char *add) { - char *newvers; - size_t size; - - if (add != NULL) { - size = strlen(SSH_VERSION_BASE) + strlen(SSH_VERSION_HPN) + 1 + - strlen(add) + 1; - newvers = xmalloc(size); - snprintf(newvers, size, "%s %s", SSH_VERSION_BASE, - SSH_VERSION_HPN, add); - } else { - newvers = xstrdup(SSH_VERSION_BASE SSH_VERSION_HPN); - } - if (version != NULL) - xfree(version); - version = newvers; +ssh_version_set_addendum(const char *add) +{ + if (add && addendum && !strcmp(add, addendum)) + return; + + if (addendum) + xfree((void *)addendum); + addendum = (add ? xstrdup(add) : xstrdup("")); + + update_version = 1; } Modified: head/crypto/openssh/version.h ============================================================================== --- head/crypto/openssh/version.h Sun May 27 06:11:09 2012 (r236138) +++ head/crypto/openssh/version.h Sun May 27 06:53:35 2012 (r236139) @@ -1,13 +1,13 @@ /* $OpenBSD: version.h,v 1.62 2011/08/02 23:13:01 djm Exp $ */ /* $FreeBSD$ */ -#ifndef SSH_VERSION +#ifndef _VERSION_H_ +#define _VERSION_H_ + #define SSH_VERSION_BASE "OpenSSH_5.9p1" #define SSH_VERSION_ADDENDUM "FreeBSD-20111001" #define SSH_VERSION_HPN "_hpn13v11" -#define SSH_VERSION SSH_VERSION_BASE SSH_VERSION_HPN " " SSH_VERSION_ADDENDUM -#define SSH_RELEASE (ssh_version_get()) -const char *ssh_version_get(void); +const char *ssh_version_get(int hpn_disabled); void ssh_version_set_addendum(const char *); -#endif /* SSH_VERSION */ +#endif /* _VERSION_H_ */ From owner-svn-src-head@FreeBSD.ORG Sun May 27 07:45:17 2012 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 7CFCA106564A; Sun, 27 May 2012 07:45:17 +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 0BADC8FC0A; Sun, 27 May 2012 07:45:16 +0000 (UTC) Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q4R7jDpJ021722 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 27 May 2012 17:45:14 +1000 Date: Sun, 27 May 2012 17:45:13 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans In-Reply-To: <20120527043827.W3357@besplex.bde.org> Message-ID: <20120527172204.G989@besplex.bde.org> References: <201205252150.q4PLomFk035064@svn.freebsd.org> <20120526173233.A885@besplex.bde.org> <20120526164927.GU2358@deviant.kiev.zoral.com.ua> <20120527043827.W3357@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Ed Schouten , svn-src-head@FreeBSD.org, rwatson@FreeBSD.org, Konstantin Belousov , jonathan@FreeBSD.org Subject: Re: svn commit: r236026 - in head/sys: amd64/linux32 compat/freebsd32 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, 27 May 2012 07:45:17 -0000 On Sun, 27 May 2012, Bruce Evans wrote: > On Sat, 26 May 2012, Konstantin Belousov wrote: > >> On Sat, May 26, 2012 at 10:21:25PM +1000, Bruce Evans wrote: >>>... >>> All the non-indirect "char *"s for pathnames and other things seem to be >>> completely wrong on amd64 too. These pointers start as 32 bits, and it >>> takes more than a bad type pun to turn then into kernel 64-bit pointers. >>> The magic for this seems to be: >>> - all args are converted to 64 bits (by zero-extension?) at a low level >>> ... >> The 'low level' AKA magic happens in several *_fetch_syscall_args() >> functions. For both linux32 and freebsd32, the magic code automatically >> zero-extends the arguments into 64bit entities. Linux passes args in >> registers, while FreeBSD uses words on stack. > > Actually, the amd64 linux_fetch32_fetch_syscall_args() just copies from > 64-bit registers frame->tf_r* to 64-bit sa->args[*]. I can't see how > this gives anything except garbage in the top bits. Is there magic in > the switch to 64-bit mode that sets the top bits? Anyway, sign extension > would give garbage for unsigned args, and zero-extension would give > garbage for negative signed args. I checked what actually happens. There is no magic. The registers just have garbage in the top bits. Mostly this is 0. Sometimes it is all top bits 1. Sometimes it is some top bits 1 (starting at the top). I traced a bit of the execution of ld-linux.so... The first syscall was an linux_mmap. It had all top bits 1 in tf_rbx, then some top bits 1 in a later register, and all top bits 0 in 4 registers. Then there were several syscalls with all top bits in all 6 syscall arg registers 0. Then there was a linux_write syscall with 1's back in some top bits. Then there were many syscalls with all top bits in all arg registers 0. This behaviour is probably due to the initial state being more random (but why doesn't exec clear all top bits?). Then normal activity like xorl %ebx,%ebx tends to clear top bits (does this xorl clear top bits even in 32-bit mode?). Then something occasionally sets top bits to 1. > The amd64 ia32_fetch_syscall_args() is quite different. Now the args > ... Bruce From owner-svn-src-head@FreeBSD.ORG Sun May 27 09:34:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B0413106564A; Sun, 27 May 2012 09:34:48 +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 5580A8FC08; Sun, 27 May 2012 09:34:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4R9Ym6e039139; Sun, 27 May 2012 09:34:48 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4R9YmF7039137; Sun, 27 May 2012 09:34:48 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201205270934.q4R9YmF7039137@svn.freebsd.org> From: Ed Schouten Date: Sun, 27 May 2012 09:34: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: r236140 - head/sys/fs/ntfs 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, 27 May 2012 09:34:48 -0000 Author: ed Date: Sun May 27 09:34:47 2012 New Revision: 236140 URL: http://svn.freebsd.org/changeset/base/236140 Log: Fix style and consistency: - Use tabs, not spaces. - Add tab after #define. - Don't mix the use of BSD and ISO C unsigned integer types. Prefer the ISO C ones. Modified: head/sys/fs/ntfs/ntfs.h Modified: head/sys/fs/ntfs/ntfs.h ============================================================================== --- head/sys/fs/ntfs/ntfs.h Sun May 27 06:53:35 2012 (r236139) +++ head/sys/fs/ntfs/ntfs.h Sun May 27 09:34:47 2012 (r236140) @@ -30,11 +30,11 @@ /*#define NTFS_DEBUG 1*/ -typedef u_int64_t cn_t; -typedef u_int16_t wchar; +typedef uint64_t cn_t; +typedef uint16_t wchar; #pragma pack(1) -#define BBSIZE 1024 +#define BBSIZE 1024 #define BBOFF ((off_t)(0)) #define BBLOCK 0 #define NTFS_MFTINO 0 @@ -45,157 +45,157 @@ typedef u_int16_t wchar; #define NTFS_BOOTINO 7 #define NTFS_BADCLUSINO 8 #define NTFS_UPCASEINO 10 -#define NTFS_MAXFILENAME 255 +#define NTFS_MAXFILENAME 255 struct fixuphdr { - u_int32_t fh_magic; - u_int16_t fh_foff; - u_int16_t fh_fnum; + uint32_t fh_magic; + uint16_t fh_foff; + uint16_t fh_fnum; }; -#define NTFS_AF_INRUN 0x00000001 +#define NTFS_AF_INRUN 0x00000001 struct attrhdr { - u_int32_t a_type; - u_int32_t reclen; - u_int8_t a_flag; - u_int8_t a_namelen; - u_int8_t a_nameoff; - u_int8_t reserved1; - u_int8_t a_compression; - u_int8_t reserved2; - u_int16_t a_index; -}; -#define NTFS_A_STD 0x10 -#define NTFS_A_ATTRLIST 0x20 -#define NTFS_A_NAME 0x30 -#define NTFS_A_VOLUMENAME 0x60 -#define NTFS_A_DATA 0x80 + uint32_t a_type; + uint32_t reclen; + uint8_t a_flag; + uint8_t a_namelen; + uint8_t a_nameoff; + uint8_t reserved1; + uint8_t a_compression; + uint8_t reserved2; + uint16_t a_index; +}; +#define NTFS_A_STD 0x10 +#define NTFS_A_ATTRLIST 0x20 +#define NTFS_A_NAME 0x30 +#define NTFS_A_VOLUMENAME 0x60 +#define NTFS_A_DATA 0x80 #define NTFS_A_INDXROOT 0x90 #define NTFS_A_INDX 0xA0 -#define NTFS_A_INDXBITMAP 0xB0 +#define NTFS_A_INDXBITMAP 0xB0 -#define NTFS_MAXATTRNAME 255 +#define NTFS_MAXATTRNAME 255 struct attr { - struct attrhdr a_hdr; + struct attrhdr a_hdr; union { struct { - u_int16_t a_datalen; - u_int16_t reserved1; - u_int16_t a_dataoff; - u_int16_t a_indexed; - } a_S_r; + uint16_t a_datalen; + uint16_t reserved1; + uint16_t a_dataoff; + uint16_t a_indexed; + } a_S_r; struct { - cn_t a_vcnstart; - cn_t a_vcnend; - u_int16_t a_dataoff; - u_int16_t a_compressalg; - u_int32_t reserved1; - u_int64_t a_allocated; - u_int64_t a_datalen; - u_int64_t a_initialized; - } a_S_nr; - } a_S; + cn_t a_vcnstart; + cn_t a_vcnend; + uint16_t a_dataoff; + uint16_t a_compressalg; + uint32_t reserved1; + uint64_t a_allocated; + uint64_t a_datalen; + uint64_t a_initialized; + } a_S_nr; + } a_S; }; -#define a_r a_S.a_S_r -#define a_nr a_S.a_S_nr +#define a_r a_S.a_S_r +#define a_nr a_S.a_S_nr typedef struct { - u_int64_t t_create; - u_int64_t t_write; - u_int64_t t_mftwrite; - u_int64_t t_access; -} ntfs_times_t; - -#define NTFS_FFLAG_RDONLY 0x01LL -#define NTFS_FFLAG_HIDDEN 0x02LL -#define NTFS_FFLAG_SYSTEM 0x04LL -#define NTFS_FFLAG_ARCHIVE 0x20LL -#define NTFS_FFLAG_COMPRESSED 0x0800LL -#define NTFS_FFLAG_DIR 0x10000000LL + uint64_t t_create; + uint64_t t_write; + uint64_t t_mftwrite; + uint64_t t_access; +} ntfs_times_t; + +#define NTFS_FFLAG_RDONLY 0x01LL +#define NTFS_FFLAG_HIDDEN 0x02LL +#define NTFS_FFLAG_SYSTEM 0x04LL +#define NTFS_FFLAG_ARCHIVE 0x20LL +#define NTFS_FFLAG_COMPRESSED 0x0800LL +#define NTFS_FFLAG_DIR 0x10000000LL struct attr_name { - u_int32_t n_pnumber; /* Parent ntnode */ - u_int32_t reserved; - ntfs_times_t n_times; - u_int64_t n_size; - u_int64_t n_attrsz; - u_int64_t n_flag; - u_int8_t n_namelen; - u_int8_t n_nametype; - u_int16_t n_name[1]; + uint32_t n_pnumber; /* Parent ntnode */ + uint32_t reserved; + ntfs_times_t n_times; + uint64_t n_size; + uint64_t n_attrsz; + uint64_t n_flag; + uint8_t n_namelen; + uint8_t n_nametype; + uint16_t n_name[1]; }; -#define NTFS_IRFLAG_INDXALLOC 0x00000001 +#define NTFS_IRFLAG_INDXALLOC 0x00000001 struct attr_indexroot { - u_int32_t ir_unkn1; /* always 0x30 */ - u_int32_t ir_unkn2; /* always 0x1 */ - u_int32_t ir_size;/* ??? */ - u_int32_t ir_unkn3; /* number of cluster */ - u_int32_t ir_unkn4; /* always 0x10 */ - u_int32_t ir_datalen; /* sizeof simething */ - u_int32_t ir_allocated; /* same as above */ - u_int16_t ir_flag;/* ?? always 1 */ - u_int16_t ir_unkn7; + uint32_t ir_unkn1; /* always 0x30 */ + uint32_t ir_unkn2; /* always 0x1 */ + uint32_t ir_size;/* ??? */ + uint32_t ir_unkn3; /* number of cluster */ + uint32_t ir_unkn4; /* always 0x10 */ + uint32_t ir_datalen; /* sizeof simething */ + uint32_t ir_allocated; /* same as above */ + uint16_t ir_flag;/* ?? always 1 */ + uint16_t ir_unkn7; }; struct attr_attrlist { - u_int32_t al_type; /* Attribute type */ - u_int16_t reclen; /* length of this entry */ - u_int8_t al_namelen; /* Attribute name len */ - u_int8_t al_nameoff; /* Name offset from entry start */ - u_int64_t al_vcnstart; /* VCN number */ - u_int32_t al_inumber; /* Parent ntnode */ - u_int32_t reserved; - u_int16_t al_index; /* Attribute index in MFT record */ - u_int16_t al_name[1]; /* Name */ + uint32_t al_type; /* Attribute type */ + uint16_t reclen; /* length of this entry */ + uint8_t al_namelen; /* Attribute name len */ + uint8_t al_nameoff; /* Name offset from entry start */ + uint64_t al_vcnstart; /* VCN number */ + uint32_t al_inumber; /* Parent ntnode */ + uint32_t reserved; + uint16_t al_index; /* Attribute index in MFT record */ + uint16_t al_name[1]; /* Name */ }; -#define NTFS_INDXMAGIC (u_int32_t)(0x58444E49) +#define NTFS_INDXMAGIC (uint32_t)(0x58444E49) struct attr_indexalloc { struct fixuphdr ia_fixup; - u_int64_t unknown1; - cn_t ia_bufcn; - u_int16_t ia_hdrsize; - u_int16_t unknown2; - u_int32_t ia_inuse; - u_int32_t ia_allocated; + uint64_t unknown1; + cn_t ia_bufcn; + uint16_t ia_hdrsize; + uint16_t unknown2; + uint32_t ia_inuse; + uint32_t ia_allocated; }; #define NTFS_IEFLAG_SUBNODE 0x00000001 #define NTFS_IEFLAG_LAST 0x00000002 struct attr_indexentry { - u_int32_t ie_number; - u_int32_t unknown1; - u_int16_t reclen; - u_int16_t ie_size; - u_int32_t ie_flag;/* 1 - has subnodes, 2 - last */ - u_int32_t ie_fpnumber; - u_int32_t unknown2; - ntfs_times_t ie_ftimes; - u_int64_t ie_fallocated; - u_int64_t ie_fsize; - u_int64_t ie_fflag; - u_int8_t ie_fnamelen; - u_int8_t ie_fnametype; - wchar ie_fname[NTFS_MAXFILENAME]; + uint32_t ie_number; + uint32_t unknown1; + uint16_t reclen; + uint16_t ie_size; + uint32_t ie_flag; /* 1 - has subnodes, 2 - last */ + uint32_t ie_fpnumber; + uint32_t unknown2; + ntfs_times_t ie_ftimes; + uint64_t ie_fallocated; + uint64_t ie_fsize; + uint64_t ie_fflag; + uint8_t ie_fnamelen; + uint8_t ie_fnametype; + wchar ie_fname[NTFS_MAXFILENAME]; /* cn_t ie_bufcn; buffer with subnodes */ }; -#define NTFS_FILEMAGIC (u_int32_t)(0x454C4946) +#define NTFS_FILEMAGIC (uint32_t)(0x454C4946) #define NTFS_BLOCK_SIZE 512 #define NTFS_FRFLAG_DIR 0x0002 struct filerec { - struct fixuphdr fr_fixup; - u_int8_t reserved[8]; - u_int16_t fr_seqnum; /* Sequence number */ - u_int16_t fr_nlink; - u_int16_t fr_attroff; /* offset to attributes */ - u_int16_t fr_flags; /* 1-nonresident attr, 2-directory */ - u_int32_t fr_size;/* hdr + attributes */ - u_int32_t fr_allocated; /* allocated length of record */ - u_int64_t fr_mainrec; /* main record */ - u_int16_t fr_attrnum; /* maximum attr number + 1 ??? */ + struct fixuphdr fr_fixup; + uint8_t reserved[8]; + uint16_t fr_seqnum; /* Sequence number */ + uint16_t fr_nlink; + uint16_t fr_attroff; /* offset to attributes */ + uint16_t fr_flags; /* 1-nonresident attr, 2-directory */ + uint32_t fr_size;/* hdr + attributes */ + uint32_t fr_allocated; /* allocated length of record */ + uint64_t fr_mainrec; /* main record */ + uint16_t fr_attrnum; /* maximum attr number + 1 ??? */ }; #define NTFS_ATTRNAME_MAXLEN 0x40 @@ -203,66 +203,66 @@ struct filerec { #define NTFS_ADFLAG_INDEX 0x0002 /* Attrib can be indexed */ struct attrdef { wchar ad_name[NTFS_ATTRNAME_MAXLEN]; - u_int32_t ad_type; - u_int32_t reserved1[2]; - u_int32_t ad_flag; - u_int64_t ad_minlen; - u_int64_t ad_maxlen; /* -1 for nonlimited */ + uint32_t ad_type; + uint32_t reserved1[2]; + uint32_t ad_flag; + uint64_t ad_minlen; + uint64_t ad_maxlen; /* -1 for nonlimited */ }; struct ntvattrdef { char ad_name[0x40]; int ad_namelen; - u_int32_t ad_type; + uint32_t ad_type; }; #define NTFS_BBID "NTFS " #define NTFS_BBIDLEN 8 struct bootfile { - u_int8_t reserved1[3]; /* asm jmp near ... */ - u_int8_t bf_sysid[8]; /* 'NTFS ' */ - u_int16_t bf_bps; /* bytes per sector */ - u_int8_t bf_spc; /* sectors per cluster */ - u_int8_t reserved2[7]; /* unused (zeroed) */ - u_int8_t bf_media; /* media desc. (0xF8) */ - u_int8_t reserved3[2]; - u_int16_t bf_spt; /* sectors per track */ - u_int16_t bf_heads; /* number of heads */ - u_int8_t reserver4[12]; - u_int64_t bf_spv; /* sectors per volume */ - cn_t bf_mftcn; /* $MFT cluster number */ - cn_t bf_mftmirrcn; /* $MFTMirr cn */ - u_int8_t bf_mftrecsz; /* MFT record size (clust) */ + uint8_t reserved1[3]; /* asm jmp near ... */ + uint8_t bf_sysid[8]; /* 'NTFS ' */ + uint16_t bf_bps; /* bytes per sector */ + uint8_t bf_spc; /* sectors per cluster */ + uint8_t reserved2[7]; /* unused (zeroed) */ + uint8_t bf_media; /* media desc. (0xF8) */ + uint8_t reserved3[2]; + uint16_t bf_spt; /* sectors per track */ + uint16_t bf_heads; /* number of heads */ + uint8_t reserver4[12]; + uint64_t bf_spv; /* sectors per volume */ + cn_t bf_mftcn; /* $MFT cluster number */ + cn_t bf_mftmirrcn; /* $MFTMirr cn */ + uint8_t bf_mftrecsz; /* MFT record size (clust) */ /* 0xF6 inducates 1/4 */ - u_int32_t bf_ibsz; /* index buffer size */ - u_int32_t bf_volsn; /* volume ser. num. */ + uint32_t bf_ibsz; /* index buffer size */ + uint32_t bf_volsn; /* volume ser. num. */ }; #define NTFS_SYSNODESNUM 0x0B struct ntfsmount { struct mount *ntm_mountp; /* filesystem vfs structure */ - struct bootfile ntm_bootfile; + struct bootfile ntm_bootfile; struct g_consumer *ntm_cp; struct bufobj *ntm_bo; struct vnode *ntm_devvp; /* block device mounted vnode */ struct vnode *ntm_sysvn[NTFS_SYSNODESNUM]; - u_int32_t ntm_bpmftrec; - uid_t ntm_uid; - gid_t ntm_gid; - mode_t ntm_mode; + uint32_t ntm_bpmftrec; + uid_t ntm_uid; + gid_t ntm_gid; + mode_t ntm_mode; uint64_t ntm_flag; cn_t ntm_cfree; struct ntvattrdef *ntm_ad; int ntm_adnum; - wchar * ntm_82u; /* 8bit to Unicode */ - char ** ntm_u28; /* Unicode to 8 bit */ + wchar * ntm_82u; /* 8bit to Unicode */ + char ** ntm_u28; /* Unicode to 8 bit */ void * ntm_ic_l2u; /* Local to Unicode (iconv) */ void * ntm_ic_u2l; /* Unicode to Local (iconv) */ - u_int8_t ntm_multiplier; /* NTFS blockno to DEV_BSIZE sectorno */ + uint8_t ntm_multiplier; /* NTFS blockno to DEV_BSIZE sectorno */ }; -#define ntm_mftcn ntm_bootfile.bf_mftcn -#define ntm_mftmirrcn ntm_bootfile.bf_mftmirrcn +#define ntm_mftcn ntm_bootfile.bf_mftcn +#define ntm_mftmirrcn ntm_bootfile.bf_mftmirrcn #define ntm_mftrecsz ntm_bootfile.bf_mftrecsz #define ntm_spc ntm_bootfile.bf_spc #define ntm_bps ntm_bootfile.bf_bps @@ -272,17 +272,17 @@ struct ntfsmount { #define NTFS_NEXTREC(s, type) ((type)(((caddr_t) s) + (s)->reclen)) /* Convert mount ptr to ntfsmount ptr. */ -#define VFSTONTFS(mp) ((struct ntfsmount *)((mp)->mnt_data)) -#define VTONT(v) FTONT(VTOF(v)) +#define VFSTONTFS(mp) ((struct ntfsmount *)((mp)->mnt_data)) +#define VTONT(v) FTONT(VTOF(v)) #define VTOF(v) ((struct fnode *)((v)->v_data)) #define FTOV(f) ((f)->f_vp) #define FTONT(f) ((f)->f_ip) -#define ntfs_cntobn(cn) (daddr_t)((cn) * (ntmp->ntm_spc)) -#define ntfs_cntob(cn) (off_t)((cn) * (ntmp)->ntm_spc * (ntmp)->ntm_bps) -#define ntfs_btocn(off) (cn_t)((off) / ((ntmp)->ntm_spc * (ntmp)->ntm_bps)) -#define ntfs_btocl(off) (cn_t)((off + ntfs_cntob(1) - 1) / ((ntmp)->ntm_spc * (ntmp)->ntm_bps)) -#define ntfs_btocnoff(off) (off_t)((off) % ((ntmp)->ntm_spc * (ntmp)->ntm_bps)) -#define ntfs_bntob(bn) (daddr_t)((bn) * (ntmp)->ntm_bps) +#define ntfs_cntobn(cn) (daddr_t)((cn) * (ntmp->ntm_spc)) +#define ntfs_cntob(cn) (off_t)((cn) * (ntmp)->ntm_spc * (ntmp)->ntm_bps) +#define ntfs_btocn(off) (cn_t)((off) / ((ntmp)->ntm_spc * (ntmp)->ntm_bps)) +#define ntfs_btocl(off) (cn_t)((off + ntfs_cntob(1) - 1) / ((ntmp)->ntm_spc * (ntmp)->ntm_bps)) +#define ntfs_btocnoff(off) (off_t)((off) % ((ntmp)->ntm_spc * (ntmp)->ntm_bps)) +#define ntfs_bntob(bn) (daddr_t)((bn) * (ntmp)->ntm_bps) #define ntfs_bpbl (daddr_t)((ntmp)->ntm_bps) @@ -294,15 +294,15 @@ MALLOC_DECLARE(M_NTFSNTHASH); #endif #if defined(NTFS_DEBUG) -#define dprintf(a) printf a +#define dprintf(a) printf a #if NTFS_DEBUG > 1 -#define ddprintf(a) printf a +#define ddprintf(a) printf a #else -#define ddprintf(a) (void)0 +#define ddprintf(a) (void)0 #endif #else -#define dprintf(a) (void)0 -#define ddprintf(a) (void)0 +#define dprintf(a) (void)0 +#define ddprintf(a) (void)0 #endif extern struct vop_vector ntfs_vnodeops; From owner-svn-src-head@FreeBSD.ORG Sun May 27 10:25:21 2012 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 D8D28106564A; Sun, 27 May 2012 10:25:21 +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 C13C28FC0A; Sun, 27 May 2012 10:25:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4RAPLNF041172; Sun, 27 May 2012 10:25:21 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4RAPLJ4041152; Sun, 27 May 2012 10:25:21 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201205271025.q4RAPLJ4041152@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 27 May 2012 10:25: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: r236141 - in head/sys: conf kern powerpc/booke powerpc/conf 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: Sun, 27 May 2012 10:25:21 -0000 Author: raj Date: Sun May 27 10:25:20 2012 New Revision: 236141 URL: http://svn.freebsd.org/changeset/base/236141 Log: Let us manage differences of Book-E PowerPC variations i.e. vendor / implementation specific vs. the common architecture definition. Bring PPC4XX defines (PSL, SPR, TLB). Note the new definitions under BOOKE_PPC4XX are not used in the code yet. This change set is not supposed to affect existing E500 support, it's just another reorg step before bringing support for E500mc, E5500 and PPC465. Obtained from: AppliedMicro, Freescale, Semihalf Modified: head/sys/conf/files.powerpc head/sys/conf/options.powerpc head/sys/kern/sched_ule.c head/sys/powerpc/booke/locore.S head/sys/powerpc/booke/machdep.c head/sys/powerpc/conf/MPC85XX head/sys/powerpc/conf/NOTES head/sys/powerpc/include/pcpu.h head/sys/powerpc/include/profile.h head/sys/powerpc/include/psl.h head/sys/powerpc/include/pte.h head/sys/powerpc/include/spr.h head/sys/powerpc/include/tlb.h head/sys/powerpc/include/trap.h head/sys/powerpc/include/vmparam.h head/sys/powerpc/powerpc/cpu.c head/sys/powerpc/powerpc/db_trace.c head/sys/powerpc/powerpc/gdb_machdep.c head/sys/powerpc/powerpc/genassym.c Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sun May 27 09:34:47 2012 (r236140) +++ head/sys/conf/files.powerpc Sun May 27 10:25:20 2012 (r236141) @@ -97,17 +97,17 @@ powerpc/aim/swtch64.S optional aim powe powerpc/aim/trap.c optional aim powerpc/aim/uma_machdep.c optional aim powerpc/aim/vm_machdep.c optional aim -powerpc/booke/clock.c optional e500 -powerpc/booke/copyinout.c optional e500 -powerpc/booke/interrupt.c optional e500 -powerpc/booke/locore.S optional e500 no-obj -powerpc/booke/machdep.c optional e500 -powerpc/booke/mp_cpudep.c optional e500 smp +powerpc/booke/clock.c optional booke +powerpc/booke/copyinout.c optional booke +powerpc/booke/interrupt.c optional booke +powerpc/booke/locore.S optional booke no-obj +powerpc/booke/machdep.c optional booke +powerpc/booke/mp_cpudep.c optional booke smp powerpc/booke/platform_bare.c optional mpc85xx -powerpc/booke/pmap.c optional e500 -powerpc/booke/swtch.S optional e500 -powerpc/booke/trap.c optional e500 -powerpc/booke/vm_machdep.c optional e500 +powerpc/booke/pmap.c optional booke +powerpc/booke/swtch.S optional booke +powerpc/booke/trap.c optional booke +powerpc/booke/vm_machdep.c optional booke powerpc/cpufreq/dfs.c optional cpufreq powerpc/cpufreq/pcr.c optional cpufreq aim powerpc/fpu/fpu_add.c optional fpu_emu powerpc Modified: head/sys/conf/options.powerpc ============================================================================== --- head/sys/conf/options.powerpc Sun May 27 09:34:47 2012 (r236140) +++ head/sys/conf/options.powerpc Sun May 27 10:25:20 2012 (r236141) @@ -2,7 +2,9 @@ # Options specific to the powerpc platform kernels AIM opt_global.h -E500 opt_global.h +BOOKE opt_global.h +BOOKE_E500 opt_global.h +BOOKE_PPC4XX opt_global.h CELL POWERPC Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Sun May 27 09:34:47 2012 (r236140) +++ head/sys/kern/sched_ule.c Sun May 27 10:25:20 2012 (r236141) @@ -77,7 +77,7 @@ dtrace_vtime_switch_func_t dtrace_vtime_ #include #include -#if defined(__powerpc__) && defined(E500) +#if defined(__powerpc__) && defined(BOOKE_E500) #error "This architecture is not currently compatible with ULE" #endif Modified: head/sys/powerpc/booke/locore.S ============================================================================== --- head/sys/powerpc/booke/locore.S Sun May 27 09:34:47 2012 (r236140) +++ head/sys/powerpc/booke/locore.S Sun May 27 10:25:20 2012 (r236141) @@ -218,7 +218,7 @@ done_mapping: mr %r3, %r30 mr %r4, %r31 - /* Prepare e500 core */ + /* Prepare core */ bl booke_init /* Switch to thread0.td_kstack now */ Modified: head/sys/powerpc/booke/machdep.c ============================================================================== --- head/sys/powerpc/booke/machdep.c Sun May 27 09:34:47 2012 (r236140) +++ head/sys/powerpc/booke/machdep.c Sun May 27 10:25:20 2012 (r236141) @@ -392,6 +392,7 @@ booke_init(uint32_t arg1, uint32_t arg2) debugf(" boothowto = 0x%08x\n", boothowto); debugf(" kernel ccsrbar = 0x%08x\n", CCSRBAR_VA); debugf(" MSR = 0x%08x\n", mfmsr()); +#if defined(BOOKE_E500) debugf(" HID0 = 0x%08x\n", mfspr(SPR_HID0)); debugf(" HID1 = 0x%08x\n", mfspr(SPR_HID1)); debugf(" BUCSR = 0x%08x\n", mfspr(SPR_BUCSR)); @@ -399,13 +400,16 @@ booke_init(uint32_t arg1, uint32_t arg2) __asm __volatile("msync; isync"); csr = ccsr_read4(OCP85XX_L2CTL); debugf(" L2CTL = 0x%08x\n", csr); +#endif debugf(" dtbp = 0x%08x\n", (uint32_t)dtbp); print_kernel_section_addr(); print_kenv(); +#if defined(BOOKE_E500) //tlb1_print_entries(); //tlb1_print_tlbentries(); +#endif kdb_init(); @@ -421,8 +425,10 @@ booke_init(uint32_t arg1, uint32_t arg2) pmap_mmu_install(MMU_TYPE_BOOKE, 0); pmap_bootstrap((uintptr_t)kernel_text, end); debugf("MSR = 0x%08x\n", mfmsr()); +#if defined(BOOKE_E500) //tlb1_print_entries(); //tlb1_print_tlbentries(); +#endif /* Initialize params/tunables that are derived from memsize. */ init_param2(physmem); Modified: head/sys/powerpc/conf/MPC85XX ============================================================================== --- head/sys/powerpc/conf/MPC85XX Sun May 27 09:34:47 2012 (r236140) +++ head/sys/powerpc/conf/MPC85XX Sun May 27 10:25:20 2012 (r236141) @@ -4,7 +4,8 @@ # $FreeBSD$ # -cpu E500 +cpu BOOKE +cpu BOOKE_E500 ident MPC85XX machine powerpc powerpc Modified: head/sys/powerpc/conf/NOTES ============================================================================== --- head/sys/powerpc/conf/NOTES Sun May 27 09:34:47 2012 (r236140) +++ head/sys/powerpc/conf/NOTES Sun May 27 10:25:20 2012 (r236141) @@ -14,7 +14,8 @@ # # You must specify at least one CPU (the one you intend to run on). cpu AIM -#cpu E500 +#cpu BOOKE_E500 +#cpu BOOKE_PPC440 options FPU_EMU Modified: head/sys/powerpc/include/pcpu.h ============================================================================== --- head/sys/powerpc/include/pcpu.h Sun May 27 09:34:47 2012 (r236140) +++ head/sys/powerpc/include/pcpu.h Sun May 27 10:25:20 2012 (r236141) @@ -115,7 +115,7 @@ struct pmap; PCPU_MD_COMMON_FIELDS \ PCPU_MD_AIM_FIELDS #endif -#ifdef E500 +#if defined(BOOKE) #define PCPU_MD_FIELDS \ PCPU_MD_COMMON_FIELDS \ PCPU_MD_BOOKE_FIELDS Modified: head/sys/powerpc/include/profile.h ============================================================================== --- head/sys/powerpc/include/profile.h Sun May 27 09:34:47 2012 (r236140) +++ head/sys/powerpc/include/profile.h Sun May 27 10:25:20 2012 (r236141) @@ -172,12 +172,13 @@ __asm( " .globl _mcount \n" \ #define __PROFILE_VECTOR_BASE EXC_RST #define __PROFILE_VECTOR_TOP (EXC_LAST + 0x100) #endif /* AIM */ -#ifdef E500 +#if defined(BOOKE) extern char interrupt_vector_base[]; extern char interrupt_vector_top[]; #define __PROFILE_VECTOR_BASE (uintfptr_t)interrupt_vector_base #define __PROFILE_VECTOR_TOP (uintfptr_t)interrupt_vector_top -#endif /* E500 */ +#endif /* BOOKE_E500 || BOOKE_PPC4XX */ + #endif /* !COMPILING_LINT */ #ifndef __PROFILE_VECTOR_BASE Modified: head/sys/powerpc/include/psl.h ============================================================================== --- head/sys/powerpc/include/psl.h Sun May 27 09:34:47 2012 (r236140) +++ head/sys/powerpc/include/psl.h Sun May 27 10:25:20 2012 (r236141) @@ -35,7 +35,7 @@ #ifndef _MACHINE_PSL_H_ #define _MACHINE_PSL_H_ -#if defined(E500) +#if defined(BOOKE_E500) /* * Machine State Register (MSR) - e500 core * @@ -67,7 +67,29 @@ #define PSL_KERNSET (PSL_CE | PSL_ME | PSL_EE) #define PSL_USERSET (PSL_KERNSET | PSL_PR) -#else /* if defined(E500) */ +#elif defined(BOOKE_PPC4XX) +/* + * Machine State Register (MSR) - PPC4xx core + */ +#define PSL_WE (0x80000000 >> 13) /* Wait State Enable */ +#define PSL_CE (0x80000000 >> 14) /* Critical Interrupt Enable */ +#define PSL_EE (0x80000000 >> 16) /* External Interrupt Enable */ +#define PSL_PR (0x80000000 >> 17) /* Problem State */ +#define PSL_FP (0x80000000 >> 18) /* Floating Point Available */ +#define PSL_ME (0x80000000 >> 19) /* Machine Check Enable */ +#define PSL_FE0 (0x80000000 >> 20) /* Floating-point exception mode 0 */ +#define PSL_DWE (0x80000000 >> 21) /* Debug Wait Enable */ +#define PSL_DE (0x80000000 >> 22) /* Debug interrupt Enable */ +#define PSL_FE1 (0x80000000 >> 23) /* Floating-point exception mode 1 */ +#define PSL_IS (0x80000000 >> 26) /* Instruction Address Space */ +#define PSL_DS (0x80000000 >> 27) /* Data Address Space */ + +#define PSL_KERNSET (PSL_CE | PSL_ME | PSL_EE | PSL_FP) +#define PSL_USERSET (PSL_KERNSET | PSL_PR) + +#define PSL_FE_DFLT 0x00000000UL /* default == none */ + +#else /* if defined(BOOKE_*) */ /* * Machine State Register (MSR) * @@ -127,5 +149,5 @@ #define PSL_USERSTATIC (PSL_USERSET | PSL_IP | 0x87c0008c) -#endif /* if defined(E500) */ +#endif /* if defined(BOOKE_E500) */ #endif /* _MACHINE_PSL_H_ */ Modified: head/sys/powerpc/include/pte.h ============================================================================== --- head/sys/powerpc/include/pte.h Sun May 27 09:34:47 2012 (r236140) +++ head/sys/powerpc/include/pte.h Sun May 27 10:25:20 2012 (r236141) @@ -163,7 +163,7 @@ extern u_int dsisr(void); #endif /* _KERNEL */ #endif /* LOCORE */ -#else +#else /* BOOKE */ #include @@ -224,6 +224,8 @@ typedef struct pte pte_t; /* RPN mask, TLB0 4K pages */ #define PTE_PA_MASK PAGE_MASK +#if defined(BOOKE_E500) + /* PTE bits assigned to MAS2, MAS3 flags */ #define PTE_W MAS2_W #define PTE_I MAS2_I @@ -241,6 +243,26 @@ typedef struct pte pte_t; #define PTE_MAS3_MASK ((MAS3_UX | MAS3_SX | MAS3_UW \ | MAS3_SW | MAS3_UR | MAS3_SR) << PTE_MAS3_SHIFT) +#elif defined(BOOKE_PPC4XX) + +#define PTE_WL1 TLB_WL1 +#define PTE_IL2I TLB_IL2I +#define PTE_IL2D TLB_IL2D + +#define PTE_W TLB_W +#define PTE_I TLB_I +#define PTE_M TLB_M +#define PTE_G TLB_G + +#define PTE_UX TLB_UX +#define PTE_SX TLB_SX +#define PTE_UW TLB_UW +#define PTE_SW TLB_SW +#define PTE_UR TLB_UR +#define PTE_SR TLB_SR + +#endif + /* Other PTE flags */ #define PTE_VALID 0x80000000 /* Valid */ #define PTE_MODIFIED 0x40000000 /* Modified */ @@ -256,6 +278,5 @@ typedef struct pte pte_t; #define PTE_ISMODIFIED(pte) ((pte)->flags & PTE_MODIFIED) #define PTE_ISREFERENCED(pte) ((pte)->flags & PTE_REFERENCED) -#endif /* #elif defined(E500) */ - +#endif /* BOOKE_PPC4XX */ #endif /* _MACHINE_PTE_H_ */ Modified: head/sys/powerpc/include/spr.h ============================================================================== --- head/sys/powerpc/include/spr.h Sun May 27 09:34:47 2012 (r236140) +++ head/sys/powerpc/include/spr.h Sun May 27 10:25:20 2012 (r236141) @@ -455,7 +455,7 @@ #define SPR_DAC1 0x3f6 /* 4.. Data Address Compare 1 */ #define SPR_DAC2 0x3f7 /* 4.. Data Address Compare 2 */ #define SPR_PIR 0x3ff /* .6. Processor Identification Register */ -#elif defined(E500) +#elif defined(BOOKE) #define SPR_PIR 0x11e /* ..8 Processor Identification Register */ #define SPR_DBSR 0x130 /* ..8 Debug Status Register */ #define DBSR_IDE 0x80000000 /* Imprecise debug event. */ @@ -628,7 +628,7 @@ #define ESR_DIZ 0x00800000 /* Data/instruction storage interrupt - zone fault */ #define ESR_U0F 0x00008000 /* Data storage interrupt - U0 fault */ -#elif defined(E500) +#elif defined(BOOKE) #define SPR_MCSR 0x23c /* ..8 Machine Check Syndrome register */ @@ -642,12 +642,20 @@ #define ESR_BO 0x00020000 /* Data/instruction storage, byte ordering */ #define ESR_SPE 0x00000080 /* SPE exception bit */ - #define SPR_CSRR0 0x03a /* ..8 58 Critical SRR0 */ #define SPR_CSRR1 0x03b /* ..8 59 Critical SRR1 */ #define SPR_MCSRR0 0x23a /* ..8 570 Machine check SRR0 */ #define SPR_MCSRR1 0x23b /* ..8 571 Machine check SRR1 */ +#define SPR_MMUCR 0x3b2 /* 4.. MMU Control Register */ +#define MMUCR_SWOA (0x80000000 >> 7) +#define MMUCR_U1TE (0x80000000 >> 9) +#define MMUCR_U2SWOAE (0x80000000 >> 10) +#define MMUCR_DULXE (0x80000000 >> 12) +#define MMUCR_IULXE (0x80000000 >> 13) +#define MMUCR_STS (0x80000000 >> 15) +#define MMUCR_STID_MASK (0xFF000000 >> 24) + #define SPR_MMUCSR0 0x3f4 /* ..8 1012 MMU Control and Status Register 0 */ #define MMUCSR0_L2TLB0_FI 0x04 /* TLB0 flash invalidate */ #define MMUCSR0_L2TLB1_FI 0x02 /* TLB1 flash invalidate */ @@ -758,6 +766,5 @@ #define BUCSR_BPEN 0x00000001 /* Branch Prediction Enable */ #define BUCSR_BBFI 0x00000200 /* Branch Buffer Flash Invalidate */ -#endif /* #elif defined(E500) */ - +#endif /* BOOKE */ #endif /* !_POWERPC_SPR_H_ */ Modified: head/sys/powerpc/include/tlb.h ============================================================================== --- head/sys/powerpc/include/tlb.h Sun May 27 09:34:47 2012 (r236140) +++ head/sys/powerpc/include/tlb.h Sun May 27 10:25:20 2012 (r236141) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2006 Semihalf, Marian Balakowicz + * Copyright (C) 2006-2012 Semihalf. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,6 +30,8 @@ #ifndef _MACHINE_TLB_H_ #define _MACHINE_TLB_H_ +#if defined(BOOKE_E500) + /* PowerPC E500 MAS registers */ #define MAS0_TLBSEL(x) ((x << 28) & 0x10000000) #define MAS0_ESEL(x) ((x << 16) & 0x000F0000) @@ -122,15 +124,6 @@ #define _TLB_ENTRY_MEM (0) #endif -#define TID_KERNEL 0 /* TLB TID to use for kernel (shared) translations */ -#define TID_KRESERVED 1 /* Number of TIDs reserved for kernel */ -#define TID_URESERVED 0 /* Number of TIDs reserved for user */ -#define TID_MIN (TID_KRESERVED + TID_URESERVED) -#define TID_MAX 255 -#define TID_NONE -1 - -#define TLB_UNLOCKED 0 - #if !defined(LOCORE) typedef struct tlb_entry { uint32_t mas1; @@ -138,15 +131,80 @@ typedef struct tlb_entry { uint32_t mas3; } tlb_entry_t; -typedef int tlbtid_t; -struct pmap; - void tlb0_print_tlbentries(void); void tlb1_inval_entry(unsigned int); void tlb1_init(vm_offset_t); void tlb1_print_entries(void); void tlb1_print_tlbentries(void); +#endif /* !LOCORE */ + +#elif defined(BOOKE_PPC4XX) + +/* TLB Words */ +#define TLB_PAGEID 0 +#define TLB_XLAT 1 +#define TLB_ATTRIB 2 + +/* Page identification fields */ +#define TLB_EPN_MASK (0xFFFFFC00 >> 0) +#define TLB_VALID (0x80000000 >> 22) +#define TLB_TS (0x80000000 >> 23) +#define TLB_SIZE_1K (0x00000000 >> 24) +#define TLB_SIZE_MASK (0xF0000000 >> 24) + +/* Translation fields */ +#define TLB_RPN_MASK (0xFFFFFC00 >> 0) +#define TLB_ERPN_MASK (0xF0000000 >> 28) + +/* Storage attribute and access control fields */ +#define TLB_WL1 (0x80000000 >> 11) +#define TLB_IL1I (0x80000000 >> 12) +#define TLB_IL1D (0x80000000 >> 13) +#define TLB_IL2I (0x80000000 >> 14) +#define TLB_IL2D (0x80000000 >> 15) +#define TLB_U0 (0x80000000 >> 16) +#define TLB_U1 (0x80000000 >> 17) +#define TLB_U2 (0x80000000 >> 18) +#define TLB_U3 (0x80000000 >> 19) +#define TLB_W (0x80000000 >> 20) +#define TLB_I (0x80000000 >> 21) +#define TLB_M (0x80000000 >> 22) +#define TLB_G (0x80000000 >> 23) +#define TLB_E (0x80000000 >> 24) +#define TLB_UX (0x80000000 >> 26) +#define TLB_UW (0x80000000 >> 27) +#define TLB_UR (0x80000000 >> 28) +#define TLB_SX (0x80000000 >> 29) +#define TLB_SW (0x80000000 >> 30) +#define TLB_SR (0x80000000 >> 31) +#define TLB_SIZE 64 + +#define TLB_SIZE_4K (0x10000000 >> 24) +#define TLB_SIZE_16K (0x20000000 >> 24) +#define TLB_SIZE_64K (0x30000000 >> 24) +#define TLB_SIZE_256K (0x40000000 >> 24) +#define TLB_SIZE_1M (0x50000000 >> 24) +#define TLB_SIZE_16M (0x70000000 >> 24) +#define TLB_SIZE_256M (0x90000000 >> 24) +#define TLB_SIZE_1G (0xA0000000 >> 24) + +#endif /* BOOKE_E500 */ + +#define TID_KERNEL 0 /* TLB TID to use for kernel (shared) translations */ +#define TID_KRESERVED 1 /* Number of TIDs reserved for kernel */ +#define TID_URESERVED 0 /* Number of TIDs reserved for user */ +#define TID_MIN (TID_KRESERVED + TID_URESERVED) +#define TID_MAX 255 +#define TID_NONE -1 + +#define TLB_UNLOCKED 0 + +#if !defined(LOCORE) + +typedef int tlbtid_t; + +struct pmap; void tlb_lock(uint32_t *); void tlb_unlock(uint32_t *); Modified: head/sys/powerpc/include/trap.h ============================================================================== --- head/sys/powerpc/include/trap.h Sun May 27 09:34:47 2012 (r236140) +++ head/sys/powerpc/include/trap.h Sun May 27 10:25:20 2012 (r236141) @@ -2,7 +2,7 @@ #if defined(AIM) #include -#elif defined(E500) +#elif defined(BOOKE) #include #endif Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Sun May 27 09:34:47 2012 (r236140) +++ head/sys/powerpc/include/vmparam.h Sun May 27 10:25:20 2012 (r236141) @@ -78,7 +78,7 @@ #endif #define SHAREDPAGE (VM_MAXUSER_ADDRESS - PAGE_SIZE) #else /* LOCORE */ -#if !defined(__powerpc64__) && defined(E500) +#if !defined(__powerpc64__) && defined(BOOKE) #define VM_MIN_ADDRESS 0 #define VM_MAXUSER_ADDRESS 0x7ffff000 #endif Modified: head/sys/powerpc/powerpc/cpu.c ============================================================================== --- head/sys/powerpc/powerpc/cpu.c Sun May 27 09:34:47 2012 (r236140) +++ head/sys/powerpc/powerpc/cpu.c Sun May 27 10:25:20 2012 (r236141) @@ -446,6 +446,7 @@ cpu_6xx_print_cacheinfo(u_int cpuid, uin static void cpu_booke_setup(int cpuid, uint16_t vers) { +#ifdef BOOKE_E500 register_t hid0; hid0 = mfspr(SPR_HID0); @@ -457,6 +458,7 @@ cpu_booke_setup(int cpuid, uint16_t vers mtspr(SPR_HID0, hid0); printf("cpu%d: HID0 %b\n", cpuid, (int)hid0, HID0_E500_BITMASK); +#endif if (cpu_idle_hook == NULL) cpu_idle_hook = cpu_idle_booke; Modified: head/sys/powerpc/powerpc/db_trace.c ============================================================================== --- head/sys/powerpc/powerpc/db_trace.c Sun May 27 09:34:47 2012 (r236140) +++ head/sys/powerpc/powerpc/db_trace.c Sun May 27 10:25:20 2012 (r236141) @@ -102,7 +102,7 @@ struct db_variable db_regs[] = { { "dar", DB_OFFSET(cpu.aim.dar), db_frame }, { "dsisr", DB_OFFSET(cpu.aim.dsisr), db_frame }, #endif -#ifdef E500 +#if defined(BOOKE) { "dear", DB_OFFSET(cpu.booke.dear), db_frame }, { "esr", DB_OFFSET(cpu.booke.esr), db_frame }, #endif @@ -243,7 +243,7 @@ db_backtrace(struct thread *td, db_addr_ case EXC_SC: trapstr = "SC"; break; case EXC_EXI: trapstr = "EXI"; break; case EXC_MCHK: trapstr = "MCHK"; break; -#ifndef E500 +#if !defined(BOOKE) case EXC_VEC: trapstr = "VEC"; break; case EXC_FPA: trapstr = "FPA"; break; case EXC_BPT: trapstr = "BPT"; break; Modified: head/sys/powerpc/powerpc/gdb_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/gdb_machdep.c Sun May 27 09:34:47 2012 (r236140) +++ head/sys/powerpc/powerpc/gdb_machdep.c Sun May 27 10:25:20 2012 (r236141) @@ -84,7 +84,7 @@ gdb_cpu_setreg(int regnum, void *val) int gdb_cpu_signal(int vector, int dummy __unused) { -#ifdef E500 +#if defined(BOOKE) if (vector == EXC_DEBUG || vector == EXC_PGM) return (SIGTRAP); #else Modified: head/sys/powerpc/powerpc/genassym.c ============================================================================== --- head/sys/powerpc/powerpc/genassym.c Sun May 27 09:34:47 2012 (r236140) +++ head/sys/powerpc/powerpc/genassym.c Sun May 27 10:25:20 2012 (r236141) @@ -63,7 +63,7 @@ ASSYM(PC_TEMPSAVE, offsetof(struct pcpu, ASSYM(PC_DISISAVE, offsetof(struct pcpu, pc_disisave)); ASSYM(PC_DBSAVE, offsetof(struct pcpu, pc_dbsave)); -#ifdef E500 +#if defined(BOOKE) ASSYM(PC_BOOKE_CRITSAVE, offsetof(struct pcpu, pc_booke_critsave)); ASSYM(PC_BOOKE_MCHKSAVE, offsetof(struct pcpu, pc_booke_mchksave)); ASSYM(PC_BOOKE_TLBSAVE, offsetof(struct pcpu, pc_booke_tlbsave)); @@ -116,15 +116,14 @@ ASSYM(SEGMENT_MASK, SEGMENT_MASK); ASSYM(PM_SR, offsetof(struct pmap, pm_sr)); ASSYM(USER_SR, USER_SR); #endif -#elif defined(E500) +#elif defined(BOOKE) ASSYM(PM_PDIR, offsetof(struct pmap, pm_pdir)); -#endif - -#if defined(E500) ASSYM(PTE_RPN, offsetof(struct pte, rpn)); ASSYM(PTE_FLAGS, offsetof(struct pte, flags)); +#if defined(BOOKE_E500) ASSYM(TLB0_ENTRY_SIZE, sizeof(struct tlb_entry)); #endif +#endif #ifdef __powerpc64__ ASSYM(FSP, 48); @@ -215,18 +214,20 @@ ASSYM(SF_UC, offsetof(struct sigframe, s ASSYM(KERNBASE, KERNBASE); ASSYM(MAXCOMLEN, MAXCOMLEN); -#ifdef E500 +#if defined(BOOKE) +ASSYM(PSL_DE, PSL_DE); +ASSYM(PSL_DS, PSL_DS); +ASSYM(PSL_IS, PSL_IS); +ASSYM(PSL_CE, PSL_CE); +#endif +#if defined(BOOKE_E500) ASSYM(PSL_UCLE, PSL_UCLE); ASSYM(PSL_SPE, PSL_SPE); ASSYM(PSL_WE, PSL_WE); -ASSYM(PSL_CE, PSL_CE); ASSYM(PSL_UBLE, PSL_UBLE); -ASSYM(PSL_DS, PSL_DS); -ASSYM(PSL_IS, PSL_IS); -ASSYM(PSL_DE, PSL_DE); ASSYM(PSL_KERNSET_INIT, PSL_KERNSET_INIT); -#else /* AIM */ +#elif defined(AIM) #ifdef __powerpc64__ ASSYM(PSL_SF, PSL_SF); ASSYM(PSL_HV, PSL_HV); @@ -256,8 +257,9 @@ ASSYM(PSL_FE1, PSL_FE1); ASSYM(PSL_FP, PSL_FP); ASSYM(PSL_ME, PSL_ME); ASSYM(PSL_PR, PSL_PR); +#if defined(BOOKE_E500) ASSYM(PSL_PMM, PSL_PMM); - +#endif ASSYM(PSL_KERNSET, PSL_KERNSET); ASSYM(PSL_USERSET, PSL_USERSET); From owner-svn-src-head@FreeBSD.ORG Sun May 27 10:32:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 22B28106564A; Sun, 27 May 2012 10:32:11 +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 0DD378FC15; Sun, 27 May 2012 10:32:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4RAWARV041468; Sun, 27 May 2012 10:32:10 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4RAWAC7041466; Sun, 27 May 2012 10:32:10 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201205271032.q4RAWAC7041466@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 27 May 2012 10:32: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: r236142 - head/sys/powerpc/booke 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, 27 May 2012 10:32:11 -0000 Author: raj Date: Sun May 27 10:32:10 2012 New Revision: 236142 URL: http://svn.freebsd.org/changeset/base/236142 Log: Remove redundant check, we catch ULE platform support in common sys/kern/sched_ule.c Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Sun May 27 10:25:20 2012 (r236141) +++ head/sys/powerpc/booke/pmap.c Sun May 27 10:32:10 2012 (r236142) @@ -101,10 +101,6 @@ __FBSDID("$FreeBSD$"); #define TODO panic("%s: not implemented", __func__); -#include "opt_sched.h" -#ifndef SCHED_4BSD -#error "e500 only works with SCHED_4BSD which uses a global scheduler lock." -#endif extern struct mtx sched_lock; extern int dumpsys_minidump; From owner-svn-src-head@FreeBSD.ORG Sun May 27 11:37:24 2012 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 BA71F1065673; Sun, 27 May 2012 11:37:24 +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 A3C798FC1A; Sun, 27 May 2012 11:37:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4RBbOce046205; Sun, 27 May 2012 11:37:24 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4RBbODF046203; Sun, 27 May 2012 11:37:24 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201205271137.q4RBbODF046203@svn.freebsd.org> From: Martin Matuska Date: Sun, 27 May 2012 11:37:24 +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: r236143 - head/cddl/contrib/opensolaris/cmd/ztest 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, 27 May 2012 11:37:24 -0000 Author: mm Date: Sun May 27 11:37:24 2012 New Revision: 236143 URL: http://svn.freebsd.org/changeset/base/236143 Log: Import illumos changeset 13571:a5771a96228c 1950 ztest backwards compatibility testing option References: https://www.illumos.org/issues/1950 Obtained from: illumos (issue #1950) MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Sun May 27 10:32:10 2012 (r236142) +++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Sun May 27 11:37:24 2012 (r236143) @@ -20,8 +20,9 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2012 Martin Matuska . All rights reserved. */ /* @@ -51,7 +52,9 @@ * At random times, the child self-immolates with a SIGKILL. * This is the software equivalent of pulling the power cord. * The parent then runs the test again, using the existing - * storage pool, as many times as desired. + * storage pool, as many times as desired. If backwards compatability + * testing is enabled ztest will sometimes run the "older" version + * of ztest after a SIGKILL. * * (6) To verify that we don't have future leaks or temporal incursions, * many of the functional tests record the transaction group number @@ -68,9 +71,15 @@ * You can ask more more vdevs [-v], datasets [-d], or threads [-t] * to increase the pool capacity, fanout, and overall stress level. * - * The -N(okill) option will suppress kills, so each child runs to completion. - * This can be useful when you're trying to distinguish temporal incursions - * from plain old race conditions. + * Use the -k option to set the desired frequency of kills. + * + * When ztest invokes itself it passes all relevant information through a + * temporary file which is mmap-ed in the child process. This allows shared + * memory to survive the exec syscall. The ztest_shared_hdr_t struct is always + * stored at offset 0 of this file and contains information on the size and + * number of shared structures in the file. The information stored in this file + * must remain backwards compatible with older versions of ztest so that + * ztest can invoke them during backwards compatibility testing (-B). */ #include @@ -111,29 +120,82 @@ #include #include -static char cmdname[] = "ztest"; -static char *zopt_pool = cmdname; -static char *progname; - -static uint64_t zopt_vdevs = 5; -static uint64_t zopt_vdevtime; -static int zopt_ashift = SPA_MINBLOCKSHIFT; -static int zopt_mirrors = 2; -static int zopt_raidz = 4; -static int zopt_raidz_parity = 1; -static size_t zopt_vdev_size = SPA_MINDEVSIZE; -static int zopt_datasets = 7; -static int zopt_threads = 23; -static uint64_t zopt_passtime = 60; /* 60 seconds */ -static uint64_t zopt_killrate = 70; /* 70% kill rate */ -static int zopt_verbose = 0; -static int zopt_init = 1; -static char *zopt_dir = "/tmp"; -static uint64_t zopt_time = 300; /* 5 minutes */ -static uint64_t zopt_maxloops = 50; /* max loops during spa_freeze() */ +#define ZTEST_FD_DATA 3 +#define ZTEST_FD_RAND 4 + +typedef struct ztest_shared_hdr { + uint64_t zh_hdr_size; + uint64_t zh_opts_size; + uint64_t zh_size; + uint64_t zh_stats_size; + uint64_t zh_stats_count; + uint64_t zh_ds_size; + uint64_t zh_ds_count; +} ztest_shared_hdr_t; + +static ztest_shared_hdr_t *ztest_shared_hdr; + +typedef struct ztest_shared_opts { + char zo_pool[MAXNAMELEN]; + char zo_dir[MAXNAMELEN]; + char zo_alt_ztest[MAXNAMELEN]; + char zo_alt_libpath[MAXNAMELEN]; + uint64_t zo_vdevs; + uint64_t zo_vdevtime; + size_t zo_vdev_size; + int zo_ashift; + int zo_mirrors; + int zo_raidz; + int zo_raidz_parity; + int zo_datasets; + int zo_threads; + uint64_t zo_passtime; + uint64_t zo_killrate; + int zo_verbose; + int zo_init; + uint64_t zo_time; + uint64_t zo_maxloops; + uint64_t zo_metaslab_gang_bang; +} ztest_shared_opts_t; + +static const ztest_shared_opts_t ztest_opts_defaults = { + .zo_pool = { 'z', 't', 'e', 's', 't', '\0' }, + .zo_dir = { '/', 't', 'm', 'p', '\0' }, + .zo_alt_ztest = { '\0' }, + .zo_alt_libpath = { '\0' }, + .zo_vdevs = 5, + .zo_ashift = SPA_MINBLOCKSHIFT, + .zo_mirrors = 2, + .zo_raidz = 4, + .zo_raidz_parity = 1, + .zo_vdev_size = SPA_MINDEVSIZE, + .zo_datasets = 7, + .zo_threads = 23, + .zo_passtime = 60, /* 60 seconds */ + .zo_killrate = 70, /* 70% kill rate */ + .zo_verbose = 0, + .zo_init = 1, + .zo_time = 300, /* 5 minutes */ + .zo_maxloops = 50, /* max loops during spa_freeze() */ + .zo_metaslab_gang_bang = 32 << 10 +}; + +extern uint64_t metaslab_gang_bang; +extern uint64_t metaslab_df_alloc_threshold; + +static ztest_shared_opts_t *ztest_shared_opts; +static ztest_shared_opts_t ztest_opts; + +typedef struct ztest_shared_ds { + uint64_t zd_seq; +} ztest_shared_ds_t; + +static ztest_shared_ds_t *ztest_shared_ds; +#define ZTEST_GET_SHARED_DS(d) (&ztest_shared_ds[d]) #define BT_MAGIC 0x123456789abcdefULL -#define MAXFAULTS() (MAX(zs->zs_mirrors, 1) * (zopt_raidz_parity + 1) - 1) +#define MAXFAULTS() \ + (MAX(zs->zs_mirrors, 1) * (ztest_opts.zo_raidz_parity + 1) - 1) enum ztest_io_type { ZTEST_IO_WRITE_TAG, @@ -205,10 +267,10 @@ typedef struct ztest_od { * Per-dataset state. */ typedef struct ztest_ds { + ztest_shared_ds_t *zd_shared; objset_t *zd_os; rwlock_t zd_zilog_lock; zilog_t *zd_zilog; - uint64_t zd_seq; ztest_od_t *zd_od; /* debugging aid */ char zd_name[MAXNAMELEN]; mutex_t zd_dirobj_lock; @@ -225,11 +287,17 @@ typedef struct ztest_info { ztest_func_t *zi_func; /* test function */ uint64_t zi_iters; /* iterations per execution */ uint64_t *zi_interval; /* execute every seconds */ - uint64_t zi_call_count; /* per-pass count */ - uint64_t zi_call_time; /* per-pass time */ - uint64_t zi_call_next; /* next time to call this function */ } ztest_info_t; +typedef struct ztest_shared_callstate { + uint64_t zc_count; /* per-pass count */ + uint64_t zc_time; /* per-pass time */ + uint64_t zc_next; /* next time to call this function */ +} ztest_shared_callstate_t; + +static ztest_shared_callstate_t *ztest_shared_callstate; +#define ZTEST_GET_SHARED_CALLSTATE(c) (&ztest_shared_callstate[c]) + /* * Note: these aren't static because we want dladdr() to work. */ @@ -297,8 +365,10 @@ ztest_info_t ztest_info[] = { { ztest_dsl_dataset_promote_busy, 1, &zopt_rarely }, { ztest_vdev_attach_detach, 1, &zopt_rarely }, { ztest_vdev_LUN_growth, 1, &zopt_rarely }, - { ztest_vdev_add_remove, 1, &zopt_vdevtime }, - { ztest_vdev_aux_add_remove, 1, &zopt_vdevtime }, + { ztest_vdev_add_remove, 1, + &ztest_opts.zo_vdevtime }, + { ztest_vdev_aux_add_remove, 1, + &ztest_opts.zo_vdevtime }, }; #define ZTEST_FUNCS (sizeof (ztest_info) / sizeof (ztest_info_t)) @@ -316,8 +386,7 @@ typedef struct ztest_cb_list { * Stuff we need to share writably between parent and child. */ typedef struct ztest_shared { - char *zs_pool; - spa_t *zs_spa; + boolean_t zs_do_init; hrtime_t zs_proc_start; hrtime_t zs_proc_stop; hrtime_t zs_thread_start; @@ -328,13 +397,11 @@ typedef struct ztest_shared { uint64_t zs_vdev_aux; uint64_t zs_alloc; uint64_t zs_space; - uint64_t zs_guid; - mutex_t zs_vdev_lock; - rwlock_t zs_name_lock; - ztest_info_t zs_info[ZTEST_FUNCS]; uint64_t zs_splits; uint64_t zs_mirrors; - ztest_ds_t zs_zd[]; + uint64_t zs_metaslab_sz; + uint64_t zs_metaslab_df_alloc_threshold; + uint64_t zs_guid; } ztest_shared_t; #define ID_PARALLEL -1ULL @@ -342,20 +409,19 @@ typedef struct ztest_shared { static char ztest_dev_template[] = "%s/%s.%llua"; static char ztest_aux_template[] = "%s/%s.%s.%llu"; ztest_shared_t *ztest_shared; -uint64_t *ztest_seq; -static int ztest_random_fd; -static int ztest_dump_core = 1; +static spa_t *ztest_spa = NULL; +static ztest_ds_t *ztest_ds; +static mutex_t ztest_vdev_lock; +static rwlock_t ztest_name_lock; + +static boolean_t ztest_dump_core = B_TRUE; static boolean_t ztest_exiting; /* Global commit callback list */ static ztest_cb_list_t zcl; -extern uint64_t metaslab_gang_bang; -extern uint64_t metaslab_df_alloc_threshold; -static uint64_t metaslab_sz; - enum ztest_object { ZTEST_META_DNODE = 0, ZTEST_DIROBJ, @@ -468,12 +534,14 @@ nicenumtoull(const char *buf) static void usage(boolean_t requested) { + const ztest_shared_opts_t *zo = &ztest_opts_defaults; + char nice_vdev_size[10]; char nice_gang_bang[10]; FILE *fp = requested ? stdout : stderr; - nicenum(zopt_vdev_size, nice_vdev_size); - nicenum(metaslab_gang_bang, nice_gang_bang); + nicenum(zo->zo_vdev_size, nice_vdev_size); + nicenum(zo->zo_metaslab_gang_bang, nice_gang_bang); (void) fprintf(fp, "Usage: %s\n" "\t[-v vdevs (default: %llu)]\n" @@ -494,42 +562,43 @@ usage(boolean_t requested) "\t[-T time (default: %llu sec)] total run time\n" "\t[-F freezeloops (default: %llu)] max loops in spa_freeze()\n" "\t[-P passtime (default: %llu sec)] time per pass\n" + "\t[-B alt_ztest (default: )] alternate ztest path\n" "\t[-h] (print help)\n" "", - cmdname, - (u_longlong_t)zopt_vdevs, /* -v */ + zo->zo_pool, + (u_longlong_t)zo->zo_vdevs, /* -v */ nice_vdev_size, /* -s */ - zopt_ashift, /* -a */ - zopt_mirrors, /* -m */ - zopt_raidz, /* -r */ - zopt_raidz_parity, /* -R */ - zopt_datasets, /* -d */ - zopt_threads, /* -t */ + zo->zo_ashift, /* -a */ + zo->zo_mirrors, /* -m */ + zo->zo_raidz, /* -r */ + zo->zo_raidz_parity, /* -R */ + zo->zo_datasets, /* -d */ + zo->zo_threads, /* -t */ nice_gang_bang, /* -g */ - zopt_init, /* -i */ - (u_longlong_t)zopt_killrate, /* -k */ - zopt_pool, /* -p */ - zopt_dir, /* -f */ - (u_longlong_t)zopt_time, /* -T */ - (u_longlong_t)zopt_maxloops, /* -F */ - (u_longlong_t)zopt_passtime); /* -P */ + zo->zo_init, /* -i */ + (u_longlong_t)zo->zo_killrate, /* -k */ + zo->zo_pool, /* -p */ + zo->zo_dir, /* -f */ + (u_longlong_t)zo->zo_time, /* -T */ + (u_longlong_t)zo->zo_maxloops, /* -F */ + (u_longlong_t)zo->zo_passtime); exit(requested ? 0 : 1); } static void process_options(int argc, char **argv) { + char *path; + ztest_shared_opts_t *zo = &ztest_opts; + int opt; uint64_t value; + char altdir[MAXNAMELEN] = { 0 }; - /* Remember program name. */ - progname = argv[0]; - - /* By default, test gang blocks for blocks 32K and greater */ - metaslab_gang_bang = 32 << 10; + bcopy(&ztest_opts_defaults, zo, sizeof (*zo)); while ((opt = getopt(argc, argv, - "v:s:a:m:r:R:d:t:g:i:k:p:f:VET:P:hF:")) != EOF) { + "v:s:a:m:r:R:d:t:g:i:k:p:f:VET:P:hF:B:")) != EOF) { value = 0; switch (opt) { case 'v': @@ -550,58 +619,71 @@ process_options(int argc, char **argv) } switch (opt) { case 'v': - zopt_vdevs = value; + zo->zo_vdevs = value; break; case 's': - zopt_vdev_size = MAX(SPA_MINDEVSIZE, value); + zo->zo_vdev_size = MAX(SPA_MINDEVSIZE, value); break; case 'a': - zopt_ashift = value; + zo->zo_ashift = value; break; case 'm': - zopt_mirrors = value; + zo->zo_mirrors = value; break; case 'r': - zopt_raidz = MAX(1, value); + zo->zo_raidz = MAX(1, value); break; case 'R': - zopt_raidz_parity = MIN(MAX(value, 1), 3); + zo->zo_raidz_parity = MIN(MAX(value, 1), 3); break; case 'd': - zopt_datasets = MAX(1, value); + zo->zo_datasets = MAX(1, value); break; case 't': - zopt_threads = MAX(1, value); + zo->zo_threads = MAX(1, value); break; case 'g': - metaslab_gang_bang = MAX(SPA_MINBLOCKSIZE << 1, value); + zo->zo_metaslab_gang_bang = MAX(SPA_MINBLOCKSIZE << 1, + value); break; case 'i': - zopt_init = value; + zo->zo_init = value; break; case 'k': - zopt_killrate = value; + zo->zo_killrate = value; break; case 'p': - zopt_pool = strdup(optarg); + (void) strlcpy(zo->zo_pool, optarg, + sizeof (zo->zo_pool)); break; case 'f': - zopt_dir = strdup(optarg); + path = realpath(optarg, NULL); + if (path == NULL) { + (void) fprintf(stderr, "error: %s: %s\n", + optarg, strerror(errno)); + usage(B_FALSE); + } else { + (void) strlcpy(zo->zo_dir, path, + sizeof (zo->zo_dir)); + } break; case 'V': - zopt_verbose++; + zo->zo_verbose++; break; case 'E': - zopt_init = 0; + zo->zo_init = 0; break; case 'T': - zopt_time = value; + zo->zo_time = value; break; case 'P': - zopt_passtime = MAX(1, value); + zo->zo_passtime = MAX(1, value); break; case 'F': - zopt_maxloops = MAX(1, value); + zo->zo_maxloops = MAX(1, value); + break; + case 'B': + (void) strlcpy(altdir, optarg, sizeof (altdir)); break; case 'h': usage(B_TRUE); @@ -613,17 +695,59 @@ process_options(int argc, char **argv) } } - zopt_raidz_parity = MIN(zopt_raidz_parity, zopt_raidz - 1); + zo->zo_raidz_parity = MIN(zo->zo_raidz_parity, zo->zo_raidz - 1); - zopt_vdevtime = (zopt_vdevs > 0 ? zopt_time * NANOSEC / zopt_vdevs : + zo->zo_vdevtime = + (zo->zo_vdevs > 0 ? zo->zo_time * NANOSEC / zo->zo_vdevs : UINT64_MAX >> 2); + + if (strlen(altdir) > 0) { + char cmd[MAXNAMELEN]; + char realaltdir[MAXNAMELEN]; + char *bin; + char *ztest; + char *isa; + int isalen; + + (void) realpath(getexecname(), cmd); + if (0 != access(altdir, F_OK)) { + ztest_dump_core = B_FALSE; + fatal(B_TRUE, "invalid alternate ztest path: %s", + altdir); + } + VERIFY(NULL != realpath(altdir, realaltdir)); + + /* + * 'cmd' should be of the form "/usr/bin//ztest". + * We want to extract to determine if we should use + * 32 or 64 bit binaries. + */ + bin = strstr(cmd, "/usr/bin/"); + ztest = strstr(bin, "/ztest"); + isa = bin + 9; + isalen = ztest - isa; + (void) snprintf(zo->zo_alt_ztest, sizeof (zo->zo_alt_ztest), + "%s/usr/bin/%.*s/ztest", realaltdir, isalen, isa); + (void) snprintf(zo->zo_alt_libpath, sizeof (zo->zo_alt_libpath), + "%s/usr/lib/%.*s", realaltdir, isalen, isa); + + if (0 != access(zo->zo_alt_ztest, X_OK)) { + ztest_dump_core = B_FALSE; + fatal(B_TRUE, "invalid alternate ztest: %s", + zo->zo_alt_ztest); + } else if (0 != access(zo->zo_alt_libpath, X_OK)) { + ztest_dump_core = B_FALSE; + fatal(B_TRUE, "invalid alternate lib directory %s", + zo->zo_alt_libpath); + } + } } static void ztest_kill(ztest_shared_t *zs) { - zs->zs_alloc = metaslab_class_get_alloc(spa_normal_class(zs->zs_spa)); - zs->zs_space = metaslab_class_get_space(spa_normal_class(zs->zs_spa)); + zs->zs_alloc = metaslab_class_get_alloc(spa_normal_class(ztest_spa)); + zs->zs_space = metaslab_class_get_space(spa_normal_class(ztest_spa)); (void) kill(getpid(), SIGKILL); } @@ -635,7 +759,7 @@ ztest_random(uint64_t range) if (range == 0) return (0); - if (read(ztest_random_fd, &r, sizeof (r)) != sizeof (r)) + if (read(ZTEST_FD_RAND, &r, sizeof (r)) != sizeof (r)) fatal(1, "short read from /dev/urandom"); return (r % range); @@ -651,9 +775,9 @@ ztest_record_enospc(const char *s) static uint64_t ztest_get_ashift(void) { - if (zopt_ashift == 0) + if (ztest_opts.zo_ashift == 0) return (SPA_MINBLOCKSHIFT + ztest_random(3)); - return (zopt_ashift); + return (ztest_opts.zo_ashift); } static nvlist_t * @@ -671,12 +795,14 @@ make_vdev_file(char *path, char *aux, si if (aux != NULL) { vdev = ztest_shared->zs_vdev_aux; - (void) sprintf(path, ztest_aux_template, - zopt_dir, zopt_pool, aux, vdev); + (void) snprintf(path, sizeof (pathbuf), + ztest_aux_template, ztest_opts.zo_dir, + ztest_opts.zo_pool, aux, vdev); } else { vdev = ztest_shared->zs_vdev_next_leaf++; - (void) sprintf(path, ztest_dev_template, - zopt_dir, zopt_pool, vdev); + (void) snprintf(path, sizeof (pathbuf), + ztest_dev_template, ztest_opts.zo_dir, + ztest_opts.zo_pool, vdev); } } @@ -714,7 +840,7 @@ make_vdev_raidz(char *path, char *aux, s VERIFY(nvlist_add_string(raidz, ZPOOL_CONFIG_TYPE, VDEV_TYPE_RAIDZ) == 0); VERIFY(nvlist_add_uint64(raidz, ZPOOL_CONFIG_NPARITY, - zopt_raidz_parity) == 0); + ztest_opts.zo_raidz_parity) == 0); VERIFY(nvlist_add_nvlist_array(raidz, ZPOOL_CONFIG_CHILDREN, child, r) == 0); @@ -852,7 +978,7 @@ ztest_dsl_prop_set_uint64(char *osname, VERIFY3U(dsl_prop_get(osname, propname, sizeof (curval), 1, &curval, setpoint), ==, 0); - if (zopt_verbose >= 6) { + if (ztest_opts.zo_verbose >= 6) { VERIFY(zfs_prop_index_to_string(prop, curval, &valname) == 0); (void) printf("%s %s = %s at '%s'\n", osname, propname, valname, setpoint); @@ -862,9 +988,9 @@ ztest_dsl_prop_set_uint64(char *osname, } static int -ztest_spa_prop_set_uint64(ztest_shared_t *zs, zpool_prop_t prop, uint64_t value) +ztest_spa_prop_set_uint64(zpool_prop_t prop, uint64_t value) { - spa_t *spa = zs->zs_spa; + spa_t *spa = ztest_spa; nvlist_t *props = NULL; int error; @@ -986,13 +1112,16 @@ ztest_range_unlock(rl_t *rl) } static void -ztest_zd_init(ztest_ds_t *zd, objset_t *os) +ztest_zd_init(ztest_ds_t *zd, ztest_shared_ds_t *szd, objset_t *os) { zd->zd_os = os; zd->zd_zilog = dmu_objset_zil(os); - zd->zd_seq = 0; + zd->zd_shared = szd; dmu_objset_name(os, zd->zd_name); + if (zd->zd_shared != NULL) + zd->zd_shared->zd_seq = 0; + VERIFY(rwlock_init(&zd->zd_zilog_lock, USYNC_THREAD, NULL) == 0); VERIFY(_mutex_init(&zd->zd_dirobj_lock, USYNC_THREAD, NULL) == 0); @@ -2076,8 +2205,9 @@ ztest_zil_commit(ztest_ds_t *zd, uint64_ * will verify that the log really does contain this record. */ mutex_enter(&zilog->zl_lock); - ASSERT(zd->zd_seq <= zilog->zl_commit_lr_seq); - zd->zd_seq = zilog->zl_commit_lr_seq; + ASSERT(zd->zd_shared != NULL); + ASSERT3U(zd->zd_shared->zd_seq, <=, zilog->zl_commit_lr_seq); + zd->zd_shared->zd_seq = zilog->zl_commit_lr_seq; mutex_exit(&zilog->zl_lock); (void) rw_unlock(&zd->zd_zilog_lock); @@ -2114,7 +2244,7 @@ ztest_zil_remount(ztest_ds_t *zd, uint64 void ztest_spa_create_destroy(ztest_ds_t *zd, uint64_t id) { - ztest_shared_t *zs = ztest_shared; + ztest_shared_opts_t *zo = &ztest_opts; spa_t *spa; nvlist_t *nvroot; @@ -2138,15 +2268,15 @@ ztest_spa_create_destroy(ztest_ds_t *zd, * Attempt to create an existing pool. It shouldn't matter * what's in the nvroot; we should fail with EEXIST. */ - (void) rw_rdlock(&zs->zs_name_lock); + (void) rw_rdlock(&ztest_name_lock); nvroot = make_vdev_root("/dev/bogus", NULL, 0, 0, 0, 0, 0, 1); - VERIFY3U(EEXIST, ==, spa_create(zs->zs_pool, nvroot, NULL, NULL, NULL)); + VERIFY3U(EEXIST, ==, spa_create(zo->zo_pool, nvroot, NULL, NULL, NULL)); nvlist_free(nvroot); - VERIFY3U(0, ==, spa_open(zs->zs_pool, &spa, FTAG)); - VERIFY3U(EBUSY, ==, spa_destroy(zs->zs_pool)); + VERIFY3U(0, ==, spa_open(zo->zo_pool, &spa, FTAG)); + VERIFY3U(EBUSY, ==, spa_destroy(zo->zo_pool)); spa_close(spa, FTAG); - (void) rw_unlock(&zs->zs_name_lock); + (void) rw_unlock(&ztest_name_lock); } static vdev_t * @@ -2193,14 +2323,15 @@ void ztest_vdev_add_remove(ztest_ds_t *zd, uint64_t id) { ztest_shared_t *zs = ztest_shared; - spa_t *spa = zs->zs_spa; + spa_t *spa = ztest_spa; uint64_t leaves; uint64_t guid; nvlist_t *nvroot; int error; - VERIFY(mutex_lock(&zs->zs_vdev_lock) == 0); - leaves = MAX(zs->zs_mirrors + zs->zs_splits, 1) * zopt_raidz; + VERIFY(mutex_lock(&ztest_vdev_lock) == 0); + leaves = + MAX(zs->zs_mirrors + zs->zs_splits, 1) * ztest_opts.zo_raidz; spa_config_enter(spa, SCL_VDEV, FTAG, RW_READER); @@ -2225,9 +2356,9 @@ ztest_vdev_add_remove(ztest_ds_t *zd, ui * dmu_objset_destroy() to fail with EBUSY thus * leaving the dataset in an inconsistent state. */ - VERIFY(rw_wrlock(&ztest_shared->zs_name_lock) == 0); + VERIFY(rw_wrlock(&ztest_name_lock) == 0); error = spa_vdev_remove(spa, guid, B_FALSE); - VERIFY(rw_unlock(&ztest_shared->zs_name_lock) == 0); + VERIFY(rw_unlock(&ztest_name_lock) == 0); if (error && error != EEXIST) fatal(0, "spa_vdev_remove() = %d", error); @@ -2237,8 +2368,10 @@ ztest_vdev_add_remove(ztest_ds_t *zd, ui /* * Make 1/4 of the devices be log devices. */ - nvroot = make_vdev_root(NULL, NULL, zopt_vdev_size, 0, - ztest_random(4) == 0, zopt_raidz, zs->zs_mirrors, 1); + nvroot = make_vdev_root(NULL, NULL, + ztest_opts.zo_vdev_size, 0, + ztest_random(4) == 0, ztest_opts.zo_raidz, + zs->zs_mirrors, 1); error = spa_vdev_add(spa, nvroot); nvlist_free(nvroot); @@ -2249,7 +2382,7 @@ ztest_vdev_add_remove(ztest_ds_t *zd, ui fatal(0, "spa_vdev_add() = %d", error); } - VERIFY(mutex_unlock(&ztest_shared->zs_vdev_lock) == 0); + VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); } /* @@ -2260,7 +2393,7 @@ void ztest_vdev_aux_add_remove(ztest_ds_t *zd, uint64_t id) { ztest_shared_t *zs = ztest_shared; - spa_t *spa = zs->zs_spa; + spa_t *spa = ztest_spa; vdev_t *rvd = spa->spa_root_vdev; spa_aux_vdev_t *sav; char *aux; @@ -2275,7 +2408,7 @@ ztest_vdev_aux_add_remove(ztest_ds_t *zd aux = ZPOOL_CONFIG_L2CACHE; } - VERIFY(mutex_lock(&zs->zs_vdev_lock) == 0); + VERIFY(mutex_lock(&ztest_vdev_lock) == 0); spa_config_enter(spa, SCL_VDEV, FTAG, RW_READER); @@ -2292,8 +2425,9 @@ ztest_vdev_aux_add_remove(ztest_ds_t *zd for (;;) { char path[MAXPATHLEN]; int c; - (void) sprintf(path, ztest_aux_template, zopt_dir, - zopt_pool, aux, zs->zs_vdev_aux); + (void) snprintf(path, sizeof (path), ztest_aux_template, + ztest_opts.zo_dir, ztest_opts.zo_pool, aux, + zs->zs_vdev_aux); for (c = 0; c < sav->sav_count; c++) if (strcmp(sav->sav_vdevs[c]->vdev_path, path) == 0) @@ -2312,7 +2446,7 @@ ztest_vdev_aux_add_remove(ztest_ds_t *zd * Add a new device. */ nvlist_t *nvroot = make_vdev_root(NULL, aux, - (zopt_vdev_size * 5) / 4, 0, 0, 0, 0, 1); + (ztest_opts.zo_vdev_size * 5) / 4, 0, 0, 0, 0, 1); error = spa_vdev_add(spa, nvroot); if (error != 0) fatal(0, "spa_vdev_add(%p) = %d", nvroot, error); @@ -2331,7 +2465,7 @@ ztest_vdev_aux_add_remove(ztest_ds_t *zd fatal(0, "spa_vdev_remove(%llu) = %d", guid, error); } - VERIFY(mutex_unlock(&zs->zs_vdev_lock) == 0); + VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); } /* @@ -2342,17 +2476,17 @@ void ztest_split_pool(ztest_ds_t *zd, uint64_t id) { ztest_shared_t *zs = ztest_shared; - spa_t *spa = zs->zs_spa; + spa_t *spa = ztest_spa; vdev_t *rvd = spa->spa_root_vdev; nvlist_t *tree, **child, *config, *split, **schild; uint_t c, children, schildren = 0, lastlogid = 0; int error = 0; - VERIFY(mutex_lock(&zs->zs_vdev_lock) == 0); + VERIFY(mutex_lock(&ztest_vdev_lock) == 0); /* ensure we have a useable config; mirrors of raidz aren't supported */ - if (zs->zs_mirrors < 3 || zopt_raidz > 1) { - VERIFY(mutex_unlock(&zs->zs_vdev_lock) == 0); + if (zs->zs_mirrors < 3 || ztest_opts.zo_raidz > 1) { + VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); return; } @@ -2411,9 +2545,9 @@ ztest_split_pool(ztest_ds_t *zd, uint64_ spa_config_exit(spa, SCL_VDEV, FTAG); - (void) rw_wrlock(&zs->zs_name_lock); + (void) rw_wrlock(&ztest_name_lock); error = spa_vdev_split_mirror(spa, "splitp", config, NULL, B_FALSE); - (void) rw_unlock(&zs->zs_name_lock); + (void) rw_unlock(&ztest_name_lock); nvlist_free(config); @@ -2426,7 +2560,7 @@ ztest_split_pool(ztest_ds_t *zd, uint64_ ++zs->zs_splits; --zs->zs_mirrors; } - VERIFY(mutex_unlock(&zs->zs_vdev_lock) == 0); + VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); } @@ -2438,7 +2572,7 @@ void ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t id) { ztest_shared_t *zs = ztest_shared; - spa_t *spa = zs->zs_spa; + spa_t *spa = ztest_spa; spa_aux_vdev_t *sav = &spa->spa_spares; vdev_t *rvd = spa->spa_root_vdev; vdev_t *oldvd, *newvd, *pvd; @@ -2455,8 +2589,8 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, int oldvd_is_log; int error, expected_error; - VERIFY(mutex_lock(&zs->zs_vdev_lock) == 0); - leaves = MAX(zs->zs_mirrors, 1) * zopt_raidz; + VERIFY(mutex_lock(&ztest_vdev_lock) == 0); + leaves = MAX(zs->zs_mirrors, 1) * ztest_opts.zo_raidz; spa_config_enter(spa, SCL_VDEV, FTAG, RW_READER); @@ -2482,12 +2616,12 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, if (zs->zs_mirrors >= 1) { ASSERT(oldvd->vdev_ops == &vdev_mirror_ops); ASSERT(oldvd->vdev_children >= zs->zs_mirrors); - oldvd = oldvd->vdev_child[leaf / zopt_raidz]; + oldvd = oldvd->vdev_child[leaf / ztest_opts.zo_raidz]; } - if (zopt_raidz > 1) { + if (ztest_opts.zo_raidz > 1) { ASSERT(oldvd->vdev_ops == &vdev_raidz_ops); - ASSERT(oldvd->vdev_children == zopt_raidz); - oldvd = oldvd->vdev_child[leaf % zopt_raidz]; + ASSERT(oldvd->vdev_children == ztest_opts.zo_raidz); + oldvd = oldvd->vdev_child[leaf % ztest_opts.zo_raidz]; } /* @@ -2516,7 +2650,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, if (error != 0 && error != ENODEV && error != EBUSY && error != ENOTSUP) fatal(0, "detach (%s) returned %d", oldpath, error); - VERIFY(mutex_unlock(&zs->zs_vdev_lock) == 0); + VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); return; } @@ -2530,7 +2664,8 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, (void) strcpy(newpath, newvd->vdev_path); } else { (void) snprintf(newpath, sizeof (newpath), ztest_dev_template, - zopt_dir, zopt_pool, top * leaves + leaf); + ztest_opts.zo_dir, ztest_opts.zo_pool, + top * leaves + leaf); if (ztest_random(2) == 0) newpath[strlen(newpath) - 1] = 'b'; newvd = vdev_lookup_by_path(rvd, newpath); @@ -2609,7 +2744,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, (longlong_t)newsize, replacing, error, expected_error); } - VERIFY(mutex_unlock(&zs->zs_vdev_lock) == 0); + VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); } /* @@ -2632,7 +2767,7 @@ grow_vdev(vdev_t *vd, void *arg) fsize = lseek(fd, 0, SEEK_END); (void) ftruncate(fd, *newsize); - if (zopt_verbose >= 6) { + if (ztest_opts.zo_verbose >= 6) { (void) printf("%s grew from %lu to %lu bytes\n", vd->vdev_path, (ulong_t)fsize, (ulong_t)*newsize); } @@ -2668,7 +2803,7 @@ online_vdev(vdev_t *vd, void *arg) * vdev_open fails is by checking the returned newstate. */ if (error || newstate != VDEV_STATE_HEALTHY) { - if (zopt_verbose >= 5) { + if (ztest_opts.zo_verbose >= 5) { (void) printf("Unable to expand vdev, state %llu, " "error %d\n", (u_longlong_t)newstate, error); } @@ -2683,7 +2818,7 @@ online_vdev(vdev_t *vd, void *arg) * trying to online it. */ if (generation != spa->spa_config_generation) { - if (zopt_verbose >= 5) { + if (ztest_opts.zo_verbose >= 5) { (void) printf("vdev configuration has changed, " "guid %llu, state %llu, expected gen %llu, " "got gen %llu\n", @@ -2729,8 +2864,7 @@ vdev_walk_tree(vdev_t *vd, vdev_t *(*fun void ztest_vdev_LUN_growth(ztest_ds_t *zd, uint64_t id) { - ztest_shared_t *zs = ztest_shared; - spa_t *spa = zs->zs_spa; + spa_t *spa = ztest_spa; vdev_t *vd, *tvd; metaslab_class_t *mc; metaslab_group_t *mg; @@ -2738,7 +2872,7 @@ ztest_vdev_LUN_growth(ztest_ds_t *zd, ui uint64_t top; uint64_t old_class_space, new_class_space, old_ms_count, new_ms_count; - VERIFY(mutex_lock(&zs->zs_vdev_lock) == 0); + VERIFY(mutex_lock(&ztest_vdev_lock) == 0); spa_config_enter(spa, SCL_STATE, spa, RW_READER); top = ztest_random_vdev_top(spa, B_TRUE); @@ -2764,16 +2898,16 @@ ztest_vdev_LUN_growth(ztest_ds_t *zd, ui * original size, and it has a valid psize. */ if (tvd->vdev_state != VDEV_STATE_HEALTHY || - psize == 0 || psize >= 4 * zopt_vdev_size) { + psize == 0 || psize >= 4 * ztest_opts.zo_vdev_size) { spa_config_exit(spa, SCL_STATE, spa); - VERIFY(mutex_unlock(&zs->zs_vdev_lock) == 0); + VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); return; } ASSERT(psize > 0); newsize = psize + psize / 8; ASSERT3U(newsize, >, psize); - if (zopt_verbose >= 6) { + if (ztest_opts.zo_verbose >= 6) { (void) printf("Expanding LUN %s from %lu to %lu\n", vd->vdev_path, (ulong_t)psize, (ulong_t)newsize); } @@ -2786,12 +2920,12 @@ ztest_vdev_LUN_growth(ztest_ds_t *zd, ui if (vdev_walk_tree(tvd, grow_vdev, &newsize) != NULL || vdev_walk_tree(tvd, online_vdev, NULL) != NULL || tvd->vdev_state != VDEV_STATE_HEALTHY) { - if (zopt_verbose >= 5) { + if (ztest_opts.zo_verbose >= 5) { (void) printf("Could not expand LUN because " "the vdev configuration changed.\n"); } spa_config_exit(spa, SCL_STATE, spa); - VERIFY(mutex_unlock(&zs->zs_vdev_lock) == 0); + VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); return; } @@ -2820,12 +2954,12 @@ ztest_vdev_LUN_growth(ztest_ds_t *zd, ui new_class_space = metaslab_class_get_space(mc); if (tvd->vdev_mg != mg || mg->mg_class != mc) { - if (zopt_verbose >= 5) { + if (ztest_opts.zo_verbose >= 5) { (void) printf("Could not verify LUN expansion due to " "intervening vdev offline or remove.\n"); } spa_config_exit(spa, SCL_STATE, spa); - VERIFY(mutex_unlock(&zs->zs_vdev_lock) == 0); + VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); return; } @@ -2843,7 +2977,7 @@ ztest_vdev_LUN_growth(ztest_ds_t *zd, ui fatal(0, "LUN expansion failed: class_space %llu <= %llu\n", old_class_space, new_class_space); - if (zopt_verbose >= 5) { + if (ztest_opts.zo_verbose >= 5) { char oldnumbuf[6], newnumbuf[6]; nicenum(old_class_space, oldnumbuf); @@ -2853,7 +2987,7 @@ ztest_vdev_LUN_growth(ztest_ds_t *zd, ui } spa_config_exit(spa, SCL_STATE, spa); - VERIFY(mutex_unlock(&zs->zs_vdev_lock) == 0); + VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); } /* @@ -2880,7 +3014,8 @@ ztest_dataset_create(char *dsname) if (err || zilset < 80) return (err); - (void) printf("Setting dataset %s to sync always\n", dsname); + if (ztest_opts.zo_verbose >= 6) + (void) printf("Setting dataset %s to sync always\n", dsname); return (ztest_dsl_prop_set_uint64(dsname, ZFS_PROP_SYNC, ZFS_SYNC_ALWAYS, B_FALSE)); } @@ -2952,7 +3087,6 @@ ztest_snapshot_destroy(char *osname, uin void ztest_dmu_objset_create_destroy(ztest_ds_t *zd, uint64_t id) { - ztest_shared_t *zs = ztest_shared; ztest_ds_t zdtmp; int iters; int error; @@ -2960,10 +3094,10 @@ ztest_dmu_objset_create_destroy(ztest_ds char name[MAXNAMELEN]; zilog_t *zilog; - (void) rw_rdlock(&zs->zs_name_lock); + (void) rw_rdlock(&ztest_name_lock); (void) snprintf(name, MAXNAMELEN, "%s/temp_%llu", - zs->zs_pool, (u_longlong_t)id); + ztest_opts.zo_pool, (u_longlong_t)id); /* * If this dataset exists from a previous run, process its replay log @@ -2972,7 +3106,7 @@ ztest_dmu_objset_create_destroy(ztest_ds */ if (ztest_random(2) == 0 && dmu_objset_own(name, DMU_OST_OTHER, B_FALSE, FTAG, &os) == 0) { - ztest_zd_init(&zdtmp, os); + ztest_zd_init(&zdtmp, NULL, os); zil_replay(os, &zdtmp, ztest_replay_vector); ztest_zd_fini(&zdtmp); dmu_objset_disown(os, FTAG); @@ -2998,7 +3132,7 @@ ztest_dmu_objset_create_destroy(ztest_ds if (error) { if (error == ENOSPC) { ztest_record_enospc(FTAG); - (void) rw_unlock(&zs->zs_name_lock); + (void) rw_unlock(&ztest_name_lock); return; } fatal(0, "dmu_objset_create(%s) = %d", name, error); @@ -3007,7 +3141,7 @@ ztest_dmu_objset_create_destroy(ztest_ds VERIFY3U(0, ==, dmu_objset_own(name, DMU_OST_OTHER, B_FALSE, FTAG, &os)); - ztest_zd_init(&zdtmp, os); + ztest_zd_init(&zdtmp, NULL, os); /* * Open the intent log for it. @@ -3047,7 +3181,7 @@ ztest_dmu_objset_create_destroy(ztest_ds dmu_objset_disown(os, FTAG); ztest_zd_fini(&zdtmp); - (void) rw_unlock(&zs->zs_name_lock); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun May 27 12:22:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D7EA21065674; Sun, 27 May 2012 12:22:15 +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 9EDA48FC0C; Sun, 27 May 2012 12:22:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4RCMFN2048270; Sun, 27 May 2012 12:22:15 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4RCMFNj048268; Sun, 27 May 2012 12:22:15 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201205271222.q4RCMFNj048268@svn.freebsd.org> From: Martin Matuska Date: Sun, 27 May 2012 12:22: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: r236145 - head/cddl/contrib/opensolaris/cmd/zpool 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, 27 May 2012 12:22:16 -0000 Author: mm Date: Sun May 27 12:22:15 2012 New Revision: 236145 URL: http://svn.freebsd.org/changeset/base/236145 Log: Import illumos changeset 13564:cf89c0c60496 1946 incorrect formatting when listing output of multiple pools with zpool iostat -v References: https://www.illumos.org/issues/1946 Obtained from: illumos (issue #1946) MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun May 27 12:01:04 2012 (r236144) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun May 27 12:22:15 2012 (r236145) @@ -23,6 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Frederik Wessels. All rights reserved. * Copyright (c) 2011 Martin Matuska . All rights reserved. */ @@ -2351,7 +2352,8 @@ get_namewidth(zpool_handle_t *zhp, void if (!cb->cb_verbose) cb->cb_namewidth = strlen(zpool_get_name(zhp)); else - cb->cb_namewidth = max_width(zhp, nvroot, 0, 0); + cb->cb_namewidth = max_width(zhp, nvroot, 0, + cb->cb_namewidth); } /* From owner-svn-src-head@FreeBSD.ORG Sun May 27 12:28:45 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C1780106566C; Sun, 27 May 2012 12:28:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx08.syd.optusnet.com.au (fallbackmx08.syd.optusnet.com.au [211.29.132.10]) by mx1.freebsd.org (Postfix) with ESMTP id 1203F8FC14; Sun, 27 May 2012 12:28:44 +0000 (UTC) Received: from mail30.syd.optusnet.com.au (mail30.syd.optusnet.com.au [211.29.133.193]) by fallbackmx08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q4RCShp6004665; Sun, 27 May 2012 22:28:43 +1000 Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail30.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q4RCSWRE022272 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 27 May 2012 22:28:34 +1000 Date: Sun, 27 May 2012 22:28:32 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Kenneth D. Merry" In-Reply-To: <201205270611.q4R6B9fO029809@svn.freebsd.org> Message-ID: <20120527174540.Q1061@besplex.bde.org> References: <201205270611.q4R6B9fO029809@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: r236138 - head/sys/cam/scsi 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, 27 May 2012 12:28:45 -0000 On Sun, 27 May 2012, Kenneth D. Merry wrote: > Log: > Work around a race condition in devfs by changing the way closes > are handled in most CAM peripheral drivers that are not handled by > GEOM's disk class. Sigh. I was trying to get kib to fix last close properly and remove a previous D_TRACKCLOSE fix. The geom case is quite broken too. > The usual character driver open and close semantics are that the > driver gets N open calls, but only one close, when the last caller > closes the device. vfs+devfs doesn't understand its own state well enough to get this right. It's impossible for individual drivers to fix this (except in a few simple cases where access is basically exclusive), since to do so they would have to understand vfs+devfs better than vfs+devfs understands itself, and inspect and maybe modify its entrails... > CAM peripheral drivers expect that behavior to be honored to the > letter, and the CAM peripheral driver code (specifically > cam_periph_release_locked_busses()) panics if it is done incorrectly. The old way to determine whether the device is already open and whether it should actually be closed in last-close is to use count_dev(). This almost worked. It is still used in the ata tape driver, and I used it in a couple of other pre-geom and de-geomed ata drivers (mainly to fix eject in acd). It is more broken than originally mainly in the case of multiple devfs mounts, due to lossage in aliasing code. Its locking is inadequate, especially when it is called from drivers. But devfs has no better way to determine the lastness of a close. Devfs close uses count_dev(), and just has better locking for its call. Even driver close calls for D_TRACKCLOSE can go missing when count_dev() is lower than it should be. But most problems occur when count_dev() is higher than it should be when devfs close calls it. Last-close calls go missing in this case. Drivers can trust it even less. For example, if the driver attempts to track last closes using D_TRACKCLOSE, then the driver close should do less when this is not the last close. But if count_dev() is higher than it should be (now at the time of the finalization of the driver close instead of earlier in devfs close) then a driver that trusts count_dev() will do less than it should. OTOH, counting things in drivers takes a lot of work and still cannot work, since wrong vfs+devfs counts result in closes not matching opens even with D_TRACKCLOSE. All a driver can do is: - count things well enough not to panic went vfs+devfs messes up its counts - use D_TRACKCLOSE to handle missing last closes if necessary. Most drivers don't want the complexity of handling all closes, but some are more broken than others by missing last closes, and it may be necessary to count all closes to avoid the panics. > Since devfs has to drop its locks while it calls a driver's close > routine, and it does not have a way to delay or prevent open calls > while it is calling the close routine, there is a race. Indeed. Note that the race window is unbounded and any number of { open, i/o, close } sequences may occur (and work!) while the original last-close is running. This cannot be fixed in general by holding a lock throughout the original last-close, since that may want to take aritrarily long and the lock would deadlock it. You need to be able to do { open, ioctl, close } sequences to tell the device not to block. Dropping the locks is also what makes count_dev() more broken in drivers than in devfs close: - originally, count_dev() was spelled vcount() and all vnodes for a device were aliased to a single vnode. This vnode was locked by the kernel not being preemptive and/or by SMP not existing and/or by Giant locking, even after the vnode exlusive lock was dropped in specfs/devfs, unless the driver operation sleeps. Sleeping gives normal races, so for example after a driver close sleeps it should have called vcount() to detect state changes while sleeping. This was done by few or no drivers. But vcount was reliable() after waking up, even without the vnode exclusive lock, due to the Giant/etc locking. - the aliasing code regressed to allowing multiple vnodes active on a device (with devfs, this takes multiple mounts). The count is still per-device. There is dev locking to protect the count, but no interlocking of this with the vnodes. This would mostly still work without SMP. But with SMP, you can have 2 active vnodes for a device, and 1 process holding the vnode (now non-exclusive) lock for stat() and incrementing the device count, while another process tries to last-close the device; then in devfs close, although both vnodes are locked the count is 1 too high due to the stat() and the last close goes missing; worse, if you use D_TRACKCLOSE to try to fix this, you may or may not see the count as 1 too high and have no way to tell if it is, and no way to fix the locking (count_dev() will acquire a dev lock, but for working locking you also need the lock for your vnode that devfs close dropped, and also the lock for the other aliased vnode(s) that stat() may or may not still hold, since count_dev() understands less about this than you and doesn't lock them. Then after blocking on these locks, you must consider restarting the operation if the state changed while you were blocked...). - without multiple mounts, there are no aliasing problems, but the ones for SMP are similar. Now count_dev() works as correctly as before in devfs close (there are still old problems with revoke(2) and vgone(9), and complications for the extra count for controlling terminals), but the vnode (exclusive) locking works. But when the vnode lock is released, count_dev() becomes hard to use. Drivers must add vnode locking around sections of code that use it, and the only simplification from the above aliased case is that there is only one vnode to know too much about. kib has some fixes for a small part of this. They involve not only incrementing the device count for open and not for stat() and other operations. (Now, most syscalls that lock a device's vnode also increase its access count. This access count is abused as an open count. This abuse used to mostly work everything was exclusively locked in devfs close and Giant locked elswhere. In normal operation, devfs close is not called while any other process is in the driver (since in normal operation, if for example a read() operation has not returned from the driver, the file is still open so close will not be called for it). The device may still be open, with other processes in the driver for it, via another file. Last-close semantics (no D_TRACKCLOSE) results in these processes not being disturbed for close on the inactive file. If these processes have not yet released the vnode lock in the devfs entry to the driver, or have re-aquired it, then the locking prevents devfs close disturbing them even with D_TRACKCLOSE. Then there is abnormal operation, in which things are quite broken. revoke(2) and vgone(9) result in devfs close being called even when there other processes in the driver, via the same or another vnode. Only locking of the vnode being revoked will prevent this. If things are minimally broken, then last-close will occur. I think last-closes go missing when there are multiple active aliases. If the driver uses D_TRACKCLOSE, then it will see at least 1 close per revoke/vgone. It then has the responsibility of untangling the mess. revoke() should probably apply to all the aliases, but general vgone() should not, since it is usually for forcibly unmounting 1 devfs instance -- this shouldn't affect others. D_TRACKCLOSE is most broken in this case. I think driver close is only called once per revoke/vgone (the count is reduced to 1 so that last-close occurs, but the intermediate reductions are not noticed. kib has some fixes for this.) > The sequence of events, simplified a bit, is: > > - devfs acquires a lock > - devfs checks the reference count, and if it is 1, continues to close. > - devfs releases the lock > > - 2nd process open call on the device happens here > > - devfs calls the driver's close routine Is this for the 2nd process? It should be, but see below. > - devfs acquires a lock > - devfs decrements the reference count > - devfs releases the lock > > - 2nd process close call on the device happens here > > At the second close, we get a panic in > cam_periph_release_locked_busses(), complaining that peripheral > has been released when the reference count is already 0. This is > because we have gotten two closes in a row, which should not > happen. This all seems to be correct operation (normal races) except for the panic. The closes are not in a row, but are concurrent, and there can be any number of them concurrently. This is an unavoidable consequence of dropping the lock. I was more concerned about missing and extra last closes due to vfs miscounting. I think D_TRACKCLOSE would only complicate the above case further. The second close really shouldn't occur unless it had a corresponding open. The sequence might be: open io start close start open (1) end open io close (should notice that previous one is active and do less) end close Or you could make the middle close tell the first one to return, and wait for it, and then complete (this in turn might race with another open/io/close and might pass control to the next close...). However, there are the following bugs: - the access count is bogusly increased before driver open is called. The race window for this may be aritrarily long, since driver opens may sleep. - the access count may also be 1 extra for concurrent stat(), etc. Both of these tend to make last-closes go missing, so I don't understand your problem yet. D_TRACKCLOSE increases the problem by fixing the missing last-closes giving driver close calls when for example there is a 3rd open/close (first process in close; second process blocked in open; third process got through open by using O_NONBLOCK). The extra count for stat() normally won't result in extra concurrent closes, since stat() doesn't cause closes. > The fix is to add the D_TRACKCLOSE flag to the driver's cdevsw, so > that we get a close() call for each open(). That does happen > reliably, so we can make sure that our reference counts are > correct. It's horribly unreliable. > Note that the sa(4) and pt(4) drivers only allow one context > through the open routine. So these drivers aren't exposed to the > same race condition. When I started looking at this bug suite again this year, it was in response to someone adding D_TRACKCLOSE to sndstat. This has at least partially exclusive access. But it was still broken. According to the commit log close() calls went missing due to other processes being in open() or stat(). As explained above, the problem with stat() can only occur when there are multiple devfs mounts, so I doubt that it was the one that actually occurred. But it is easy for open()s to get in each others way, and the exclusive access checking doesn't help at all since it is not done until after aquiring a lock, so the following bad behaviour like the following apparently happens: open start read (aquire lock) devfs open (increment access the count that is abused as an open count) device open (block on lock, even if O_NOBLOCK) dev* open... (can be any number of these of these) end read (release lock, but scheduler decides to keep running us) devfs close (should be last close, but isn't because wrong open count) device open (it can run now. Missing last close => bogusly busy => EBUSY) devfs open (decrement access count) device open... (return EBUSY, as above) devfs open (eventually access count decremented to 0) open (still bogusly busy => EBUSY) open... (busy forever) The exclusive access makes the problem worse by getting stuck in an invalid state. The fix was to use D_TRACKCLOSE. I don't like this, but it is safer for drivers for drivers with pure exclusive access since the correct open count is very easy to determine (modulo bugs in revoke()) -- it must be 1 throughout the close. Bugs in revoke give relatively minor complications: - missing last closes: avoided by D_TRACKCLOSE - extra last closes: it's often harmless for the hardware to be turned off twice. If not, use the exclusive access condition to avoid this (no owner when close is called means an extra close). There remains the problem that driver open shouldn't block before doing the exlusive access check. > scsi_enc_internal.h, > scsi_pass.c, > scsi_sg.c: > For these drivers, change the open() routine to > increment the reference count for every open, and > just decrement the reference count in the close. > > Call cam_periph_release_locked() in some scenarios > to avoid additional lock and unlock calls. > > scsi_pt.c: Call cam_periph_release_locked() in some scenarios > to avoid additional lock and unlock calls. Might work except in the revoke/vgone case. Note that revoke(2) acts on any character device (if count_dev() on the device is > 1). For non- terminal devices, revoke(2) is a mainly foot-shooting interface so it could be disallowed. But vgone() on any cdev must be allowed, since it is need to forcibly unmount devfs. Here is one way D_TRACKCLOSE breaks in geom when its foot is shot using revoke(). geom doesn't count closes, but turns off access flags. In old disk code, I used open flags for each device. Device flags are more immune to the vfs+devfs counting bugs than device counts, since they stick at 0 and 1 and you can try to reset them using normal operations. But geom breaks anyway. % static int % g_dev_close(struct cdev *dev, int flags, int fmt, struct thread *td) % { % struct g_geom *gp; % struct g_consumer *cp; % int error, r, w, e, i; % % gp = dev->si_drv1; % cp = dev->si_drv2; % if (gp == NULL || cp == NULL) % return(ENXIO); % g_trace(G_T_ACCESS, "g_dev_close(%s, %d, %d, %p)", % gp->name, flags, fmt, td); % r = flags & FREAD ? -1 : 0; % w = flags & FWRITE ? -1 : 0; % #ifdef notyet % e = flags & O_EXCL ? -1 : 0; % #else % e = 0; % #endif Geom tries to track the open flags. The above converts them from the flags arg to r/w/e (e ifdefed off). But when this is called for revoke/vgone, the flags are unavailable, or at least not passed down. I think they are always 0. Each open file has its own open mode, so for this to work, vgone would have to find all the open files and extract their open mode, then pass this down for each, and when D_TRACKCLOSE is not used, do the call the driver close precisely when last open file is closed. But it now doesn't do much like this. I think it only calls devfs close once for all the files, and invents an open mode for that. % g_topology_lock(); % if (dev->si_devsw == NULL) % error = ENXIO; /* We were orphaned */ % else % error = g_access(cp, r, w, e); % for (i = 0; i < 10 * hz;) { % if (cp->acr != 0 || cp->acw != 0) % break; % if (cp->nstart == cp->nend) % break; % pause("gdevwclose", hz / 10); % i += hz / 10; % } % if (cp->acr == 0 && cp->acw == 0 && cp->nstart != cp->nend) { % printf("WARNING: Final close of geom_dev(%s) %s %s\n", % gp->name, % "still has outstanding I/O after 10 seconds.", % "Completing close anyway, panic may happen later."); I remember getting this message. It is right about the panic happening soon. But now I don't see how this code was reached -- null flags would have resulted in cp->acr and cp->acw remaining unchanged as nonzero. % } % g_topology_unlock(); % return (error); % } The panic prevents further damage from the access flags becoming scrambled and the driver close being called. The case of the device file being mounted on would be most interesting, but I got the panic using something like open for read followed by revoke on an unused partition. To involve the physical driver, all subdevices on the physical device would have to be revoked, and the panic normally occurs long before getting that far. The open flags in the previous scisi code may have had a similar fail- safeness. I don't see how you fixed panics by removing them. Actually trusting them could have given panics if you checked them, but they weren't used much. The new code is actually simpler. I like this, but it seems to be simpler than possible. For example: % Modified: head/sys/cam/scsi/scsi_sg.c % ============================================================================== % --- head/sys/cam/scsi/scsi_sg.c Sun May 27 05:27:47 2012 (r236137) % +++ head/sys/cam/scsi/scsi_sg.c Sun May 27 06:11:09 2012 (r236138) % [... remove open flag and add D_TRACKCLOSE] % ... % @@ -415,19 +414,12 @@ sgopen(struct cdev *dev, int flags, int % % softc = (struct sg_softc *)periph->softc; % if (softc->flags & SG_FLAG_INVALID) { % + cam_periph_release_locked(periph); % cam_periph_unlock(periph); % - cam_periph_release(periph); % return (ENXIO); % } % % - if ((softc->flags & SG_FLAG_OPEN) == 0) { % - softc->flags |= SG_FLAG_OPEN; % - cam_periph_unlock(periph); % - } else { % - /* Device closes aren't symmetrical, fix up the refcount. */ % - cam_periph_unlock(periph); % - cam_periph_release(periph); The open flag was only used to avoid increasing the refcount much above 1. cam_periph_release() keeps count, but periph refcounts never worked any better than vfs+devfs counts, so when cam_periph_release() naively trusts them and calls camperiphfree(), panics result. % - } % + cam_periph_unlock(periph); % % return (error); % } % @@ -436,18 +428,11 @@ static int % sgclose(struct cdev *dev, int flag, int fmt, struct thread *td) % { % struct cam_periph *periph; % - struct sg_softc *softc; % % periph = (struct cam_periph *)dev->si_drv1; % if (periph == NULL) % return (ENXIO); % % - cam_periph_lock(periph); % - % - softc = (struct sg_softc *)periph->softc; % - softc->flags &= ~SG_FLAG_OPEN; % - % - cam_periph_unlock(periph); % cam_periph_release(periph); % % return (0); % Now we don't maintain the open flag, but depend on vfs+devfs counts more directly (via devfs close being called enough). When these don't work, panics occur. However, most of the revoke+vgone bugs involve missing calls to devfs close. This results in driver counts of open/close via D_TRACKCLOSE rarely bcoming 0 to soon or negative. They gradually grow larger, and panics don't occur until they overflow to negative or 0. Another problem that I forgot to mention above closes don't match opens in the case of failed closes. This is as it should be. However, increments of the "open" count match opens (modulo bogus ones for stat() etc.), while decremements of the "open" count don't match closes. The difference is due to bogusly increasing the "open" count before open completes: increment "open" count call driver open if (driver open failed) decremement "open" count return failure to userland else continue with incremented count eventually call close decrement count call driver close if last-close or D_TRACKCLOSE (fragile state) tis had better not fail endif Drivers need to know that they must clean up for failing opens, since close will not be called. The above shows sgopen() doing this. It just calls cam_periph_release() for the failing case. This decremenents the periph's refcount corresponding to decrementing the "open" count in the above pseudo-code. If the open had touched more hardware, then it should do more to shut the hardware down. But only if the device is not otherwise open or being opened. A device refcount like the periph one is better than the "open" count for tracking other device activity. Bruce From owner-svn-src-head@FreeBSD.ORG Sun May 27 12:31:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5AC56106566B; Sun, 27 May 2012 12:31:58 +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 2A53E8FC14; Sun, 27 May 2012 12:31:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4RCVw1n048679; Sun, 27 May 2012 12:31:58 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4RCVvm7048676; Sun, 27 May 2012 12:31:57 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201205271231.q4RCVvm7048676@svn.freebsd.org> From: Martin Matuska Date: Sun, 27 May 2012 12:31: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: r236146 - in head: cddl/contrib/opensolaris/cmd/zpool 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: Sun, 27 May 2012 12:31:58 -0000 Author: mm Date: Sun May 27 12:31:57 2012 New Revision: 236146 URL: http://svn.freebsd.org/changeset/base/236146 Log: Import illumos changeset 13605:b5c2b5db80d6 (partial) 763 FMD msg URLs should refer to something visible Replace sun.com URL's with illumos.org References: https://www.illumos.org/issues/763 Obtained from: illumos (issue #763) MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun May 27 12:22:15 2012 (r236145) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun May 27 12:31:57 2012 (r236146) @@ -1617,7 +1617,7 @@ show_import(nvlist_t *config) } if (msgid != NULL) - (void) printf(gettext(" see: http://www.sun.com/msg/%s\n"), + (void) printf(gettext(" see: http://illumos.org/msg/%s\n"), msgid); (void) printf(gettext(" config:\n\n")); @@ -3685,7 +3685,7 @@ print_dedup_stats(nvlist_t *config) * pool: tank * status: DEGRADED * reason: One or more devices ... - * see: http://www.sun.com/msg/ZFS-xxxx-01 + * see: http://illumos.org/msg/ZFS-xxxx-01 * config: * mirror DEGRADED * c1t0d0 OK @@ -3893,7 +3893,7 @@ status_callback(zpool_handle_t *zhp, voi } if (msgid != NULL) - (void) printf(gettext(" see: http://www.sun.com/msg/%s\n"), + (void) printf(gettext(" see: http://illumos.org/msg/%s\n"), msgid); if (config != NULL) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sun May 27 12:22:15 2012 (r236145) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sun May 27 12:31:57 2012 (r236146) @@ -2050,7 +2050,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_ cmn_err(CE_WARN, "pool '%s' could not be " "loaded as it was last accessed by " "another system (host: %s hostid: 0x%lx). " - "See: http://www.sun.com/msg/ZFS-8000-EY", + "See: http://illumos.org/msg/ZFS-8000-EY", spa_name(spa), hostname, (unsigned long)hostid); return (EBADF); From owner-svn-src-head@FreeBSD.ORG Sun May 27 12:54:41 2012 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 BC6E6106564A; Sun, 27 May 2012 12:54:41 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A711A8FC16; Sun, 27 May 2012 12:54:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4RCsfL5049974; Sun, 27 May 2012 12:54:41 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4RCsfIn049972; Sun, 27 May 2012 12:54:41 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201205271254.q4RCsfIn049972@svn.freebsd.org> From: David Chisnall Date: Sun, 27 May 2012 12: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: r236148 - head/lib/msun/src 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, 27 May 2012 12:54:41 -0000 Author: theraven Date: Sun May 27 12:54:41 2012 New Revision: 236148 URL: http://svn.freebsd.org/changeset/base/236148 Log: Allow inclusion of libc++ to work after including math.h Submitted by: Yamaya Takashi Reviewed by: das MFC after: 1 week Modified: head/lib/msun/src/math.h Modified: head/lib/msun/src/math.h ============================================================================== --- head/lib/msun/src/math.h Sun May 27 12:47:35 2012 (r236147) +++ head/lib/msun/src/math.h Sun May 27 12:54:41 2012 (r236148) @@ -395,35 +395,15 @@ float significandf(float); * long double versions of ISO/POSIX math functions */ #if __ISO_C_VISIBLE >= 1999 -#if _DECLARE_C99_LDBL_MATH -long double acoshl(long double); -#endif long double acosl(long double); -#if _DECLARE_C99_LDBL_MATH -long double asinhl(long double); -#endif long double asinl(long double); long double atan2l(long double, long double); -#if _DECLARE_C99_LDBL_MATH -long double atanhl(long double); -#endif long double atanl(long double); long double cbrtl(long double); long double ceill(long double); long double copysignl(long double, long double) __pure2; -#if _DECLARE_C99_LDBL_MATH -long double coshl(long double); -#endif long double cosl(long double); -#if _DECLARE_C99_LDBL_MATH -long double erfcl(long double); -long double erfl(long double); -#endif long double exp2l(long double); -#if _DECLARE_C99_LDBL_MATH -long double expl(long double); -long double expm1l(long double); -#endif long double fabsl(long double) __pure2; long double fdiml(long double, long double); long double floorl(long double); @@ -435,20 +415,9 @@ long double frexpl(long double value, in long double hypotl(long double, long double); int ilogbl(long double) __pure2; long double ldexpl(long double, int); -#if _DECLARE_C99_LDBL_MATH -long double lgammal(long double); -#endif long long llrintl(long double); long long llroundl(long double); -#if _DECLARE_C99_LDBL_MATH -long double log10l(long double); -long double log1pl(long double); -long double log2l(long double); -#endif long double logbl(long double); -#if _DECLARE_C99_LDBL_MATH -long double logl(long double); -#endif long lrintl(long double); long lroundl(long double); long double modfl(long double, long double *); /* fundamentally !__pure2 */ @@ -458,30 +427,54 @@ long double nextafterl(long double, long double nexttoward(double, long double); float nexttowardf(float, long double); long double nexttowardl(long double, long double); -#if _DECLARE_C99_LDBL_MATH -long double powl(long double, long double); -#endif long double remainderl(long double, long double); long double remquol(long double, long double, int *); long double rintl(long double); long double roundl(long double); long double scalblnl(long double, long); long double scalbnl(long double, int); -#if _DECLARE_C99_LDBL_MATH -long double sinhl(long double); -#endif long double sinl(long double); long double sqrtl(long double); -#if _DECLARE_C99_LDBL_MATH -long double tanhl(long double); -#endif long double tanl(long double); -#if _DECLARE_C99_LDBL_MATH -long double tgammal(long double); -#endif long double truncl(long double); #endif /* __ISO_C_VISIBLE >= 1999 */ __END_DECLS #endif /* !_MATH_H_ */ + +/* separate header for cmath */ +#ifndef _MATH_EXTRA_H_ +#if __ISO_C_VISIBLE >= 1999 +#if _DECLARE_C99_LDBL_MATH + +#define _MATH_EXTRA_H_ + +/* + * extra long double versions of math functions for C99 and cmath + */ +__BEGIN_DECLS + +long double acoshl(long double); +long double asinhl(long double); +long double atanhl(long double); +long double coshl(long double); +long double erfcl(long double); +long double erfl(long double); +long double expl(long double); +long double expm1l(long double); +long double lgammal(long double); +long double log10l(long double); +long double log1pl(long double); +long double log2l(long double); +long double logl(long double); +long double powl(long double, long double); +long double sinhl(long double); +long double tanhl(long double); +long double tgammal(long double); + +__END_DECLS + +#endif /* !_DECLARE_C99_LDBL_MATH */ +#endif /* __ISO_C_VISIBLE >= 1999 */ +#endif /* !_MATH_EXTRA_H_ */ From owner-svn-src-head@FreeBSD.ORG Sun May 27 13:33:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BE4D3106564A; Sun, 27 May 2012 13:33:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FB8A8FC0C; Sun, 27 May 2012 13:33:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4RDXsCr051636; Sun, 27 May 2012 13:33:54 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4RDXs07051634; Sun, 27 May 2012 13:33:54 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201205271333.q4RDXs07051634@svn.freebsd.org> From: Dimitry Andric Date: Sun, 27 May 2012 13:33: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: r236149 - head/contrib/llvm/tools/clang/lib/CodeGen 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, 27 May 2012 13:33:54 -0000 Author: dim Date: Sun May 27 13:33:54 2012 New Revision: 236149 URL: http://svn.freebsd.org/changeset/base/236149 Log: Pull in r157212 from upstream clang trunk: Revert r115805. An array type is required to have a range type, however, the range can be unknown for the upper bound. Testcase to follow. Part of rdar://11457152 This should fix ctfconvert producing error messages during kernel builds, similar to: ERROR: scsi_all.c: die 24561: failed to retrieve array bounds These were caused by incorrect debug information for flexible array members of structs. MFC after: 3 days Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Sun May 27 12:54:41 2012 (r236148) +++ head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Sun May 27 13:33:54 2012 (r236149) @@ -1479,25 +1479,21 @@ llvm::DIType CGDebugInfo::CreateType(con // obvious/recursive way? SmallVector Subscripts; QualType EltTy(Ty, 0); - if (Ty->isIncompleteArrayType()) + while ((Ty = dyn_cast(EltTy))) { + int64_t UpperBound = 0; + int64_t LowerBound = 0; + if (const ConstantArrayType *CAT = dyn_cast(Ty)) { + if (CAT->getSize().getZExtValue()) + UpperBound = CAT->getSize().getZExtValue() - 1; + } else + // This is an unbounded array. Use Low = 1, Hi = 0 to express such + // arrays. + LowerBound = 1; + + // FIXME: Verify this is right for VLAs. + Subscripts.push_back(DBuilder.getOrCreateSubrange(LowerBound, + UpperBound)); EltTy = Ty->getElementType(); - else { - while ((Ty = dyn_cast(EltTy))) { - int64_t UpperBound = 0; - int64_t LowerBound = 0; - if (const ConstantArrayType *CAT = dyn_cast(Ty)) { - if (CAT->getSize().getZExtValue()) - UpperBound = CAT->getSize().getZExtValue() - 1; - } else - // This is an unbounded array. Use Low = 1, Hi = 0 to express such - // arrays. - LowerBound = 1; - - // FIXME: Verify this is right for VLAs. - Subscripts.push_back(DBuilder.getOrCreateSubrange(LowerBound, - UpperBound)); - EltTy = Ty->getElementType(); - } } llvm::DIArray SubscriptArray = DBuilder.getOrCreateArray(Subscripts); From owner-svn-src-head@FreeBSD.ORG Sun May 27 16:00:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D2B6A106566C; Sun, 27 May 2012 16:00:01 +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 B1CEF8FC15; Sun, 27 May 2012 16:00:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4RG01Oe058766; Sun, 27 May 2012 16:00:01 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4RG01QZ058749; Sun, 27 May 2012 16:00:01 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201205271600.q4RG01QZ058749@svn.freebsd.org> From: Martin Matuska Date: Sun, 27 May 2012 16:00: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: r236155 - in head: cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs s... 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, 27 May 2012 16:00:02 -0000 Author: mm Date: Sun May 27 16:00:00 2012 New Revision: 236155 URL: http://svn.freebsd.org/changeset/base/236155 Log: Import illumos changeset 13570:3411fd5f1589 1948 zpool list should show more detailed pool information Display per-vdev information with "zpool list -v". The added expandsize property has currently no value on FreeBSD. This changeset allows adding expansion support to individual vdevs in the future. References: https://www.illumos.org/issues/1948 Obtained from: illumos (issue #1948) MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.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_mirror.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_root.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sun May 27 15:48:25 2012 (r236154) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sun May 27 16:00:00 2012 (r236155) @@ -537,6 +537,8 @@ value of 1.76 indicates that 1.76 units for a description of the deduplication feature. .It Sy free Number of blocks within the pool that are not allocated. +.It Sy expandsize +This property has currently no value on FreeBSD. .It Sy guid A unique identifier for the pool. .It Sy health @@ -1275,7 +1277,7 @@ Treat exported or foreign devices as ina .It Xo .Nm .Cm list -.Op Fl H +.Op Fl Hv .Op Fl o Ar property Ns Op , Ns Ar ... .Op Fl T Cm d Ns | Ns Cm u .Op Ar pool Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun May 27 15:48:25 2012 (r236154) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun May 27 16:00:00 2012 (r236155) @@ -22,9 +22,9 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2012 by Frederik Wessels. All rights reserved. - * Copyright (c) 2011 Martin Matuska . All rights reserved. + * Copyright (c) 2012 Martin Matuska . All rights reserved. */ #include @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -70,6 +71,7 @@ static int zpool_do_status(int, char **) static int zpool_do_online(int, char **); static int zpool_do_offline(int, char **); static int zpool_do_clear(int, char **); +static int zpool_do_reopen(int, char **); static int zpool_do_reguid(int, char **); @@ -132,7 +134,8 @@ typedef enum { HELP_GET, HELP_SET, HELP_SPLIT, - HELP_REGUID + HELP_REGUID, + HELP_REOPEN } zpool_help_t; @@ -167,6 +170,7 @@ static zpool_command_t command_table[] = { "online", zpool_do_online, HELP_ONLINE }, { "offline", zpool_do_offline, HELP_OFFLINE }, { "clear", zpool_do_clear, HELP_CLEAR }, + { "reopen", zpool_do_reopen, HELP_REOPEN }, { NULL }, { "attach", zpool_do_attach, HELP_ATTACH }, { "detach", zpool_do_detach, HELP_DETACH }, @@ -241,6 +245,8 @@ get_usage(zpool_help_t idx) { "[new-device]\n")); case HELP_REMOVE: return (gettext("\tremove ...\n")); + case HELP_REOPEN: + return (""); /* Undocumented command */ case HELP_SCRUB: return (gettext("\tscrub [-s] ...\n")); case HELP_STATUS: @@ -2109,10 +2115,10 @@ error: } typedef struct iostat_cbdata { - zpool_list_t *cb_list; - int cb_verbose; - int cb_iteration; + boolean_t cb_verbose; int cb_namewidth; + int cb_iteration; + zpool_list_t *cb_list; } iostat_cbdata_t; static void @@ -2582,8 +2588,9 @@ zpool_do_iostat(int argc, char **argv) } typedef struct list_cbdata { + boolean_t cb_verbose; + int cb_namewidth; boolean_t cb_scripted; - boolean_t cb_first; zprop_list_t *cb_proplist; } list_cbdata_t; @@ -2591,16 +2598,27 @@ typedef struct list_cbdata { * Given a list of columns to display, output appropriate headers for each one. */ static void -print_header(zprop_list_t *pl) +print_header(list_cbdata_t *cb) { + zprop_list_t *pl = cb->cb_proplist; const char *header; boolean_t first = B_TRUE; boolean_t right_justify; + size_t width = 0; for (; pl != NULL; pl = pl->pl_next) { if (pl->pl_prop == ZPROP_INVAL) continue; + width = pl->pl_width; + if (first && cb->cb_verbose) { + /* + * Reset the width to accommodate the verbose listing + * of devices. + */ + width = cb->cb_namewidth; + } + if (!first) (void) printf(" "); else @@ -2612,9 +2630,10 @@ print_header(zprop_list_t *pl) if (pl->pl_next == NULL && !right_justify) (void) printf("%s", header); else if (right_justify) - (void) printf("%*s", pl->pl_width, header); + (void) printf("%*s", width, header); else - (void) printf("%-*s", pl->pl_width, header); + (void) printf("%-*s", width, header); + } (void) printf("\n"); @@ -2625,17 +2644,28 @@ print_header(zprop_list_t *pl) * to the described layout. */ static void -print_pool(zpool_handle_t *zhp, zprop_list_t *pl, int scripted) +print_pool(zpool_handle_t *zhp, list_cbdata_t *cb) { + zprop_list_t *pl = cb->cb_proplist; boolean_t first = B_TRUE; char property[ZPOOL_MAXPROPLEN]; char *propstr; boolean_t right_justify; - int width; + size_t width; for (; pl != NULL; pl = pl->pl_next) { + + width = pl->pl_width; + if (first && cb->cb_verbose) { + /* + * Reset the width to accommodate the verbose listing + * of devices. + */ + width = cb->cb_namewidth; + } + if (!first) { - if (scripted) + if (cb->cb_scripted) (void) printf("\t"); else (void) printf(" "); @@ -2645,7 +2675,10 @@ print_pool(zpool_handle_t *zhp, zprop_li right_justify = B_FALSE; if (pl->pl_prop != ZPROP_INVAL) { - if (zpool_get_prop(zhp, pl->pl_prop, property, + if (pl->pl_prop == ZPOOL_PROP_EXPANDSZ && + zpool_get_prop_int(zhp, pl->pl_prop, NULL) == 0) + propstr = "-"; + else if (zpool_get_prop(zhp, pl->pl_prop, property, sizeof (property), NULL) != 0) propstr = "-"; else @@ -2656,14 +2689,13 @@ print_pool(zpool_handle_t *zhp, zprop_li propstr = "-"; } - width = pl->pl_width; /* * If this is being called in scripted mode, or if this is the * last column and it is left-justified, don't include a width * format specifier. */ - if (scripted || (pl->pl_next == NULL && !right_justify)) + if (cb->cb_scripted || (pl->pl_next == NULL && !right_justify)) (void) printf("%s", propstr); else if (right_justify) (void) printf("%*s", width, propstr); @@ -2674,6 +2706,101 @@ print_pool(zpool_handle_t *zhp, zprop_li (void) printf("\n"); } +static void +print_one_column(zpool_prop_t prop, uint64_t value, boolean_t scripted) +{ + char propval[64]; + boolean_t fixed; + size_t width = zprop_width(prop, &fixed, ZFS_TYPE_POOL); + + zfs_nicenum(value, propval, sizeof (propval)); + + if (prop == ZPOOL_PROP_EXPANDSZ && value == 0) + (void) strlcpy(propval, "-", sizeof (propval)); + + if (scripted) + (void) printf("\t%s", propval); + else + (void) printf(" %*s", width, propval); +} + +void +print_list_stats(zpool_handle_t *zhp, const char *name, nvlist_t *nv, + list_cbdata_t *cb, int depth) +{ + nvlist_t **child; + vdev_stat_t *vs; + uint_t c, children; + char *vname; + boolean_t scripted = cb->cb_scripted; + + verify(nvlist_lookup_uint64_array(nv, ZPOOL_CONFIG_VDEV_STATS, + (uint64_t **)&vs, &c) == 0); + + if (name != NULL) { + if (scripted) + (void) printf("\t%s", name); + else if (strlen(name) + depth > cb->cb_namewidth) + (void) printf("%*s%s", depth, "", name); + else + (void) printf("%*s%s%*s", depth, "", name, + (int)(cb->cb_namewidth - strlen(name) - depth), ""); + + /* only toplevel vdevs have capacity stats */ + if (vs->vs_space == 0) { + if (scripted) + (void) printf("\t-\t-\t-"); + else + (void) printf(" - - -"); + } else { + print_one_column(ZPOOL_PROP_SIZE, vs->vs_space, + scripted); + print_one_column(ZPOOL_PROP_CAPACITY, vs->vs_alloc, + scripted); + print_one_column(ZPOOL_PROP_FREE, + vs->vs_space - vs->vs_alloc, scripted); + } + print_one_column(ZPOOL_PROP_EXPANDSZ, vs->vs_esize, + scripted); + (void) printf("\n"); + } + + if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN, + &child, &children) != 0) + return; + + for (c = 0; c < children; c++) { + uint64_t ishole = B_FALSE; + + if (nvlist_lookup_uint64(child[c], + ZPOOL_CONFIG_IS_HOLE, &ishole) == 0 && ishole) + continue; + + vname = zpool_vdev_name(g_zfs, zhp, child[c], B_FALSE); + print_list_stats(zhp, vname, child[c], cb, depth + 2); + free(vname); + } + + /* + * Include level 2 ARC devices in iostat output + */ + if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_L2CACHE, + &child, &children) != 0) + return; + + if (children > 0) { + (void) printf("%-*s - - - - - " + "-\n", cb->cb_namewidth, "cache"); + for (c = 0; c < children; c++) { + vname = zpool_vdev_name(g_zfs, zhp, child[c], + B_FALSE); + print_list_stats(zhp, vname, child[c], cb, depth + 2); + free(vname); + } + } +} + + /* * Generic callback function to list a pool. */ @@ -2681,14 +2808,18 @@ int list_callback(zpool_handle_t *zhp, void *data) { list_cbdata_t *cbp = data; + nvlist_t *config; + nvlist_t *nvroot; - if (cbp->cb_first) { - if (!cbp->cb_scripted) - print_header(cbp->cb_proplist); - cbp->cb_first = B_FALSE; - } + config = zpool_get_config(zhp, NULL); - print_pool(zhp, cbp->cb_proplist, cbp->cb_scripted); + print_pool(zhp, cbp); + if (!cbp->cb_verbose) + return (0); + + verify(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, + &nvroot) == 0); + print_list_stats(zhp, NULL, nvroot, cbp, 0); return (0); } @@ -2712,12 +2843,15 @@ zpool_do_list(int argc, char **argv) int ret; list_cbdata_t cb = { 0 }; static char default_props[] = - "name,size,allocated,free,capacity,dedupratio,health,altroot"; + "name,size,allocated,free,capacity,dedupratio," + "health,altroot"; char *props = default_props; unsigned long interval = 0, count = 0; + zpool_list_t *list; + boolean_t first = B_TRUE; /* check options */ - while ((c = getopt(argc, argv, ":Ho:T:")) != -1) { + while ((c = getopt(argc, argv, ":Ho:T:v")) != -1) { switch (c) { case 'H': cb.cb_scripted = B_TRUE; @@ -2728,6 +2862,9 @@ zpool_do_list(int argc, char **argv) case 'T': get_timestamp_arg(*optarg); break; + case 'v': + cb.cb_verbose = B_TRUE; + break; case ':': (void) fprintf(stderr, gettext("missing argument for " "'%c' option\n"), optopt); @@ -2748,21 +2885,32 @@ zpool_do_list(int argc, char **argv) if (zprop_get_list(g_zfs, props, &cb.cb_proplist, ZFS_TYPE_POOL) != 0) usage(B_FALSE); - cb.cb_first = B_TRUE; + if ((list = pool_list_get(argc, argv, &cb.cb_proplist, &ret)) == NULL) + return (1); + + if (argc == 0 && !cb.cb_scripted && pool_list_count(list) == 0) { + (void) printf(gettext("no pools available\n")); + zprop_free_list(cb.cb_proplist); + return (0); + } for (;;) { + pool_list_update(list); + + if (pool_list_count(list) == 0) + break; + + cb.cb_namewidth = 0; + (void) pool_list_iter(list, B_FALSE, get_namewidth, &cb); if (timestamp_fmt != NODATE) print_timestamp(timestamp_fmt); - ret = for_each_pool(argc, argv, B_TRUE, &cb.cb_proplist, - list_callback, &cb); - - if (argc == 0 && cb.cb_first && !cb.cb_scripted) { - (void) printf(gettext("no pools available\n")); - zprop_free_list(cb.cb_proplist); - return (0); + if (!cb.cb_scripted && (first || cb.cb_verbose)) { + print_header(&cb); + first = B_FALSE; } + ret = pool_list_iter(list, B_TRUE, list_callback, &cb); if (interval == 0) break; @@ -3382,6 +3530,36 @@ zpool_do_reguid(int argc, char **argv) } +/* + * zpool reopen + * + * Reopen the pool so that the kernel can update the sizes of all vdevs. + * + * NOTE: This command is currently undocumented. If the command is ever + * exposed then the appropriate usage() messages will need to be made. + */ +int +zpool_do_reopen(int argc, char **argv) +{ + int ret = 0; + zpool_handle_t *zhp; + char *pool; + + argc--; + argv++; + + if (argc != 1) + return (2); + + pool = argv[0]; + if ((zhp = zpool_open_canfail(g_zfs, pool)) == NULL) + return (1); + + ret = zpool_reopen(zhp); + zpool_close(zhp); + return (ret); +} + typedef struct scrub_cbdata { int cb_type; int cb_argc; Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Sun May 27 15:48:25 2012 (r236154) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Sun May 27 16:00:00 2012 (r236155) @@ -24,7 +24,7 @@ * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011 Pawel Jakub Dawidek . * All rights reserved. - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2012 Martin Matuska . All rights reserved. */ @@ -237,6 +237,7 @@ typedef struct splitflags { extern int zpool_scan(zpool_handle_t *, pool_scan_func_t); extern int zpool_clear(zpool_handle_t *, const char *, nvlist_t *); extern int zpool_reguid(zpool_handle_t *); +extern int zpool_reopen(zpool_handle_t *); extern int zpool_vdev_online(zpool_handle_t *, const char *, int, vdev_state_t *); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sun May 27 15:48:25 2012 (r236154) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Sun May 27 16:00:00 2012 (r236155) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #include @@ -301,6 +301,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpoo case ZPOOL_PROP_SIZE: case ZPOOL_PROP_ALLOCATED: case ZPOOL_PROP_FREE: + case ZPOOL_PROP_EXPANDSZ: (void) zfs_nicenum(intval, buf, len); break; @@ -390,8 +391,8 @@ pool_uses_efi(nvlist_t *config) return (B_FALSE); } -static boolean_t -pool_is_bootable(zpool_handle_t *zhp) +boolean_t +zpool_is_bootable(zpool_handle_t *zhp) { char bootfs[ZPOOL_MAXNAMELEN]; @@ -1126,7 +1127,7 @@ zpool_add(zpool_handle_t *zhp, nvlist_t return (zfs_error(hdl, EZFS_BADVERSION, msg)); } - if (pool_is_bootable(zhp) && nvlist_lookup_nvlist_array(nvroot, + if (zpool_is_bootable(zhp) && nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, &spares, &nspares) == 0) { uint64_t s; @@ -2412,7 +2413,7 @@ zpool_vdev_attach(zpool_handle_t *zhp, uint_t children; nvlist_t *config_root; libzfs_handle_t *hdl = zhp->zpool_hdl; - boolean_t rootpool = pool_is_bootable(zhp); + boolean_t rootpool = zpool_is_bootable(zhp); if (replacing) (void) snprintf(msg, sizeof (msg), dgettext(TEXT_DOMAIN, @@ -3054,6 +3055,26 @@ zpool_reguid(zpool_handle_t *zhp) } /* + * Reopen the pool. + */ +int +zpool_reopen(zpool_handle_t *zhp) +{ + zfs_cmd_t zc = { 0 }; + char msg[1024]; + libzfs_handle_t *hdl = zhp->zpool_hdl; + + (void) snprintf(msg, sizeof (msg), + dgettext(TEXT_DOMAIN, "cannot reopen '%s'"), + zhp->zpool_name); + + (void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name)); + if (zfs_ioctl(hdl, ZFS_IOC_POOL_REOPEN, &zc) == 0) + return (0); + return (zpool_standard_error(hdl, errno, msg)); +} + +/* * Convert from a devid string to a path. */ static char * @@ -3703,7 +3724,7 @@ zpool_label_disk(libzfs_handle_t *hdl, z if (zhp) { nvlist_t *nvroot; - if (pool_is_bootable(zhp)) { + if (zpool_is_bootable(zhp)) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "EFI labeled devices are not supported on root " "pools.")); Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c Sun May 27 15:48:25 2012 (r236154) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c Sun May 27 16:00:00 2012 (r236155) @@ -21,7 +21,7 @@ /* * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #include @@ -81,6 +81,8 @@ zpool_prop_init(void) ZFS_TYPE_POOL, "", "FREE"); zprop_register_number(ZPOOL_PROP_ALLOCATED, "allocated", 0, PROP_READONLY, ZFS_TYPE_POOL, "", "ALLOC"); + zprop_register_number(ZPOOL_PROP_EXPANDSZ, "expandsize", 0, + PROP_READONLY, ZFS_TYPE_POOL, "", "EXPANDSZ"); zprop_register_number(ZPOOL_PROP_CAPACITY, "capacity", 0, PROP_READONLY, ZFS_TYPE_POOL, "", "CAP"); zprop_register_number(ZPOOL_PROP_GUID, "guid", 0, PROP_READONLY, Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sun May 27 15:48:25 2012 (r236154) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sun May 27 16:00:00 2012 (r236155) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ /* @@ -175,15 +175,17 @@ spa_prop_add_list(nvlist_t *nvl, zpool_p static void spa_prop_get_config(spa_t *spa, nvlist_t **nvp) { + vdev_t *rvd = spa->spa_root_vdev; uint64_t size; uint64_t alloc; + uint64_t space; uint64_t cap, version; zprop_source_t src = ZPROP_SRC_NONE; spa_config_dirent_t *dp; ASSERT(MUTEX_HELD(&spa->spa_props_lock)); - if (spa->spa_root_vdev != NULL) { + if (rvd != NULL) { alloc = metaslab_class_get_alloc(spa_normal_class(spa)); size = metaslab_class_get_space(spa_normal_class(spa)); spa_prop_add_list(*nvp, ZPOOL_PROP_NAME, spa_name(spa), 0, src); @@ -191,6 +193,15 @@ spa_prop_get_config(spa_t *spa, nvlist_t spa_prop_add_list(*nvp, ZPOOL_PROP_ALLOCATED, NULL, alloc, src); spa_prop_add_list(*nvp, ZPOOL_PROP_FREE, NULL, size - alloc, src); + + space = 0; + for (int c = 0; c < rvd->vdev_children; c++) { + vdev_t *tvd = rvd->vdev_child[c]; + space += tvd->vdev_max_asize - tvd->vdev_asize; + } + spa_prop_add_list(*nvp, ZPOOL_PROP_EXPANDSZ, NULL, space, + src); + spa_prop_add_list(*nvp, ZPOOL_PROP_READONLY, NULL, (spa_mode(spa) == FREAD), src); @@ -201,7 +212,7 @@ spa_prop_get_config(spa_t *spa, nvlist_t ddt_get_pool_dedup_ratio(spa), src); spa_prop_add_list(*nvp, ZPOOL_PROP_HEALTH, NULL, - spa->spa_root_vdev->vdev_state, src); + rvd->vdev_state, src); version = spa_version(spa); if (version == zpool_prop_default_numeric(ZPOOL_PROP_VERSION)) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Sun May 27 15:48:25 2012 (r236154) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Sun May 27 16:00:00 2012 (r236155) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #ifndef _SYS_VDEV_IMPL_H @@ -55,7 +56,8 @@ typedef struct vdev_cache_entry vdev_cac /* * Virtual device operations */ -typedef int vdev_open_func_t(vdev_t *vd, uint64_t *size, uint64_t *ashift); +typedef int vdev_open_func_t(vdev_t *vd, uint64_t *size, uint64_t *max_size, + uint64_t *ashift); typedef void vdev_close_func_t(vdev_t *vd); typedef uint64_t vdev_asize_func_t(vdev_t *vd, uint64_t psize); typedef int vdev_io_start_func_t(zio_t *zio); @@ -118,6 +120,7 @@ struct vdev { uint64_t vdev_orig_guid; /* orig. guid prior to remove */ uint64_t vdev_asize; /* allocatable device capacity */ uint64_t vdev_min_asize; /* min acceptable asize */ + uint64_t vdev_max_asize; /* max acceptable asize */ uint64_t vdev_ashift; /* block alignment shift */ uint64_t vdev_state; /* see VDEV_STATE_* #defines */ uint64_t vdev_prevstate; /* used when reopening a vdev */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sun May 27 15:48:25 2012 (r236154) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sun May 27 16:00:00 2012 (r236155) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #include @@ -119,7 +119,7 @@ vdev_get_min_asize(vdev_t *vd) vdev_t *pvd = vd->vdev_parent; /* - * The our parent is NULL (inactive spare or cache) or is the root, + * If our parent is NULL (inactive spare or cache) or is the root, * just return our own asize. */ if (pvd == NULL) @@ -748,6 +748,7 @@ vdev_add_parent(vdev_t *cvd, vdev_ops_t mvd->vdev_asize = cvd->vdev_asize; mvd->vdev_min_asize = cvd->vdev_min_asize; + mvd->vdev_max_asize = cvd->vdev_max_asize; mvd->vdev_ashift = cvd->vdev_ashift; mvd->vdev_state = cvd->vdev_state; mvd->vdev_crtxg = cvd->vdev_crtxg; @@ -1119,7 +1120,8 @@ vdev_open(vdev_t *vd) spa_t *spa = vd->vdev_spa; int error; uint64_t osize = 0; - uint64_t asize, psize; + uint64_t max_osize = 0; + uint64_t asize, max_asize, psize; uint64_t ashift = 0; ASSERT(vd->vdev_open_thread == curthread || @@ -1150,7 +1152,7 @@ vdev_open(vdev_t *vd) return (ENXIO); } - error = vd->vdev_ops->vdev_op_open(vd, &osize, &ashift); + error = vd->vdev_ops->vdev_op_open(vd, &osize, &max_osize, &ashift); /* * Reset the vdev_reopening flag so that we actually close @@ -1208,6 +1210,7 @@ vdev_open(vdev_t *vd) } osize = P2ALIGN(osize, (uint64_t)sizeof (vdev_label_t)); + max_osize = P2ALIGN(max_osize, (uint64_t)sizeof (vdev_label_t)); if (vd->vdev_children == 0) { if (osize < SPA_MINDEVSIZE) { @@ -1217,6 +1220,8 @@ vdev_open(vdev_t *vd) } psize = osize; asize = osize - (VDEV_LABEL_START_SIZE + VDEV_LABEL_END_SIZE); + max_asize = max_osize - (VDEV_LABEL_START_SIZE + + VDEV_LABEL_END_SIZE); } else { if (vd->vdev_parent != NULL && osize < SPA_MINDEVSIZE - (VDEV_LABEL_START_SIZE + VDEV_LABEL_END_SIZE)) { @@ -1226,6 +1231,7 @@ vdev_open(vdev_t *vd) } psize = 0; asize = osize; + max_asize = max_osize; } vd->vdev_psize = psize; @@ -1245,6 +1251,7 @@ vdev_open(vdev_t *vd) * For testing purposes, a higher ashift can be requested. */ vd->vdev_asize = asize; + vd->vdev_max_asize = max_asize; vd->vdev_ashift = MAX(ashift, vd->vdev_ashift); } else { /* @@ -1255,6 +1262,7 @@ vdev_open(vdev_t *vd) VDEV_AUX_BAD_LABEL); return (EINVAL); } + vd->vdev_max_asize = max_asize; } /* @@ -2478,6 +2486,7 @@ vdev_get_stats(vdev_t *vd, vdev_stat_t * vs->vs_rsize = vdev_get_min_asize(vd); if (vd->vdev_ops->vdev_op_leaf) vs->vs_rsize += VDEV_LABEL_START_SIZE + VDEV_LABEL_END_SIZE; + vs->vs_esize = vd->vdev_max_asize - vd->vdev_asize; mutex_exit(&vd->vdev_stat_lock); /* Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Sun May 27 15:48:25 2012 (r236154) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Sun May 27 16:00:00 2012 (r236155) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #include @@ -30,6 +31,7 @@ #include #include #include +#include #include /* @@ -102,8 +104,39 @@ vdev_disk_rele(vdev_t *vd) } } +static uint64_t +vdev_disk_get_space(vdev_t *vd, uint64_t capacity, uint_t blksz) +{ + ASSERT(vd->vdev_wholedisk); + + vdev_disk_t *dvd = vd->vdev_tsd; + dk_efi_t dk_ioc; + efi_gpt_t *efi; + uint64_t avail_space = 0; + int efisize = EFI_LABEL_SIZE * 2; + + dk_ioc.dki_data = kmem_alloc(efisize, KM_SLEEP); + dk_ioc.dki_lba = 1; + dk_ioc.dki_length = efisize; + dk_ioc.dki_data_64 = (uint64_t)(uintptr_t)dk_ioc.dki_data; + efi = dk_ioc.dki_data; + + if (ldi_ioctl(dvd->vd_lh, DKIOCGETEFI, (intptr_t)&dk_ioc, + FKIOCTL, kcred, NULL) == 0) { + uint64_t efi_altern_lba = LE_64(efi->efi_gpt_AlternateLBA); + + zfs_dbgmsg("vdev %s, capacity %llu, altern lba %llu", + vd->vdev_path, capacity, efi_altern_lba); + if (capacity > efi_altern_lba) + avail_space = (capacity - efi_altern_lba) * blksz; + } + kmem_free(dk_ioc.dki_data, efisize); + return (avail_space); +} + static int -vdev_disk_open(vdev_t *vd, uint64_t *psize, uint64_t *ashift) +vdev_disk_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize, + uint64_t *ashift) { spa_t *spa = vd->vdev_spa; vdev_disk_t *dvd; @@ -274,16 +307,6 @@ skip_open: } /* - * If we own the whole disk, try to enable disk write caching. - * We ignore errors because it's OK if we can't do it. - */ - if (vd->vdev_wholedisk == 1) { - int wce = 1; - (void) ldi_ioctl(dvd->vd_lh, DKIOCSETWCE, (intptr_t)&wce, - FKIOCTL, kcred, NULL); - } - - /* * Determine the device's minimum transfer size. * If the ioctl isn't supported, assume DEV_BSIZE. */ @@ -293,6 +316,25 @@ skip_open: *ashift = highbit(MAX(dkmext.dki_pbsize, SPA_MINBLOCKSIZE)) - 1; + if (vd->vdev_wholedisk == 1) { + uint64_t capacity = dkmext.dki_capacity - 1; + uint64_t blksz = dkmext.dki_lbsize; + int wce = 1; + + /* + * If we own the whole disk, try to enable disk write caching. + * We ignore errors because it's OK if we can't do it. + */ + (void) ldi_ioctl(dvd->vd_lh, DKIOCSETWCE, (intptr_t)&wce, + FKIOCTL, kcred, NULL); + + *max_psize = *psize + vdev_disk_get_space(vd, capacity, blksz); + zfs_dbgmsg("capacity change: vdev %s, psize %llu, " + "max_psize %llu", vd->vdev_path, *psize, *max_psize); + } else { + *max_psize = *psize; + } + /* * Clear the nowritecache bit, so that on a vdev_reopen() we will * try again. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Sun May 27 15:48:25 2012 (r236154) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Sun May 27 16:00:00 2012 (r236155) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #include @@ -47,7 +48,8 @@ vdev_file_rele(vdev_t *vd) } static int -vdev_file_open(vdev_t *vd, uint64_t *psize, uint64_t *ashift) +vdev_file_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize, + uint64_t *ashift) { vdev_file_t *vf; vnode_t *vp; @@ -125,7 +127,7 @@ skip_open: return (error); } - *psize = vattr.va_size; + *max_psize = *psize = vattr.va_size; *ashift = SPA_MINBLOCKSHIFT; return (0); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun May 27 15:48:25 2012 (r236154) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun May 27 16:00:00 2012 (r236155) @@ -21,6 +21,8 @@ /* * Copyright (c) 2006 Pawel Jakub Dawidek * All rights reserved. + * + * Portions Copyright (c) 2012 Martin Matuska */ #include @@ -405,7 +407,8 @@ vdev_geom_open_by_path(vdev_t *vd, int c } static int -vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *ashift) +vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize, + uint64_t *ashift) { struct g_provider *pp; struct g_consumer *cp; @@ -488,7 +491,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi /* * Determine the actual size of the device. */ - *psize = pp->mediasize; + *max_psize = *psize = pp->mediasize; /* * Determine the device's minimum transfer size. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Sun May 27 15:48:25 2012 (r236154) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Sun May 27 16:00:00 2012 (r236155) @@ -23,6 +23,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + #include #include #include @@ -127,7 +131,8 @@ vdev_mirror_map_alloc(zio_t *zio) } static int -vdev_mirror_open(vdev_t *vd, uint64_t *asize, uint64_t *ashift) +vdev_mirror_open(vdev_t *vd, uint64_t *asize, uint64_t *max_asize, + uint64_t *ashift) { int numerrors = 0; int lasterror = 0; @@ -149,6 +154,7 @@ vdev_mirror_open(vdev_t *vd, uint64_t *a } *asize = MIN(*asize - 1, cvd->vdev_asize - 1) + 1; + *max_asize = MIN(*max_asize - 1, cvd->vdev_max_asize - 1) + 1; *ashift = MAX(*ashift, cvd->vdev_ashift); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c Sun May 27 15:48:25 2012 (r236154) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c Sun May 27 16:00:00 2012 (r236155) @@ -24,6 +24,10 @@ */ /* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +/* * The 'missing' vdev is a special vdev type used only during import. It * signifies a placeholder in the root vdev for some vdev that we know is * missing. We pass it down to the kernel to allow the rest of the @@ -40,7 +44,8 @@ /* ARGSUSED */ static int -vdev_missing_open(vdev_t *vd, uint64_t *psize, uint64_t *ashift) +vdev_missing_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize, + uint64_t *ashift) { /* * Really this should just fail. But then the root vdev will be in the @@ -49,6 +54,7 @@ vdev_missing_open(vdev_t *vd, uint64_t * * will fail the GUID sum check before ever trying to open the pool. */ *psize = 0; + *max_psize = 0; *ashift = 0; return (0); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Sun May 27 15:48:25 2012 (r236154) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Sun May 27 16:00:00 2012 (r236155) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #include @@ -1441,7 +1442,8 @@ vdev_raidz_reconstruct(raidz_map_t *rm, } static int -vdev_raidz_open(vdev_t *vd, uint64_t *asize, uint64_t *ashift) +vdev_raidz_open(vdev_t *vd, uint64_t *asize, uint64_t *max_asize, + uint64_t *ashift) { vdev_t *cvd; uint64_t nparity = vd->vdev_nparity; @@ -1469,10 +1471,12 @@ vdev_raidz_open(vdev_t *vd, uint64_t *as } *asize = MIN(*asize - 1, cvd->vdev_asize - 1) + 1; + *max_asize = MIN(*max_asize - 1, cvd->vdev_max_asize - 1) + 1; *ashift = MAX(*ashift, cvd->vdev_ashift); } *asize *= vd->vdev_children; + *max_asize *= vd->vdev_children; if (numerrors > nparity) { vd->vdev_stat.vs_aux = VDEV_AUX_NO_REPLICAS; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_root.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_root.c Sun May 27 15:48:25 2012 (r236154) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_root.c Sun May 27 16:00:00 2012 (r236155) @@ -23,6 +23,10 @@ * Use is subject to license terms. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun May 27 16:08:59 2012 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 08C131065670; Sun, 27 May 2012 16:08:59 +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 E72F18FC19; Sun, 27 May 2012 16:08:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4RG8wLv059143; Sun, 27 May 2012 16:08:58 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4RG8w95059141; Sun, 27 May 2012 16:08:58 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201205271608.q4RG8w95059141@svn.freebsd.org> From: Marius Strobl Date: Sun, 27 May 2012 16:08: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: r236156 - head/sys/dev/mmc 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, 27 May 2012 16:08:59 -0000 Author: marius Date: Sun May 27 16:08:58 2012 New Revision: 236156 URL: http://svn.freebsd.org/changeset/base/236156 Log: - Fix some typos in mmc_acquire_bus() and mmc_send_csd(). - Fix some math errors in mmc_decode_csd_sd(). - Fix incorrect arguments to mmc_send_app_op_cond() in mmc_go_discovery(). - Add reporting of CSD for debug purposes. - Add detection (and skipping) of password-locked cards. - Add setting of block length on card if necessary. Submitted by: Patrick Kelsey MFC after: 3 days Modified: head/sys/dev/mmc/mmc.c Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Sun May 27 16:00:00 2012 (r236155) +++ head/sys/dev/mmc/mmc.c Sun May 27 16:08:58 2012 (r236156) @@ -224,7 +224,7 @@ mmc_acquire_bus(device_t busdev, device_ sc = device_get_softc(busdev); MMC_LOCK(sc); if (sc->owner) - panic("mmc: host bridge didn't seralize us."); + panic("mmc: host bridge didn't serialize us."); sc->owner = dev; MMC_UNLOCK(sc); @@ -859,7 +859,7 @@ mmc_decode_csd_sd(uint32_t *raw_csd, str if (v == 0) { m = mmc_get_bits(raw_csd, 128, 115, 4); e = mmc_get_bits(raw_csd, 128, 112, 3); - csd->tacc = exp[e] * mant[m] + 9 / 10; + csd->tacc = (exp[e] * mant[m] + 9) / 10; csd->nsac = mmc_get_bits(raw_csd, 128, 104, 8) * 100; m = mmc_get_bits(raw_csd, 128, 99, 4); e = mmc_get_bits(raw_csd, 128, 96, 3); @@ -887,7 +887,7 @@ mmc_decode_csd_sd(uint32_t *raw_csd, str } else if (v == 1) { m = mmc_get_bits(raw_csd, 128, 115, 4); e = mmc_get_bits(raw_csd, 128, 112, 3); - csd->tacc = exp[e] * mant[m] + 9 / 10; + csd->tacc = (exp[e] * mant[m] + 9) / 10; csd->nsac = mmc_get_bits(raw_csd, 128, 104, 8) * 100; m = mmc_get_bits(raw_csd, 128, 99, 4); e = mmc_get_bits(raw_csd, 128, 96, 3); @@ -1002,7 +1002,7 @@ mmc_all_send_cid(struct mmc_softc *sc, u } static int -mmc_send_csd(struct mmc_softc *sc, uint16_t rca, uint32_t *rawcid) +mmc_send_csd(struct mmc_softc *sc, uint16_t rca, uint32_t *rawcsd) { struct mmc_command cmd; int err; @@ -1012,7 +1012,7 @@ mmc_send_csd(struct mmc_softc *sc, uint1 cmd.flags = MMC_RSP_R2 | MMC_CMD_BCR; cmd.data = NULL; err = mmc_wait_for_cmd(sc, &cmd, 0); - memcpy(rawcid, cmd.resp, 4 * sizeof(uint32_t)); + memcpy(rawcsd, cmd.resp, 4 * sizeof(uint32_t)); return (err); } @@ -1121,6 +1121,35 @@ mmc_send_relative_addr(struct mmc_softc return (err); } +static int +mmc_send_status(struct mmc_softc *sc, uint16_t rca, uint32_t *status) +{ + struct mmc_command cmd; + int err; + + cmd.opcode = MMC_SEND_STATUS; + cmd.arg = rca << 16; + cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; + cmd.data = NULL; + err = mmc_wait_for_cmd(sc, &cmd, 0); + *status = cmd.resp[0]; + return (err); +} + +static int +mmc_set_blocklen(struct mmc_softc *sc, uint32_t len) +{ + struct mmc_command cmd; + int err; + + cmd.opcode = MMC_SET_BLOCKLEN; + cmd.arg = len; + cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; + cmd.data = NULL; + err = mmc_wait_for_cmd(sc, &cmd, 0); + return (err); +} + static void mmc_log_card(device_t dev, struct mmc_ivars *ivar, int newcard) { @@ -1144,8 +1173,7 @@ mmc_discover_cards(struct mmc_softc *sc) struct mmc_ivars *ivar = NULL; device_t *devlist; int err, i, devcount, newcard; - uint32_t raw_cid[4]; - uint32_t resp, sec_count; + uint32_t raw_cid[4], resp, sec_count, status; device_t child; uint16_t rca = 2; u_char switch_res[64]; @@ -1194,6 +1222,12 @@ mmc_discover_cards(struct mmc_softc *sc) ivar->rca = resp >> 16; /* Get card CSD. */ mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + if (bootverbose || mmc_debug) + device_printf(sc->dev, + "%sard detected (CSD %08x%08x%08x%08x)\n", + newcard ? "New c" : "C", ivar->raw_csd[0], + ivar->raw_csd[1], ivar->raw_csd[2], + ivar->raw_csd[3]); mmc_decode_csd_sd(ivar->raw_csd, &ivar->csd); ivar->sec_count = ivar->csd.capacity / MMC_SECTOR_SIZE; if (ivar->csd.csd_structure > 0) @@ -1201,6 +1235,19 @@ mmc_discover_cards(struct mmc_softc *sc) ivar->tran_speed = ivar->csd.tran_speed; ivar->erase_sector = ivar->csd.erase_sector * ivar->csd.write_bl_len / MMC_SECTOR_SIZE; + + err = mmc_send_status(sc, ivar->rca, &status); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error reading card status %d\n", err); + break; + } + if ((status & R1_CARD_IS_LOCKED) != 0) { + device_printf(sc->dev, + "Card is password protected, skipping.\n"); + break; + } + /* Get card SCR. Card must be selected to fetch it. */ mmc_select_card(sc, ivar->rca); mmc_app_send_scr(sc, ivar->rca, ivar->raw_scr); @@ -1228,7 +1275,22 @@ mmc_discover_cards(struct mmc_softc *sc) if ((mmcbr_get_caps(sc->dev) & MMC_CAP_4_BIT_DATA) && (ivar->scr.bus_widths & SD_SCR_BUS_WIDTH_4)) ivar->bus_width = bus_width_4; + + /* + * Some cards that report maximum I/O block sizes + * greater than 512 require the block length to be + * set to 512, even though that is supposed to be + * the default. Example: + * + * Transcend 2GB SDSC card, CID: + * mid=0x1b oid=0x534d pnm="00000" prv=1.0 mdt=00.2000 + */ + if (ivar->csd.read_bl_len != MMC_SECTOR_SIZE || + ivar->csd.write_bl_len != MMC_SECTOR_SIZE) + mmc_set_blocklen(sc, MMC_SECTOR_SIZE); + mmc_format_card_id_string(ivar); + if (bootverbose || mmc_debug) mmc_log_card(sc->dev, ivar, newcard); if (newcard) { @@ -1243,11 +1305,31 @@ mmc_discover_cards(struct mmc_softc *sc) mmc_set_relative_addr(sc, ivar->rca); /* Get card CSD. */ mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + if (bootverbose || mmc_debug) + device_printf(sc->dev, + "%sard detected (CSD %08x%08x%08x%08x)\n", + newcard ? "New c" : "C", ivar->raw_csd[0], + ivar->raw_csd[1], ivar->raw_csd[2], + ivar->raw_csd[3]); + mmc_decode_csd_mmc(ivar->raw_csd, &ivar->csd); ivar->sec_count = ivar->csd.capacity / MMC_SECTOR_SIZE; ivar->tran_speed = ivar->csd.tran_speed; ivar->erase_sector = ivar->csd.erase_sector * ivar->csd.write_bl_len / MMC_SECTOR_SIZE; + + err = mmc_send_status(sc, ivar->rca, &status); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error reading card status %d\n", err); + break; + } + if ((status & R1_CARD_IS_LOCKED) != 0) { + device_printf(sc->dev, + "Card is password protected, skipping.\n"); + break; + } + /* Only MMC >= 4.x cards support EXT_CSD. */ if (ivar->csd.spec_vers >= 4) { /* Card must be selected to fetch EXT_CSD. */ @@ -1286,7 +1368,21 @@ mmc_discover_cards(struct mmc_softc *sc) ivar->bus_width = bus_width_1; ivar->timing = bus_timing_normal; } + + /* + * Some cards that report maximum I/O block sizes greater + * than 512 require the block length to be set to 512, even + * though that is supposed to be the default. Example: + * + * Transcend 2GB SDSC card, CID: + * mid=0x1b oid=0x534d pnm="00000" prv=1.0 mdt=00.2000 + */ + if (ivar->csd.read_bl_len != MMC_SECTOR_SIZE || + ivar->csd.write_bl_len != MMC_SECTOR_SIZE) + mmc_set_blocklen(sc, MMC_SECTOR_SIZE); + mmc_format_card_id_string(ivar); + if (bootverbose || mmc_debug) mmc_log_card(sc->dev, ivar, newcard); if (newcard) { @@ -1362,8 +1458,7 @@ mmc_go_discovery(struct mmc_softc *sc) err = mmc_send_if_cond(sc, 1); if ((bootverbose || mmc_debug) && err == 0) device_printf(sc->dev, "SD 2.0 interface conditions: OK\n"); - if (mmc_send_app_op_cond(sc, err ? 0 : MMC_OCR_CCS, &ocr) != - MMC_ERR_NONE) { + if (mmc_send_app_op_cond(sc, 0, &ocr) != MMC_ERR_NONE) { if (bootverbose || mmc_debug) device_printf(sc->dev, "SD probe: failed\n"); /* @@ -1535,7 +1630,6 @@ mmc_write_ivar(device_t bus, device_t ch return (EINVAL); } - static void mmc_delayed_attach(void *xsc) { From owner-svn-src-head@FreeBSD.ORG Sun May 27 16:16:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 17145106566B; Sun, 27 May 2012 16:16:29 +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 035658FC12; Sun, 27 May 2012 16:16:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4RGGS8q059476; Sun, 27 May 2012 16:16:28 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4RGGSiK059474; Sun, 27 May 2012 16:16:28 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201205271616.q4RGGSiK059474@svn.freebsd.org> From: Ed Maste Date: Sun, 27 May 2012 16:16: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: r236157 - 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: Sun, 27 May 2012 16:16:29 -0000 Author: emaste Date: Sun May 27 16:16:28 2012 New Revision: 236157 URL: http://svn.freebsd.org/changeset/base/236157 Log: Add IPPROTO_MPLS (rfc4023) IP protocol definition There are currently no in-tree consumers; I'm adding it now for use by vendor code. This matches the change OpenBSD made while implementing MPLS in gif(4). Modified: head/sys/netinet/in.h Modified: head/sys/netinet/in.h ============================================================================== --- head/sys/netinet/in.h Sun May 27 16:08:58 2012 (r236156) +++ head/sys/netinet/in.h Sun May 27 16:16:28 2012 (r236157) @@ -241,6 +241,7 @@ __END_DECLS #define IPPROTO_PIM 103 /* Protocol Independent Mcast */ #define IPPROTO_CARP 112 /* CARP */ #define IPPROTO_PGM 113 /* PGM */ +#define IPPROTO_MPLS 137 /* MPLS-in-IP */ #define IPPROTO_PFSYNC 240 /* PFSYNC */ /* 255: Reserved */ /* BSD Private, local use, namespace incursion, no longer used */ From owner-svn-src-head@FreeBSD.ORG Sun May 27 16:24:00 2012 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 DF252106564A; Sun, 27 May 2012 16:24:00 +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 C89C68FC08; Sun, 27 May 2012 16:24:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4RGO0HC059811; Sun, 27 May 2012 16:24:00 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4RGO0Ni059809; Sun, 27 May 2012 16:24:00 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201205271624.q4RGO0Ni059809@svn.freebsd.org> From: Alan Cox Date: Sun, 27 May 2012 16:24: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: r236158 - head/sys/i386/i386 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, 27 May 2012 16:24:01 -0000 Author: alc Date: Sun May 27 16:24:00 2012 New Revision: 236158 URL: http://svn.freebsd.org/changeset/base/236158 Log: Replace all uses of the vm page queues lock by a r/w lock that is private to this pmap.c. This new r/w lock is used primarily to synchronize access to the PV lists. However, it will be used in a somewhat unconventional way. As finer-grained PV list locking is added to each of the pmap functions that acquire this r/w lock, its acquisition will be changed from write to read, enabling concurrent execution of the pmap functions with finer-grained locking. X-MFC after: r236045 Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sun May 27 16:16:28 2012 (r236157) +++ head/sys/i386/i386/pmap.c Sun May 27 16:24:00 2012 (r236158) @@ -118,6 +118,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -236,6 +237,7 @@ static int pat_index[PAT_INDEX_SIZE]; /* static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; static struct md_page *pv_table; +static struct rwlock pvh_global_lock; static int shpgperproc = PMAP_SHPGPERPROC; struct pv_chunk *pv_chunkbase; /* KVA block for pv_chunks */ @@ -392,6 +394,12 @@ pmap_bootstrap(vm_paddr_t firstaddr) kernel_pmap->pm_root = NULL; CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ TAILQ_INIT(&kernel_pmap->pm_pvchunk); + + /* + * Initialize the global pv list lock. + */ + rw_init(&pvh_global_lock, "pvh global"); + LIST_INIT(&allpmaps); /* @@ -1276,7 +1284,7 @@ invlcaddr(void *caddr) * scans are across different pmaps. It is very wasteful * to do an entire invltlb for checking a single mapping. * - * If the given pmap is not the current pmap, vm_page_queue_mtx + * If the given pmap is not the current pmap, pvh_global_lock * must be held and curthread pinned to a CPU. */ static pt_entry_t * @@ -1292,7 +1300,7 @@ pmap_pte_quick(pmap_t pmap, vm_offset_t /* are we current address space or kernel? */ if (pmap_is_current(pmap)) return (vtopte(va)); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); newpf = *pde & PG_FRAME; if ((*PMAP1 & PG_FRAME) != newpf) { @@ -1841,9 +1849,9 @@ _pmap_allocpte(pmap_t pmap, u_int ptepin VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) { if (flags & M_WAITOK) { PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); VM_WAIT; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); } @@ -2339,7 +2347,7 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv struct pv_chunk *pc; int idx, field, bit; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); PV_STAT(pv_entry_frees++); PV_STAT(pv_entry_spare++); @@ -2382,8 +2390,8 @@ get_pv_entry(pmap_t pmap, int try) struct pv_chunk *pc; vm_page_t m; + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); PV_STAT(pv_entry_allocs++); pv_entry_count++; if (pv_entry_count > pv_entry_high_water) @@ -2455,7 +2463,7 @@ pmap_pvh_remove(struct md_page *pvh, pma { pv_entry_t pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { if (pmap == PV_PMAP(pv) && va == pv->pv_va) { TAILQ_REMOVE(&pvh->pv_list, pv, pv_list); @@ -2473,7 +2481,7 @@ pmap_pv_demote_pde(pmap_t pmap, vm_offse vm_offset_t va_last; vm_page_t m; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT((pa & PDRMASK) == 0, ("pmap_pv_demote_pde: pa is not 4mpage aligned")); @@ -2506,7 +2514,7 @@ pmap_pv_promote_pde(pmap_t pmap, vm_offs vm_offset_t va_last; vm_page_t m; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT((pa & PDRMASK) == 0, ("pmap_pv_promote_pde: pa is not 4mpage aligned")); @@ -2547,7 +2555,7 @@ pmap_remove_entry(pmap_t pmap, vm_page_t { struct md_page *pvh; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); pmap_pvh_free(&m->md, pmap, va); if (TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); @@ -2565,8 +2573,8 @@ pmap_insert_entry(pmap_t pmap, vm_offset { pv_entry_t pv; + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); pv = get_pv_entry(pmap, FALSE); pv->pv_va = va; TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); @@ -2580,8 +2588,8 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm { pv_entry_t pv; + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); if (pv_entry_count < pv_entry_high_water && (pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; @@ -2600,7 +2608,7 @@ pmap_pv_insert_pde(pmap_t pmap, vm_offse struct md_page *pvh; pv_entry_t pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); if (pv_entry_count < pv_entry_high_water && (pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; @@ -2678,7 +2686,7 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t */ if (va >= KERNBASE) firstpte = &KPTmap[i386_btop(trunc_4mpage(va))]; - else if (curthread->td_pinned > 0 && mtx_owned(&vm_page_queue_mtx)) { + else if (curthread->td_pinned > 0 && rw_wowned(&pvh_global_lock)) { if ((*PMAP1 & PG_FRAME) != mptepa) { *PMAP1 = mptepa | PG_RW | PG_V | PG_A | PG_M; #ifdef SMP @@ -2837,7 +2845,7 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t pt_entry_t oldpte; vm_page_t m; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); oldpte = pte_load_clear(ptq); if (oldpte & PG_W) @@ -2868,7 +2876,7 @@ pmap_remove_page(pmap_t pmap, vm_offset_ { pt_entry_t *pte; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); PMAP_LOCK_ASSERT(pmap, MA_OWNED); if ((pte = pmap_pte_quick(pmap, va)) == NULL || *pte == 0) @@ -2900,7 +2908,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva anyvalid = 0; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); PMAP_LOCK(pmap); @@ -2989,7 +2997,7 @@ out: sched_unpin(); if (anyvalid) pmap_invalidate_all(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); pmap_free_zero_pages(free); } @@ -3021,7 +3029,7 @@ pmap_remove_all(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_remove_all: page %p is not managed", m)); free = NULL; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; @@ -3062,7 +3070,7 @@ small_mappings: } vm_page_aflag_clear(m, PGA_WRITEABLE); sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); pmap_free_zero_pages(free); } @@ -3138,7 +3146,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv else { pv_lists_locked = TRUE; resume: - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); } anychanged = FALSE; @@ -3182,7 +3190,7 @@ resume: } else { if (!pv_lists_locked) { pv_lists_locked = TRUE; - if (!mtx_trylock(&vm_page_queue_mtx)) { + if (!rw_try_wlock(&pvh_global_lock)) { if (anychanged) pmap_invalidate_all( pmap); @@ -3251,7 +3259,7 @@ retry: pmap_invalidate_all(pmap); if (pv_lists_locked) { sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } PMAP_UNLOCK(pmap); } @@ -3422,7 +3430,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, mpte = NULL; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); sched_pin(); @@ -3592,7 +3600,7 @@ validate: pmap_promote_pde(pmap, pde, va); sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3607,7 +3615,7 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t { pd_entry_t *pde, newpde; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); pde = pmap_pde(pmap, va); if (*pde != 0) { @@ -3676,7 +3684,7 @@ pmap_enter_object(pmap_t pmap, vm_offset psize = atop(end - start); mpte = NULL; m = m_start; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { va = start + ptoa(diff); @@ -3690,7 +3698,7 @@ pmap_enter_object(pmap_t pmap, vm_offset mpte); m = TAILQ_NEXT(m, listq); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3707,10 +3715,10 @@ void pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); (void)pmap_enter_quick_locked(pmap, va, m, prot, NULL); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3725,7 +3733,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); /* @@ -3931,9 +3939,9 @@ retry: if (!wired != ((*pde & PG_W) == 0)) { if (!are_queues_locked) { are_queues_locked = TRUE; - if (!mtx_trylock(&vm_page_queue_mtx)) { + if (!rw_try_wlock(&pvh_global_lock)) { PMAP_UNLOCK(pmap); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); goto retry; } } @@ -3957,7 +3965,7 @@ retry: pmap_pte_release(pte); out: if (are_queues_locked) - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3986,7 +3994,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm if (!pmap_is_current(src_pmap)) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); if (dst_pmap < src_pmap) { PMAP_LOCK(dst_pmap); PMAP_LOCK(src_pmap); @@ -4076,7 +4084,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm } out: sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(src_pmap); PMAP_UNLOCK(dst_pmap); } @@ -4218,7 +4226,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_page_exists_quick: page %p is not managed", m)); rv = FALSE; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { if (PV_PMAP(pv) == pmap) { rv = TRUE; @@ -4240,7 +4248,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p break; } } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4258,13 +4266,13 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->oflags & VPO_UNMANAGED) != 0) return (count); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); count = pmap_pvh_wired_mappings(&m->md, count); if ((m->flags & PG_FICTITIOUS) == 0) { count = pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), count); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (count); } @@ -4280,7 +4288,7 @@ pmap_pvh_wired_mappings(struct md_page * pt_entry_t *pte; pv_entry_t pv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); sched_pin(); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { pmap = PV_PMAP(pv); @@ -4305,11 +4313,11 @@ pmap_page_is_mapped(vm_page_t m) if ((m->oflags & VPO_UNMANAGED) != 0) return (FALSE); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); rv = !TAILQ_EMPTY(&m->md.pv_list) || ((m->flags & PG_FICTITIOUS) == 0 && !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list)); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4339,7 +4347,7 @@ pmap_remove_pages(pmap_t pmap) printf("warning: pmap_remove_pages called with non-current pmap\n"); return; } - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); sched_pin(); TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { @@ -4451,7 +4459,7 @@ pmap_remove_pages(pmap_t pmap) } sched_unpin(); pmap_invalidate_all(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); pmap_free_zero_pages(free); } @@ -4479,11 +4487,11 @@ pmap_is_modified(vm_page_t m) if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return (FALSE); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); rv = pmap_is_modified_pvh(&m->md) || ((m->flags & PG_FICTITIOUS) == 0 && pmap_is_modified_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4500,7 +4508,7 @@ pmap_is_modified_pvh(struct md_page *pvh pmap_t pmap; boolean_t rv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); rv = FALSE; sched_pin(); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { @@ -4553,11 +4561,11 @@ pmap_is_referenced(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_is_referenced: page %p is not managed", m)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); rv = pmap_is_referenced_pvh(&m->md) || ((m->flags & PG_FICTITIOUS) == 0 && pmap_is_referenced_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -4573,7 +4581,7 @@ pmap_is_referenced_pvh(struct md_page *p pmap_t pmap; boolean_t rv; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); rv = FALSE; sched_pin(); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { @@ -4614,7 +4622,7 @@ pmap_remove_write(vm_page_t m) if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; @@ -4655,7 +4663,7 @@ retry: } vm_page_aflag_clear(m, PGA_WRITEABLE); sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -4684,7 +4692,7 @@ pmap_ts_referenced(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_ts_referenced: page %p is not managed", m)); pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; @@ -4743,7 +4751,7 @@ small_mappings: } out: sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rtval); } @@ -4773,7 +4781,7 @@ pmap_clear_modify(vm_page_t m) */ if ((m->aflags & PGA_WRITEABLE) == 0) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; @@ -4834,7 +4842,7 @@ small_mappings: PMAP_UNLOCK(pmap); } sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -4854,7 +4862,7 @@ pmap_clear_reference(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_clear_reference: page %p is not managed", m)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); sched_pin(); if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; @@ -4901,7 +4909,7 @@ small_mappings: PMAP_UNLOCK(pmap); } sched_unpin(); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* From owner-svn-src-head@FreeBSD.ORG Sun May 27 16:27:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9D543106566B; Sun, 27 May 2012 16:27:05 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F7628FC08; Sun, 27 May 2012 16:27:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4RGR5V4059970; Sun, 27 May 2012 16:27:05 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4RGR5Ya059967; Sun, 27 May 2012 16:27:05 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201205271627.q4RGR5Ya059967@svn.freebsd.org> From: Tim Kientzle Date: Sun, 27 May 2012 16:27: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: r236159 - head/sys/boot/arm/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: Sun, 27 May 2012 16:27:05 -0000 Author: kientzle Date: Sun May 27 16:27:04 2012 New Revision: 236159 URL: http://svn.freebsd.org/changeset/base/236159 Log: Allow the load address used by ARM ubldr to be set via Make argument. In particular, this simplifies scripts that build system images. Modified: head/sys/boot/arm/uboot/Makefile head/sys/boot/arm/uboot/ldscript.arm Modified: head/sys/boot/arm/uboot/Makefile ============================================================================== --- head/sys/boot/arm/uboot/Makefile Sun May 27 16:24:00 2012 (r236158) +++ head/sys/boot/arm/uboot/Makefile Sun May 27 16:27:04 2012 (r236159) @@ -7,6 +7,9 @@ NEWVERSWHAT= "U-Boot loader" ${MACHINE_A BINDIR?= /boot INSTALLFLAGS= -b WARNS?= 1 +# Address at which ubldr will be loaded. +# This varies for different boards and SOCs. +UBLDR_LOADADDR?= 0x1000000 # Architecture-specific loader code SRCS= start.S conf.c vers.c @@ -85,7 +88,9 @@ CLEANFILES+= vers.c loader.help CFLAGS+= -ffreestanding -LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH} +LDFLAGS= -nostdlib -static +LDFLAGS+= -T ldscript.generated +LDFLAGS+= -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH} # Pull in common loader code .PATH: ${.CURDIR}/../../uboot/common @@ -110,6 +115,18 @@ loader.help: help.common help.uboot cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} +${PROG}: ldscript.generated ${.CURDIR}/ldscript.${MACHINE_CPUARCH} + +ldscript.generated:: + rm -f ldscript.generated.tmp + echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >ldscript.generated.tmp + if diff ldscript.generated ldscript.generated.tmp > /dev/null; then \ + true; \ + else \ + rm -f ldscript.generated; \ + mv ldscript.generated.tmp ldscript.generated; \ + fi + .PATH: ${.CURDIR}/../../forth FILES= loader.help Modified: head/sys/boot/arm/uboot/ldscript.arm ============================================================================== --- head/sys/boot/arm/uboot/ldscript.arm Sun May 27 16:24:00 2012 (r236158) +++ head/sys/boot/arm/uboot/ldscript.arm Sun May 27 16:27:04 2012 (r236159) @@ -5,7 +5,7 @@ ENTRY(_start) SECTIONS { /* Read-only sections, merged into text segment: */ - . = 0x1000000 + SIZEOF_HEADERS; + . = UBLDR_LOADADDR + SIZEOF_HEADERS; .interp : { *(.interp) } .hash : { *(.hash) } .dynsym : { *(.dynsym) } From owner-svn-src-head@FreeBSD.ORG Sun May 27 19:00:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B0D401065670; Sun, 27 May 2012 19:00:48 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from server2.allsitecontrol.com (server2.allsitecontrol.com [63.143.36.210]) by mx1.freebsd.org (Postfix) with ESMTP id 7E4868FC08; Sun, 27 May 2012 19:00:47 +0000 (UTC) Received: from gorz.torservers.net ([109.163.233.205]:39066 helo=internal.tormail.org) by server2.allsitecontrol.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.77) (envelope-from ) id 1SYihi-0003q9-QM; Sun, 27 May 2012 15:00:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:In-Reply-To:Subject:Cc:To:From; bh=zVPCLU/aZLKE1K7VZqbxQ0UXLr3b5/3D4bs6VOwQxOI=; b=DPA84ex3c2MvOHyo1am5LhllNgde5zrPUDUPl+mEt2WLAKplbw8SUTMyNdmfm3l5mdWXcoY9TX+c7Zt5LFob50SViILiCohV0O/IQDmI/WUJtnwPABezTWrQ8zwc7PMiDJAo7g2RlILgDFX9eADoJW2pepJy9nzaB8d7aOI0jbg=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1SYign-000JeQ-DO; Sun, 27 May 2012 18:59:43 +0000 From: Jan Beich To: Gabor Kovesdan In-Reply-To: <201205252207.q4PM7DPD035808__11377.0620352172$1337983761$gmane$org@svn.freebsd.org> (Gabor Kovesdan's message of "Fri, 25 May 2012 22:07:13 +0000 (UTC)") Date: Mon, 28 May 2012 04:59:52 +1000 References: <201205252207.q4PM7DPD035808__11377.0620352172$1337983761$gmane$org@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1SYign-000JeQ-DO@internal.tormail.org> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server2.allsitecontrol.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tormail.org X-Source: X-Source-Args: X-Source-Dir: Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r236028 - head/lib/libkiconv 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, 27 May 2012 19:00:48 -0000 Gabor Kovesdan writes: > Author: gabor > Date: Fri May 25 22:07:13 2012 > New Revision: 236028 > URL: http://svn.freebsd.org/changeset/base/236028 > > Log: > - Add support for BSD iconv when it is build into libc [...] > +.if !defined(MK_ICONV) > +CFLAGS+= -DICONV_DLOPEN > +.endif This doesn't work unless you include bsd.own.mk before. $ make WITH_ICONV= -C lib/libkiconv Warning: Object directory not changed from original /a/freebsd/lib/libkiconv clang ... -DICONV_DLOPEN ... -o kiconv_sysctl.o [...] From owner-svn-src-head@FreeBSD.ORG Sun May 27 20:30:31 2012 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 9BCD8106566B; Sun, 27 May 2012 20:30:31 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 593FE8FC1A; Sun, 27 May 2012 20:30:30 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 5BC797F3ECA; Sun, 27 May 2012 22:31:00 +0200 (CEST) Date: Sun, 27 May 2012 22:31:00 +0200 From: Roman Divacky To: Konstantin Belousov Message-ID: <20120527203100.GA22921@freebsd.org> References: <201205270527.q4R5Rm44028055@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201205270527.q4R5Rm44028055@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r236137 - head/contrib/gcc/config/i386 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, 27 May 2012 20:30:31 -0000 Fwiw, to enable the same thing in clang you want this simple patch: =================================================================== --- Tools.cpp (revision 157545) +++ Tools.cpp (working copy) @@ -4794,6 +4794,7 @@ if (Args.hasArg(options::OPT_static)) { CmdArgs.push_back("-Bstatic"); } else { + CmdArgs.push_back("--hash-style=both"); if (Args.hasArg(options::OPT_rdynamic)) CmdArgs.push_back("-export-dynamic"); CmdArgs.push_back("--eh-frame-hdr"); I cant commit this upstream as this option doesn't work with ld 2.15. What should be done here? Commit this to local FreeBSD version? Commit it upstream making it not work with old ld? Leave it out completely? On Sun, May 27, 2012 at 05:27:48AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Sun May 27 05:27:47 2012 > New Revision: 236137 > URL: http://svn.freebsd.org/changeset/base/236137 > > Log: > Enable gnu hash generation for dynamic ELF binaries on x86. > > Reviewed by: kan > > Modified: > head/contrib/gcc/config/i386/freebsd.h > head/contrib/gcc/config/i386/freebsd64.h > > Modified: head/contrib/gcc/config/i386/freebsd.h > ============================================================================== > --- head/contrib/gcc/config/i386/freebsd.h Sun May 27 05:24:53 2012 (r236136) > +++ head/contrib/gcc/config/i386/freebsd.h Sun May 27 05:27:47 2012 (r236137) > @@ -49,6 +49,7 @@ Boston, MA 02110-1301, USA. */ > %{rdynamic: -export-dynamic} \ > %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ > %{static:-Bstatic}} \ > + %{!static:--hash-style=both} \ > %{symbolic:-Bsymbolic}" > > /* Reset our STARTFILE_SPEC which was properly set in config/freebsd.h > > Modified: head/contrib/gcc/config/i386/freebsd64.h > ============================================================================== > --- head/contrib/gcc/config/i386/freebsd64.h Sun May 27 05:24:53 2012 (r236136) > +++ head/contrib/gcc/config/i386/freebsd64.h Sun May 27 05:27:47 2012 (r236137) > @@ -54,4 +54,5 @@ Boston, MA 02110-1301, USA. */ > %{rdynamic:-export-dynamic} \ > %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ > %{static:-Bstatic}} \ > + %{!static:--hash-style=both} \ > %{symbolic:-Bsymbolic}" From owner-svn-src-head@FreeBSD.ORG Sun May 27 20:32:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7587B106567D; Sun, 27 May 2012 20:32:15 +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 0F4548FC1E; Sun, 27 May 2012 20:32:13 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4RKW2sm047243; Sun, 27 May 2012 23:32:03 +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.5/8.14.5) with ESMTP id q4RKW2U6052487; Sun, 27 May 2012 23:32:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4RKW28l052486; Sun, 27 May 2012 23:32:02 +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, 27 May 2012 23:32:02 +0300 From: Konstantin Belousov To: Roman Divacky Message-ID: <20120527203202.GX2358@deviant.kiev.zoral.com.ua> References: <201205270527.q4R5Rm44028055@svn.freebsd.org> <20120527203100.GA22921@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1MaLZ7+w12+PvFyj" Content-Disposition: inline In-Reply-To: <20120527203100.GA22921@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=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham 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: r236137 - head/contrib/gcc/config/i386 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, 27 May 2012 20:32:15 -0000 --1MaLZ7+w12+PvFyj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 27, 2012 at 10:31:00PM +0200, Roman Divacky wrote: > Fwiw, to enable the same thing in clang you want this simple patch: >=20 > =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 > --- Tools.cpp (revision 157545) > +++ Tools.cpp (working copy) > @@ -4794,6 +4794,7 @@ > if (Args.hasArg(options::OPT_static)) { > CmdArgs.push_back("-Bstatic"); > } else { > + CmdArgs.push_back("--hash-style=3Dboth"); > if (Args.hasArg(options::OPT_rdynamic)) > CmdArgs.push_back("-export-dynamic"); > CmdArgs.push_back("--eh-frame-hdr"); >=20 >=20 >=20 > I cant commit this upstream as this option doesn't work with ld 2.15. What > should be done here? Commit this to local FreeBSD version? Commit it upst= ream > making it not work with old ld? Leave it out completely? I cannot answer this question. This should be discussed with our in-tree clang maintainers. >=20 > On Sun, May 27, 2012 at 05:27:48AM +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Sun May 27 05:27:47 2012 > > New Revision: 236137 > > URL: http://svn.freebsd.org/changeset/base/236137 > >=20 > > Log: > > Enable gnu hash generation for dynamic ELF binaries on x86. > > =20 > > Reviewed by: kan > >=20 > > Modified: > > head/contrib/gcc/config/i386/freebsd.h > > head/contrib/gcc/config/i386/freebsd64.h > >=20 > > Modified: head/contrib/gcc/config/i386/freebsd.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/contrib/gcc/config/i386/freebsd.h Sun May 27 05:24:53 2012 (r2= 36136) > > +++ head/contrib/gcc/config/i386/freebsd.h Sun May 27 05:27:47 2012 (r2= 36137) > > @@ -49,6 +49,7 @@ Boston, MA 02110-1301, USA. */ > > %{rdynamic: -export-dynamic} \ > > %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ > > %{static:-Bstatic}} \ > > + %{!static:--hash-style=3Dboth} \ > > %{symbolic:-Bsymbolic}" > > =20 > > /* Reset our STARTFILE_SPEC which was properly set in config/freebsd.h > >=20 > > Modified: head/contrib/gcc/config/i386/freebsd64.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/contrib/gcc/config/i386/freebsd64.h Sun May 27 05:24:53 2012 (= r236136) > > +++ head/contrib/gcc/config/i386/freebsd64.h Sun May 27 05:27:47 2012 (= r236137) > > @@ -54,4 +54,5 @@ Boston, MA 02110-1301, USA. */ > > %{rdynamic:-export-dynamic} \ > > %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ > > %{static:-Bstatic}} \ > > + %{!static:--hash-style=3Dboth} \ > > %{symbolic:-Bsymbolic}" --1MaLZ7+w12+PvFyj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/Cj0IACgkQC3+MBN1Mb4gG+gCfcvsTSRQn7kpHPizmfgb9nWHK aV8AoIhukCdWvB6UqfL0ANDZZwc3LnEX =/Ixo -----END PGP SIGNATURE----- --1MaLZ7+w12+PvFyj-- From owner-svn-src-head@FreeBSD.ORG Mon May 28 09:30:14 2012 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 27DEA106566B; Mon, 28 May 2012 09:30:14 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 10E108FC16; Mon, 28 May 2012 09:30:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4S9UEEM002284; Mon, 28 May 2012 09:30:14 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4S9UDnu002269; Mon, 28 May 2012 09:30:13 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205280930.q4S9UDnu002269@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 28 May 2012 09:30: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: r236170 - in head: sbin/ifconfig sys/net sys/netinet sys/netinet6 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: Mon, 28 May 2012 09:30:14 -0000 Author: bz Date: Mon May 28 09:30:13 2012 New Revision: 236170 URL: http://svn.freebsd.org/changeset/base/236170 Log: It turns out that too many drivers are not only parsing the L2/3/4 headers for TSO but also for generic checksum offloading. Ideally we would only have one common function shared amongst all drivers, and perhaps when updating them for IPv6 we should introduce that. Eventually we should provide the meta information along with mbufs to avoid (re-)parsing entirely. To not break IPv6 (checksums and offload) and to be able to MFC the changes without risking to hurt 3rd party drivers, duplicate the v4 framework, as other OSes have done as well. Introduce interface capability flags for TX/RX checksum offload with IPv6, to allow independent toggling (where possible). Add CSUM_*_IPV6 flags for UDP/TCP over IPv6, and reserve further for SCTP, and IPv6 fragmentation. Define CSUM_DELAY_DATA_IPV6 as we do for legacy IP and add an alias for CSUM_DATA_VALID_IPV6. This pretty much brings IPv6 handling in line with IPv4. TSO is still handled in a different way and not via if_hwassist. Update ifconfig to allow (un)setting of the new capability flags. Update loopback to announce the new capabilities and if_hwassist flags. Individual driver updates will have to follow, as will SCTP. Reported by: gallatin, dim, .. Reviewed by: gallatin (glanced at?) MFC after: 3 days X-MFC with: r235961,235959,235958 Modified: head/sbin/ifconfig/ifconfig.8 head/sbin/ifconfig/ifconfig.c head/sys/net/if.h head/sys/net/if_loop.c head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_timewait.c head/sys/netinet6/ip6_forward.c head/sys/netinet6/ip6_ipsec.c head/sys/netinet6/ip6_output.c head/sys/netinet6/udp6_usrreq.c head/sys/sys/mbuf.h Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Mon May 28 09:23:12 2012 (r236169) +++ head/sbin/ifconfig/ifconfig.8 Mon May 28 09:30:13 2012 (r236170) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd May 19, 2012 +.Dd May 27, 2012 .Dt IFCONFIG 8 .Os .Sh NAME @@ -372,16 +372,32 @@ This is useful for devices which have mu .It Cm name Ar name Set the interface name to .Ar name . -.It Cm rxcsum , txcsum +.It Cm rxcsum , txcsum , rxcsum6 , txcsum6 If the driver supports user-configurable checksum offloading, enable receive (or transmit) checksum offloading on the interface. +The feature can be turned on selectively per protocol family. +Use +.Cm rxcsum6 , txcsum6 +for +.Xr ip6 4 +or +.Cm rxcsum , txcsum +otherwise. Some drivers may not be able to enable these flags independently of each other, so setting one may also set the other. The driver will offload as much checksum work as it can reliably support, the exact level of offloading varies between drivers. -.It Fl rxcsum , txcsum +.It Fl rxcsum , txcsum , rxcsum6 , txcsum6 If the driver supports user-configurable checksum offloading, disable receive (or transmit) checksum offloading on the interface. +The feature can be turned off selectively per protocol family. +Use +.Fl rxcsum6 , txcsum6 +for +.Xr ip6 4 +or +.Fl rxcsum , txcsum +otherwise. These settings may not always be independent of each other. .It Cm tso If the driver supports Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Mon May 28 09:23:12 2012 (r236169) +++ head/sbin/ifconfig/ifconfig.c Mon May 28 09:30:13 2012 (r236170) @@ -916,7 +916,8 @@ unsetifdescr(const char *val, int value, #define IFCAPBITS \ "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \ "\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \ -"\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE\25NETMAP" +"\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE\25NETMAP" \ +"\26IFCAP_RXCSUM_IPV6\27IFCAP_TXCSUM_IPV6" /* * Print the status of the interface. If an address family was @@ -1193,6 +1194,10 @@ static struct cmd basic_cmds[] = { DEF_CMD("-monitor", -IFF_MONITOR, setifflags), DEF_CMD("staticarp", IFF_STATICARP, setifflags), DEF_CMD("-staticarp", -IFF_STATICARP, setifflags), + DEF_CMD("rxcsum6", IFCAP_RXCSUM_IPV6, setifcap), + DEF_CMD("-rxcsum6", -IFCAP_RXCSUM_IPV6, setifcap), + DEF_CMD("txcsum6", IFCAP_TXCSUM_IPV6, setifcap), + DEF_CMD("-txcsum6", -IFCAP_TXCSUM_IPV6, setifcap), DEF_CMD("rxcsum", IFCAP_RXCSUM, setifcap), DEF_CMD("-rxcsum", -IFCAP_RXCSUM, setifcap), DEF_CMD("txcsum", IFCAP_TXCSUM, setifcap), Modified: head/sys/net/if.h ============================================================================== --- head/sys/net/if.h Mon May 28 09:23:12 2012 (r236169) +++ head/sys/net/if.h Mon May 28 09:30:13 2012 (r236170) @@ -230,6 +230,10 @@ struct if_data { #define IFCAP_VLAN_HWTSO 0x40000 /* can do IFCAP_TSO on VLANs */ #define IFCAP_LINKSTATE 0x80000 /* the runtime link state is dynamic */ #define IFCAP_NETMAP 0x100000 /* netmap mode supported/enabled */ +#define IFCAP_RXCSUM_IPV6 0x200000 /* can offload checksum on IPv6 RX */ +#define IFCAP_TXCSUM_IPV6 0x400000 /* can offload checksum on IPv6 TX */ + +#define IFCAP_HWCSUM_IPV6 (IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6) #define IFCAP_HWCSUM (IFCAP_RXCSUM | IFCAP_TXCSUM) #define IFCAP_TSO (IFCAP_TSO4 | IFCAP_TSO6) Modified: head/sys/net/if_loop.c ============================================================================== --- head/sys/net/if_loop.c Mon May 28 09:23:12 2012 (r236169) +++ head/sys/net/if_loop.c Mon May 28 09:30:13 2012 (r236170) @@ -92,7 +92,9 @@ #endif #define LO_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP | CSUM_SCTP) -#define LO_CSUM_SET (CSUM_DATA_VALID | CSUM_PSEUDO_HDR | \ +#define LO_CSUM_FEATURES6 (CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | CSUM_SCTP) +#define LO_CSUM_SET (CSUM_DATA_VALID | CSUM_DATA_VALID_IPV6 | \ + CSUM_PSEUDO_HDR | \ CSUM_IP_CHECKED | CSUM_IP_VALID | \ CSUM_SCTP_VALID) @@ -143,8 +145,9 @@ lo_clone_create(struct if_clone *ifc, in ifp->if_ioctl = loioctl; ifp->if_output = looutput; ifp->if_snd.ifq_maxlen = ifqmaxlen; - ifp->if_capabilities = ifp->if_capenable = IFCAP_HWCSUM; - ifp->if_hwassist = LO_CSUM_FEATURES; + ifp->if_capabilities = ifp->if_capenable = + IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6; + ifp->if_hwassist = LO_CSUM_FEATURES | LO_CSUM_FEATURES6; if_attach(ifp); bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); if (V_loif == NULL) @@ -247,12 +250,19 @@ looutput(struct ifnet *ifp, struct mbuf #if 1 /* XXX */ switch (dst->sa_family) { case AF_INET: - case AF_INET6: if (ifp->if_capenable & IFCAP_RXCSUM) { m->m_pkthdr.csum_data = 0xffff; m->m_pkthdr.csum_flags = LO_CSUM_SET; } m->m_pkthdr.csum_flags &= ~LO_CSUM_FEATURES; + break; + case AF_INET6: + if (ifp->if_capenable & IFCAP_RXCSUM_IPV6) { + m->m_pkthdr.csum_data = 0xffff; + m->m_pkthdr.csum_flags = LO_CSUM_SET; + } + m->m_pkthdr.csum_flags &= ~LO_CSUM_FEATURES6; + break; case AF_IPX: case AF_APPLETALK: break; @@ -436,10 +446,15 @@ loioctl(struct ifnet *ifp, u_long cmd, c ifp->if_capenable ^= IFCAP_RXCSUM; if ((mask & IFCAP_TXCSUM) != 0) ifp->if_capenable ^= IFCAP_TXCSUM; + if ((mask & IFCAP_RXCSUM_IPV6) != 0) + ifp->if_capenable ^= IFCAP_RXCSUM_IPV6; + if ((mask & IFCAP_TXCSUM_IPV6) != 0) + ifp->if_capenable ^= IFCAP_TXCSUM_IPV6; + ifp->if_hwassist = 0; if (ifp->if_capenable & IFCAP_TXCSUM) ifp->if_hwassist = LO_CSUM_FEATURES; - else - ifp->if_hwassist = 0; + if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) + ifp->if_hwassist |= LO_CSUM_FEATURES6; break; default: Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon May 28 09:23:12 2012 (r236169) +++ head/sys/netinet/tcp_input.c Mon May 28 09:30:13 2012 (r236170) @@ -589,7 +589,7 @@ tcp_input(struct mbuf *m, int off0) ip6 = mtod(m, struct ip6_hdr *); th = (struct tcphdr *)((caddr_t)ip6 + off0); tlen = sizeof(*ip6) + ntohs(ip6->ip6_plen) - off0; - if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID) { + if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID_IPV6) { if (m->m_pkthdr.csum_flags & CSUM_PSEUDO_HDR) th->th_sum = m->m_pkthdr.csum_data; else Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Mon May 28 09:23:12 2012 (r236169) +++ head/sys/netinet/tcp_output.c Mon May 28 09:30:13 2012 (r236170) @@ -1047,7 +1047,6 @@ send: * checksum extended header and data. */ m->m_pkthdr.len = hdrlen + len; /* in6_cksum() need this */ - m->m_pkthdr.csum_flags = CSUM_TCP; m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum); #ifdef INET6 if (isipv6) { @@ -1055,6 +1054,7 @@ send: * ip6_plen is not need to be filled now, and will be filled * in ip6_output. */ + m->m_pkthdr.csum_flags = CSUM_TCP_IPV6; th->th_sum = in6_cksum_pseudo(ip6, sizeof(struct tcphdr) + optlen + len, IPPROTO_TCP, 0); } @@ -1064,6 +1064,7 @@ send: #endif #ifdef INET { + m->m_pkthdr.csum_flags = CSUM_TCP; th->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, htons(sizeof(struct tcphdr) + IPPROTO_TCP + len + optlen)); Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Mon May 28 09:23:12 2012 (r236169) +++ head/sys/netinet/tcp_subr.c Mon May 28 09:30:13 2012 (r236170) @@ -619,10 +619,10 @@ tcp_respond(struct tcpcb *tp, void *ipge nth->th_win = htons((u_short)win); nth->th_urp = 0; - m->m_pkthdr.csum_flags = CSUM_TCP; m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum); #ifdef INET6 if (isipv6) { + m->m_pkthdr.csum_flags = CSUM_TCP_IPV6; nth->th_sum = in6_cksum_pseudo(ip6, tlen - sizeof(struct ip6_hdr), IPPROTO_TCP, 0); ip6->ip6_hlim = in6_selecthlim(tp != NULL ? tp->t_inpcb : @@ -634,6 +634,7 @@ tcp_respond(struct tcpcb *tp, void *ipge #endif #ifdef INET { + m->m_pkthdr.csum_flags = CSUM_TCP; nth->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, htons((u_short)(tlen - sizeof(struct ip) + ip->ip_p))); } Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Mon May 28 09:23:12 2012 (r236169) +++ head/sys/netinet/tcp_syncache.c Mon May 28 09:30:13 2012 (r236170) @@ -1473,10 +1473,10 @@ syncache_respond(struct syncache *sc) optlen = 0; M_SETFIB(m, sc->sc_inc.inc_fibnum); - m->m_pkthdr.csum_flags = CSUM_TCP; m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum); #ifdef INET6 if (sc->sc_inc.inc_flags & INC_ISIPV6) { + m->m_pkthdr.csum_flags = CSUM_TCP_IPV6; th->th_sum = in6_cksum_pseudo(ip6, tlen + optlen - hlen, IPPROTO_TCP, 0); ip6->ip6_hlim = in6_selecthlim(NULL, NULL); @@ -1488,6 +1488,7 @@ syncache_respond(struct syncache *sc) #endif #ifdef INET { + m->m_pkthdr.csum_flags = CSUM_TCP; th->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, htons(tlen + optlen - hlen + IPPROTO_TCP)); error = ip_output(m, sc->sc_ipopts, NULL, 0, NULL, NULL); Modified: head/sys/netinet/tcp_timewait.c ============================================================================== --- head/sys/netinet/tcp_timewait.c Mon May 28 09:23:12 2012 (r236169) +++ head/sys/netinet/tcp_timewait.c Mon May 28 09:30:13 2012 (r236170) @@ -574,10 +574,10 @@ tcp_twrespond(struct tcptw *tw, int flag th->th_flags = flags; th->th_win = htons(tw->last_win); - m->m_pkthdr.csum_flags = CSUM_TCP; m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum); #ifdef INET6 if (isipv6) { + m->m_pkthdr.csum_flags = CSUM_TCP_IPV6; th->th_sum = in6_cksum_pseudo(ip6, sizeof(struct tcphdr) + optlen, IPPROTO_TCP, 0); ip6->ip6_hlim = in6_selecthlim(inp, NULL); @@ -590,6 +590,7 @@ tcp_twrespond(struct tcptw *tw, int flag #endif #ifdef INET { + m->m_pkthdr.csum_flags = CSUM_TCP; th->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, htons(sizeof(struct tcphdr) + optlen + IPPROTO_TCP)); ip->ip_len = m->m_pkthdr.len; Modified: head/sys/netinet6/ip6_forward.c ============================================================================== --- head/sys/netinet6/ip6_forward.c Mon May 28 09:23:12 2012 (r236169) +++ head/sys/netinet6/ip6_forward.c Mon May 28 09:30:13 2012 (r236170) @@ -581,9 +581,9 @@ skip_routing: m->m_flags |= M_FASTFWD_OURS; if (m->m_pkthdr.rcvif == NULL) m->m_pkthdr.rcvif = V_loif; - if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { + if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { m->m_pkthdr.csum_flags |= - CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + CSUM_DATA_VALID_IPV6 | CSUM_PSEUDO_HDR; m->m_pkthdr.csum_data = 0xffff; } #ifdef SCTP @@ -601,9 +601,9 @@ skip_routing: if (m->m_flags & M_FASTFWD_OURS) { if (m->m_pkthdr.rcvif == NULL) m->m_pkthdr.rcvif = V_loif; - if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { + if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { m->m_pkthdr.csum_flags |= - CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + CSUM_DATA_VALID_IPV6 | CSUM_PSEUDO_HDR; m->m_pkthdr.csum_data = 0xffff; } #ifdef SCTP Modified: head/sys/netinet6/ip6_ipsec.c ============================================================================== --- head/sys/netinet6/ip6_ipsec.c Mon May 28 09:23:12 2012 (r236169) +++ head/sys/netinet6/ip6_ipsec.c Mon May 28 09:30:13 2012 (r236170) @@ -291,6 +291,7 @@ ip6_ipsec_output(struct mbuf **m, struct /* * Do delayed checksums now because we send before * this is done in the normal processing path. + * XXX-BZ CSUM_DELAY_DATA_IPV6? */ if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { ipseclog((LOG_DEBUG, Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Mon May 28 09:23:12 2012 (r236169) +++ head/sys/netinet6/ip6_output.c Mon May 28 09:30:13 2012 (r236170) @@ -190,7 +190,7 @@ in6_delayed_cksum(struct mbuf *m, uint32 u_short csum; csum = in_cksum_skip(m, offset + plen, offset); - if (m->m_pkthdr.csum_flags & CSUM_UDP && csum == 0) + if (m->m_pkthdr.csum_flags & CSUM_UDP_IPV6 && csum == 0) csum = 0xffff; offset += m->m_pkthdr.csum_data; /* checksum offset */ @@ -885,9 +885,9 @@ again: m->m_flags |= M_FASTFWD_OURS; if (m->m_pkthdr.rcvif == NULL) m->m_pkthdr.rcvif = V_loif; - if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { + if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { m->m_pkthdr.csum_flags |= - CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + CSUM_DATA_VALID_IPV6 | CSUM_PSEUDO_HDR; m->m_pkthdr.csum_data = 0xffff; } #ifdef SCTP @@ -905,9 +905,9 @@ again: if (m->m_flags & M_FASTFWD_OURS) { if (m->m_pkthdr.rcvif == NULL) m->m_pkthdr.rcvif = V_loif; - if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { + if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { m->m_pkthdr.csum_flags |= - CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + CSUM_DATA_VALID_IPV6 | CSUM_PSEUDO_HDR; m->m_pkthdr.csum_data = 0xffff; } #ifdef SCTP @@ -960,8 +960,8 @@ passout: * XXX-BZ Need a framework to know when the NIC can handle it, even * with ext. hdrs. */ - if (sw_csum & CSUM_DELAY_DATA) { - sw_csum &= ~CSUM_DELAY_DATA; + if (sw_csum & CSUM_DELAY_DATA_IPV6) { + sw_csum &= ~CSUM_DELAY_DATA_IPV6; in6_delayed_cksum(m, plen, sizeof(struct ip6_hdr)); } #ifdef SCTP @@ -1076,9 +1076,9 @@ passout: * fragmented packets, then do it here. * XXX-BZ handle the hw offloading case. Need flags. */ - if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { + if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { in6_delayed_cksum(m, plen, hlen); - m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; + m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; } #ifdef SCTP if (m->m_pkthdr.csum_flags & CSUM_SCTP) { Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Mon May 28 09:23:12 2012 (r236169) +++ head/sys/netinet6/udp6_usrreq.c Mon May 28 09:30:13 2012 (r236170) @@ -230,7 +230,7 @@ udp6_input(struct mbuf **mp, int *offp, goto badunlocked; } - if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID) { + if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID_IPV6) { if (m->m_pkthdr.csum_flags & CSUM_PSEUDO_HDR) uh_sum = m->m_pkthdr.csum_data; else @@ -784,7 +784,7 @@ udp6_output(struct inpcb *inp, struct mb ip6->ip6_dst = *faddr; udp6->uh_sum = in6_cksum_pseudo(ip6, plen, IPPROTO_UDP, 0); - m->m_pkthdr.csum_flags = CSUM_UDP; + m->m_pkthdr.csum_flags = CSUM_UDP_IPV6; m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum); flags = 0; Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Mon May 28 09:23:12 2012 (r236169) +++ head/sys/sys/mbuf.h Mon May 28 09:30:13 2012 (r236170) @@ -283,15 +283,24 @@ struct mbuf { #define CSUM_FRAGMENT 0x0010 /* will do IP fragmentation */ #define CSUM_TSO 0x0020 /* will do TSO */ #define CSUM_SCTP 0x0040 /* will csum SCTP */ +/* CSUM_SCTP_IPV6 0x0080 will csum IPv6/SCTP */ #define CSUM_IP_CHECKED 0x0100 /* did csum IP */ #define CSUM_IP_VALID 0x0200 /* ... the csum is valid */ #define CSUM_DATA_VALID 0x0400 /* csum_data field is valid */ #define CSUM_PSEUDO_HDR 0x0800 /* csum_data has pseudo hdr */ #define CSUM_SCTP_VALID 0x1000 /* SCTP checksum is valid */ +#define CSUM_UDP_IPV6 0x2000 /* will csum IPv6/UDP */ +#define CSUM_TCP_IPV6 0x4000 /* will csum IPv6/TCP */ +/* CSUM_TSO_IPV6 0x8000 will do IPv6/TSO */ + +/* CSUM_FRAGMENT_IPV6 0x10000 will do IPv6 fragementation */ + +#define CSUM_DELAY_DATA_IPV6 (CSUM_TCP_IPV6 | CSUM_UDP_IPV6) +#define CSUM_DATA_VALID_IPV6 CSUM_DATA_VALID #define CSUM_DELAY_DATA (CSUM_TCP | CSUM_UDP) -#define CSUM_DELAY_IP (CSUM_IP) /* XXX add ipv6 here too? */ +#define CSUM_DELAY_IP (CSUM_IP) /* Only v4, no v6 IP hdr csum */ /* * mbuf types. From owner-svn-src-head@FreeBSD.ORG Mon May 28 10:45:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 848B2106564A; Mon, 28 May 2012 10:45:52 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 703508FC12; Mon, 28 May 2012 10:45:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4SAjq9i007117; Mon, 28 May 2012 10:45:52 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4SAjqK4007115; Mon, 28 May 2012 10:45:52 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205281045.q4SAjqK4007115@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 28 May 2012 10:45: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: r236176 - head/sbin/ifconfig 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, 28 May 2012 10:45:52 -0000 Author: bz Date: Mon May 28 10:45:51 2012 New Revision: 236176 URL: http://svn.freebsd.org/changeset/base/236176 Log: Removed the IFCAP_ prefix when printing the IPv6 checksum capabilities. Submitted by: dim MFC after: 3 days Modified: head/sbin/ifconfig/ifconfig.c Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Mon May 28 10:22:46 2012 (r236175) +++ head/sbin/ifconfig/ifconfig.c Mon May 28 10:45:51 2012 (r236176) @@ -917,7 +917,7 @@ unsetifdescr(const char *val, int value, "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \ "\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \ "\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE\25NETMAP" \ -"\26IFCAP_RXCSUM_IPV6\27IFCAP_TXCSUM_IPV6" +"\26RXCSUM_IPV6\27TXCSUM_IPV6" /* * Print the status of the interface. If an address family was From owner-svn-src-head@FreeBSD.ORG Mon May 28 12:11:01 2012 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 A057A1065670; Mon, 28 May 2012 12:11:01 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8ADA58FC12; Mon, 28 May 2012 12:11:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4SCB1At010555; Mon, 28 May 2012 12:11:01 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4SCB1EL010543; Mon, 28 May 2012 12:11:01 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201205281211.q4SCB1EL010543@svn.freebsd.org> From: David Chisnall Date: Mon, 28 May 2012 12:11: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: r236177 - head/gnu/lib/libsupc++ 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, 28 May 2012 12:11:01 -0000 Author: theraven Date: Mon May 28 12:11:00 2012 New Revision: 236177 URL: http://svn.freebsd.org/changeset/base/236177 Log: Correctly export operator new / delete for things linking against libsupc++ but not libstdc++. Unfortunately, it appears that libsupc++ / libstdc++ have a different idea of the type of size_t to the rest of the world, which may cause problems later on... Reported by: des MFC after: 1 week Modified: head/gnu/lib/libsupc++/Version.map Modified: head/gnu/lib/libsupc++/Version.map ============================================================================== --- head/gnu/lib/libsupc++/Version.map Mon May 28 10:45:51 2012 (r236176) +++ head/gnu/lib/libsupc++/Version.map Mon May 28 12:11:00 2012 (r236177) @@ -126,6 +126,16 @@ CXXABI_1.3 { # __gnu_cxx::_verbose_terminate_handler() _ZN9__gnu_cxx27__verbose_terminate_handlerEv; + # new / delete operators + _Znaj; + _ZnajRKSt9nothrow_t; + _Znwj; + _ZnwjRKSt9nothrow_t; + _ZdaPv; + _ZdaPvRKSt9nothrow_t; + _ZdlPv; + _ZdlPvRKSt9nothrow_t; + local: *; }; From owner-svn-src-head@FreeBSD.ORG Mon May 28 12:13:05 2012 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 AA1961065673; Mon, 28 May 2012 12:13:05 +0000 (UTC) (envelope-from rea@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C9DE8FC15; Mon, 28 May 2012 12:13:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4SCD54E010674; Mon, 28 May 2012 12:13:05 GMT (envelope-from rea@svn.freebsd.org) Received: (from rea@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4SCD5PO010671; Mon, 28 May 2012 12:13:05 GMT (envelope-from rea@svn.freebsd.org) Message-Id: <201205281213.q4SCD5PO010671@svn.freebsd.org> From: Eygene Ryabinkin Date: Mon, 28 May 2012 12:13: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: r236178 - in head: sbin/ifconfig 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: Mon, 28 May 2012 12:13:05 -0000 Author: rea (ports committer) Date: Mon May 28 12:13:04 2012 New Revision: 236178 URL: http://svn.freebsd.org/changeset/base/236178 Log: if_lagg: allow to invoke SIOCSLAGGPORT multiple times in a row Currently, 'ifconfig laggX down' does not remove members from this lagg(4) interface. So, 'service netif stop laggX' followed by 'service netif start laggX' will choke, because "stop" will leave interfaces attached to the laggX and ifconfig from the "start" will refuse to add already-existing interfaces. The real-world case is when I am bundling together my Ethernet and WiFi interfaces and using multiple profiles for accessing network in different places: system being booted up with one profile, but later this profile being exchanged to another one, followed by 'service netif restart' will not add WiFi interface back to the lagg: the "stop" action from 'service netif restart' will shut down my main WiFi interface, so wlan0 that exists in the lagg0 will be destroyed and purged from lagg0; the "start" action will try to re-add both interfaces, but since Ethernet one is already in lagg0, ifconfig will refuse to add the wlan0 from WiFi interface. Since adding the interface to the lagg(4) when it is already here should be an idempotent action: we're really not changing anything, so this fix doesn't change the semantics of interface addition. Approved by: thompsa Reviewed by: emaste MFC after: 1 week Modified: head/sbin/ifconfig/iflagg.c head/sys/net/if_lagg.c Modified: head/sbin/ifconfig/iflagg.c ============================================================================== --- head/sbin/ifconfig/iflagg.c Mon May 28 12:11:00 2012 (r236177) +++ head/sbin/ifconfig/iflagg.c Mon May 28 12:13:04 2012 (r236178) @@ -40,7 +40,8 @@ setlaggport(const char *val, int d, int strlcpy(rp.rp_ifname, name, sizeof(rp.rp_ifname)); strlcpy(rp.rp_portname, val, sizeof(rp.rp_portname)); - if (ioctl(s, SIOCSLAGGPORT, &rp)) + /* Don't choke if the port is already in this lagg. */ + if (ioctl(s, SIOCSLAGGPORT, &rp) && errno != EEXIST) err(1, "SIOCSLAGGPORT"); } Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Mon May 28 12:11:00 2012 (r236177) +++ head/sys/net/if_lagg.c Mon May 28 12:13:04 2012 (r236178) @@ -516,8 +516,13 @@ lagg_port_create(struct lagg_softc *sc, return (ENOSPC); /* Check if port has already been associated to a lagg */ - if (ifp->if_lagg != NULL) + if (ifp->if_lagg != NULL) { + /* Port is already in the current lagg? */ + lp = (struct lagg_port *)ifp->if_lagg; + if (lp->lp_softc == sc) + return (EEXIST); return (EBUSY); + } /* XXX Disallow non-ethernet interfaces (this should be any of 802) */ if (ifp->if_type != IFT_ETHER) From owner-svn-src-head@FreeBSD.ORG Mon May 28 13:14:24 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8DA55106566B; Mon, 28 May 2012 13:14:24 +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 ED18A8FC0C; Mon, 28 May 2012 13:14:23 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q4SDEMiY023625; Mon, 28 May 2012 17:14:22 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q4SDEMx7023624; Mon, 28 May 2012 17:14:22 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 28 May 2012 17:14:22 +0400 From: Gleb Smirnoff To: Eygene Ryabinkin Message-ID: <20120528131422.GH92865@FreeBSD.org> References: <201205281213.q4SCD5PO010671@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201205281213.q4SCD5PO010671@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r236178 - in head: sbin/ifconfig 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: Mon, 28 May 2012 13:14:24 -0000 On Mon, May 28, 2012 at 12:13:05PM +0000, Eygene Ryabinkin wrote: E> The real-world case is when I am bundling together my Ethernet and E> WiFi interfaces and using multiple profiles for accessing network in E> different places: system being booted up with one profile, but later E> this profile being exchanged to another one, followed by 'service E> netif restart' will not add WiFi interface back to the lagg: the E> "stop" action from 'service netif restart' will shut down my main WiFi E> interface, so wlan0 that exists in the lagg0 will be destroyed and E> purged from lagg0; the "start" action will try to re-add both E> interfaces, but since Ethernet one is already in lagg0, ifconfig will E> refuse to add the wlan0 from WiFi interface. Although the lagg(4) change is definetely a needed fix, the way of network roaming via stacking WiFi and Ethernet into lagg(4) always looked like a huge crutch to me. Isn't the problem solvable via a some kind of smarter dhclient? How other UNIX-like OS-es solve this? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Mon May 28 13:36:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9D00106566B; Mon, 28 May 2012 13:36: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 4FFE08FC0A; Mon, 28 May 2012 13:36:59 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4SDaYDF060694; Mon, 28 May 2012 16:36:34 +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.5/8.14.5) with ESMTP id q4SDaXIT012101; Mon, 28 May 2012 16:36:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4SDaX6J012100; Mon, 28 May 2012 16:36:33 +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: Mon, 28 May 2012 16:36:33 +0300 From: Konstantin Belousov To: Bruce Evans Message-ID: <20120528133633.GB2358@deviant.kiev.zoral.com.ua> References: <201205252150.q4PLomFk035064@svn.freebsd.org> <20120526173233.A885@besplex.bde.org> <20120526164927.GU2358@deviant.kiev.zoral.com.ua> <20120527043827.W3357@besplex.bde.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tYqdTR6Mwu/xEI6p" Content-Disposition: inline In-Reply-To: <20120527043827.W3357@besplex.bde.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=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Ed Schouten , rwatson@freebsd.org, svn-src-head@freebsd.org, jonathan@freebsd.org Subject: Re: svn commit: r236026 - in head/sys: amd64/linux32 compat/freebsd32 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, 28 May 2012 13:37:00 -0000 --tYqdTR6Mwu/xEI6p Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 27, 2012 at 07:49:36AM +1000, Bruce Evans wrote: > On Sat, 26 May 2012, Konstantin Belousov wrote: >=20 > >On Sat, May 26, 2012 at 10:21:25PM +1000, Bruce Evans wrote: > >The 'low level' AKA magic happens in several *_fetch_syscall_args() > >functions. For both linux32 and freebsd32, the magic code automatically > >zero-extends the arguments into 64bit entities. Linux passes args in > >registers, while FreeBSD uses words on stack. >=20 > Actually, the amd64 linux_fetch32_fetch_syscall_args() just copies from > 64-bit registers frame->tf_r* to 64-bit sa->args[*]. I can't see how > this gives anything except garbage in the top bits. Is there magic in > the switch to 64-bit mode that sets the top bits? Anyway, sign extension > would give garbage for unsigned args, and zero-extension would give > garbage for negative signed args. Hardware zero-extends any register touched in the 32bit mode. In fact, please see r217991 for related bug. --tYqdTR6Mwu/xEI6p Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/Df2EACgkQC3+MBN1Mb4ip6wCgggnSTu1Pu2ez7ezggGkwCKAC r+4An1hr9XYzUqXU6Mg19LKkFUWuareL =UlcY -----END PGP SIGNATURE----- --tYqdTR6Mwu/xEI6p-- From owner-svn-src-head@FreeBSD.ORG Mon May 28 13:50:15 2012 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 9541110656E3; Mon, 28 May 2012 13:50:15 +0000 (UTC) (envelope-from rea@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.6.71]) by mx1.freebsd.org (Postfix) with ESMTP id E43348FC0A; Mon, 28 May 2012 13:50:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codelabs.ru; s=two; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=YU0gOJyCdW79pJ958rpC43o6LaNBykeEEXHTsAfRkWo=; b=RmpClpLj25xW0ZTDJjstPFFZxJjSlatFgM2soPFJuYtpstcLDCFk2QSOqATAYIYvUrF7YF2kPoMEOEluH+jtwh2ymKtMK1M2OqQhyLtwTw8GgpwMNvS6k6bheT4BjuI5YtbsmjFhMQPx4WtdLX6I/ojMJi32F9ObTADIKIL+TuIN8L3XHKCvr9lzakMR94wCH4uYtPs+biUKI0Osm2vgKBJmS5+tXFmA7uTldzA/3SbyAeupHrZ44mYIUzySgXfsRLuDSScdOwaJiiCXSAJp6v/3qphhPvpIe2zbFxNgQGUTMkenuPsnMZHuNSV04OuFEe/ud00/O/RJFD5nfcH1qg==; Received: from void.codelabs.ru (void.codelabs.ru [144.206.6.66]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1SZ0Kh-000PTE-2L; Mon, 28 May 2012 17:50:03 +0400 Date: Mon, 28 May 2012 17:50:00 +0400 From: Eygene Ryabinkin To: Gleb Smirnoff Message-ID: References: <201205281213.q4SCD5PO010671@svn.freebsd.org> <20120528131422.GH92865@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1Ow488MNN9B9o/ov" Content-Disposition: inline In-Reply-To: <20120528131422.GH92865@FreeBSD.org> Sender: rea@codelabs.ru Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r236178 - in head: sbin/ifconfig 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: Mon, 28 May 2012 13:50:15 -0000 --1Ow488MNN9B9o/ov Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Gleb, good day. Mon, May 28, 2012 at 05:14:22PM +0400, Gleb Smirnoff wrote: > the way of network roaming via stacking WiFi and Ethernet into > lagg(4) always looked like a huge crutch to me. Why? > Isn't the problem solvable via a some kind of smarter dhclient? It isn't always bound to DHCP: just now I am sitting at $WORK and travelling via the building with WiFi and Ethernet -- I have static IP and when I plug into wire -- I have wired setup, when I am unplugged -- WiFi works here. But the magic of switching is inside if_lagg, not in some external app that looks for events and does the plumbing. And I like this way of doing things. > How other UNIX-like OS-es solve this? Looks like OSX does have the smart client that polls for the interface events and configures network accordingly. I should dig it a bit more, since I hadn't touched this part of OSX yet. --=20 Eygene Ryabinkin ,,,^..^,,, [ Life's unfair - but root password helps! | codelabs.ru ] [ 82FE 06BC D497 C0DE 49EC 4FF0 16AF 9EAE 8152 ECFB | freebsd.org ] --1Ow488MNN9B9o/ov Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iF4EABEIAAYFAk/DgogACgkQFq+eroFS7PsS7QD+PCBX1FqWjYIkI7GX0RTTs0be XPJhVOJgHn0XYOtPyN8A/A1w1w0BB0pbFkoEIAj8PvGAWL0sWETFXku3L1pG7cph =j/4w -----END PGP SIGNATURE----- --1Ow488MNN9B9o/ov-- From owner-svn-src-head@FreeBSD.ORG Mon May 28 13:55:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 211CE106566B; Mon, 28 May 2012 13:55:50 +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 0D00D8FC0C; Mon, 28 May 2012 13:55:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4SDtnbT014944; Mon, 28 May 2012 13:55:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4SDtnl8014942; Mon, 28 May 2012 13:55:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205281355.q4SDtnl8014942@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 28 May 2012 13:55: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: r236182 - head/sys/dev/drm2/i915 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, 28 May 2012 13:55:50 -0000 Author: kib Date: Mon May 28 13:55:49 2012 New Revision: 236182 URL: http://svn.freebsd.org/changeset/base/236182 Log: Fix calculation of the execution buffer end in the mapped pages when it is spilled into the next page. MFC after: 1 month Modified: head/sys/dev/drm2/i915/i915_gem_execbuffer.c Modified: head/sys/dev/drm2/i915/i915_gem_execbuffer.c ============================================================================== --- head/sys/dev/drm2/i915/i915_gem_execbuffer.c Mon May 28 13:49:52 2012 (r236181) +++ head/sys/dev/drm2/i915/i915_gem_execbuffer.c Mon May 28 13:55:49 2012 (r236182) @@ -1069,7 +1069,8 @@ i915_gem_fix_mi_batchbuffer_end(struct d po_r -= 4; mkva = pmap_mapdev_attr(trunc_page(po_r), 2 * PAGE_SIZE, PAT_WRITE_COMBINING); - cmd = *(uint32_t *)(mkva + (po_r & PAGE_MASK)); + po_r &= PAGE_MASK; + cmd = *(uint32_t *)(mkva + po_r); if (cmd != MI_BATCH_BUFFER_END) { /* @@ -1083,8 +1084,7 @@ i915_gem_fix_mi_batchbuffer_end(struct d po_w = po_r; DRM_DEBUG("batchbuffer does not end by MI_BATCH_BUFFER_END, overwriting last bo cmd !\n"); } - - *(uint32_t *)(mkva + (po_w & PAGE_MASK)) = MI_BATCH_BUFFER_END; + *(uint32_t *)(mkva + po_w) = MI_BATCH_BUFFER_END; } pmap_unmapdev((vm_offset_t)mkva, 2 * PAGE_SIZE); From owner-svn-src-head@FreeBSD.ORG Mon May 28 13:58:08 2012 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 E82ED106566B; Mon, 28 May 2012 13:58:08 +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 D412B8FC08; Mon, 28 May 2012 13:58:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4SDw83u015074; Mon, 28 May 2012 13:58:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4SDw8Lq015072; Mon, 28 May 2012 13:58:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205281358.q4SDw8Lq015072@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 28 May 2012 13:58: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: r236183 - head/sys/dev/drm2/i915 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, 28 May 2012 13:58:09 -0000 Author: kib Date: Mon May 28 13:58:08 2012 New Revision: 236183 URL: http://svn.freebsd.org/changeset/base/236183 Log: Disable end of buffer fixup by default. New DDX does not need this, and since batch_len is unused by Linux driver, it seems that it is sometimes gets passed wrong. This causes command buffer corruption and GPU hung. Old GEMified DDX drivers that needs this workaround are not supported. MFC after: 1 month Modified: head/sys/dev/drm2/i915/i915_gem_execbuffer.c Modified: head/sys/dev/drm2/i915/i915_gem_execbuffer.c ============================================================================== --- head/sys/dev/drm2/i915/i915_gem_execbuffer.c Mon May 28 13:55:49 2012 (r236182) +++ head/sys/dev/drm2/i915/i915_gem_execbuffer.c Mon May 28 13:58:08 2012 (r236183) @@ -1090,7 +1090,7 @@ DRM_DEBUG("batchbuffer does not end by M pmap_unmapdev((vm_offset_t)mkva, 2 * PAGE_SIZE); } -int i915_fix_mi_batchbuffer_end = 1; +int i915_fix_mi_batchbuffer_end = 0; static int i915_reset_gen7_sol_offsets(struct drm_device *dev, From owner-svn-src-head@FreeBSD.ORG Mon May 28 14:29:40 2012 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 715D7106566B; Mon, 28 May 2012 14:29:40 +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 F29D98FC0A; Mon, 28 May 2012 14:29:39 +0000 (UTC) Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q4SETUR3029500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 29 May 2012 00:29:31 +1000 Date: Tue, 29 May 2012 00:29:30 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov In-Reply-To: <20120528133633.GB2358@deviant.kiev.zoral.com.ua> Message-ID: <20120529002201.C1877@besplex.bde.org> References: <201205252150.q4PLomFk035064@svn.freebsd.org> <20120526173233.A885@besplex.bde.org> <20120526164927.GU2358@deviant.kiev.zoral.com.ua> <20120527043827.W3357@besplex.bde.org> <20120528133633.GB2358@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Ed Schouten , rwatson@FreeBSD.org, Bruce Evans , svn-src-head@FreeBSD.org, jonathan@FreeBSD.org Subject: Re: svn commit: r236026 - in head/sys: amd64/linux32 compat/freebsd32 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, 28 May 2012 14:29:40 -0000 On Mon, 28 May 2012, Konstantin Belousov wrote: > On Sun, May 27, 2012 at 07:49:36AM +1000, Bruce Evans wrote: >> On Sat, 26 May 2012, Konstantin Belousov wrote: >> >>> On Sat, May 26, 2012 at 10:21:25PM +1000, Bruce Evans wrote: >>> The 'low level' AKA magic happens in several *_fetch_syscall_args() >>> functions. For both linux32 and freebsd32, the magic code automatically >>> zero-extends the arguments into 64bit entities. Linux passes args in >>> registers, while FreeBSD uses words on stack. >> >> Actually, the amd64 linux_fetch32_fetch_syscall_args() just copies from >> 64-bit registers frame->tf_r* to 64-bit sa->args[*]. I can't see how >> this gives anything except garbage in the top bits. Is there magic in >> the switch to 64-bit mode that sets the top bits? Anyway, sign extension >> would give garbage for unsigned args, and zero-extension would give >> garbage for negative signed args. > Hardware zero-extends any register touched in the 32bit mode. So they have garbage extension when not touched? Or maybe the kernel extends them. > In fact, please see r217991 for related bug. That seems to be the kernel extending them. I tested on a kernel built on 3 Mar 2012. It is much later than that, and shows nonzero extensions (about half of the wrong cases sign extensions). Bruce From owner-svn-src-head@FreeBSD.ORG Mon May 28 14:33:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EE303106567E; Mon, 28 May 2012 14:33:15 +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 D9D1A8FC19; Mon, 28 May 2012 14:33:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4SEXFeR016599; Mon, 28 May 2012 14:33:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4SEXFxN016597; Mon, 28 May 2012 14:33:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205281433.q4SEXFxN016597@svn.freebsd.org> From: Alexander Motin Date: Mon, 28 May 2012 14:33: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: r236184 - 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, 28 May 2012 14:33:16 -0000 Author: mav Date: Mon May 28 14:33:15 2012 New Revision: 236184 URL: http://svn.freebsd.org/changeset/base/236184 Log: Make legacy ATA to not call device_add_child() with unit number but without driver name. This fixed legacy ATA breakage by r235978. MFC after: 1 week Modified: head/sys/dev/ata/ata-all.c Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Mon May 28 13:58:08 2012 (r236183) +++ head/sys/dev/ata/ata-all.c Mon May 28 14:33:15 2012 (r236184) @@ -887,7 +887,7 @@ ata_add_child(device_t parent, struct at { device_t child; - if ((child = device_add_child(parent, NULL, unit))) { + if ((child = device_add_child(parent, (unit < 0) ? NULL : "ad", unit))) { device_set_softc(child, atadev); device_quiet(child); atadev->dev = child; From owner-svn-src-head@FreeBSD.ORG Mon May 28 14:45:13 2012 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 0AFFF1065674; Mon, 28 May 2012 14:45:12 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D98728FC17; Mon, 28 May 2012 14:45:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4SEjCDe017122; Mon, 28 May 2012 14:45:12 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4SEjCsK017120; Mon, 28 May 2012 14:45:12 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201205281445.q4SEjCsK017120@svn.freebsd.org> From: Gabor Kovesdan Date: Mon, 28 May 2012 14:45: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: r236185 - head/lib/libkiconv 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, 28 May 2012 14:45:13 -0000 Author: gabor Date: Mon May 28 14:45:12 2012 New Revision: 236185 URL: http://svn.freebsd.org/changeset/base/236185 Log: - Include forgotten bsd.own.mk and fix condition Reported by: Jan Beich Modified: head/lib/libkiconv/Makefile Modified: head/lib/libkiconv/Makefile ============================================================================== --- head/lib/libkiconv/Makefile Mon May 28 14:33:15 2012 (r236184) +++ head/lib/libkiconv/Makefile Mon May 28 14:45:12 2012 (r236185) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + LIB= kiconv SHLIBDIR?= /lib SRCS= kiconv_sysctl.c xlat16_iconv.c xlat16_sysctl.c @@ -17,7 +19,7 @@ CFLAGS+= -I${.CURDIR}/../../sys WARNS?= 1 -.if !defined(MK_ICONV) +.if ${MK_ICONV} == "no" CFLAGS+= -DICONV_DLOPEN .endif From owner-svn-src-head@FreeBSD.ORG Mon May 28 16:33:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B1AA91065672; Mon, 28 May 2012 16:33:58 +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 9D20C8FC0C; Mon, 28 May 2012 16:33:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4SGXwd6021818; Mon, 28 May 2012 16:33:58 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4SGXw51021816; Mon, 28 May 2012 16:33:58 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201205281633.q4SGXw51021816@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 28 May 2012 16:33: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: r236188 - head/sys/fs/nandfs 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, 28 May 2012 16:33:58 -0000 Author: marcel Date: Mon May 28 16:33:58 2012 New Revision: 236188 URL: http://svn.freebsd.org/changeset/base/236188 Log: Catch a corner case where ssegs could be 0 and thus i would be 0 and we index suinfo out of bounds (i.e. -1). Approved by: gber Modified: head/sys/fs/nandfs/nandfs_cleaner.c Modified: head/sys/fs/nandfs/nandfs_cleaner.c ============================================================================== --- head/sys/fs/nandfs/nandfs_cleaner.c Mon May 28 15:34:55 2012 (r236187) +++ head/sys/fs/nandfs/nandfs_cleaner.c Mon May 28 16:33:58 2012 (r236188) @@ -310,23 +310,22 @@ retry: nandfs_error("%s:%d", __FILE__, __LINE__); goto out; } - if (ssegs == 0 && *rseg != 0) { *rseg = 0; goto retry; } + if (ssegs > 0) { + print_suinfo(suinfo, ssegs); - print_suinfo(suinfo, ssegs); - - for (i = 0; i < ssegs; i++) { - (**segpp) = suinfo[i].nsi_num; - (*segpp)++; + for (i = 0; i < ssegs; i++) { + (**segpp) = suinfo[i].nsi_num; + (*segpp)++; + } + *rseg = suinfo[i - 1].nsi_num + 1; } - *rseg = suinfo[i - 1].nsi_num + 1; out: free(suinfo, M_NANDFSTEMP); - return (error); } From owner-svn-src-head@FreeBSD.ORG Mon May 28 17:16:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 199C61065741; Mon, 28 May 2012 17:16:28 +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 A4A438FC0A; Mon, 28 May 2012 17:16:27 +0000 (UTC) Received: from dhcp-10-249-130-87.fas.harvard.edu (wrls-249-130-87.wrls-client.fas.harvard.edu [140.247.145.87]) by cyrus.watson.org (Postfix) with ESMTPSA id 3C00346B0C; Mon, 28 May 2012 13:16:27 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: "Robert N. M. Watson" In-Reply-To: <20120528133633.GB2358@deviant.kiev.zoral.com.ua> Date: Mon, 28 May 2012 13:16:27 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <71304742-3635-49C6-BE36-60E4F4A6FC20@freebsd.org> References: <201205252150.q4PLomFk035064@svn.freebsd.org> <20120526173233.A885@besplex.bde.org> <20120526164927.GU2358@deviant.kiev.zoral.com.ua> <20120527043827.W3357@besplex.bde.org> <20120528133633.GB2358@deviant.kiev.zoral.com.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1257) Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Ed Schouten , Bruce Evans , svn-src-head@freebsd.org, jonathan@freebsd.org Subject: Re: svn commit: r236026 - in head/sys: amd64/linux32 compat/freebsd32 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, 28 May 2012 17:16:28 -0000 On 28 May 2012, at 09:36, Konstantin Belousov wrote: > On Sun, May 27, 2012 at 07:49:36AM +1000, Bruce Evans wrote: >> On Sat, 26 May 2012, Konstantin Belousov wrote: >>=20 >>> On Sat, May 26, 2012 at 10:21:25PM +1000, Bruce Evans wrote: >>> The 'low level' AKA magic happens in several *_fetch_syscall_args() >>> functions. For both linux32 and freebsd32, the magic code = automatically >>> zero-extends the arguments into 64bit entities. Linux passes args in >>> registers, while FreeBSD uses words on stack. >>=20 >> Actually, the amd64 linux_fetch32_fetch_syscall_args() just copies = from >> 64-bit registers frame->tf_r* to 64-bit sa->args[*]. I can't see how >> this gives anything except garbage in the top bits. Is there magic = in >> the switch to 64-bit mode that sets the top bits? Anyway, sign = extension >> would give garbage for unsigned args, and zero-extension would give >> garbage for negative signed args. > Hardware zero-extends any register touched in the 32bit mode. >=20 > In fact, please see r217991 for related bug. This may well be true on Intel, but is not true of MIPS -- which we = probably don't care about currently for the purposes of Linux emulation, = but maybe someday we will. On MIPS, 32-bit values are sign-extended = rather than zero-extended. I see a somewhat complex thread here, but am not sure I quite understand = the import for Capsicum. Is the 64-bit rights mask as part of system = call arguments not working properly in compat32 scenarios? Or are there = issues outside of the compat environment? Right now compat32 is not = well-supported with Capsicum, but fixing that is quite important to = productionising Capsicum. Robert= From owner-svn-src-head@FreeBSD.ORG Mon May 28 17:35:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B58C0106564A; Mon, 28 May 2012 17:35:23 +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 A12538FC0A; Mon, 28 May 2012 17:35:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4SHZNPX024457; Mon, 28 May 2012 17:35:23 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4SHZNAe024455; Mon, 28 May 2012 17:35:23 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201205281735.q4SHZNAe024455@svn.freebsd.org> From: Alan Cox Date: Mon, 28 May 2012 17:35: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: r236190 - head/sys/i386/i386 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, 28 May 2012 17:35:23 -0000 Author: alc Date: Mon May 28 17:35:23 2012 New Revision: 236190 URL: http://svn.freebsd.org/changeset/base/236190 Log: Update a comment in get_pv_entry() to reflect the changes to the synchronization of pv_vafree in r236158. Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Mon May 28 16:37:42 2012 (r236189) +++ head/sys/i386/i386/pmap.c Mon May 28 17:35:23 2012 (r236190) @@ -2428,8 +2428,8 @@ retry: } } /* - * Access to the ptelist "pv_vafree" is synchronized by the page - * queues lock. If "pv_vafree" is currently non-empty, it will + * Access to the ptelist "pv_vafree" is synchronized by the pvh + * global lock. If "pv_vafree" is currently non-empty, it will * remain non-empty until pmap_ptelist_alloc() completes. */ if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | From owner-svn-src-head@FreeBSD.ORG Mon May 28 17:58:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 33818106564A; Mon, 28 May 2012 17:58:11 +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 1DE528FC12; Mon, 28 May 2012 17:58:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4SHwAPl025522; Mon, 28 May 2012 17:58:10 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4SHwATZ025519; Mon, 28 May 2012 17:58:10 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201205281758.q4SHwATZ025519@svn.freebsd.org> From: Marius Strobl Date: Mon, 28 May 2012 17:58: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: r236191 - head/sys/arm/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: Mon, 28 May 2012 17:58:11 -0000 Author: marius Date: Mon May 28 17:58:10 2012 New Revision: 236191 URL: http://svn.freebsd.org/changeset/base/236191 Log: - Correct the comments regarding the sizes of some partitions in the DataFlash. - Add a mapping for the Nut/OS configuration DataFlash partition according to the board manual (but not known to either Linux or U-Boot (patches). Modified: head/sys/arm/conf/ETHERNUT5.hints Modified: head/sys/arm/conf/ETHERNUT5.hints ============================================================================== --- head/sys/arm/conf/ETHERNUT5.hints Mon May 28 17:35:23 2012 (r236190) +++ head/sys/arm/conf/ETHERNUT5.hints Mon May 28 17:58:10 2012 (r236191) @@ -27,18 +27,24 @@ hint.map.3.start=0x000c6000 hint.map.3.end=0x00359fff hint.map.3.name="kernel" #hint.map.3.readonly=1 -# nutos 3432 kbytes +# nutos 528 kbytes hint.map.4.at="flash/spi0" hint.map.4.start=0x0035a000 hint.map.4.end=0x003ddfff hint.map.4.name="nutos" hint.map.4.readonly=1 -# env 3960 kbytes +# env 132 kbytes hint.map.5.at="flash/spi0" hint.map.5.start=0x003de000 hint.map.5.end=0x003fefff hint.map.5.name="env" hint.map.5.readonly=1 +# env 132 kbytes +hint.map.6.at="flash/spi0" +hint.map.6.start=0x003ff000 +hint.map.6.end=0x0041ffff +hint.map.6.name="nutoscfg" +hint.map.6.readonly=1 # NXP PCF8563 clock/calendar hint.pcf8563_rtc.0.at="iicbus0" From owner-svn-src-head@FreeBSD.ORG Mon May 28 19:04:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8BE701065676; Mon, 28 May 2012 19:04:03 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 096A18FC12; Mon, 28 May 2012 19:04:02 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id q4SJ3tqg047151; Mon, 28 May 2012 21:03:56 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id q4SJ3t5D047150; Mon, 28 May 2012 21:03:55 +0200 (CEST) (envelope-from marius) Date: Mon, 28 May 2012 21:03:55 +0200 From: Marius Strobl To: Konstantin Belousov Message-ID: <20120528190355.GA42283@alchemy.franken.de> References: <201205270527.q4R5Rm44028055@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201205270527.q4R5Rm44028055@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r236137 - head/contrib/gcc/config/i386 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, 28 May 2012 19:04:03 -0000 On Sun, May 27, 2012 at 05:27:48AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Sun May 27 05:27:47 2012 > New Revision: 236137 > URL: http://svn.freebsd.org/changeset/base/236137 > > Log: > Enable gnu hash generation for dynamic ELF binaries on x86. > As far as I remember from your commit adding GNU hash support to rtld(1), there's nothing left to be done for the other architectures apart from testing, correct? Marius From owner-svn-src-head@FreeBSD.ORG Mon May 28 19:22:24 2012 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 350A3106564A; Mon, 28 May 2012 19:22:24 +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 1FC8B8FC0A; Mon, 28 May 2012 19:22:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4SJMNta029100; Mon, 28 May 2012 19:22:23 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4SJMNWF029098; Mon, 28 May 2012 19:22:23 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201205281922.q4SJMNWF029098@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 28 May 2012 19:22: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: r236193 - head/lib/libfetch 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, 28 May 2012 19:22:24 -0000 Author: jilles Date: Mon May 28 19:22:23 2012 New Revision: 236193 URL: http://svn.freebsd.org/changeset/base/236193 Log: libfetch: Avoid SIGPIPE on network connections. To avoid unexpected process termination from SIGPIPE when writing to a closed network connection, enable SO_NOSIGPIPE on all network connections. The POSIX standard MSG_NOSIGNAL is not used since it requires modifying all send calls to add this flag. This is particularly nasty for SSL connections. Reviewed by: des Tested by: bapt MFC after: 5 days Modified: head/lib/libfetch/common.c Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Mon May 28 19:13:21 2012 (r236192) +++ head/lib/libfetch/common.c Mon May 28 19:22:23 2012 (r236193) @@ -209,11 +209,13 @@ conn_t * fetch_reopen(int sd) { conn_t *conn; + int opt = 1; /* allocate and fill connection structure */ if ((conn = calloc(1, sizeof(*conn))) == NULL) return (NULL); fcntl(sd, F_SETFD, FD_CLOEXEC); + setsockopt(sd, SOL_SOCKET, SO_NOSIGPIPE, &opt, sizeof opt); conn->sd = sd; ++conn->ref; return (conn); From owner-svn-src-head@FreeBSD.ORG Mon May 28 19:33:56 2012 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 89881106566C; Mon, 28 May 2012 19:33:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) 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 43E818FC12; Mon, 28 May 2012 19:33:56 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:4c1c:92fb:538c:83ed] (unknown [IPv6:2001:7b8:3a7:0:4c1c:92fb:538c:83ed]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 748635C59; Mon, 28 May 2012 21:33:55 +0200 (CEST) Message-ID: <4FC3D320.1070709@FreeBSD.org> Date: Mon, 28 May 2012 21:33:52 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120522 Thunderbird/13.0 MIME-Version: 1.0 To: Roman Divacky References: <201205270527.q4R5Rm44028055@svn.freebsd.org> <20120527203100.GA22921@freebsd.org> In-Reply-To: <20120527203100.GA22921@freebsd.org> X-Enigmail-Version: 1.5a1pre 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, Konstantin Belousov Subject: Re: svn commit: r236137 - head/contrib/gcc/config/i386 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, 28 May 2012 19:33:56 -0000 On 2012-05-27 22:31, Roman Divacky wrote: > Fwiw, to enable the same thing in clang you want this simple patch: > > =================================================================== > --- Tools.cpp (revision 157545) > +++ Tools.cpp (working copy) > @@ -4794,6 +4794,7 @@ > if (Args.hasArg(options::OPT_static)) { > CmdArgs.push_back("-Bstatic"); > } else { > + CmdArgs.push_back("--hash-style=both"); > if (Args.hasArg(options::OPT_rdynamic)) > CmdArgs.push_back("-export-dynamic"); > CmdArgs.push_back("--eh-frame-hdr"); > > > > I cant commit this upstream as this option doesn't work with ld 2.15. What > should be done here? Commit this to local FreeBSD version? Commit it upstream > making it not work with old ld? Leave it out completely? I think this can be committed locally in our version, especially if it is better for performance. We already have a few local modifications, this one isn't very shocking. :) For upstream, you should really add a configure check for gnu hash support in ld, and then surround the above addition with conditionals, e.g. #ifdef HAVE_LINK_GNU_HASH or something. On the other hand, it's really platform-dependent: I've checked several Linux distributions, and it is fairly unpredictable whether their gcc passes --hash-style to the linker, or if they do, which option they use. For example, Debian stable uses --hash-style=both, while Ubuntu 12.04 uses --hash-style=gnu. So the correct mechanism for this is tricky. It should be discussed on the clang mailing list, not here. Lastly, my personal preference would be to adjust these defaults in the linker itself, depending on platform, but apparently nobody does that... From owner-svn-src-head@FreeBSD.ORG Mon May 28 19:38:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B6CDC106566C for ; Mon, 28 May 2012 19:38:52 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 322A78FC0C for ; Mon, 28 May 2012 19:38:52 +0000 (UTC) Received: by wgbds11 with SMTP id ds11so3198869wgb.31 for ; Mon, 28 May 2012 12:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=GServpy62pdzu38rWq945gH0YTjlkwIannEor/ok1fI=; b=MDIA69y0PZ25d5/08M0d2psI/BTYU0JrUO/nwHrB97tFwLmWB2sEA2h0mLDHttTV8P 0roPdw4pXdQhNMnuIkkRka3imFr38nT38lmUc4I2zc/SmLeuSD/C33WPgROBYv+6WUoJ N4dsZFEQNLyFYVq5KXju6HOYaCOLkC95kaCT4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=GServpy62pdzu38rWq945gH0YTjlkwIannEor/ok1fI=; b=HfJ0uznTidU8JOljyGDWbE8Jd6dZmYrd7CINeNHWo4M4MTc/pOlQ2yoLDrfdch7g0P dAcOzkffx3+uBJTr3YNClPCohSxWusFHK0Syj3nc0D41SERJc4d0FevX/xtrIhTVAA9z MxN7b8xO8ew9HO4NfJmF7ce/obUuNDviuB1sDUMyx9mNbtUxncULW3DfqBkTpgBYXqeI s2wIpGDYANI1vtMO/rJiA2RPnGtYMqbt0AG23Kxk7pPTTmKfwWFR14iWwz51Zo6yO5Ic TU1rhodKAm95f+WDcRAPGkNJmc0kLqQsUrpn844eNp9fAxnmtC6uaUvn90H5eVtPuVt4 k+aw== Received: by 10.216.212.157 with SMTP id y29mr5681443weo.146.1338233930125; Mon, 28 May 2012 12:38:50 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.223.85.202 with HTTP; Mon, 28 May 2012 12:38:19 -0700 (PDT) In-Reply-To: <20120525103202.GR2358@deviant.kiev.zoral.com.ua> References: <201205232107.q4NL71dw095460@svn.freebsd.org> <4FBD5899.9000808@daemonic.se> <20120524092649.GH2358@deviant.kiev.zoral.com.ua> <4FBE0086.1050801@daemonic.se> <4FBF438C.5080805@daemonic.se> <20120525103202.GR2358@deviant.kiev.zoral.com.ua> From: Eitan Adler Date: Mon, 28 May 2012 12:38:19 -0700 X-Google-Sender-Auth: 7vZ13COU9aCCUU4j2vUIAyscGIo Message-ID: To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQlbraRGipLc0ZTgjzadm3Rw9jW4XmY1nGhAMuRnDQUtarRJESnNx/oSjrWvH2oWIdRMGN3w Cc: Niclas Zeising , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235859 - in head/sys: i386/conf modules 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, 28 May 2012 19:38:52 -0000 On 25 May 2012 03:32, Konstantin Belousov wrote: > On Fri, May 25, 2012 at 10:32:12AM +0200, Niclas Zeising wrote: >> Hi! >> Would it be possible to bump the FreeBSD version to reflect this commit? >> =C2=A0It would be helpful when working with the xorg ports, amongst othe= r things. >> Thanks! >> Regards! >> -- > There is absolutely no use for version bump. Port builds (libdrm, mesa > and ddx) do not depend on any base system headers or libraries. They > come with private copies of the ABI headers. there is a use. the ports can check to see if they are being built/installed on the right version of FreeBSD. Having a check that says if OSVERSION < x IGNORE=3D upgrade endif is helpful --=20 Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-head@FreeBSD.ORG Mon May 28 19:47:57 2012 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 7AEAE106566C; Mon, 28 May 2012 19:47:57 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61D9D8FC0C; Mon, 28 May 2012 19:47:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4SJlvcY030250; Mon, 28 May 2012 19:47:57 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4SJluwi030228; Mon, 28 May 2012 19:47:56 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201205281947.q4SJluwi030228@svn.freebsd.org> From: Doug Barton Date: Mon, 28 May 2012 19:47:56 +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: r236196 - in head: contrib/bind9 contrib/bind9/bin/named contrib/bind9/bin/named/unix contrib/bind9/lib/bind9 contrib/bind9/lib/dns contrib/bind9/lib/dns/include/dns contrib/bind9/lib/d... 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, 28 May 2012 19:47:57 -0000 Author: dougb Date: Mon May 28 19:47:56 2012 New Revision: 236196 URL: http://svn.freebsd.org/changeset/base/236196 Log: Upgrade to BIND version 9.8.3, the latest from ISC. Feature Change * BIND now recognizes the TLSA resource record type, created to support IETF DANE (DNS-based Authentication of Named Entities) Bug Fix * The locking strategy around the handling of iterative queries has been tuned to reduce unnecessary contention in a multi- threaded environment. Other critical bug fixes are included. All BIND users are encouraged to upgrade. Added: head/contrib/bind9/lib/dns/rdata/generic/tlsa_52.c - copied unchanged from r236173, vendor/bind9/dist/lib/dns/rdata/generic/tlsa_52.c head/contrib/bind9/lib/dns/rdata/generic/tlsa_52.h - copied unchanged from r236173, vendor/bind9/dist/lib/dns/rdata/generic/tlsa_52.h Modified: head/contrib/bind9/CHANGES head/contrib/bind9/README head/contrib/bind9/bin/named/builtin.c head/contrib/bind9/bin/named/query.c head/contrib/bind9/bin/named/server.c head/contrib/bind9/bin/named/unix/dlz_dlopen_driver.c head/contrib/bind9/lib/bind9/api head/contrib/bind9/lib/bind9/check.c head/contrib/bind9/lib/dns/api head/contrib/bind9/lib/dns/dnssec.c head/contrib/bind9/lib/dns/include/dns/ecdb.h head/contrib/bind9/lib/dns/include/dns/rpz.h head/contrib/bind9/lib/dns/include/dns/sdb.h head/contrib/bind9/lib/dns/include/dns/stats.h head/contrib/bind9/lib/dns/include/dns/tsec.h head/contrib/bind9/lib/dns/include/dns/view.h head/contrib/bind9/lib/dns/rbtdb.c head/contrib/bind9/lib/dns/resolver.c head/contrib/bind9/lib/dns/sdb.c head/contrib/bind9/lib/dns/tkey.c head/contrib/bind9/lib/dns/zone.c head/contrib/bind9/lib/isc/pthreads/mutex.c head/contrib/bind9/lib/isccfg/api head/contrib/bind9/lib/isccfg/parser.c head/contrib/bind9/version head/lib/bind/dns/code.h head/lib/bind/dns/dns/enumtype.h head/lib/bind/dns/dns/rdatastruct.h Directory Properties: head/contrib/bind9/ (props changed) Modified: head/contrib/bind9/CHANGES ============================================================================== --- head/contrib/bind9/CHANGES Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/CHANGES Mon May 28 19:47:56 2012 (r236196) @@ -1,3 +1,56 @@ + --- 9.8.3 released --- + +3318. [tuning] Reduce the amount of work performed while holding a + bucket lock when finshed with a fetch context. + [RT #29239] + +3314. [bug] The masters list could be updated while refesh_callback + and stub_callback were using it. [RT #26732] + +3313. [protocol] Add TLSA record type. [RT #28989] + +3312. [bug] named-checkconf didn't detect a bad dns64 clients acl. + [RT #27631] + +3311. [bug] Abort the zone dump if zone->db is NULL in + zone.c:zone_gotwritehandle. [RT #29028] + +3310. [test] Increase table size for mutex profiling. [RT #28809] + +3309. [bug] resolver.c:fctx_finddone() was not threadsafe. + [RT #27995] + +3307. [bug] Add missing ISC_LANG_BEGINDECLS and ISC_LANG_ENDDECLS. + [RT #28956] + +3306. [bug] Improve DNS64 reverse zone performance. [RT #28563] + +3305. [func] Add wire format lookup method to sdb. [RT #28563] + +3304. [bug] Use hmctx, not mctx when freeing rbtdb->heaps. + [RT #28571] + +3302. [bug] dns_dnssec_findmatchingkeys could fail to find + keys if the zone name contained character that + required special mappings. [RT #28600] + +3301. [contrib] Update queryperf to build on darwin. Add -R flag + for non-recursive queries. [RT #28565] + +3300. [bug] Named could die if gssapi was enabled in named.conf + but was not compiled in. [RT #28338] + +3299. [bug] Make SDB handle errors from database drivers better. + [RT #28534] + +3232. [bug] Zero zone->curmaster before return in + dns_zone_setmasterswithkeys(). [RT #26732] + +3183. [bug] Added RTLD_GLOBAL flag to dlopen call. [RT #26301] + +3197. [bug] Don't try to log the filename and line number when + the config parser can't open a file. [RT #22263] + --- 9.8.2 released --- 3298. [bug] Named could dereference a NULL pointer in @@ -58,9 +111,9 @@ 3274. [bug] Log when a zone is not reusable. Only set loadtime on successful loads. [RT #27650] -3273. [bug] AAAA responses could be returned in the additional - section even when filter-aaaa-on-v4 was in use. - [RT #27292] +3273. [bug] AAAA responses could be returned in the additional + section even when filter-aaaa-on-v4 was in use. + [RT #27292] 3271. [port] darwin: mksymtbl is not always stable, loop several times before giving up. mksymtbl was using non Modified: head/contrib/bind9/README ============================================================================== --- head/contrib/bind9/README Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/README Mon May 28 19:47:56 2012 (r236196) @@ -51,6 +51,10 @@ BIND 9 For up-to-date release notes and errata, see http://www.isc.org/software/bind9/releasenotes +BIND 9.8.3 + + BIND 9.8.3 is a maintenance release. + BIND 9.8.2 BIND 9.8.2 includes a number of bug fixes and prevents a security Modified: head/contrib/bind9/bin/named/builtin.c ============================================================================== --- head/contrib/bind9/bin/named/builtin.c Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/bin/named/builtin.c Mon May 28 19:47:56 2012 (r236196) @@ -69,35 +69,79 @@ static builtin_t empty_builtin = { do_em static builtin_t dns64_builtin = { do_dns64_lookup, NULL, NULL }; static dns_sdbimplementation_t *builtin_impl; +static dns_sdbimplementation_t *dns64_impl; -static const char hex[] = "0123456789abcdef"; -static const char HEX[] = "0123456789ABCDEF"; +/* + * Pre computed HEX * 16 or 1 table. + */ +static const unsigned char hex16[256] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*00*/ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*10*/ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*20*/ + 0, 16, 32, 48, 64, 80, 96,112,128,144, 1, 1, 1, 1, 1, 1, /*30*/ + 1,160,176,192,208,224,240, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*40*/ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*50*/ + 1,160,176,192,208,224,240, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*60*/ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*70*/ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*80*/ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*90*/ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*A0*/ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*B0*/ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*C0*/ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*D0*/ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*E0*/ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 /*F0*/ +}; + +const unsigned char decimal[] = "0123456789"; + +static size_t +dns64_rdata(unsigned char *v, size_t start, unsigned char *rdata) { + size_t i, j = 0; + + for (i = 0; i < 4; i++) { + unsigned char c = v[start++]; + if (start == 7) + start++; + if (c > 99) { + rdata[j++] = 3; + rdata[j++] = decimal[c/100]; c = c % 100; + rdata[j++] = decimal[c/10]; c = c % 10; + rdata[j++] = decimal[c]; + } else if (c > 9) { + rdata[j++] = 2; + rdata[j++] = decimal[c/10]; c = c % 10; + rdata[j++] = decimal[c]; + } else { + rdata[j++] = 1; + rdata[j++] = decimal[c]; + } + } + memcpy(&rdata[j], "\07in-addr\04arpa", 14); + return (j + 14); +} static isc_result_t -dns64_cname(const char *zone, const char *name, dns_sdblookup_t *lookup) { - size_t zlen, nlen, j; - const char *s; - unsigned char v[16]; +dns64_cname(const dns_name_t *zone, const dns_name_t *name, + dns_sdblookup_t *lookup) +{ + size_t zlen, nlen, j, len; + unsigned char v[16], n; unsigned int i; - char reverse[sizeof("123.123.123.123.in-addr.arpa.")]; + unsigned char rdata[sizeof("123.123.123.123.in-addr.arpa.")]; + unsigned char *ndata; /* - * The sum the length of the relative name and the length of the zone - * name for a IPv6 reverse lookup comes to 71. - * - * The reverse of 2001::10.0.0.1 (dns64 2001::/96) has a zone of - * "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.2.ip6.arpa" - * and a name of "1.0.0.0.0.0.a.0". The sum of the lengths of these - * two strings is 71. + * The combined length of the zone and name is 74. * - * The minimum length for a ip6.arpa zone name is 8. + * The minimum zone length is 10 ((3)ip6(4)arpa(0)). * - * The length of name should always be odd as we are expecting + * The length of name should always be even as we are expecting * a series of nibbles. */ - zlen = strlen(zone); - nlen = strlen(name); - if ((zlen + nlen) > 71U || zlen < 8U || (nlen % 2) != 1U) + zlen = zone->length; + nlen = name->length; + if ((zlen + nlen) > 74U || zlen < 10U || (nlen % 2) != 0U) return (ISC_R_NOTFOUND); /* @@ -116,25 +160,20 @@ dns64_cname(const char *zone, const char * are byte aligned and we correctly return ISC_R_NOTFOUND or * ISC_R_SUCCESS. We will not generate a CNAME in this case. */ - i = (nlen % 4) == 1U ? 1 : 0; + ndata = name->ndata; + i = (nlen % 4) == 2U ? 1 : 0; j = nlen; memset(v, 0, sizeof(v)); - while (j >= 1U) { + while (j != 0) { INSIST((i/2) < sizeof(v)); - if (j > 1U && name[1] != '.') + if (ndata[0] != 1) return (ISC_R_NOTFOUND); - v[i/2] >>= 4; - if ((s = strchr(hex, name[0])) != NULL) - v[i/2] |= (s - hex) << 4; - else if ((s = strchr(HEX, name[0])) != NULL) - v[i/2] |= (s - HEX) << 4; - else + n = hex16[ndata[1]&0xff]; + if (n == 1) return (ISC_R_NOTFOUND); - if (j > 1U) - j -= 2; - else - j -= 1; - name += 2; + v[i/2] = n | (v[i/2]>>4); + j -= 2; + ndata += 2; i++; } @@ -144,90 +183,91 @@ dns64_cname(const char *zone, const char * it corresponds to a empty node in the zone or there should be * a CNAME. */ +#define ZLEN(x) (10 + (x)/2) switch (zlen) { - case 24: /* prefix len 32 */ + case ZLEN(32): /* prefix len 32 */ + /* + * The nibbles that map to this byte must be zero for 'name' + * to exist in the zone. + */ + if (nlen > 16U && v[(nlen-1)/4 - 4] != 0) + return (ISC_R_NOTFOUND); /* - * If the total length is not 71 then this is a empty node + * If the total length is not 74 then this is a empty node * so return success. */ - if (nlen + zlen != 71U) + if (nlen + zlen != 74U) return (ISC_R_SUCCESS); - snprintf(reverse, sizeof(reverse), "%u.%u.%u.%u.in-addr.arpa.", - v[8], v[9], v[10], v[11]); + len = dns64_rdata(v, 8, rdata); break; - case 28: /* prefix len 40 */ + case ZLEN(40): /* prefix len 40 */ /* * The nibbles that map to this byte must be zero for 'name' * to exist in the zone. */ - if (nlen > 11U && v[nlen/4 - 3] != 0) + if (nlen > 12U && v[(nlen-1)/4 - 3] != 0) return (ISC_R_NOTFOUND); /* - * If the total length is not 71 then this is a empty node + * If the total length is not 74 then this is a empty node * so return success. */ - if (nlen + zlen != 71U) + if (nlen + zlen != 74U) return (ISC_R_SUCCESS); - snprintf(reverse, sizeof(reverse), "%u.%u.%u.%u.in-addr.arpa.", - v[6], v[8], v[9], v[10]); + len = dns64_rdata(v, 6, rdata); break; - case 32: /* prefix len 48 */ + case ZLEN(48): /* prefix len 48 */ /* * The nibbles that map to this byte must be zero for 'name' * to exist in the zone. */ - if (nlen > 7U && v[nlen/4 - 2] != 0) + if (nlen > 8U && v[(nlen-1)/4 - 2] != 0) return (ISC_R_NOTFOUND); /* - * If the total length is not 71 then this is a empty node + * If the total length is not 74 then this is a empty node * so return success. */ - if (nlen + zlen != 71U) + if (nlen + zlen != 74U) return (ISC_R_SUCCESS); - snprintf(reverse, sizeof(reverse), "%u.%u.%u.%u.in-addr.arpa.", - v[5], v[6], v[8], v[9]); + len = dns64_rdata(v, 5, rdata); break; - case 36: /* prefix len 56 */ + case ZLEN(56): /* prefix len 56 */ /* * The nibbles that map to this byte must be zero for 'name' * to exist in the zone. */ - if (nlen > 3U && v[nlen/4 - 1] != 0) + if (nlen > 4U && v[(nlen-1)/4 - 1] != 0) return (ISC_R_NOTFOUND); /* - * If the total length is not 71 then this is a empty node + * If the total length is not 74 then this is a empty node * so return success. */ - if (nlen + zlen != 71U) + if (nlen + zlen != 74U) return (ISC_R_SUCCESS); - snprintf(reverse, sizeof(reverse), "%u.%u.%u.%u.in-addr.arpa.", - v[4], v[5], v[6], v[8]); + len = dns64_rdata(v, 4, rdata); break; - case 40: /* prefix len 64 */ + case ZLEN(64): /* prefix len 64 */ /* * The nibbles that map to this byte must be zero for 'name' * to exist in the zone. */ - if (v[nlen/4] != 0) + if (v[(nlen-1)/4] != 0) return (ISC_R_NOTFOUND); /* - * If the total length is not 71 then this is a empty node + * If the total length is not 74 then this is a empty node * so return success. */ - if (nlen + zlen != 71U) + if (nlen + zlen != 74U) return (ISC_R_SUCCESS); - snprintf(reverse, sizeof(reverse), "%u.%u.%u.%u.in-addr.arpa.", - v[3], v[4], v[5], v[6]); + len = dns64_rdata(v, 3, rdata); break; - case 56: /* prefix len 96 */ + case ZLEN(96): /* prefix len 96 */ /* - * If the total length is not 71 then this is a empty node + * If the total length is not 74 then this is a empty node * so return success. */ - if (nlen + zlen != 71U) + if (nlen + zlen != 74U) return (ISC_R_SUCCESS); - snprintf(reverse, sizeof(reverse), "%u.%u.%u.%u.in-addr.arpa.", - v[0], v[1], v[2], v[3]); + len = dns64_rdata(v, 0, rdata); break; default: /* @@ -236,7 +276,7 @@ dns64_cname(const char *zone, const char */ return (ISC_R_NOTFOUND); } - return (dns_sdb_putrr(lookup, "CNAME", 600, reverse)); + return (dns_sdb_putrdata(lookup, dns_rdatatype_cname, 600, rdata, len)); } static isc_result_t @@ -249,13 +289,23 @@ builtin_lookup(const char *zone, const c if (strcmp(name, "@") == 0) return (b->do_lookup(lookup)); - else if (b->do_lookup == do_dns64_lookup) - return (dns64_cname(zone, name, lookup)); else return (ISC_R_NOTFOUND); } static isc_result_t +dns64_lookup(const dns_name_t *zone, const dns_name_t *name, void *dbdata, + dns_sdblookup_t *lookup) +{ + builtin_t *b = (builtin_t *) dbdata; + + if (name->labels == 0 && name->length == 0) + return (b->do_lookup(lookup)); + else + return (dns64_cname(zone, name, lookup)); +} + +static isc_result_t put_txt(dns_sdblookup_t *lookup, const char *text) { unsigned char buf[256]; unsigned int len = strlen(text); @@ -481,7 +531,17 @@ static dns_sdbmethods_t builtin_methods builtin_authority, NULL, /* allnodes */ builtin_create, - builtin_destroy + builtin_destroy, + NULL +}; + +static dns_sdbmethods_t dns64_methods = { + NULL, + builtin_authority, + NULL, /* allnodes */ + builtin_create, + builtin_destroy, + dns64_lookup, }; isc_result_t @@ -491,11 +551,17 @@ ns_builtin_init(void) { DNS_SDBFLAG_RELATIVERDATA, ns_g_mctx, &builtin_impl) == ISC_R_SUCCESS); + RUNTIME_CHECK(dns_sdb_register("_dns64", &dns64_methods, NULL, + DNS_SDBFLAG_RELATIVEOWNER | + DNS_SDBFLAG_RELATIVERDATA | + DNS_SDBFLAG_DNS64, + ns_g_mctx, &dns64_impl) + == ISC_R_SUCCESS); return (ISC_R_SUCCESS); } void ns_builtin_deinit(void) { dns_sdb_unregister(&builtin_impl); + dns_sdb_unregister(&dns64_impl); } - Modified: head/contrib/bind9/bin/named/query.c ============================================================================== --- head/contrib/bind9/bin/named/query.c Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/bin/named/query.c Mon May 28 19:47:56 2012 (r236196) @@ -3354,6 +3354,11 @@ query_addwildcardproof(ns_client_t *clie dns_name_copy(name, cname, NULL); while (result == DNS_R_NXDOMAIN) { labels = dns_name_countlabels(cname) - 1; + /* + * Sanity check. + */ + if (labels == 0U) + goto cleanup; dns_name_split(cname, labels, NULL, cname); result = dns_db_find(db, cname, version, dns_rdatatype_nsec, Modified: head/contrib/bind9/bin/named/server.c ============================================================================== --- head/contrib/bind9/bin/named/server.c Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/bin/named/server.c Mon May 28 19:47:56 2012 (r236196) @@ -1358,7 +1358,7 @@ dns64_reverse(dns_view_t *view, isc_mem_ { char *cp; char reverse[48+sizeof("ip6.arpa.")]; - const char *dns64_dbtype[4] = { "_builtin", "dns64", ".", "." }; + const char *dns64_dbtype[4] = { "_dns64", "dns64", ".", "." }; const char *sep = ": view "; const char *viewname = view->name; const unsigned char *s6; Modified: head/contrib/bind9/bin/named/unix/dlz_dlopen_driver.c ============================================================================== --- head/contrib/bind9/bin/named/unix/dlz_dlopen_driver.c Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/bin/named/unix/dlz_dlopen_driver.c Mon May 28 19:47:56 2012 (r236196) @@ -250,7 +250,7 @@ dlopen_dlz_create(const char *dlzname, u isc_mutex_init(&cd->lock); /* Open the library */ - dlopen_flags = RTLD_NOW; + dlopen_flags = RTLD_NOW|RTLD_GLOBAL; #ifdef RTLD_DEEPBIND /* Modified: head/contrib/bind9/lib/bind9/api ============================================================================== --- head/contrib/bind9/lib/bind9/api Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/lib/bind9/api Mon May 28 19:47:56 2012 (r236196) @@ -4,5 +4,5 @@ # 9.8: 80-89 # 9.9: 90-109 LIBINTERFACE = 80 -LIBREVISION = 4 +LIBREVISION = 5 LIBAGE = 0 Modified: head/contrib/bind9/lib/bind9/check.c ============================================================================== --- head/contrib/bind9/lib/bind9/check.c Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/lib/bind9/check.c Mon May 28 19:47:56 2012 (r236196) @@ -434,7 +434,7 @@ check_dns64(cfg_aclconfctx_t *actx, cons int nbytes; int i; - static const char *acls[] = { "client", "exclude", "mapped", NULL}; + static const char *acls[] = { "clients", "exclude", "mapped", NULL}; if (voptions != NULL) cfg_map_get(voptions, "dns64", &dns64); Modified: head/contrib/bind9/lib/dns/api ============================================================================== --- head/contrib/bind9/lib/dns/api Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/lib/dns/api Mon May 28 19:47:56 2012 (r236196) @@ -4,5 +4,5 @@ # 9.8: 80-89 # 9.9: 90-109 LIBINTERFACE = 87 -LIBREVISION = 0 +LIBREVISION = 1 LIBAGE = 6 Modified: head/contrib/bind9/lib/dns/dnssec.c ============================================================================== --- head/contrib/bind9/lib/dns/dnssec.c Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/lib/dns/dnssec.c Mon May 28 19:47:56 2012 (r236196) @@ -1246,7 +1246,7 @@ dns_dnssec_findmatchingkeys(dns_name_t * isc_dir_init(&dir); isc_buffer_init(&b, namebuf, sizeof(namebuf) - 1); - RETERR(dns_name_totext(origin, ISC_FALSE, &b)); + RETERR(dns_name_tofilenametext(origin, ISC_FALSE, &b)); len = isc_buffer_usedlength(&b); namebuf[len] = '\0'; Modified: head/contrib/bind9/lib/dns/include/dns/ecdb.h ============================================================================== --- head/contrib/bind9/lib/dns/include/dns/ecdb.h Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/lib/dns/include/dns/ecdb.h Mon May 28 19:47:56 2012 (r236196) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC") * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -39,6 +39,8 @@ *** Functions ***/ +ISC_LANG_BEGINDECLS + /* TBD: describe those */ isc_result_t Modified: head/contrib/bind9/lib/dns/include/dns/rpz.h ============================================================================== --- head/contrib/bind9/lib/dns/include/dns/rpz.h Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/lib/dns/include/dns/rpz.h Mon May 28 19:47:56 2012 (r236196) @@ -194,5 +194,7 @@ dns_rpz_cidr_find(dns_rpz_cidr_t *cidr, dns_rpz_policy_t dns_rpz_decode_cname(dns_rdataset_t *, dns_name_t *selfname); +ISC_LANG_ENDDECLS + #endif /* DNS_RPZ_H */ Modified: head/contrib/bind9/lib/dns/include/dns/sdb.h ============================================================================== --- head/contrib/bind9/lib/dns/include/dns/sdb.h Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/lib/dns/include/dns/sdb.h Mon May 28 19:47:56 2012 (r236196) @@ -59,6 +59,9 @@ typedef struct dns_sdballnodes dns_sdbal typedef isc_result_t (*dns_sdblookupfunc_t)(const char *zone, const char *name, void *dbdata, dns_sdblookup_t *); +typedef isc_result_t +(*dns_sdblookup2func_t)(const dns_name_t *zone, const dns_name_t *name, + void *dbdata, dns_sdblookup_t *lookup); typedef isc_result_t (*dns_sdbauthorityfunc_t)(const char *zone, void *dbdata, dns_sdblookup_t *); @@ -81,6 +84,7 @@ typedef struct dns_sdbmethods { dns_sdballnodesfunc_t allnodes; dns_sdbcreatefunc_t create; dns_sdbdestroyfunc_t destroy; + dns_sdblookup2func_t lookup2; } dns_sdbmethods_t; /*** @@ -92,6 +96,7 @@ ISC_LANG_BEGINDECLS #define DNS_SDBFLAG_RELATIVEOWNER 0x00000001U #define DNS_SDBFLAG_RELATIVERDATA 0x00000002U #define DNS_SDBFLAG_THREADSAFE 0x00000004U +#define DNS_SDBFLAG_DNS64 0x00000008U isc_result_t dns_sdb_register(const char *drivername, const dns_sdbmethods_t *methods, Modified: head/contrib/bind9/lib/dns/include/dns/stats.h ============================================================================== --- head/contrib/bind9/lib/dns/include/dns/stats.h Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/lib/dns/include/dns/stats.h Mon May 28 19:47:56 2012 (r236196) @@ -147,6 +147,8 @@ typedef void (*dns_rdatatypestats_dumper void *); typedef void (*dns_opcodestats_dumper_t)(dns_opcode_t, isc_uint64_t, void *); +ISC_LANG_BEGINDECLS + isc_result_t dns_generalstats_create(isc_mem_t *mctx, dns_stats_t **statsp, int ncounters); /*%< Modified: head/contrib/bind9/lib/dns/include/dns/tsec.h ============================================================================== --- head/contrib/bind9/lib/dns/include/dns/tsec.h Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/lib/dns/include/dns/tsec.h Mon May 28 19:47:56 2012 (r236196) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009, 2010 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2009, 2010, 2012 Internet Systems Consortium, Inc. ("ISC") * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -132,4 +132,6 @@ dns_tsec_getkey(dns_tsec_t *tsec, void * *\li *tsecp points to a valid key structure depending on the TSEC type. */ +ISC_LANG_ENDDECLS + #endif /* DNS_TSEC_H */ Modified: head/contrib/bind9/lib/dns/include/dns/view.h ============================================================================== --- head/contrib/bind9/lib/dns/include/dns/view.h Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/lib/dns/include/dns/view.h Mon May 28 19:47:56 2012 (r236196) @@ -1075,4 +1075,6 @@ dns_view_setnewzones(dns_view_t *view, i void dns_view_restorekeyring(dns_view_t *view); +ISC_LANG_ENDDECLS + #endif /* DNS_VIEW_H */ Modified: head/contrib/bind9/lib/dns/rbtdb.c ============================================================================== --- head/contrib/bind9/lib/dns/rbtdb.c Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/lib/dns/rbtdb.c Mon May 28 19:47:56 2012 (r236196) @@ -7814,7 +7814,7 @@ dns_rbtdb_create for (i = 0 ; i < (int)rbtdb->node_lock_count ; i++) if (rbtdb->heaps[i] != NULL) isc_heap_destroy(&rbtdb->heaps[i]); - isc_mem_put(mctx, rbtdb->heaps, + isc_mem_put(hmctx, rbtdb->heaps, rbtdb->node_lock_count * sizeof(isc_heap_t *)); } Copied: head/contrib/bind9/lib/dns/rdata/generic/tlsa_52.c (from r236173, vendor/bind9/dist/lib/dns/rdata/generic/tlsa_52.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bind9/lib/dns/rdata/generic/tlsa_52.c Mon May 28 19:47:56 2012 (r236196, copy of r236173, vendor/bind9/dist/lib/dns/rdata/generic/tlsa_52.c) @@ -0,0 +1,290 @@ +/* + * Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC") + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/* $Id$ */ + +/* draft-ietf-dane-protocol-19.txt */ + +#ifndef RDATA_GENERIC_TLSA_52_C +#define RDATA_GENERIC_TLSA_52_C + +#define RRTYPE_TLSA_ATTRIBUTES 0 + +static inline isc_result_t +fromtext_tlsa(ARGS_FROMTEXT) { + isc_token_t token; + + REQUIRE(type == 52); + + UNUSED(type); + UNUSED(rdclass); + UNUSED(origin); + UNUSED(options); + UNUSED(callbacks); + + /* + * Certificate Usage. + */ + RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, + ISC_FALSE)); + if (token.value.as_ulong > 0xffU) + RETTOK(ISC_R_RANGE); + RETERR(uint8_tobuffer(token.value.as_ulong, target)); + + /* + * Selector. + */ + RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, + ISC_FALSE)); + if (token.value.as_ulong > 0xffU) + RETTOK(ISC_R_RANGE); + RETERR(uint8_tobuffer(token.value.as_ulong, target)); + + /* + * Matching type. + */ + RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, + ISC_FALSE)); + if (token.value.as_ulong > 0xffU) + RETTOK(ISC_R_RANGE); + RETERR(uint8_tobuffer(token.value.as_ulong, target)); + + /* + * Certificate Association Data. + */ + return (isc_hex_tobuffer(lexer, target, -1)); +} + +static inline isc_result_t +totext_tlsa(ARGS_TOTEXT) { + isc_region_t sr; + char buf[sizeof("64000 ")]; + unsigned int n; + + REQUIRE(rdata->type == 52); + REQUIRE(rdata->length != 0); + + UNUSED(tctx); + + dns_rdata_toregion(rdata, &sr); + + /* + * Certificate Usage. + */ + n = uint8_fromregion(&sr); + isc_region_consume(&sr, 1); + sprintf(buf, "%u ", n); + RETERR(str_totext(buf, target)); + + /* + * Selector. + */ + n = uint8_fromregion(&sr); + isc_region_consume(&sr, 1); + sprintf(buf, "%u ", n); + RETERR(str_totext(buf, target)); + + /* + * Matching type. + */ + n = uint8_fromregion(&sr); + isc_region_consume(&sr, 1); + sprintf(buf, "%u", n); + RETERR(str_totext(buf, target)); + + /* + * Certificate Association Data. + */ + if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) + RETERR(str_totext(" (", target)); + RETERR(str_totext(tctx->linebreak, target)); + if (tctx->width == 0) /* No splitting */ + RETERR(isc_hex_totext(&sr, 0, "", target)); + else + RETERR(isc_hex_totext(&sr, tctx->width - 2, + tctx->linebreak, target)); + if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) + RETERR(str_totext(" )", target)); + return (ISC_R_SUCCESS); +} + +static inline isc_result_t +fromwire_tlsa(ARGS_FROMWIRE) { + isc_region_t sr; + + REQUIRE(type == 52); + + UNUSED(type); + UNUSED(rdclass); + UNUSED(dctx); + UNUSED(options); + + isc_buffer_activeregion(source, &sr); + + if (sr.length < 3) + return (ISC_R_UNEXPECTEDEND); + + isc_buffer_forward(source, sr.length); + return (mem_tobuffer(target, sr.base, sr.length)); +} + +static inline isc_result_t +towire_tlsa(ARGS_TOWIRE) { + isc_region_t sr; + + REQUIRE(rdata->type == 52); + REQUIRE(rdata->length != 0); + + UNUSED(cctx); + + dns_rdata_toregion(rdata, &sr); + return (mem_tobuffer(target, sr.base, sr.length)); +} + +static inline int +compare_tlsa(ARGS_COMPARE) { + isc_region_t r1; + isc_region_t r2; + + REQUIRE(rdata1->type == rdata2->type); + REQUIRE(rdata1->rdclass == rdata2->rdclass); + REQUIRE(rdata1->type == 52); + REQUIRE(rdata1->length != 0); + REQUIRE(rdata2->length != 0); + + dns_rdata_toregion(rdata1, &r1); + dns_rdata_toregion(rdata2, &r2); + return (isc_region_compare(&r1, &r2)); +} + +static inline isc_result_t +fromstruct_tlsa(ARGS_FROMSTRUCT) { + dns_rdata_tlsa_t *tlsa = source; + + REQUIRE(type == 52); + REQUIRE(source != NULL); + REQUIRE(tlsa->common.rdtype == type); + REQUIRE(tlsa->common.rdclass == rdclass); + + UNUSED(type); + UNUSED(rdclass); + + RETERR(uint8_tobuffer(tlsa->usage, target)); + RETERR(uint8_tobuffer(tlsa->selector, target)); + RETERR(uint8_tobuffer(tlsa->match, target)); + + return (mem_tobuffer(target, tlsa->data, tlsa->length)); +} + +static inline isc_result_t +tostruct_tlsa(ARGS_TOSTRUCT) { + dns_rdata_tlsa_t *tlsa = target; + isc_region_t region; + + REQUIRE(rdata->type == 52); + REQUIRE(target != NULL); + REQUIRE(rdata->length != 0); + + tlsa->common.rdclass = rdata->rdclass; + tlsa->common.rdtype = rdata->type; + ISC_LINK_INIT(&tlsa->common, link); + + dns_rdata_toregion(rdata, ®ion); + + tlsa->usage = uint8_fromregion(®ion); + isc_region_consume(®ion, 1); + tlsa->selector = uint8_fromregion(®ion); + isc_region_consume(®ion, 1); + tlsa->match = uint8_fromregion(®ion); + isc_region_consume(®ion, 1); + tlsa->length = region.length; + + tlsa->data = mem_maybedup(mctx, region.base, region.length); + if (tlsa->data == NULL) + return (ISC_R_NOMEMORY); + + tlsa->mctx = mctx; + return (ISC_R_SUCCESS); +} + +static inline void +freestruct_tlsa(ARGS_FREESTRUCT) { + dns_rdata_tlsa_t *tlsa = source; + + REQUIRE(tlsa != NULL); + REQUIRE(tlsa->common.rdtype == 52); + + if (tlsa->mctx == NULL) + return; + + if (tlsa->data != NULL) + isc_mem_free(tlsa->mctx, tlsa->data); + tlsa->mctx = NULL; +} + +static inline isc_result_t +additionaldata_tlsa(ARGS_ADDLDATA) { + REQUIRE(rdata->type == 52); + + UNUSED(rdata); + UNUSED(add); + UNUSED(arg); + + return (ISC_R_SUCCESS); +} + +static inline isc_result_t +digest_tlsa(ARGS_DIGEST) { + isc_region_t r; + + REQUIRE(rdata->type == 52); + + dns_rdata_toregion(rdata, &r); + + return ((digest)(arg, &r)); +} + +static inline isc_boolean_t +checkowner_tlsa(ARGS_CHECKOWNER) { + + REQUIRE(type == 52); + + UNUSED(name); + UNUSED(type); + UNUSED(rdclass); + UNUSED(wildcard); + + return (ISC_TRUE); +} + +static inline isc_boolean_t +checknames_tlsa(ARGS_CHECKNAMES) { + + REQUIRE(rdata->type == 52); + + UNUSED(rdata); + UNUSED(owner); + UNUSED(bad); + + return (ISC_TRUE); +} + +static inline int +casecompare_tlsa(ARGS_COMPARE) { + return (compare_tlsa(rdata1, rdata2)); +} + +#endif /* RDATA_GENERIC_TLSA_52_C */ Copied: head/contrib/bind9/lib/dns/rdata/generic/tlsa_52.h (from r236173, vendor/bind9/dist/lib/dns/rdata/generic/tlsa_52.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bind9/lib/dns/rdata/generic/tlsa_52.h Mon May 28 19:47:56 2012 (r236196, copy of r236173, vendor/bind9/dist/lib/dns/rdata/generic/tlsa_52.h) @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC") + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/* $Id$ */ + +#ifndef GENERIC_TLSA_52_H +#define GENERIC_TLSA_52_H 1 + +/*! + * \brief per draft-ietf-dane-protocol-19.txt + */ +typedef struct dns_rdata_tlsa { + dns_rdatacommon_t common; + isc_mem_t *mctx; + isc_uint8_t usage; + isc_uint8_t selector; + isc_uint8_t match; + isc_uint16_t length; + unsigned char *data; +} dns_rdata_tlsa_t; + +#endif /* GENERIC_TLSA_52_H */ Modified: head/contrib/bind9/lib/dns/resolver.c ============================================================================== --- head/contrib/bind9/lib/dns/resolver.c Mon May 28 19:44:35 2012 (r236195) +++ head/contrib/bind9/lib/dns/resolver.c Mon May 28 19:47:56 2012 (r236196) @@ -180,7 +180,9 @@ struct fetchctx { dns_rdatatype_t type; unsigned int options; unsigned int bucketnum; - char * info; + char * info; + isc_mem_t * mctx; + /*% Locked by appropriate bucket lock. */ fetchstate state; isc_boolean_t want_shutdown; @@ -446,7 +448,8 @@ static void resquery_response(isc_task_t static void resquery_connected(isc_task_t *task, isc_event_t *event); static void fctx_try(fetchctx_t *fctx, isc_boolean_t retrying, isc_boolean_t badcache); -static isc_boolean_t fctx_destroy(fetchctx_t *fctx); +static void fctx_destroy(fetchctx_t *fctx); +static isc_boolean_t fctx_unlink(fetchctx_t *fctx); static isc_result_t ncache_adderesult(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node, dns_rdatatype_t covers, @@ -478,8 +481,7 @@ valcreate(fetchctx_t *fctx, dns_adbaddri dns_valarg_t *valarg; isc_result_t result; - valarg = isc_mem_get(fctx->res->buckets[fctx->bucketnum].mctx, - sizeof(*valarg)); + valarg = isc_mem_get(fctx->mctx, sizeof(*valarg)); if (valarg == NULL) return (ISC_R_NOMEMORY); @@ -501,8 +503,7 @@ valcreate(fetchctx_t *fctx, dns_adbaddri } ISC_LIST_APPEND(fctx->validators, validator, link); } else - isc_mem_put(fctx->res->buckets[fctx->bucketnum].mctx, - valarg, sizeof(*valarg)); + isc_mem_put(fctx->mctx, valarg, sizeof(*valarg)); return (result); } @@ -1386,13 +1387,12 @@ fctx_query(fetchctx_t *fctx, dns_adbaddr dns_message_reset(fctx->rmessage, DNS_MESSAGE_INTENTPARSE); - query = isc_mem_get(res->buckets[fctx->bucketnum].mctx, - sizeof(*query)); + query = isc_mem_get(fctx->mctx, sizeof(*query)); if (query == NULL) { result = ISC_R_NOMEMORY; goto stop_idle_timer; } - query->mctx = res->buckets[fctx->bucketnum].mctx; + query->mctx = fctx->mctx; query->options = options; query->attributes = 0; query->sends = 0; @@ -1569,8 +1569,7 @@ fctx_query(fetchctx_t *fctx, dns_adbaddr cleanup_query: if (query->connects == 0) { query->magic = 0; - isc_mem_put(res->buckets[fctx->bucketnum].mctx, - query, sizeof(*query)); + isc_mem_put(fctx->mctx, query, sizeof(*query)); } stop_idle_timer: @@ -1600,8 +1599,7 @@ add_bad_edns(fetchctx_t *fctx, isc_socka *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon May 28 19:48:20 2012 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 93F2910657C2; Mon, 28 May 2012 19:48:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx09.syd.optusnet.com.au (fallbackmx09.syd.optusnet.com.au [211.29.132.242]) by mx1.freebsd.org (Postfix) with ESMTP id 0CC208FC12; Mon, 28 May 2012 19:48:19 +0000 (UTC) Received: from mail34.syd.optusnet.com.au (mail34.syd.optusnet.com.au [211.29.133.218]) by fallbackmx09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q4SJmDPX000519; Tue, 29 May 2012 05:48:13 +1000 Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail34.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q4SJm3tU025917 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 29 May 2012 05:48:04 +1000 Date: Tue, 29 May 2012 05:48:03 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Robert N. M. Watson" In-Reply-To: <71304742-3635-49C6-BE36-60E4F4A6FC20@freebsd.org> Message-ID: <20120529033708.U2726@besplex.bde.org> References: <201205252150.q4PLomFk035064@svn.freebsd.org> <20120526173233.A885@besplex.bde.org> <20120526164927.GU2358@deviant.kiev.zoral.com.ua> <20120527043827.W3357@besplex.bde.org> <20120528133633.GB2358@deviant.kiev.zoral.com.ua> <71304742-3635-49C6-BE36-60E4F4A6FC20@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Ed Schouten , svn-src-head@freebsd.org, Bruce Evans , Konstantin Belousov , jonathan@freebsd.org Subject: Re: svn commit: r236026 - in head/sys: amd64/linux32 compat/freebsd32 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, 28 May 2012 19:48:20 -0000 On Mon, 28 May 2012, Robert N. M. Watson wrote: > On 28 May 2012, at 09:36, Konstantin Belousov wrote: > >> On Sun, May 27, 2012 at 07:49:36AM +1000, Bruce Evans wrote: >>> On Sat, 26 May 2012, Konstantin Belousov wrote: >>> >>>> On Sat, May 26, 2012 at 10:21:25PM +1000, Bruce Evans wrote: >>>> The 'low level' AKA magic happens in several *_fetch_syscall_args() >>>> functions. For both linux32 and freebsd32, the magic code automatically >>>> zero-extends the arguments into 64bit entities. Linux passes args in >>>> registers, while FreeBSD uses words on stack. >>> >>> Actually, the amd64 linux_fetch32_fetch_syscall_args() just copies from >>> 64-bit registers frame->tf_r* to 64-bit sa->args[*]. I can't see how >>> this gives anything except garbage in the top bits. Is there magic in >>> the switch to 64-bit mode that sets the top bits? Anyway, sign extension >>> would give garbage for unsigned args, and zero-extension would give >>> garbage for negative signed args. >> Hardware zero-extends any register touched in the 32bit mode. >> >> In fact, please see r217991 for related bug. > > This may well be true on Intel, but is not true of MIPS -- which we probably don't care about currently for the purposes of Linux emulation, but maybe someday we will. On MIPS, 32-bit values are sign-extended rather than zero-extended. Please use the unix newline character in mail. The translation is MD so "this" (not the newline) isn't a problem. > I see a somewhat complex thread here, but am not sure I quite understand the import for Capsicum. Is the 64-bit rights mask as part of system call arguments not working properly in compat32 scenarios? Or are there issues outside of the compat environment? Right now compat32 is not well-supported with Capsicum, but fixing that is quite important to productionising Capsicum. 64-bit args need special translation, and the rights mask doesn't have any. At best, the low 32 bits of it might work accidentally. 64-bit args in ia32 start as 2 32-bit ones. These get turned into 2 64-bit ones (zero extended). These must be combined (in non-automatically generated code) into a 32-bit one. The automatically-generated args struct promotes the 32-bit args to 64 bits so that it can be passed directly to native syscalls. This doesn't work if there are any specially specially-translated args. Then the whole args struct must be translated (by simple copying for 32-bit args) lseek() shows how this should be done: % #ifdef COMPAT_43 % int % ofreebsd32_lseek(struct thread *td, struct ofreebsd32_lseek_args *uap) % { % struct lseek_args nuap; % % nuap.fd = uap->fd; % nuap.offset = uap->offset; % nuap.whence = uap->whence; % return (sys_lseek(td, &nuap)); % } % #endif This one seems to be to work around olseek() being broken in kern/syscalls.master. Its offset arg is only 32 bits, so it should be possible to call olseek() directly, but the bug makes the args structs incompatible, so the above does a simple translation by copying args and calls the full native lseek. olseek() uses the same copying code, but never worked since it starts with a wrong args struct. Apparently no one uses olseek(), but this compat lseek() is used a bit so the bug was noticed. The args stucts are: % struct ofreebsd32_lseek_args { % char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; % char offset_l_[PADL_(int)]; int offset; char offset_r_[PADR_(int)]; % char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; % }; The padding is to 64 bits. All the types are correct, although the type of `offset' is confusing. Its type is that of the pre-4.4BSD off_t, which was long, which was 32 bits on ia32 back then. This is now spelled as int, so that we can't easily see either of the 4 layers of translation in it (off_t = long -> int32_t back then (type pun) -> int32_t now (type pun) = int now. % struct olseek_args { % char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; % char offset_l_[PADL_(long)]; long offset; char offset_r_[PADR_(long)]; % char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; % }; The type of `offset' is broken. It needs to be 32 bits since that is what it was on ia32 before 4.4BSD, as above. amd64 shouldn't support pre-4.4BSD, and making an olseek() call is close to impossible on it. However, on amd64 with ia32 support, you have to enable COMPAT_43 for the ofreebsd32_lseek() to be compiled, and this gives olseek() too, so you might as well use it after fixing it. If a native olseek() call is somehow made on amd64, then it would start with a 32-bit offset and this might be extended correctly in userland, and then the wrong `long offset' in the above would work. But there is no need to risk this. By declaring the offset as signed 32 bits, it will be extended correctly when it is loaded from the args struct. Note that the above translation `nuap.offset = uap->offset;' does a critical non-null currect extension and this requires the olseek() being declared correctly in the ia32 case, and on standard magic for the args struct. `offset' starts as 32 bits, but has been zero-extended the args struct. But its type in *uap is 32 bits, so the zero bits are ignored, and its type in *uap is signed so it is sign-extended before storing it into nuap. The corresponding assignment in olseek() just copies it. % % int % freebsd32_lseek(struct thread *td, struct freebsd32_lseek_args *uap) % { % int error; % struct lseek_args ap; % off_t pos; % % ap.fd = uap->fd; % ap.offset = PAIR32TO64(off_t,uap->offset); This does the repacking of the offset. This looks nice at first, but it is missing a space after the comma and the macro is disgusting internally. uap->offset looks like a single term, but it is expanded into an expression involving uap->offset1 and uap->offset2 using delicate or invalid token pasting. The macro is only defined in this file. All other places that I looked at do the repacking using explicit expressions. The macro is more needed here since the endianness varies. % ap.whence = uap->whence; % error = sys_lseek(td, &ap); % /* Expand the quad return into two parts for eax and edx */ % pos = *(off_t *)(td->td_retval); % td->td_retval[RETVAL_LO] = pos & 0xffffffff; /* %eax */ % td->td_retval[RETVAL_HI] = pos >> 32; /* %edx */ % return error; % } This function has lots more style bugs: - unsorted declarations - bogus comments about i386 registers. The RETVAL* macros remove the need for register magic, and 3 of 4 arches that this code can be configured for (if not work), namely ia64, mips and powerpc, don't have any i386 registers. - *(off_t *)(td->td_retval) is hackish. We use this hack a lot, er, a little for 64-bit return values. It is to possibly combine td_retval[0] with td_retval[1] to create an off_t, without ifdef or if tangles for endianness, etc. It is probably unnecessary here, since this code is only useful on 64 bit arches and then everything is in td_retval[0] (until we repack for returning). This hack assumes either 64-bit td_retval[0] or little-endian to work anyway. - `quad' in the comment is bogus too - missing spaces around return value. Perhaps required to match non-KNF stype elsewhere in compat code. Fixing some style bugs gives: @ int @ freebsd32_lseek(struct thread *td, struct freebsd32_lseek_args *uap) @ { @ struct lseek_args ap; @ off_t pos; @ int error; @ @ ap.fd = uap->fd; @ ap.offset = PAIR32TO64(off_t, uap->offset); @ ap.whence = uap->whence; @ error = sys_lseek(td, &ap); @ /* Expand the off_t return into two parts for 2 32-bit registers. */ @ /* Assume that it initially fits in 1 register_t (XXX?) */ @ pos = td->td_retval[0]; @ td->td_retval[RETVAL_LO] = pos & 0xffffffff; @ td->td_retval[RETVAL_HI] = pos >> 32; @ return error; @ } Another bug is now clearer: we assume that either right shifting does the right thing with the sign bit, or that extra top bits for RETVAL_HI don't matter. I think it actually does a wrong thing on amd64, and this is responsible for some of the non-zero-extensions that I observed: Suppose pos is -1; this is all bits 1 (0xffffffffffffffff; it becomes 0xffffffff in RETVAL_LO, but remains 0xffffffffffffffff in RETVAL_HI; the kernel then returns extra bits to 32-bit mode. They have no effect in 32-bit mode, but if the register is not touched in userland then the come back to the kernel on the next syscall and mess up the indended zero-extension. Same sign bug as sigreturn() used to have. But as I said before, even looking at the top bits is a bug -- just declare all the syscalls correctly so that the top bits are ignored and correct sign extension is done. I looked for other td_retval hacks and could only find these 2 in kern: % int % ogethostid(td, uap) % struct thread *td; % struct ogethostid_args *uap; % { % size_t len = sizeof(long); % int name[2]; % % name[0] = CTL_KERN; % name[1] = KERN_HOSTID; % return (kernel_sysctl(td, name, 2, (long *)td->td_retval, &len, % NULL, 0, NULL, 0)); % } I'm not sure what kernel_sysctl() does with this, but the cast has at least 2 layers of bogusness. td_retval starts as 2 register_t's and decays to register_t *. kernel_sysctl() doesn't even take a long * arg. It takes a void *. Not casting would convert the register_t * directly to a void * and undefined things would only happen later when kernel_sysctl() doesn't convert it back to a register_t *. Now they can happen for conversion to long *. In practice, long is similar to register_t on all supported arches, instead of correct and twice as long, so none of this makes any difference. % int % sys_lseek(td, uap) % ... % fp->f_offset = offset; % VFS_KNOTE_UNLOCKED(vp, 0); % *(off_t *)(td->td_retval) = fp->f_offset; Seems to work as intended. I talked kib out of using similar large ifdefs or similar hacks for ssize_t. If ssize_t is 64 bits, then register_t should be 64 bits too, so td_retval[1] is not used and a hack like the above wouldn't touch it. If the size of the foo_t being stored using the *(foo_t *) hack is not precisely 1 or 2 register_t's, then the store will overrun or underrun. But that case needs complicated conditionals to handle, and its easier not to fix it before it happens. The above hack hasn't needed fixing in almost 20 years. Hopefully any overrun or underrun would be more obvious than bugs caused by above shift and sign extension bugs. Bruce From owner-svn-src-head@FreeBSD.ORG Mon May 28 20:17:31 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24643106566C; Mon, 28 May 2012 20:17:31 +0000 (UTC) (envelope-from theraven@theravensnest.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id E1F838FC15; Mon, 28 May 2012 20:17:30 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cmbg15-2-0-cust790.5-4.cable.virginmedia.com [86.26.15.23]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q4SKHSrh000722 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 28 May 2012 20:17:29 GMT (envelope-from theraven@theravensnest.org) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <4FC3D320.1070709@FreeBSD.org> Date: Mon, 28 May 2012 21:17:23 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <944B5ADD-8F3C-4CE4-BF97-36964F4EBB64@theravensnest.org> References: <201205270527.q4R5Rm44028055@svn.freebsd.org> <20120527203100.GA22921@freebsd.org> <4FC3D320.1070709@FreeBSD.org> To: Dimitry Andric X-Mailer: Apple Mail (2.1257) Cc: svn-src-head@FreeBSD.org, Roman Divacky , src-committers@FreeBSD.org, Konstantin Belousov , svn-src-all@FreeBSD.org Subject: Re: svn commit: r236137 - head/contrib/gcc/config/i386 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, 28 May 2012 20:17:31 -0000 On 28 May 2012, at 20:33, Dimitry Andric wrote: > On the other hand, it's really platform-dependent: I've checked = several > Linux distributions, and it is fairly unpredictable whether their gcc > passes --hash-style to the linker, or if they do, which option they = use. Can we make it dependent on the triple? i.e. if the triple is = arch-whatever-freebsd9 or greater, make it pass the flag, otherwise = don't bother? Or is it not worth caring about older FreeBSD? There's = no real disadvantage in passing it unconditionally (marginally longer = link times) and potentially a big benefit. I don't see a problem with = committing it upstream, but it would be nice to pull that change in = locally before 9.1 and not have to wait for LLVM 3.2 before we got to = make use of it. Misleading and poorly designed benchmarks on Phoronix are at stake! David= From owner-svn-src-head@FreeBSD.ORG Mon May 28 20:44:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7EAE1106564A; Mon, 28 May 2012 20:44:12 +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 50B038FC12; Mon, 28 May 2012 20:44:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4SKiCL0032541; Mon, 28 May 2012 20:44:12 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4SKiCWb032537; Mon, 28 May 2012 20:44:12 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201205282044.q4SKiCWb032537@svn.freebsd.org> From: Jamie Gritton Date: Mon, 28 May 2012 20:44: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: r236198 - head/usr.sbin/jail 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, 28 May 2012 20:44:12 -0000 Author: jamie Date: Mon May 28 20:44:11 2012 New Revision: 236198 URL: http://svn.freebsd.org/changeset/base/236198 Log: When writing the jid via the -i flag, do it right when the jail is created, before any commands run. /etc/rc.d/jail depends on this. Modified: head/usr.sbin/jail/command.c head/usr.sbin/jail/jail.c head/usr.sbin/jail/jailp.h Modified: head/usr.sbin/jail/command.c ============================================================================== --- head/usr.sbin/jail/command.c Mon May 28 19:48:37 2012 (r236197) +++ head/usr.sbin/jail/command.c Mon May 28 20:44:11 2012 (r236198) @@ -246,7 +246,7 @@ next_proc(int nonblock) /* * Run a single command for a jail, possible inside the jail. */ -int +static int run_command(struct cfjail *j) { const struct passwd *pwd; @@ -290,6 +290,8 @@ run_command(struct cfjail *j) } else { if (create_jail(j) < 0) return -1; + if (iflag) + printf("%d\n", j->jid); if (verbose >= 0 && (j->name || verbose > 0)) jail_note(j, "created\n"); dep_done(j, DF_LIGHT); Modified: head/usr.sbin/jail/jail.c ============================================================================== --- head/usr.sbin/jail/jail.c Mon May 28 19:48:37 2012 (r236197) +++ head/usr.sbin/jail/jail.c Mon May 28 20:44:11 2012 (r236198) @@ -55,6 +55,7 @@ struct permspec { }; const char *cfname; +int iflag; int note_remove; int verbose; @@ -129,7 +130,7 @@ main(int argc, char **argv) size_t sysvallen; unsigned op, pi; int ch, docf, error, i, oldcl, sysval; - int dflag, iflag, Rflag; + int dflag, Rflag; char enforce_statfs[4]; #if defined(INET) || defined(INET6) char *cs, *ncs; @@ -139,7 +140,7 @@ main(int argc, char **argv) #endif op = 0; - dflag = iflag = Rflag = 0; + dflag = Rflag = 0; docf = 1; cfname = CONF_FILE; JidFile = NULL; @@ -415,8 +416,6 @@ main(int argc, char **argv) continue; jail_create_done: clear_persist(j); - if (iflag) - printf("%d\n", j->jid); if (jfp != NULL) print_jail(jfp, j, oldcl); dep_done(j, 0); Modified: head/usr.sbin/jail/jailp.h ============================================================================== --- head/usr.sbin/jail/jailp.h Mon May 28 19:48:37 2012 (r236197) +++ head/usr.sbin/jail/jailp.h Mon May 28 20:44:11 2012 (r236198) @@ -227,6 +227,7 @@ extern struct cfjails cfjails; extern struct cfjails ready; extern struct cfjails depend; extern const char *cfname; +extern int iflag; extern int note_remove; extern int paralimit; extern int verbose; From owner-svn-src-head@FreeBSD.ORG Mon May 28 20:46:51 2012 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 788BF106564A; Mon, 28 May 2012 20:46:51 +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 E38B38FC16; Mon, 28 May 2012 20:46:49 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4SKkVA3070754; Mon, 28 May 2012 23:46:31 +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.5/8.14.5) with ESMTP id q4SKkVua026661; Mon, 28 May 2012 23:46:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4SKkVdS026660; Mon, 28 May 2012 23:46:31 +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: Mon, 28 May 2012 23:46:31 +0300 From: Konstantin Belousov To: Eitan Adler Message-ID: <20120528204631.GC2358@deviant.kiev.zoral.com.ua> References: <201205232107.q4NL71dw095460@svn.freebsd.org> <4FBD5899.9000808@daemonic.se> <20120524092649.GH2358@deviant.kiev.zoral.com.ua> <4FBE0086.1050801@daemonic.se> <4FBF438C.5080805@daemonic.se> <20120525103202.GR2358@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Ly6DD2zUc33o81TT" Content-Disposition: inline In-Reply-To: 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=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Niclas Zeising , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r235859 - in head/sys: i386/conf modules 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, 28 May 2012 20:46:51 -0000 --Ly6DD2zUc33o81TT Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 28, 2012 at 12:38:19PM -0700, Eitan Adler wrote: > On 25 May 2012 03:32, Konstantin Belousov wrote: > > On Fri, May 25, 2012 at 10:32:12AM +0200, Niclas Zeising wrote: > >> Hi! > >> Would it be possible to bump the FreeBSD version to reflect this commi= t? > >> =9AIt would be helpful when working with the xorg ports, amongst other= things. > >> Thanks! > >> Regards! > >> -- > > There is absolutely no use for version bump. Port builds (libdrm, mesa > > and ddx) do not depend on any base system headers or libraries. They > > come with private copies of the ABI headers. >=20 > there is a use. the ports can check to see if they are being > built/installed on the right version of FreeBSD. Having a check that > says > if OSVERSION < x > IGNORE=3D upgrade > endif > is helpful No, it is not. You do not understand the difference between build- and run- time. These ports build fine on whatever version of the system, but require some specific feature to run. The ddx driver already contains the correct check for required features, which is much more involved then simply check some version. It does check the presense of runtime features and either accurately degrades the performance or declines to run. --Ly6DD2zUc33o81TT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/D5CcACgkQC3+MBN1Mb4jVzACgxRbdjQgeT/yoDC4WtChVHYmt ZQ0AnjzrMz9yJmJ5GEKORIkrJl5lpWbR =xxPh -----END PGP SIGNATURE----- --Ly6DD2zUc33o81TT-- From owner-svn-src-head@FreeBSD.ORG Mon May 28 20:47:34 2012 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 24DE51065670; Mon, 28 May 2012 20:47:34 +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 935538FC0C; Mon, 28 May 2012 20:47:33 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4SKlTbC071010; Mon, 28 May 2012 23:47:29 +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.5/8.14.5) with ESMTP id q4SKlSmn026676; Mon, 28 May 2012 23:47:28 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4SKlShm026675; Mon, 28 May 2012 23:47:28 +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: Mon, 28 May 2012 23:47:28 +0300 From: Konstantin Belousov To: Marius Strobl Message-ID: <20120528204728.GD2358@deviant.kiev.zoral.com.ua> References: <201205270527.q4R5Rm44028055@svn.freebsd.org> <20120528190355.GA42283@alchemy.franken.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rvJlijl7rx+y0eL3" Content-Disposition: inline In-Reply-To: <20120528190355.GA42283@alchemy.franken.de> 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=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham 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: r236137 - head/contrib/gcc/config/i386 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, 28 May 2012 20:47:34 -0000 --rvJlijl7rx+y0eL3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 28, 2012 at 09:03:55PM +0200, Marius Strobl wrote: > On Sun, May 27, 2012 at 05:27:48AM +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Sun May 27 05:27:47 2012 > > New Revision: 236137 > > URL: http://svn.freebsd.org/changeset/base/236137 > >=20 > > Log: > > Enable gnu hash generation for dynamic ELF binaries on x86. > > =20 >=20 > As far as I remember from your commit adding GNU hash support to > rtld(1), there's nothing left to be done for the other architectures > apart from testing, correct? Yes, you are correct. I am not aware of any non-implemented MD parts, but I was unable to test on !x86, and got no feedback from arch maintainers. --rvJlijl7rx+y0eL3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/D5GAACgkQC3+MBN1Mb4jsAACglKmk+AmQnFFIZIbaRJbyA7io OHMAnjPMye1Unpox1qNg6lvcw3wnt3Aq =z8hj -----END PGP SIGNATURE----- --rvJlijl7rx+y0eL3-- From owner-svn-src-head@FreeBSD.ORG Mon May 28 20:49:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BCD02106566B; Mon, 28 May 2012 20:49:35 +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 347E88FC18; Mon, 28 May 2012 20:49:34 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4SKnVRm071445; Mon, 28 May 2012 23:49:31 +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.5/8.14.5) with ESMTP id q4SKnUne026694; Mon, 28 May 2012 23:49:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4SKnUoH026693; Mon, 28 May 2012 23:49:30 +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: Mon, 28 May 2012 23:49:30 +0300 From: Konstantin Belousov To: David Chisnall Message-ID: <20120528204930.GE2358@deviant.kiev.zoral.com.ua> References: <201205270527.q4R5Rm44028055@svn.freebsd.org> <20120527203100.GA22921@freebsd.org> <4FC3D320.1070709@FreeBSD.org> <944B5ADD-8F3C-4CE4-BF97-36964F4EBB64@theravensnest.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="20f69GCBTQuZN9jn" Content-Disposition: inline In-Reply-To: <944B5ADD-8F3C-4CE4-BF97-36964F4EBB64@theravensnest.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=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham 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, Roman Divacky , src-committers@freebsd.org, Dimitry Andric , svn-src-all@freebsd.org Subject: Re: svn commit: r236137 - head/contrib/gcc/config/i386 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, 28 May 2012 20:49:35 -0000 --20f69GCBTQuZN9jn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 28, 2012 at 09:17:23PM +0100, David Chisnall wrote: > On 28 May 2012, at 20:33, Dimitry Andric wrote: >=20 > > On the other hand, it's really platform-dependent: I've checked several > > Linux distributions, and it is fairly unpredictable whether their gcc > > passes --hash-style to the linker, or if they do, which option they use. >=20 > Can we make it dependent on the triple? i.e. if the triple is > arch-whatever-freebsd9 or greater, make it pass the flag, otherwise > don't bother? Or is it not worth caring about older FreeBSD? There's > no real disadvantage in passing it unconditionally (marginally longer > link times) and potentially a big benefit. I don't see a problem with > committing it upstream, but it would be nice to pull that change in > locally before 9.1 and not have to wait for LLVM 3.2 before we got to > make use of it. Having unused hash in the image causes on-disk bloat. Since hashes are merged into text segments (they are needed by rtld and so are mapped), this also causes memory use bloat. It is definitely not huge, at least not for normal binaries with reasonably sized symbol table. Also, it is more work for the linker to generate both tables. > > Misleading and poorly designed benchmarks on Phoronix are at stake! > > David --20f69GCBTQuZN9jn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/D5NoACgkQC3+MBN1Mb4jlgACbBlxKOPl/878jBnNHsCqYOsGZ ClAAn08fCvp9ESJ6DchwpEBe4/Gj++F/ =PjzJ -----END PGP SIGNATURE----- --20f69GCBTQuZN9jn-- From owner-svn-src-head@FreeBSD.ORG Mon May 28 21:04:59 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1524E106566C; Mon, 28 May 2012 21:04:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) 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 BFA998FC0A; Mon, 28 May 2012 21:04:58 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:4c1c:92fb:538c:83ed] (unknown [IPv6:2001:7b8:3a7:0:4c1c:92fb:538c:83ed]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id EE9875C59; Mon, 28 May 2012 23:04:57 +0200 (CEST) Message-ID: <4FC3E876.2050504@FreeBSD.org> Date: Mon, 28 May 2012 23:04:54 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120522 Thunderbird/13.0 MIME-Version: 1.0 To: David Chisnall References: <201205270527.q4R5Rm44028055@svn.freebsd.org> <20120527203100.GA22921@freebsd.org> <4FC3D320.1070709@FreeBSD.org> <944B5ADD-8F3C-4CE4-BF97-36964F4EBB64@theravensnest.org> In-Reply-To: <944B5ADD-8F3C-4CE4-BF97-36964F4EBB64@theravensnest.org> X-Enigmail-Version: 1.5a1pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, Roman Divacky , src-committers@FreeBSD.org, Konstantin Belousov , svn-src-all@FreeBSD.org Subject: Re: svn commit: r236137 - head/contrib/gcc/config/i386 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, 28 May 2012 21:04:59 -0000 On 2012-05-28 22:17, David Chisnall wrote: > On 28 May 2012, at 20:33, Dimitry Andric wrote: >> On the other hand, it's really platform-dependent: I've checked several >> Linux distributions, and it is fairly unpredictable whether their gcc >> passes --hash-style to the linker, or if they do, which option they use. > > Can we make it dependent on the triple? i.e. if the triple is arch-whatever-freebsd9 or greater, make it pass the flag, otherwise don't bother? Or is it not worth caring about older FreeBSD? There's no real disadvantage in passing it unconditionally (marginally longer link times) and potentially a big benefit. We only ship clang in FreeBSD 9 or later, so in our own copy it can be unconditional. FreeBSD 8 and earlier still use ld 2.15, which doesn't support --hash-style. But to not inconvenience users of the clang port, it would be nice to pass it only for freebsd9 and later. > I don't see a problem with committing it upstream, but it would be nice to pull that change in locally before 9.1 and not have to wait for LLVM 3.2 before we got to make use of it. > > Misleading and poorly designed benchmarks on Phoronix are at stake! Sure, I'll commit this now, and merge it to stable/9 later. From owner-svn-src-head@FreeBSD.ORG Mon May 28 21:15:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 32950106566B; Mon, 28 May 2012 21:15:55 +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 1D78F8FC12; Mon, 28 May 2012 21:15:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4SLFsSe033856; Mon, 28 May 2012 21:15:54 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4SLFscQ033854; Mon, 28 May 2012 21:15:54 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201205282115.q4SLFscQ033854@svn.freebsd.org> From: Alan Cox Date: Mon, 28 May 2012 21:15: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: r236199 - head/sys/dev/drm2/i915 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, 28 May 2012 21:15:55 -0000 Author: alc Date: Mon May 28 21:15:54 2012 New Revision: 236199 URL: http://svn.freebsd.org/changeset/base/236199 Log: A small simplification to i915_gem_pager_fault(). Reviewed by: kib Modified: head/sys/dev/drm2/i915/i915_gem.c Modified: head/sys/dev/drm2/i915/i915_gem.c ============================================================================== --- head/sys/dev/drm2/i915/i915_gem.c Mon May 28 20:44:11 2012 (r236198) +++ head/sys/dev/drm2/i915/i915_gem.c Mon May 28 21:15:54 2012 (r236199) @@ -1421,7 +1421,7 @@ unlocked_vmobj: if ((m->flags & VPO_BUSY) != 0) { DRM_UNLOCK(dev); - vm_page_sleep_if_busy(m, false, "915pbs"); + vm_page_sleep(m, "915pbs"); goto retry; } m->valid = VM_PAGE_BITS_ALL; From owner-svn-src-head@FreeBSD.ORG Tue May 29 00:53:52 2012 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 46588106566C; Tue, 29 May 2012 00:53:52 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3060A8FC12; Tue, 29 May 2012 00:53:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4T0rqhT043280; Tue, 29 May 2012 00:53:52 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4T0rpsZ043277; Tue, 29 May 2012 00:53:52 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201205290053.q4T0rpsZ043277@svn.freebsd.org> From: Andrew Gallatin Date: Tue, 29 May 2012 00:53: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: r236212 - head/sys/dev/mxge 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, 29 May 2012 00:53:52 -0000 Author: gallatin Date: Tue May 29 00:53:51 2012 New Revision: 236212 URL: http://svn.freebsd.org/changeset/base/236212 Log: Update mxge(4) firmware to the latest version available from Myricom (1.4.55). MFC after: 3 days Sponored by: Myricom, Inc. Modified: head/sys/dev/mxge/eth_z8e.h head/sys/dev/mxge/ethp_z8e.h head/sys/dev/mxge/rss_eth_z8e.h head/sys/dev/mxge/rss_ethp_z8e.h Modified: head/sys/dev/mxge/eth_z8e.h ============================================================================== --- head/sys/dev/mxge/eth_z8e.h Mon May 28 23:35:16 2012 (r236211) +++ head/sys/dev/mxge/eth_z8e.h Tue May 29 00:53:51 2012 (r236212) @@ -1,6 +1,6 @@ /******************************************************************************* -Copyright (c) 2006-2011, Myricom Inc. +Copyright (c) 2006-2012, Myricom Inc. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -28,7495 +28,7547 @@ POSSIBILITY OF SUCH DAMAGE. $FreeBSD$ ***************************************************************************/ -static unsigned int eth_z8e_uncompressed_length = 375636 ; -static unsigned int eth_z8e_length = 119802 ; -static unsigned char eth_z8e[119802 + 1] = - "\x78\x9c\xec\xbd\x7f\x78\x54\xd5\xb5\x3f\xbc\x32\x99\xc8\x24\x06" - "\x26\x62\xc4\x29\xc5\x76\xb0\x41\xa3\x05\x89\x16\xdb\xd4\x42\x0d" - "\x02\x1a\x2c\xbf\x14\x6c\xa3\xa2\x09\x1a\xe8\xa0\x11\x22\x44\x18" - "\x20\x64\xc2\x80\x36\x41\x20\xa9\xa0\x46\x09\x09\xbd\xf2\x23\x56" - "\xac\xd8\x02\x62\x45\x19\x24\xf6\x4b\x7b\x93\x0c\xed\x8b\xf7\x9b" - "\xdb\x17\x6f\x47\x6e\x84\x94\x1b\x60\x4a\x06\x32\x26\x33\x67\xbf" - "\x9f\xb5\xf7\x39\xc9\xcc\x30\x41\xb9\xf7\x3e\xcf\xfb\x4f\xf3\x3c" - "\x93\x73\xce\x3e\x7b\xaf\xbd\xf6\xda\x6b\xad\xbd\xf6\xde\x6b\xaf" - "\x43\x74\xe5\x7f\x3e\xb2\xf0\x25\x81\x4c\x07\x8a\x0f\xfd\x37\xca" - "\xff\xf3\xef\x9f\x7f\xff\xfc\xfb\xe7\xdf\x3f\xff\xfe\xf9\xf7\xcf" - "\xbf\xff\x7f\xff\xfc\x09\x34\xe6\xbc\xc9\x4c\x1f\x57\x13\x75\xb9" - "\x2d\xc3\x7c\xa4\x15\xbd\xba\x51\x84\xf0\x2a\x01\xe3\xfc\x30\xbe" - "\xf2\xef\x25\xa4\x99\xaa\xc9\x72\x63\x1a\xa5\x89\x57\x6d\xa6\x09" - "\x5b\x88\x36\x0d\x11\x1d\x1b\x5f\x11\xfe\xc6\x52\xa2\xc3\xdb\xf0" - "\xfc\x8a\x68\xdf\x38\x44\x04\x00\xa7\xc0\x47\xf9\x9b\x18\xce\x6a" - "\x3c\xaf\x46\x3a\xd2\x4a\x7c\x54\xb0\x86\xd3\xaa\x50\xce\x48\xf7" - "\xae\xb9\x48\x8d\xf6\x10\x55\x31\x1c\x7b\x98\x26\x0e\x97\x78\x6c" - "\x45\xde\x54\xce\xbb\x6a\x08\xea\x4d\x27\x72\xbf\x22\x82\x11\x38" - "\x58\xb8\x1e\xae\x5b\xcf\x7f\x34\xa6\x3e\x3f\xd2\xda\x8c\xfa\xfa" - "\x81\x91\xc6\xe5\xb9\x0d\xf6\x6f\x51\xe2\x49\xba\xfa\x3a\x86\xc9" - "\xb8\x09\x37\x59\xbc\xdd\x21\x3a\x49\xc9\x99\x9d\x6e\x4a\x3c\x0c" - "\x6a\x6c\x78\x45\xa6\x27\x7a\x03\x21\xb2\x97\x51\x02\xde\x4d\xc5" - "\xd5\x84\x72\x03\x99\x3e\x33\x6b\x29\x83\xeb\x06\x5c\xb3\x30\x79" - "\x12\xea\x07\x13\x31\x8d\x02\x26\xba\x39\xe0\xa6\x84\x2e\x77\x32" - "\xda\x6f\xc9\x94\xed\x47\xbd\x28\x6b\x3e\x49\x29\xff\x30\x21\x3f" - "\xea\xf4\xdb\x97\x33\x0e\x29\x9f\x08\xb7\xc7\x64\xc0\xd1\xdc\x9e" - "\xab\xeb\x5e\x22\xea\x74\x9b\x26\x07\x4c\x56\xa1\xc3\x39\x60\xc0" - "\xe1\x7c\xa8\x2b\x95\xeb\xea\x74\x9b\x5f\x8a\xc8\xe3\x33\xf2\x00" - "\x6f\xff\xe8\x00\x25\x32\xce\x27\x28\x25\x9b\xeb\xd3\xdb\x62\xe6" - "\x3a\xbc\x4b\x42\xe4\x45\xdf\xa3\xee\x74\xb4\xd5\x7e\x38\x48\x04" - "\x98\xd7\xd4\x97\x11\x31\x7c\xe0\x6f\x57\x30\x53\xc6\x18\x30\x19" - "\x46\x6f\x5b\xdd\x9e\xc1\xf5\x12\x47\x6e\xab\x85\xf4\xbc\x05\x91" - "\x38\x32\x5c\xb4\xe5\x7a\x6e\x4b\x23\x38\x4a\xcf\xb3\xa6\x97\x1e" - "\xbd\xed\xbf\x3a\x27\x06\xb6\x4d\xc1\x4e\x00\xec\x04\x8f\x5e\xae" - "\xb7\xfd\xbe\x98\xfc\x2a\x6f\x5a\x72\xc0\x24\x74\x3a\xa4\xb4\xf7" - "\xe5\x4d\xde\x14\x99\x17\xf8\x98\x14\x6d\xc9\xe4\xa3\x94\x56\xb4" - "\x33\x11\x79\xa6\xa0\x1f\xed\xfa\xfb\xeb\xf4\xf7\x36\xbc\xbb\x5b" - "\xc1\xbb\x3a\x3b\x02\x5e\x1a\xc3\x8b\xe4\x2d\x25\x51\x66\xfc\x92" - "\x60\x20\x5f\x85\xdf\x00\x8b\xc1\x6f\x8b\x6d\x42\x73\x7d\x03\x6d" - "\x5a\xbb\x1d\xb4\x10\xe4\x75\x06\xc9\x3e\x94\x5c\x27\xe8\xea\xdd" - "\x80\x4f\x1b\x96\x93\xc5\x55\x2c\x82\x5e\x67\x07\xb5\xf8\x3b\xc8" - "\xe5\x87\x6c\x84\x2e\x50\xd9\x05\xf0\x62\xe8\x0c\x95\x3d\x4b\xb6" - "\xc6\xd2\x2f\x28\x1e\x2f\x6b\x26\x41\xae\x61\x5c\xb6\x8d\x5a\x6a" - "\xdb\xc8\x55\x1b\x5d\xd6\x75\x03\xd9\x9a\xf1\x8c\x3e\xb7\x32\x1e" - "\x2c\x6f\xa1\x94\xed\xf6\xd2\xd7\xc8\xec\x1a\x4e\xa6\xe6\x42\x8f" - "\x8e\x4b\xaa\x93\x71\x59\x73\x9a\x2c\x6f\xcc\x03\x1f\x9e\x66\x7c" - "\xdf\xb6\xbf\xb3\x3c\x68\x3a\x6c\x9b\x42\x87\x6d\xc7\xa9\xd1\x36" - "\x8e\x1a\x9d\x13\x69\xc3\x69\x4a\x3d\x1c\x1c\x4b\x8d\xe6\x7b\xa9" - "\x31\x63\x22\x79\x3b\x70\x0f\xf9\x3d\x6c\x0b\x90\x7d\x09\xf3\x53" - "\xaa\x63\xd3\x53\x64\xf1\x29\x98\xa0\x5d\x6a\xc9\xa1\x12\x22\xa6" - "\x1d\x3f\xc7\x6b\xc7\xe2\x6f\x90\x0d\xf8\xb5\x03\x97\x1f\x02\x97" - "\xb7\x33\x6c\x94\x05\x9c\x07\x78\x6b\x42\x64\x2e\xa5\xe4\x7e\xe4" - "\x38\x5d\x03\xef\x41\x76\x3b\xea\xa0\x4f\x58\x7e\x3b\x57\xe4\x41" - "\x27\xa4\x42\xfe\x53\xd7\xe8\x32\xd0\xe1\xfa\x15\x99\x3b\x97\xe6" - "\x25\xd4\xbf\x22\xda\xba\xdc\x03\xc9\x78\x07\x59\x6c\xc3\xfb\xf6" - "\xd1\xe9\x94\xe6\x0d\xe5\xd0\xc1\xee\x76\x96\xc7\x8e\x41\x01\x4a" - "\x60\x78\x56\x27\x64\x67\x09\x25\x01\x9f\x3f\xd7\x23\xfd\x3b\xc8" - "\x87\xf2\x39\x3e\x7a\xb9\x83\xcb\x8b\xeb\x1f\x0d\x68\xd7\x3f\x7a" - "\x41\x7b\xf5\xd1\x4e\xf1\xea\xa3\xe7\xc3\xaf\x3e\xfa\x0f\xd7\x32" - "\xb2\x84\xaf\x7f\xd4\xdf\x52\x2c\xfb\x20\xad\xa5\x18\x7d\x10\x26" - "\xcb\xca\x33\x94\xf6\xf8\xb3\xe8\xfb\xd0\x67\xb4\x72\x3e\xd9\xb4" - "\xe4\xb7\x5a\xbd\xa1\x4f\xe9\xf1\x52\x12\xb8\x6f\x8f\xd7\xbe\xce" - "\x94\xb7\x0b\x0c\xd9\x42\xbd\xfb\x7d\xa6\x6d\x36\xae\xd7\x9f\xbc" - "\xb7\x00\xbf\x42\xfc\x1c\xf8\x15\x89\x94\xb7\x8b\x40\x2b\xd7\xa0" - "\x55\x09\x54\xd7\x4d\x34\x5a\xa3\x84\xd3\x34\xf0\x18\xf0\x4f\xeb" - "\x87\x6e\xc3\xb4\xb5\x9e\xea\x9b\xcb\xa9\xac\xab\xcb\x41\xac\x0b" - "\x59\xff\xb1\x3e\xec\x72\x0f\xb2\xa3\x9e\x3c\x29\xbf\xaf\x40\xc7" - "\xa4\x78\xaa\x91\xde\x1e\x58\xe1\x48\xf0\xaf\x70\x98\x3a\x53\x3c" - "\x1b\x91\x67\x22\xf2\x54\xeb\x34\x6c\x67\x58\x90\x2d\xff\xc0\x10" - "\x25\x02\x66\xf1\x7b\x17\x5b\xcd\x5b\x5e\x11\xc7\x91\xaf\xa8\x17" - "\x16\x60\x03\x0e\xe8\x3f\xa8\xdc\x48\x03\xad\xdb\xd6\x23\x1f\x97" - "\xf7\x06\x73\x78\x4c\xf1\x79\x8b\xda\xc9\x1a\xa2\x14\xd1\xa3\xea" - "\x43\x9e\x76\xd6\xe9\x03\x83\x74\x55\x97\x9b\x66\x30\x6c\x2e\xe7" - "\xed\x68\x27\x94\xdb\x28\x5c\x0e\x13\xd2\xa7\x75\x09\x47\xc2\x1a" - "\xa4\x1f\x46\x79\xbd\xee\x76\x03\x47\xae\x83\xfb\x5a\xe2\x09\x7e" - "\x38\x5c\x14\xa4\x81\x35\x94\x88\x72\x33\x19\x1e\xc3\x02\x1f\xf8" - "\xd0\xd6\x8d\x87\x8b\xfc\xa4\x89\x28\x98\x3e\x05\xcf\x9a\x1d\x05" - "\x0f\xe9\x02\xf0\x98\xff\x1a\x51\x66\xe0\x56\x09\xef\xc1\xf7\x34" - "\x86\x17\x24\xb3\x5d\xe2\xfb\x53\x86\xd1\xc5\xfa\x03\x30\x3d\x4b" - "\xee\xa1\x0e\xb2\x6e\xf5\xbb\x1c\x89\x2d\x18\x37\xb9\xfc\x3b\x65" - "\xed\x49\xa2\x33\x2f\x91\x79\x8e\xdf\x7b\x43\xe7\x39\xcf\x2a\xd1" - "\xe9\x48\x1c\xd8\x01\x5d\x84\x3c\x28\xef\x64\x3c\x23\xfb\xf2\xc1" - "\x49\x3f\x1d\x47\x3f\x9d\x38\x79\xe2\x38\x9a\x3a\x7e\xc2\x38\xca" - "\xfa\xe1\xa8\xac\x31\xdf\xfb\xc1\xf7\xe4\xcd\xf7\x7e\x90\xfd\x3d" - "\x9a\xf1\xb3\x07\xc7\xd1\x8c\x69\xe3\x68\x26\x7e\x33\x66\x4e\x7a" - "\x70\xe2\xa4\x99\xe3\x28\xef\xde\xc9\x78\x9a\x30\xee\xf6\xac\xfb" - "\x46\xcd\x98\x30\x79\x12\x3d\x30\xeb\x8e\xac\x3b\xee\xa0\xf1\x93" - "\xa6\xdc\x9e\x95\xa5\x5f\x6f\xcf\xe2\x2c\x8f\x64\x4f\x9a\x39\x6a" - "\xc6\xa2\x85\x25\x0b\x47\x4d\x9b\x3c\x81\x53\xa0\xdd\x22\x78\x28" - "\x33\x7c\x51\x63\x5a\x07\xc4\xb9\x5c\xd2\xa0\x3b\xea\xc0\x03\xf8" - "\x75\x78\xca\x4e\x40\x07\x5c\xf3\x5c\x1d\xf7\x9d\x1c\x03\xac\x07" - "\x20\xf7\xe6\x2e\x77\x5a\x29\x68\x78\x94\x69\x68\xbf\x91\xf5\xc4" - "\xf5\xef\xe3\xdd\x21\x7d\xac\x49\xc2\xfb\xda\xe8\xf7\xd7\x42\x07" - "\x5b\xff\x4f\x8b\x9d\xc8\x8b\x1f\xe8\x1e\x80\x2e\x04\x7d\xfd\xd4" - "\xe9\xca\x4b\x02\x7f\x27\xa0\x8e\x36\xc8\xe6\x51\x94\x6d\x8d\x90" - "\xf9\x36\xf4\xcf\x51\x1e\x57\xce\x52\xda\xbb\x2d\x25\x39\xc4\xfd" - "\xe4\x2d\xd1\x61\x5c\xe8\x85\x91\x22\x61\xa0\xef\x01\xe7\x98\x82" - "\x73\x8d\x3d\x42\x3f\xf8\x18\xce\x06\xbc\xd3\x61\x5d\x68\x81\x9e" - "\x80\x1e\xbf\x55\x73\x65\x92\x48\xd9\x9e\xa9\xf5\x64\xca\xb1\x12" - "\xe5\xf2\x22\xf8\x3a\xd0\xe8\x44\xbe\x37\x72\x13\xc0\x07\x09\x18" - "\x7f\xd1\x96\xb4\x42\xf0\x77\x20\xbc\x76\xef\xb3\xe2\x5c\x1e\xdb" - "\x11\x57\x9d\xa4\xc1\x7f\x46\xfb\x9a\xb4\xb5\x7b\x8b\x45\x97\x4c" - "\x63\xba\xed\x17\xfc\x9c\x82\x7c\x3d\xbd\x69\xef\x73\x1a\xf8\x20" - "\x91\xe5\x55\x08\x99\x8e\x31\x73\xf0\x32\xe8\xb4\x56\xe4\x2d\xe6" - "\xbc\xa3\x43\x34\x00\xba\xc6\x66\x77\x25\xd0\x09\x1a\x4c\x5a\xca" - "\xde\x45\x11\xf5\x01\xce\x60\x1e\xa4\x98\x1f\xcd\x5d\xe7\x00\xa7" - "\x53\xa6\xc3\x8e\x19\xfc\x18\xe0\x2f\x66\x5d\xa9\xf4\xf7\xf5\xff" - "\xce\xf9\xf4\xb1\xb9\xef\x19\xb2\xae\xe0\x5c\xff\xef\x87\x41\x4b" - "\xb6\x17\xd8\xfe\xeb\x72\x0f\x9e\xe5\xa3\x81\x7e\x35\x36\x5e\xdf" - "\xca\x79\x35\xe0\x28\x52\x93\xb8\x2d\x25\x9e\xe5\x1d\x74\xb2\x98" - "\xc7\xda\xc1\x69\x9a\xcb\x41\xd1\x38\x5d\xd3\xc4\xf8\xb3\xfe\x00" - "\x2d\x3e\x05\x1f\x24\x03\xde\xb6\x68\x3e\x18\xec\x01\x9c\x67\x81" - "\x5f\x2b\xda\xf4\xac\x8f\xae\x39\xa2\x75\x3a\x50\x2f\x99\x20\x57" - "\xd0\xe7\x7d\x30\xf4\xf2\x6d\xd1\xe5\xaf\xa9\xe0\x72\xc8\x9f\xd4" - "\xd5\x29\xf3\xaf\x63\x9a\xeb\x7c\x07\xbe\xbc\x36\x3d\x86\x2f\xb7" - "\x00\x97\xff\x88\x78\x3f\x26\xe6\xfd\x2a\xbc\xff\x4f\xfd\x3d\xe4" - "\xfe\xda\x59\x31\x7c\x5b\x8c\xf7\xa7\x80\x6f\x00\x72\x0d\xdb\xe2" - "\x9a\x5c\xf0\x98\x3f\x22\xff\x9a\x98\xfc\x5b\x91\xff\xbf\x98\x6f" - "\x78\xcc\xe1\xfc\xf5\xba\xec\x20\xbf\x05\xf9\xf7\xc4\xd4\x3f\x07" - "\xf9\x03\x11\xf8\x1d\x8b\x7e\x9f\x5e\x8b\xf7\x5f\x32\xaf\xc3\x26" - "\x4a\x42\x9e\x01\xac\x4b\x58\x8f\x1d\x2e\xe2\xfe\x4a\x37\xc7\xe4" - "\xcf\x40\xbe\x54\x9d\x46\x26\x9d\x46\xb9\xdc\x8f\xa8\xe3\xb8\xc2" - "\x21\x3d\x3b\xa6\x4c\x1e\xca\xa4\x83\x8e\xcf\x1a\x7c\x19\xa7\x4c" - "\x51\x4c\x99\x75\xdc\x8f\x42\xd5\x63\xee\xea\xe9\x2b\xa3\xeb\xc8" - "\x48\x18\xdc\xb6\xab\x01\x63\x77\x34\x8c\x21\xed\xa8\x77\xd8\x7a" - "\xa5\x77\xae\x06\x0f\xdd\x81\xb4\x7f\x07\xcc\xe7\x58\x06\x20\xab" - "\x01\xaf\x3f\x48\xc2\x95\x9b\xaa\x78\xf7\xba\x6b\x06\x85\x88\xef" - "\x47\xf1\x3d\xc3\x16\x5d\x53\x74\x99\xbc\xee\x1a\x5c\x91\x9e\xce" - "\xf6\x5b\x02\xeb\x60\xd1\xf5\x13\x4d\xc1\xbc\xee\x4e\x61\x22\x13" - "\x9e\xc3\x7a\x1d\x7f\xc6\x73\x02\xf0\x5f\x84\x31\x87\xc4\x52\xe4" - "\x5b\x4e\x13\x90\x7e\x48\xca\xaa\xca\x27\x9f\x55\x1d\xb9\xcc\xdf" - "\x63\xf0\xfc\xbe\x5e\xfe\x5d\x86\x87\xfb\xdb\xf5\xfb\x84\x30\xc3" - "\x3a\x67\xc8\xe0\x90\x37\x65\x39\xc8\xa1\x84\x8f\xf2\x62\xa9\x7c" - "\xc7\x30\x5f\xc6\x75\x32\xae\xab\x70\x7d\x00\xd7\xc7\x5c\x5f\x92" - "\xcd\x15\x96\xf2\xc8\xcf\x93\x71\x7d\x10\xd7\x3b\x71\x9d\x89\xeb" - "\x70\x5c\xef\x41\x1b\xc2\x2c\x17\x18\x47\x79\x8e\x15\xc0\xb8\xaa" - "\x78\x8b\xe7\x00\x5d\xb9\x4c\x83\x49\xc8\xd3\x2e\xe5\x55\xe9\x17" - "\x8b\xea\xc7\xeb\x3a\x64\x5a\x8a\x4c\x1b\xa0\xf8\x41\xa5\x85\x0d" - "\x3d\x74\xae\x2f\x4d\xd7\x4d\xba\x2c\xea\x69\x0a\xfe\x0c\xc0\xf7" - "\x30\xae\x42\xc1\x4a\x52\x7d\xae\xc3\x57\xe5\xcc\x71\xea\x4c\x88" - "\xac\x13\xd7\x4d\x2e\xa7\x10\xb8\x96\x73\x1f\xf9\x68\xc8\x6e\x21" - "\xf9\x1e\x63\xac\x82\x37\x5b\xcf\x37\x86\x69\x2c\xcb\xcb\xf4\xf4" - "\xa3\x11\xbc\x34\xb8\xcb\x3d\x24\x14\x23\x47\x59\xe0\xa5\xdb\x98" - "\x67\x98\xee\xdc\xb6\x41\xc5\x72\x1c\x97\x6d\x91\xf0\xcf\x29\x9e" - "\xac\xd3\xe7\xad\x4a\x7e\xaf\x9f\x18\xa3\x5f\x24\xcf\xc6\xc8\x7b" - "\x07\xd3\x3c\xb1\x94\xe5\xe0\x7a\xcc\xff\xde\x19\x26\x6d\xc6\xb5" - "\x7b\x97\xf0\xfb\x00\xfa\x98\xeb\x4d\x2c\xe6\x76\x5c\xbf\xc9\x78" - "\x2f\xdf\x25\x1f\x4a\x63\xfe\x4e\x2c\x92\xef\x76\x63\x3c\xda\x6f" - "\xbc\x33\xea\x49\x2c\x91\xef\x9a\xfa\xe0\x6e\xcf\xd5\xe1\x26\xc6" - "\xb3\xf9\x44\xc5\xf6\xec\x51\x44\xa6\x5b\xcb\x29\xc9\x1b\x3a\x46" - "\xd3\x43\x22\x3c\xaa\x9c\x92\xbd\xa1\x5d\x74\x0b\xd1\x35\xde\xd0" - "\x71\xba\x95\x68\xb8\x37\xb4\x09\x36\xc8\x36\x7e\x7f\xf0\x66\x4a" - "\x48\xc0\xd5\x75\x53\xb9\x29\xc1\x1b\x2a\xa1\x8c\x72\x33\xae\x45" - "\x74\x6f\x92\xe8\xf2\x86\xa6\x20\x5f\x21\x4d\x0f\x8b\x73\x13\x93" - "\xc4\xdf\xf2\xc3\x94\x36\xe5\x79\xe1\xf2\x86\x30\x1f\x08\x35\x21" - "\x5d\x13\xd3\xc3\x5f\xe2\xd7\x25\xb4\x8a\xed\xb9\xd3\xc3\xe7\xc4" - "\x84\xe7\x0f\xe2\xf9\x6f\x02\x7d\x24\xbc\xa1\xb1\xd4\x12\x08\x20" - "\x9f\x4b\x88\xca\xed\xd9\x8f\x5f\x30\x51\x0f\x6c\x08\xad\x72\x7b" - "\x2e\xda\x92\xd7\x83\x76\x60\x7c\xfd\x59\xcf\x0a\x5c\xd7\x6e\xff" - "\xa9\x7c\xae\xd8\xee\x10\x96\xed\x79\xb7\x61\x72\xc5\x6d\xf0\x86" - "\xda\x28\x1f\xd3\x83\xe9\xcb\xfc\x82\xf1\x1f\xb4\x8a\xe7\x56\x63" - "\x09\x7d\x60\x9d\xbe\xcc\x25\xf0\xce\x22\x92\xb7\xe7\x79\x43\x1d" - "\x84\x3a\x1c\x80\x37\x57\xc2\xab\xd8\x5e\x81\xbc\x7e\xce\x17\x09" - "\x87\x61\x70\xde\xe9\x61\xb2\x22\x7f\x45\x4f\xf2\x76\x27\x7e\x35" - "\xf8\x1d\x41\xd9\xbf\x0a\x77\xfa\x21\x81\xf1\x1e\xe5\xdb\xf1\x1c" - "\x0c\x42\x86\x25\x2d\xc3\x34\x00\xf9\xdb\xc1\x2f\x13\xc1\x77\xc0" - "\x77\x87\x4d\xe2\xbb\x76\xc7\xf5\x41\xd9\x8e\x1d\x43\x54\x3b\x76" - "\x5c\xc7\xe9\x9d\xb0\x75\x70\x9f\xdd\xa9\xde\xfd\x00\xe5\x66\xc9" - "\x72\x15\x3b\xb2\x85\x65\x47\x6e\x10\xf2\x05\xba\x96\x33\x1d\x41" - "\xd7\x72\xa6\xa5\xa8\xdc\x91\xed\x75\xae\x23\x91\xbc\x23\xb7\x27" - "\x79\x47\x1e\xca\x3f\xd5\x23\x6d\x90\x1d\xce\xa0\x82\xbd\x14\x70" - "\x66\x83\x6f\x13\x01\xc3\x09\x58\x15\x3d\x6e\x3b\x4d\x5f\x26\x82" - "\xd3\x43\xab\x42\xf9\xcb\x28\x71\x24\x95\x03\xdf\x0f\x41\xa3\x42" - "\xb4\xb3\x11\xd7\x89\x78\x4f\xd7\xa2\xae\x83\x80\xeb\xe4\xfa\x50" - "\x4f\x05\x60\x3e\x0f\x58\x85\x8c\xd3\x97\x6e\x4a\xc3\x73\xcd\x97" - "\x0a\xbf\xfd\x5a\xc5\x8e\x56\xcd\xb2\xe3\x88\xc1\x43\xcc\x3f\x8a" - "\x6e\x9b\x68\x5a\x40\x84\xbc\xa1\x2d\x04\x1e\x4b\x6b\x09\x1c\xe7" - "\xf7\x98\xff\xec\x42\x3f\x33\x4f\x95\xe0\xba\x8d\x98\x7f\x5a\x8a" - "\x9f\xe7\xbc\x07\x99\x87\xa6\x15\x07\x56\x8d\xa2\xe2\x04\x3c\xbb" - "\xf2\x43\x16\x7a\xbc\xd8\x5c\x1e\xae\xd8\xd1\xd0\x52\xcc\xfd\x72" - "\x0c\x65\xb8\x5c\x11\x59\x13\x30\x07\x48\x10\x21\xab\xd3\x6f\x1e" - "\xe8\x70\x89\x96\xc0\x14\xe4\x2d\x26\x6e\x0f\xf3\x11\xe7\x9f\xda" - "\x21\x7c\x61\xcb\xce\x3c\x6e\x9b\x18\x54\x4e\xcd\x1d\x77\x12\xcf" - "\xc3\x9a\x3b\xb6\x31\x9f\x6a\xc2\xb2\x33\x13\x3c\xda\x33\xb5\xa3" - "\x3c\xe9\xf1\x0b\x94\x80\xb4\x70\xb3\x63\x17\xde\x37\x22\x5f\x93" - "\xe4\xdb\x69\x17\x42\xd6\x90\x65\x47\x4d\xa8\x62\x67\xf6\xb4\x0b" - "\x3d\xa2\xd9\xb1\x89\x1e\xeb\x28\x07\xad\x76\xd1\xd4\x33\xa1\xc4" - "\x96\xe2\x42\xe4\xe9\x42\xfa\x36\xc9\xff\x53\xcf\x74\x8a\x69\xb0" - "\x66\xa6\x5d\xf8\x9b\x98\xea\x10\x07\xf3\x9d\x34\xe8\xea\x55\x42" - "\x63\xb9\x68\x6a\xdb\x45\x57\x1f\xf7\x11\xcb\xc4\x94\x39\x9a\x98" - "\x7a\xe6\x9c\x78\xfc\x59\xa6\xcd\x58\x6a\x76\x40\x7e\x9c\x9b\x98" - "\xde\xfb\x9b\x1d\x07\x50\xff\x44\xc0\x75\x09\xaf\x73\x0b\xf2\x7a" - "\xac\x8f\x9d\x49\xa3\xa6\xb6\x4d\x14\x4a\xde\x51\x13\xae\xdc\xd1" - "\xa0\x25\xef\x38\xa2\x55\xee\x68\x15\xc9\x3b\x33\x43\x95\x3b\xb3" - "\xc3\xc9\x3b\xc1\x03\x3b\x1b\xd0\x4f\xc9\xdc\xe7\xdd\x6e\xb2\xe3" - "\x79\x47\x37\xf7\x7f\xc5\xce\xfd\x68\x6b\x2b\x6c\x5e\xa1\x78\x7f" - "\xe7\x7e\x5e\x5b\x40\xd9\xd6\x9e\xe4\x9d\x47\x90\xaf\x55\xc9\xd7" - "\xce\x76\xe6\x4b\xe4\x33\x21\xed\x14\xe6\x3d\x89\x78\x1f\xec\x49" - "\x6e\xb0\xe0\x67\x13\x6b\x1b\x1c\x80\x7f\x8d\xe4\xa9\x8a\x06\x87" - "\xf8\x71\x35\x6c\xe8\x0b\x80\xd3\x50\x31\x3d\x7c\xb7\x00\x0d\x21" - "\x27\x0d\x0e\xad\xb2\xc1\x29\x52\x1a\x1a\x82\x92\xf7\x1b\x76\x32" - "\xec\x9e\x15\x99\xbc\xe6\x60\xc6\x7b\xd8\x80\x6f\xde\x1a\x64\x5e" - "\xb5\xbc\x99\xa9\x59\xde\xac\x10\x15\x6f\x66\xff\xe4\x79\xe1\x0f" - "\x57\xbc\x99\xa7\x55\xbc\x99\x1b\xba\x0a\xb6\xb9\xf3\x00\xb1\x7e" - "\x0a\x7d\x24\x40\x83\x4f\x40\x8f\x6d\xb2\xff\xbd\x4e\xc8\xc0\xb2" - "\xa1\xe5\xcd\x1d\xe0\x85\xe2\xb7\xa5\x6e\x6a\x09\x1c\x93\x34\x15" - "\xc9\x6f\x66\x32\x4f\x71\xff\x3e\x5e\x4c\xe5\xa2\xf2\xcd\x6c\xad" - "\xf2\xcd\xdc\x70\x25\xe0\x26\xa3\x9e\x94\xb7\xfe\x14\x94\xf2\xfa" - "\x16\xf8\xf5\x00\xca\x7c\x42\x8a\xc7\xdf\x3a\xd2\x9f\x8e\x64\x5d" - "\xc5\xfa\x69\x7a\x28\xc8\x3c\x73\x8a\xf5\x9a\xd2\x53\x94\x6f\xe8" - "\x29\xd6\x51\x3c\xdf\x61\x3d\xa5\xe9\x7a\x4a\xd3\xf5\x94\x7c\xb6" - "\x40\xd7\x54\x6c\xcf\x63\x7d\x34\xdd\xa9\xf4\xcc\xf4\x70\x96\x00" - "\x6f\xa4\x02\x46\x9e\xea\x0b\xe4\x59\xbb\x7d\xae\xcc\x2f\xe9\xb4" - "\xbd\x42\x83\xbe\xc1\xaf\x46\x53\xfa\xa6\x55\xd7\x37\x26\x43\xdf" - "\x84\x31\xae\x41\xa6\xb4\x78\xfa\x46\xd3\xf5\x4d\x58\x28\x7d\xa3" - "\xe9\xfa\x86\xd3\xc3\xba\xbe\x09\xc7\xd1\x37\x90\x67\x6e\x6f\xa2" - "\xae\x67\xca\x59\xcf\x70\x7b\xc1\x6b\xb9\x9a\xd2\x33\x0e\xcc\x75" - "\x4c\xac\x67\xc2\x28\xa3\x19\x7a\xa6\x4b\x96\xaf\x60\x5d\xd3\xf3" - "\x02\x41\x7f\xda\x89\x75\x8c\xd4\x27\xa1\xe1\x21\xd6\x27\xa0\xdf" - "\xdd\xb1\xfa\x04\xf0\x6a\x70\x9f\xa6\xeb\xa9\x23\x98\xe9\x86\xa0" - "\x4f\x1a\xa6\x3b\x03\xe8\xeb\xcf\x30\xf7\x87\xde\x76\x96\x94\x7b" - "\x9d\x21\x82\x1e\x68\x15\x2d\xe5\x04\x1c\xc1\xbf\x61\xe8\x0a\x22" - "\xc8\x65\x66\x08\x32\x0e\x1e\xcf\x6e\x29\xfe\x94\xc2\x90\xd5\xa9" - "\x1d\x9d\xde\xc7\x03\x99\x69\x53\xcf\x08\x3f\xe8\xe3\x7b\xbc\xb8" - "\x1c\xfa\x25\xd3\xdf\xdc\xf1\x21\x4d\x69\x13\xda\x94\x02\x9f\x1d" - "\x32\x90\x3d\x75\xbe\xc7\xfa\xf8\xb3\x69\x90\x33\xe1\x81\x5e\xfc" - "\x7f\xa6\x9e\x49\xb3\xce\x6e\xa3\x6f\x4d\x99\x23\xb4\x30\xe4\x0c" - "\xed\x6d\x40\xbb\xf7\x03\xf7\x23\x90\xb9\x56\xc8\x59\x66\x28\x46" - "\xce\x20\x33\x3b\x70\x6f\x57\xf4\xdb\xd9\x0a\x39\xdb\xaf\xc9\xf1" - "\xac\x4d\xce\x31\x51\x4f\x2b\xaf\xc5\x41\xd6\xf6\x6b\x95\x4a\xd6" - "\x34\x55\xae\x5d\x63\xfa\x99\x74\x59\x43\x5f\xe0\x7d\x10\xb2\x63" - "\xc1\x2f\xbe\xac\x15\x47\xc8\xda\xb3\xba\xac\x25\x2b\x59\x43\x9f" - "\x26\x86\x57\x28\x79\x63\xf8\x3c\x0f\xed\x95\xb7\x94\x37\x33\x71" - "\x9f\xa0\x78\x47\xca\x1c\xc6\x95\x37\xf3\x20\x6f\xb9\x90\x37\xc0" - "\x13\x7e\xd6\x9b\xe0\xcd\xff\xe0\xb1\x6e\x5a\xb1\xf8\x8f\xfc\xf0" - "\xd0\x72\xc8\x53\x1e\x74\xd9\xdf\xa0\x47\xff\xe3\xf1\x00\x6d\x85" - "\x3c\x65\x42\x8e\xb2\x21\x4f\xb9\x90\x2b\x96\xa7\x23\xe1\x15\x0c" - "\xf3\xad\x23\xbd\x30\xe4\x58\x19\x2d\x4f\xfd\xad\x83\x76\xb9\xed" - "\xa5\x3e\xfa\xa0\x98\xed\x15\xdc\x57\xf8\xe8\xc0\x44\xfd\x1e\xf6" - "\xcf\x56\xb9\xb6\xc5\x32\x58\x5c\x46\xd7\x9d\xa6\xe1\xb9\xe0\x77" - "\xc2\x7d\x2a\xee\xa7\x4c\xbf\xe5\x20\xec\x88\x8e\x76\xd4\xdb\xc5" - "\x72\x28\xdc\x63\xd8\x3e\xcb\x01\x1f\x5a\x44\x57\x66\x2a\xec\x4b" - "\x4d\xf4\xd8\x78\xad\xcd\x8a\xe7\x41\x68\x7f\x06\xae\x83\xb7\x5c" - "\xa4\x74\xfc\x6c\x5b\xdc\x5a\x39\xdb\x4e\xb8\xcf\x12\x4b\x6d\x29" - "\x1b\x96\xd0\x48\x6b\x80\x2c\xf5\x6e\x2d\xcf\xba\x2a\x8d\xd7\x9c" - "\xd2\xf9\x5e\xb8\xb7\x8d\xad\xbf\x48\x66\x5e\x17\xd0\x92\x51\x9f" - "\xd3\x2a\xc4\xe2\x4c\xaa\x5f\x04\xfd\xe0\x26\x5b\xbd\x5b\xec\x0e" - "\x77\x49\x99\xcc\x36\x70\x61\xdc\x80\xe7\x0d\xc0\x73\xf6\x43\xcb" - "\x72\xe8\x13\x27\xc5\x5d\xab\xed\x72\x0f\xef\x6d\x7f\x3f\xef\x6b" - "\x0d\x9a\xf4\xf3\xfe\x80\x41\xa7\x7e\xd6\xf5\xcc\x3c\x46\x87\x97" - "\x08\x7f\xd5\x53\xc4\xb4\xb0\xb9\x42\xe2\x3f\x41\xc7\xf2\xb2\x30" - "\xdd\x30\x7d\xd9\xb7\x85\xb7\x43\x78\xbc\xce\x33\x54\x8f\xf7\x65" - "\xa5\x42\xd3\x92\xf7\xfa\x44\xe5\xde\xe3\x9d\x4b\x44\x88\xd7\x72" - "\xba\xdc\x37\xda\x7d\xf4\x23\x8f\xea\x8b\x1d\xfb\xe5\x1c\xd2\xb2" - "\xf7\x38\x60\x5d\xc3\xb0\x9a\x51\x3e\x5c\xb9\xb7\x0d\xf9\x60\x6f" - "\xfe\x51\xae\x77\x40\x8e\xf7\x17\x2f\xa7\x6f\x9e\xa6\x1b\x25\x8d" - "\x45\xc5\xde\x00\xeb\x03\xa4\xa5\x21\x6d\x1d\xe0\x07\x91\xdf\xe9" - "\xa3\xbd\x9b\x94\x1d\x7b\xe3\x3a\x23\x1f\xee\x0b\xf8\x3e\x8a\x7f" - "\x12\xe4\x62\x3a\x60\xd9\xfb\x36\xab\x12\xf4\xe5\x75\xe3\x2f\x0d" - "\xbf\x9c\xf8\xaf\xfb\xf4\xf9\xce\x6c\xd8\x5a\xe4\x5a\x49\xc3\xd0" - "\x3f\xc0\xef\x3b\x09\x98\x47\x9c\x14\xee\x1b\x6b\xde\x58\x1e\xc4" - "\x3c\xe1\x3b\xa9\x3e\x7a\xb1\xb1\x3f\x7a\x0a\xb6\x75\x2e\x8a\xf6" - "\xaa\x25\xbd\xb4\xfc\x7c\xfa\x32\x4d\xf0\x3d\xeb\xa3\x7a\xa4\x33" - "\xdd\x00\x67\x96\x41\xb3\xfe\xfb\x65\xaf\x5f\xcd\x39\xbf\xb3\x47" - "\xb8\x05\x79\xbe\xc5\x7b\x4c\xdf\xd9\xab\xe8\xb0\xf3\x48\x27\xf4" - "\x08\xaf\x13\x63\x6e\x16\x58\x6c\x13\xa0\xd7\x77\x1a\x7c\x34\x32" - "\x4b\x5f\x87\x0a\x78\x43\x93\x58\xb7\xc4\x1d\xb7\x78\x4f\xac\x0f" - "\x7e\xc6\xb1\x96\x61\xd0\x43\x52\x37\x1d\x9a\x55\xa6\xf0\x0e\x32" - "\x5c\x4f\xd9\x79\x6a\xc3\xfb\xc5\x01\xd1\x2e\x2a\x0e\xe5\xf2\x3c" - "\xc2\xb3\xa4\x9b\xd3\x3e\x05\x6f\x0b\xcf\x22\xc6\x29\xe3\x53\xcf" - "\xb7\xba\xe9\xa4\x93\x12\xeb\x7b\xd7\x7f\x32\x3c\xbc\xde\xa3\xd6" - "\xb9\x32\x72\x7c\x34\x2a\x68\xe0\xc5\x36\x06\xe8\xcb\xb4\xde\xcf" - "\xb6\x06\xef\x3d\x2c\x2e\x15\x41\xb6\x39\x90\xb7\xc8\x68\x03\xb7" - "\x4f\xb5\x2b\xa3\x3c\xb2\x5d\xbc\x47\x65\x2d\x55\x34\x58\xbc\x8c" - "\x2c\x76\x45\x6b\x0b\xb7\x97\xdb\xc2\x6d\x96\x6d\x91\x3a\x16\x63" - "\x44\xe8\x4e\xcc\xc7\x64\x7a\x2b\x60\x61\xfe\x33\x52\xe7\xa9\x8c" - "\x9c\x58\x3e\xea\xed\x47\xcb\x8e\x0a\xcc\x41\xbf\xe5\xd2\xc4\x89" - "\x93\x34\xe2\x61\xb5\x76\x36\xe2\x61\x8d\xed\xec\x20\xf3\xef\x07" - "\xad\x3c\x26\x7b\x4b\x59\xdf\xca\xbc\xd7\x22\x6f\x1b\xf2\x4c\xd6" - "\xf3\x4e\x56\x7b\x76\xf2\x3a\x80\xaf\x18\xc7\x9e\xf7\xd1\x88\x02" - "\xbf\x1c\xef\x0f\xa5\x19\xcf\x98\xbb\x63\xfe\x37\xc2\x26\x2a\x3f" - "\x68\x8d\x8f\xcb\x9b\x15\x3c\x9e\x85\x2f\x8a\x0e\xd4\x73\x3d\xf3" - "\x94\x6b\x19\x7d\x03\x7c\xf9\x79\xd9\x4a\xba\x96\xf9\x49\x24\xef" - "\x0d\x29\xba\x8f\xd8\x25\xdc\xb0\x3d\xa1\x51\x8b\x97\xd0\x37\x21" - "\x47\x81\xd3\x34\xe2\x50\x7e\xa9\x1d\xb8\x12\x55\x9d\x25\x92\x3a" - "\x28\x79\x6f\xd0\x1b\xfa\x82\xea\xcf\xf2\xda\xce\x08\x9f\xc1\x8b" - "\xb8\xef\xb8\x9c\xbe\xc0\x38\x63\x51\x6b\x0f\x37\x3d\xcc\xfb\x0c" - "\x27\xe8\xa6\x89\xdc\x5e\xb5\xc7\x79\xd3\x9d\xe2\xa2\x98\x2d\xd4" - "\x98\x16\xf4\xd1\x4d\xc5\x18\x5b\x2c\xf2\xe7\xa6\x02\xf5\xbc\x33" - "\x88\x7c\x19\xe2\xa2\x46\x9c\x8e\xb4\xb1\xc2\x9d\xc0\x32\x71\xa0" - "\xcb\x7d\x93\xc3\x47\x3f\x6e\x55\x7d\x73\xd3\x18\x86\x15\x1f\x87" - "\x9d\x41\xf4\x2d\x31\x6f\x02\xd6\x9f\xed\x65\xbc\x76\x79\xd3\x76" - "\x29\x17\x80\x55\x6f\x52\x7a\x5b\x03\xae\x75\x6e\xcd\x01\x1d\xed" - "\xd0\xd6\x7e\x94\x23\xef\xf5\x77\x42\x1f\x47\xe3\xc3\x3f\x34\xcb" - "\x33\x94\x79\xfc\xe6\x91\x0a\xce\xa1\x5c\xcf\xd0\xd3\xfc\x3c\x8a" - "\x9f\x03\x96\x83\x39\xde\x9a\x1c\xd4\x7f\x1a\xf5\xde\x3c\x52\xcd" - "\xe7\x6f\x1e\xd5\x89\x3a\xba\xdc\x37\x8f\xf4\xd1\x68\xb3\xda\x73" - "\x39\x98\xd3\xdf\x5e\x32\xcb\x0e\xcb\x9c\x92\xe9\xcc\x33\xcd\x5b" - "\xa5\xfc\xb5\x77\x5a\x1a\x2c\xba\xde\xe0\x75\x9a\xd4\x13\x94\xd9" - "\xd1\x6c\x93\xfc\x6d\x12\xa6\x9b\xd7\xfd\x46\xf3\x9b\x78\x5f\x4c" - "\xa9\xaf\xcc\x8e\x4b\x7f\x37\x7b\xf0\x3b\x8a\xdf\x71\xfd\xb9\x1d" - "\xbf\x10\xee\xa7\xe0\x77\x5c\xd2\x6e\x73\x61\x82\x0f\xef\x3a\x61" - "\xb3\xf3\xb3\x8f\x6e\x3e\x22\x36\x67\x98\x60\x97\xc8\xfb\xfa\x6f" - "\xf0\x3a\xc1\xcd\xd0\xb3\x37\x95\xaa\xbe\xc8\x94\x6b\x2a\x90\x47" - "\xa6\xbb\x70\xd5\x88\x60\x63\x59\x80\xf1\xce\x68\xac\x09\x90\xfd" - "\x26\x6e\x7f\x26\xdb\x0f\x22\x00\xfa\xf3\x75\x71\x8d\xf0\x1f\xae" - "\x0d\x11\xef\xcf\x75\xb9\x33\x21\xff\xf3\xa7\xa8\x35\x87\x43\xc5" - "\x0c\x4f\xe7\x09\x61\xb4\x5f\xe9\xb4\x83\x39\xdc\x97\x78\x7e\x0e" - "\x6d\xb7\x9e\xa5\xcc\xbd\x22\xe5\xa3\x9c\xc3\x0e\xa2\x2d\xd0\x23" - "\x18\x6b\xe4\x5e\x41\xbd\xf4\x0f\xc8\xc4\xf8\x7f\xd3\x71\x63\x3f" - "\x69\x3d\xde\x6f\xc0\x3b\x8c\x3d\xfe\x66\x47\x90\x18\x56\x98\xdb" - "\x87\xf2\x1f\x6a\x7e\x33\xc6\x6a\xf4\xf9\xc1\x9c\xb2\x62\xe8\x99" - "\x5e\xbd\x95\x39\x7b\xe5\x19\x11\x34\xda\x77\x78\x2b\xcb\x42\x26" - "\xf8\xff\x69\x47\xbf\xfc\xdf\x8b\xf3\xad\xc9\x87\x33\x54\x9f\x69" - "\xa0\x4b\x74\x9f\xdd\x6a\x51\xfd\x75\xcb\xd8\xe8\xfe\xba\x15\xb6" - "\xcd\x2d\x6b\xf0\xab\xc5\x6f\x97\x7a\x8e\xfc\xdd\x52\x1c\x71\x7f" - "\x00\x3f\xe8\xce\x5b\x30\xfe\x8f\x08\xaa\x7e\xe0\x74\xb4\x83\x79" - "\xe4\x1f\x64\xd1\x7a\xf2\x88\xf7\x6b\x39\x9d\xf9\x99\xd3\x35\xd8" - "\x33\x3e\xba\xa5\x1a\xef\xd3\x58\x56\xab\x34\x8a\x7a\xef\x45\xed" - "\x9e\xe5\xd0\xd5\x74\xcb\xe7\x0c\xcb\xba\xaa\xa2\x82\xf9\x14\x65" - "\x36\x59\x43\x15\x15\xa8\xaf\xc3\xa0\x2b\xd2\x8e\xf1\x7b\xe6\xc9" - "\x2e\xf7\xad\x66\xd0\xa5\x41\xee\xc7\x62\xbe\x17\xdf\xd6\xb8\x35" - "\xb3\xd7\x26\xb3\x34\x38\x58\x1f\x75\xd0\x77\xc7\x40\x67\xa1\x6f" - "\x3f\xca\x56\x63\xcd\x77\xef\xe4\x67\xe8\xca\xcf\x71\x9f\xd5\x0c" - "\x9d\xd4\xbd\x76\x6f\x41\x8f\x89\x06\x74\x9b\x28\x27\xb4\xf6\x4c" - "\x6a\x28\xe5\xed\x22\x6f\xfb\x1e\x6a\x09\xfd\x96\xec\x4f\x49\x18" - "\xb7\x78\xc1\x03\xae\x65\x22\xfc\x4e\x77\x83\xd9\x1b\x3a\xe7\xc1" - "\xd8\xfc\xed\xd3\xf4\x5d\x49\x8f\x17\x4f\x60\xd4\x7f\x5c\xc2\xd6" - "\xe9\xd3\xd1\xbe\x61\x9e\x08\x6d\x38\x29\x02\xb0\xef\x52\xd6\x77" - "\xd3\xc8\xd7\x97\x53\x56\x6d\x37\x65\xd4\x75\x53\xa6\x38\x95\x69" - "\xaa\x85\xdd\xf6\xf8\x85\x34\x82\x4e\xc8\x1b\x54\x4c\x96\xba\xe5" - "\x24\x79\x24\x5c\x09\xfb\x2d\x04\xfb\xed\x5c\x26\xeb\xc6\x5e\xfb" - "\xad\x47\xda\xc5\xfb\x0a\x15\x1f\xed\x2b\x1c\xe8\xa0\x84\xd4\x02" - "\x4a\x03\x7e\xae\xb3\x74\xeb\xfc\x54\x0c\x88\xdc\x66\x9f\xde\x5e" - "\xd0\xbc\xd4\xea\xa0\x01\xb2\xad\xd0\xd7\xa2\xf2\xa3\xec\x7e\xc7" - "\x61\x13\xf3\x54\x80\xe5\x86\xdb\xb0\x8a\xf7\x8c\xf7\x0c\x0d\x9a" - "\x17\xd7\x8a\x20\xa7\x97\x0c\x17\xd0\x99\xdf\x75\x70\xdd\xbb\x91" - "\xde\xe5\xfe\x6e\xb5\xcf\xf4\xab\x91\xfd\xf1\x28\xe6\x47\xba\x5e" - "\x19\x79\x8d\x30\x95\x83\x47\x1b\x1a\x56\x86\x60\x7b\x9f\x65\x99" - "\x1d\x99\x36\xbd\x48\x84\xec\x0b\x78\xff\x7e\x24\xb1\x6f\x01\xef" - "\x29\xfe\x06\xb6\xcd\x57\xf9\x13\xf0\x78\xc1\x73\x05\x6b\x11\x60" - "\xae\x6d\x68\x10\x98\x9f\x7f\x5d\x7f\x06\xb4\x33\x75\xe3\x10\xf6" - "\xb3\x19\x39\xc5\x47\x53\xb6\x31\xee\xd2\x97\x06\xba\x13\xf6\xd6" - "\xb5\xc0\xab\x22\x00\x3a\xe0\x3d\xc6\xff\xc9\x4e\x7d\xff\xd7\xcf" - "\x7b\xaf\x48\xc3\xf8\x7f\xff\x01\x4e\x2b\x19\x4e\xb6\x12\xbb\x88" - "\xbb\xf7\xcd\x36\x13\xef\x49\x03\xde\xf5\x28\xb3\xc7\x80\x83\x71" - "\xea\xd7\x9d\xa6\x87\x1e\x42\xda\x11\x03\x0e\xf2\x5c\x87\xe7\xd6" - "\xde\x3c\xaa\x4c\x7b\x44\x99\x87\x3a\x4d\xb7\xfe\x1a\x69\xa1\xe8" - "\x32\xa3\x52\xa3\xcb\x8c\x1a\x16\x51\xa6\x5c\xd5\x33\x2a\x2b\xa6" - "\x4c\x4e\x4c\x99\x19\x97\xe2\x36\xaa\x30\xa6\x4c\x49\x4c\x99\x35" - "\x97\xe2\x36\xaa\x26\xa6\x4c\x43\x4c\x99\xfd\x11\xb4\x64\xbf\x9a" - "\x2c\xa4\x35\xc5\x94\x39\x1e\x53\xa6\xc3\x78\xee\x87\xc6\xa9\x8b" - "\xb7\x90\x0d\xbc\xc9\xbe\x5b\xfe\x8d\xe8\x9f\xce\x57\x9f\xee\x52" - "\x65\x6f\xcb\xbc\xb4\x5d\xb7\x8d\x8d\xae\xef\xb6\x29\xd1\xf5\xdd" - "\x36\xfb\xd2\x76\xdd\x56\x1c\x53\xa6\x3c\xa6\x4c\x75\x44\x99\xad" - "\x7a\x3d\xdb\x62\xca\xec\x89\x29\xd3\x78\x29\x5f\xdd\xd6\x1a\x53" - "\xa6\x3d\xa6\x4c\xf0\x2b\x68\xc1\xe3\xb8\xf2\x6b\x1b\xc2\xb6\xf2" - "\x3d\xb0\x11\x46\xcf\x61\xdf\x08\xde\x07\x7d\xa3\x3b\x98\xc4\xfb" - "\x73\x3c\x5e\x1d\x76\x06\x31\xb6\x8c\xc6\xfc\x67\x8c\xc7\x18\xb3" - "\xd8\x6f\x84\x65\x5a\xd9\xd8\xa3\x33\xfb\xb3\x45\xa5\xef\x99\xee" - "\xbf\xc6\x75\x1d\x1e\xc6\xe3\xd4\xe8\x4d\xbd\x36\xb1\xf2\x41\x23" - "\x1d\xce\xdf\x8d\x7d\xd8\x7a\xe5\x8f\x92\xc0\x36\xf9\x61\xa7\x2c" - "\x73\x24\xc2\x8e\xe6\xfa\x03\x7b\x96\x07\xcd\x31\x78\x34\x5c\x06" - "\x8f\x54\xd8\x46\xd9\x2d\x18\xbd\x78\x7f\xbd\xb9\x16\x36\x10\xec" - "\x7e\xc6\xed\x04\x65\x65\x49\x9b\x6c\x41\x37\xf1\xbd\xb7\xf4\x2e" - "\xb9\xff\xae\x6c\xd2\x2c\x47\x23\xea\x67\xdb\xbd\xb1\xf8\x3c\xfb" - "\x48\x61\xfc\x65\xdb\x2d\xeb\xe5\xc3\xa5\x7e\xe0\x95\x55\x60\xf8" - "\xa9\xf8\x28\x6b\x93\xb4\x35\x2a\x0e\x65\xb1\x6f\x00\xfb\xd0\x1c" - "\x0e\x64\x73\x1e\xf0\xff\xe8\x22\xa3\xbd\x18\xeb\xfd\xc8\x3b\xf6" - "\x72\x34\x53\x7d\x98\x75\x20\x9a\x27\x93\xc0\x2b\x59\x47\xa3\xfb" - "\x3d\xcb\x17\xdd\xef\x59\xfe\x68\x9e\x34\x81\x27\x6f\x37\x47\x97" - "\xb9\x3d\x3d\xba\xcc\xed\x19\x11\x65\xaa\x55\x3d\xb7\x67\xc7\x94" - "\xc9\x8d\x29\x93\x17\xf1\x8c\x36\xde\xee\xe8\x9d\xfb\x48\x1f\xa8" - "\xdb\x9d\x11\xcf\xa6\x4d\x52\x7f\xde\xbe\xce\x48\xe3\xb5\xa3\xba" - "\x57\x94\x0f\x8e\x0e\xaf\x21\x46\xde\x39\xff\x81\x18\x1c\x9a\x62" - "\x70\xe8\x95\x7f\x7d\xef\xfe\xe3\x93\x74\xc7\x1e\x7d\xef\xbe\x03" - "\x63\xf6\x74\x7e\x06\xac\x1a\xe4\x07\x1d\xee\x48\x8d\x86\x77\xc7" - "\xb0\x68\x78\x77\x8c\x8c\x78\x4e\xc3\xf3\xd8\x88\x36\xa4\x25\xda" - "\x28\x01\xfc\x02\xfb\xed\x8e\x59\x46\x3a\xcf\x29\x81\x6f\xbb\x4b" - "\x8e\x35\x39\xec\x5b\x36\xf8\x04\xdd\x31\x9e\xe7\x9f\x3a\xcc\x48" - "\xf9\x27\xd5\xae\x3b\x36\xc5\xe0\xb1\x2d\x06\x8f\x3d\x11\xed\x0a" - "\x58\x57\xd1\x03\xd6\xd0\x83\x0f\xb3\xed\xc3\xfe\x94\xd2\xc7\x6b" - "\x25\x6c\xb6\x0b\x94\xc6\xbe\x75\x27\x4b\x28\xd1\xeb\x6c\xc7\x5c" - "\x6e\x5f\x41\xbf\xfc\x94\x72\x28\x47\xf9\x56\x91\xbd\xcb\xfd\xbd" - "\x74\x83\x1f\xb5\xb5\x87\x72\xb4\xca\x0f\x33\x90\x06\xfd\x97\xb5" - "\x55\xd9\xb9\x07\x8a\x85\x2b\xaf\x06\xf4\xc4\xbc\x68\xcc\x75\xfa" - "\x3c\x62\x16\xfb\x88\xb1\x1f\x2b\xc6\xf8\x54\xb5\x0f\xff\xbd\xd9" - "\x11\x7c\x1d\xb0\x2f\xbf\x5b\x9c\xa0\x31\xc3\xd9\x06\x60\x19\x65" - "\x5f\xb3\xc3\x21\x3f\xf1\xdc\xdb\x1b\x3a\x2d\x6d\x37\xbc\xb7\xeb" - "\x65\x6b\x22\xca\xfa\xf5\xb9\x71\x3b\xbf\x1b\x1d\x22\xf3\xe1\x80" - "\x9f\x00\x27\x5d\xd9\x7b\x63\x86\x1f\x86\xbc\xa2\x4c\x93\x51\x86" - "\xe7\xd1\x72\x8f\xb7\x84\xcc\xb7\x95\x92\xd9\xb3\xfc\x84\x84\x6d" - "\xf8\x6d\xc0\x96\xee\xf0\x96\xb6\x93\x37\xd0\xca\x6b\x5d\x66\xe5" - "\xa3\x33\xc6\x9e\x18\x24\x4b\x67\xe5\x21\x8c\x71\x63\xec\xe1\xca" - "\x43\xd9\xc0\x0d\xe3\xd9\xf7\x26\xb2\xbe\x89\xa4\xdd\xa4\x49\x33" - "\x1e\x9c\x3e\x75\xd4\xcf\x1e\x9c\x3c\x6b\xd2\x5d\xf6\x59\xf3\x9f" - "\x99\x5b\x38\x6a\xe1\x73\x25\xf6\xa5\x8b\xe6\x97\xcc\x5f\xf0\x73" - "\x7b\x96\x73\x84\xd3\x3e\xa7\x44\x5d\x33\x8b\xe6\x2c\x2e\x19\xc7" - "\xb7\x23\xed\xc5\x8b\xe6\x2e\x91\xb7\xb7\xa4\x50\x34\x90\xf9\x25" - "\x73\x17\xd9\x47\x14\x8e\xb4\xdf\x3b\x67\x7e\xd1\x73\x8b\xe6\xc6" - "\x85\x75\x97\x7d\xd1\xdc\x45\x73\xe7\x14\xda\xc7\xd9\xb3\x18\x72" - "\x24\xb8\x88\xfe\xcc\x32\xc6\x31\x1e\xbf\xaa\xdc\xe2\xa8\x3e\x9e" - "\xf9\x14\xff\x8c\x09\x5c\x3a\x96\xdd\x69\x89\xe6\xb9\x3b\x6d\xd1" - "\x3c\x77\x67\xe6\xa5\x63\xd9\x9d\x31\xe3\xdf\x9d\x31\xe3\xdf\x9d" - "\xb3\x2f\x1d\xcb\xee\x8c\x19\xff\xee\x8c\x19\xff\xee\xec\x1d\xff" - "\xc0\x4b\xbe\xd5\x52\x2f\xdc\x19\x33\xfe\xdd\x19\x33\xfe\xdd\xd9" - "\x18\xf3\x7c\x2c\xe2\xf9\x5a\x3c\xb7\x45\x8e\x8f\x78\x0e\x18\xf2" - "\xd9\xa7\x5f\xbe\x6f\x31\xf2\xb0\xae\x87\x6e\x6e\x53\x79\xbf\x6f" - "\x8f\xc8\xdb\xae\xe7\x1d\xd3\x2b\x7f\xbc\xaf\x8d\x74\x35\x5f\xff" - "\xfe\x6b\xac\xd3\xd9\x1f\x8f\xc7\x26\xc8\xc7\xb7\xcf\xd2\xf7\xaf" - "\x61\x58\xcc\xc3\xec\x9f\x29\x5e\x7d\xb4\xab\x7e\x30\x59\xb8\x4c" - "\xfd\x4b\xec\xd7\x3b\x66\x24\xfb\xea\x22\x8d\x7d\x97\xa1\x53\xbe" - "\xcf\xf6\x6f\x48\x8d\x17\xdf\xf7\x49\x9b\x1f\x65\x74\xf8\x72\x5e" - "\x03\x38\xec\x0b\x6c\xa9\x52\x63\x71\x1b\xee\x53\x99\xa7\x51\xde" - "\x2c\x4c\x63\x9e\x65\x1f\x68\xa4\xa5\xe1\x97\x0e\x78\x3e\x03\xde" - "\x9a\x21\xf1\x6d\xcb\x58\x3b\xb7\x77\x3e\x68\x22\x6b\x95\x5b\x6b" - "\xf5\x6a\x6c\x5b\xff\x20\x5d\xad\x2d\xec\x2d\x17\xee\x83\x79\xf5" - "\x48\x8f\x3f\x4f\xfa\x01\xe4\xe5\x07\x16\xb5\xde\xf2\x03\xf4\xff" - "\xd4\x31\x6a\xed\x74\x6f\x39\xf4\x6d\x37\xe0\x5c\xc0\xb5\x07\xd7" - "\x7f\x37\xe0\x7b\xe4\x7c\xfb\x07\x25\xc2\x9d\x30\x93\xe1\xc6\xa4" - "\xaf\x83\x7e\xeb\xb6\x86\xca\xf3\xe2\xbc\x6b\x10\xee\xc4\x07\xe3" - "\xa4\x7b\x60\x33\x74\x03\x8f\x00\xe3\x1b\x91\xde\x2a\xdc\x83\x66" - "\x71\x7e\x1f\xd7\x87\x32\xfd\xd9\xda\x86\xff\xad\xf2\xe1\xcf\xce" - "\x88\x69\xc7\x97\x27\x29\xfb\x57\xaa\x1d\xd9\xe1\xe8\xba\xb3\xc7" - "\xc6\x6f\x47\xf6\x2c\xb4\xe3\xcb\xf8\xed\xc8\x2e\x96\xb4\x35\xa1" - "\x2d\xa6\x4b\xde\xad\x43\x5b\xbe\x94\x74\x8f\x4e\xdf\xa6\xdb\x42" - "\x01\xcc\xc3\xd2\xf0\x4e\x96\x9d\x59\xda\xd7\x6f\x7a\xbe\x26\x6b" - "\x0d\xcd\x88\x53\x67\x9b\x70\x0f\x98\xe9\xa3\x1f\xca\x73\x0d\x11" - "\xe9\x21\x85\x0b\xe8\x64\x62\x3a\xa1\x3d\x28\xd7\x5f\x7f\x1b\xf3" - "\x12\xb5\x16\xf2\x43\xc8\x7f\x36\x19\x6b\x99\x8b\x4b\x85\xdf\xa0" - "\x23\xde\x39\x62\xde\x05\x23\xde\xad\x89\x7a\xb7\xb2\x37\xbd\xd6" - "\x48\xff\x7a\xfd\xf4\xc3\xa6\x98\x7e\x42\xff\xdc\xf5\x58\x74\xbb" - "\x7f\x78\x5c\xb5\x0f\x7d\x74\x09\xad\x7f\x18\x44\x1f\xf5\xc4\xef" - "\xa3\xbb\xd2\xe3\xf3\xda\x5d\x72\x1d\x4d\x0c\xa6\x38\xf0\xee\xca" - "\x45\xdf\xf5\x48\x1e\xd4\xfb\xe9\xd2\xfe\xb9\xab\xc8\xe8\x9f\xaf" - "\xd7\xc6\xbb\x76\xc7\xb4\x31\x7c\x92\x7e\x34\x4a\xb5\xf5\x47\x2b" - "\x63\x60\x1f\x89\xcf\x8b\x77\xf9\xd0\xce\x70\x3f\xed\x0c\xf5\xcf" - "\x8b\x3f\xb2\xa1\x3d\xe1\x4b\x79\xf1\x47\x59\xaa\x0c\xc5\x2b\x33" - "\x45\xb8\xe3\xd5\xf3\xa3\x42\x57\x88\xed\xdc\x1f\xd5\xf2\xfa\x52" - "\x44\x7a\x69\x34\xff\xa1\x0d\x5c\x8e\xe9\x17\x52\x7a\x96\xfb\xe1" - "\xa4\x9d\x4c\x5f\xc5\x93\x5d\xee\x1f\x1d\x8f\xa1\xd5\xb9\x93\x34" - "\xf6\xb1\x4e\x53\xc2\x36\x45\xaf\x71\xc3\x63\x70\x0a\xc6\xa7\xd7" - "\xd8\x34\xd0\xeb\x5c\x7c\x7a\x8d\x1d\xd9\x3f\xbd\xc6\x72\xff\x9f" - "\xbb\x94\x5e\x63\x0b\x22\xe9\x05\x5b\x57\xb6\xef\x3b\x36\xf0\x46" - "\x4f\xbe\xa8\xe7\xb6\x86\x29\xcd\x0a\x5e\x51\x65\x3a\xb8\xcc\x26" - "\x6b\x50\xf1\x09\x6c\x48\xcb\x59\x1a\x5b\x6a\xc8\xff\xa0\x1a\x1a" - "\x20\x7a\x1e\x65\x3f\xa2\x04\x2e\xe7\x75\x9e\xf3\x78\x43\x59\xc4" - "\xf3\x8f\x98\x7a\x5b\xe3\xeb\x82\xb1\x7e\xd0\xf4\xa5\x4b\xd3\xc7" - "\x59\x94\x1f\xd9\xb8\x9c\x68\x1d\x31\xce\x1e\xdd\x47\x3f\xe2\xb5" - "\x53\xab\xbe\xed\xf4\x95\xbf\xcb\xf7\xd9\xb8\xea\x4b\xfb\xec\xc7" - "\xb7\xab\xfe\xfa\xf1\x35\x31\xf8\x35\xc4\xef\xaf\x71\x9e\xfe\xfb" - "\x6b\xdc\xf1\xfe\xfb\x6b\x1c\xaf\x9f\x9e\xf3\xd1\x8f\xb3\xa2\xc7" - "\x8d\x1f\xa7\x45\xb7\x17\xf5\xa2\x9c\x30\x5d\x75\x2d\x3f\x7f\xdd" - "\x76\x1b\x3f\xd6\x71\xdc\x57\x7c\xae\x08\xf8\x0f\x67\x1c\xaf\x14" - "\x46\xbf\xb0\x41\xc3\xea\xe5\xf1\xf7\x5b\x79\x8e\xdb\x52\x43\xc4" - "\xfb\xc8\xf6\x6f\xb1\xed\x7e\x77\x92\x66\xa2\x56\xdc\x9b\x4e\x52" - "\xce\x9f\x35\x93\xa9\x94\xf7\x3c\xa5\xdf\xba\x5c\x43\xb8\x7b\x58" - "\x64\x5f\xf0\xde\x27\xcf\x4d\x37\xa8\xb9\xd3\xdf\x50\x7e\xbb\xea" - "\x97\x9c\x77\xa3\xe9\x78\x77\x4e\xfc\x7e\xb9\x3b\x0f\xfd\xf2\xb7" - "\xf8\xfd\x72\x77\x49\xff\xfd\x72\x77\x35\xfa\xe5\x6f\x97\xca\xd1" - "\xdd\x0d\xba\x1c\xad\xe6\x32\xf6\x05\x3c\x1f\xcf\xf9\x06\xe7\xc1" - "\x3d\x64\x24\x47\xd2\x64\x54\x87\x21\x47\xb2\xcc\x71\xc0\x92\xf5" - "\xab\x3c\x77\xb7\xea\x30\x22\xe0\xe6\x90\xb5\x23\x9e\x9c\xe4\xd8" - "\x38\xef\x6d\xc5\x64\x01\x0d\xf3\xb6\x30\x8c\x45\x44\xa8\xe7\x19" - "\xce\xc7\xe9\xb7\x05\x22\xe5\x24\x27\xd7\xc8\xc7\xba\x4e\xcf\x9b" - "\x23\xba\x1c\xc4\xf9\x62\x60\xeb\xed\x1f\x20\xc7\x11\xce\xcf\xf9" - "\x62\xf2\xd4\x28\x79\xcc\x39\x1e\x2d\x8f\x39\xbb\xa3\xf9\x13\xf4" - "\x47\x39\x0d\x7a\x0e\xf7\x66\xe0\xf0\xb5\xf9\xeb\xf2\xb2\x39\x7e" - "\x64\x8c\x6c\x82\x07\xc6\x37\x2b\x1e\x18\xff\x76\x34\xae\xe3\x27" - "\xc6\xe7\x81\xf1\xb3\xfb\xe7\x81\xf1\xce\xfe\x79\x60\xfc\x26\xe6" - "\x01\x1f\x8d\x6f\x8a\x96\xcd\xf1\xbb\xa2\xdb\x8e\x7a\xa5\x6c\xd2" - "\x35\x57\x22\x9b\xb0\x85\xae\xed\x4f\x0e\x59\xa6\xd8\x7f\xa4\xbe" - "\xdb\xd8\xeb\xf8\x5a\x34\xb3\x40\xae\x80\xdf\x3d\x05\xbc\xa6\x04" - "\x1d\x9f\xcd\x34\xac\x93\xe7\x31\xef\x29\x89\xa4\xe3\x06\x75\x06" - "\xd2\x85\xbc\x5f\xf2\xbe\xb2\xa2\xe7\x84\x43\xd1\xed\xbf\x67\x53" - "\x7c\x7a\xde\xb3\x0b\xf4\x74\xc5\xa7\xe7\x3d\x47\xfa\xa7\xe7\x3d" - "\x6d\x7c\x46\xea\x52\x99\xba\x27\x64\x5f\x22\x6d\x14\x59\xe6\x2c" - "\x4d\x78\xe8\xeb\x8d\x4f\x13\xc6\x44\x8f\x4f\x13\x86\x5d\xf9\xf8" - "\x34\xc1\x19\x7f\x7c\x9a\x50\x1d\x7f\x7c\x9a\xd0\xa0\xe4\x61\x82" - "\x2f\x5a\x1e\x26\x78\xa2\x79\x02\xb4\xfb\x5f\x1b\x9f\x26\x66\xc5" - "\xc8\x40\xd5\x49\x9a\xf8\x2e\x6c\x0a\xdd\xde\x9c\xf4\x5c\x34\x8e" - "\x13\xa7\xc4\xef\xb7\x89\x85\xe8\xb7\xaa\xf8\xfd\x36\xb1\xbc\xff" - "\x7e\x9b\x58\x8b\x7e\xab\xba\xb4\xdf\x26\xee\xb9\x72\x9b\x62\x62" - "\x7b\x74\x9f\x4d\x3c\x7a\xe5\x7d\x36\x69\x64\xfc\x3e\x9b\x34\x31" - "\x7e\x9f\x4d\xd2\x7d\xd3\x27\x6d\x8a\xee\xb3\x49\x25\xd1\x7d\x06" - "\xba\xfd\x0f\xfb\x0c\xfd\xb3\x46\xf9\x27\x4c\xba\x80\x79\xfb\x80" - "\x2e\xf7\xa4\x0e\x1f\xdd\xbb\x47\xcd\xad\xef\x55\x63\x87\xea\xc3" - "\x77\x90\xc7\x77\xe9\x38\x70\xaf\x45\x4f\xfb\xd9\xa5\xfd\x70\x6f" - "\x06\x74\x74\x47\x63\xa9\xdc\xdb\x52\x7d\xc8\x34\x47\x3e\xcf\x72" - "\xde\x9f\xba\x77\x22\x97\x45\x1f\x0b\x6f\x30\x44\xac\xd7\x91\x3f" - "\xc0\x70\xf8\x6c\x68\x0c\xac\xe2\x2b\x19\xe3\x2f\xe3\x53\xb3\xc6" - "\x53\x76\x07\xe0\xdd\xf7\xbc\xe2\xd5\x7b\x63\xed\xdf\x7a\xbc\x7b" - "\x58\xf1\xe9\xe4\x11\x31\x38\x04\xe2\xf3\xe9\x7d\xa9\x68\x43\x7d" - "\x7c\x3e\xbd\x2f\xb3\x7f\x3e\xbd\x0f\xfd\x4f\xf5\x11\x73\x9f\xc1" - "\x8f\x87\x7c\x31\x73\x9f\xfb\x1c\xd6\x80\xe2\x1d\x69\x13\x55\xee" - "\x5d\xd3\xe5\xbe\x2f\xd6\xfe\x43\xdf\xe4\x0e\xd4\x71\x4e\x8a\x29" - "\xdf\x8f\xfd\x77\x1f\xdb\x7f\xef\xf4\x83\xf3\x65\xec\xbf\xfb\xd8" - "\xfe\x7b\xe7\x52\xd9\xca\xd5\xed\xbf\x78\x73\xbc\xdc\x91\xf1\xfb" - "\x3f\x37\xa6\xff\x29\xaf\x04\xf3\x61\x59\x3e\x3a\x5f\x51\x64\x3e" - "\xf6\x4d\xe2\xbc\xcc\x23\x71\xf2\xd6\xc4\xc2\xec\x27\x9f\xe7\x12" - "\xde\x63\x5f\xaa\xb8\xbc\x97\xab\x9f\x29\x99\x3c\x31\x5a\x1e\x27" - "\x9b\xa3\xe5\xf1\xbe\x86\xe8\x72\x93\x33\xa2\xdf\xdf\x1b\xf8\xdf" - "\xd3\xb1\x93\x37\xc5\xf0\xc0\xc1\x93\x74\xff\x35\x8a\x07\xee\x9f" - "\x1f\x83\xc7\xae\xf8\x3c\x30\xb9\x11\xed\x3f\x18\x9f\x07\x26\xfb" - "\xfa\xe7\x81\xc9\x21\xd0\xf2\x60\x24\xdf\xce\x2c\xcd\x19\x10\x9d" - "\xe7\x7e\x7b\x7c\x9d\x77\x7f\x76\xfc\x35\x82\xfb\x67\x28\x1a\xdf" - "\x5f\x11\x4d\xe3\xfb\x1d\xd1\x34\x44\x5b\xfe\xe7\x34\xec\x8d\x07" - "\xd1\xe5\xbe\x3f\x56\xfe\xbd\x27\xe9\x27\xba\xfc\x4f\x79\x20\x06" - "\xc7\x80\xc2\x25\xde\xba\xc8\x4f\x78\xfe\xeb\x8d\x4f\xcb\x9f\x8c" - "\x8c\xdf\xe6\x9f\x4c\xc4\x18\xe4\xd5\x2e\x91\xa5\x9f\xcc\x46\xfa" - "\x4c\x5e\x0f\xe5\xf5\x90\x3a\xa4\xcf\x0c\x91\x45\x8e\x57\xbd\xe3" - "\xd2\x4f\xca\xd9\x17\x85\xe9\xcf\xfc\x6b\x1d\x46\x33\x78\x0c\x62" - "\xbc\xf2\x4b\xa5\xdf\x82\x75\x0d\xf3\xfa\x8d\xcc\xeb\x3f\x91\xf6" - "\x1f\xef\xb3\xb0\x1f\xa1\xd5\x49\x33\x38\x2e\x85\xc1\xef\x9c\x3f" - "\x06\xf6\x71\x96\x0b\xce\x6f\xe4\x55\xeb\x66\xe5\x31\xba\x69\x8a" - "\x39\x7e\x1f\x4f\x19\xd6\x3f\xef\x4c\xc9\x56\xfd\x3c\xa5\x28\xba" - "\x9f\xa7\xcc\xd0\xdc\x83\x66\x71\x5b\xc1\x03\x57\x24\x27\x25\x76" - "\xe1\xef\x57\xdf\xaf\x7e\xb4\xb5\xb8\x8c\xbe\x75\x9a\xa6\x1c\x93" - "\xf5\x99\x44\xd0\xba\x2a\x81\x1a\xa5\x0e\x98\x7a\x8b\xc4\x13\x79" - "\xf2\x43\x64\x12\xab\x9f\x6e\xe5\x77\xf5\x6e\x11\x44\xbe\xa3\xbc" - "\x27\xc0\x67\xab\xc1\x0b\xd7\x9e\xa0\x29\x67\xa2\xca\x43\xf2\xbd" - "\x0a\x46\x66\xbd\x94\xc7\xa9\x19\xc6\x9a\xee\x1a\x3c\xc7\x5f\xf7" - "\x9d\x9a\x6b\xf8\x3e\x28\x9f\xb1\xa9\xfd\xee\x5f\x32\x4e\x7c\x56" - "\x86\x71\xba\xbc\x1e\x98\x5a\x6b\xf0\xaf\xf2\xb5\x9c\xba\xab\xcf" - "\x97\x6f\xea\x7e\xbc\x2b\xb8\xcc\xda\x60\x84\x1c\x4c\x6d\x8b\x84" - "\xa3\x62\xa2\x4c\x0d\x1a\xfe\x78\x5d\xee\x69\xe6\xaf\x80\xa5\xe3" - "\x33\x6d\x64\x34\x3e\xd3\xc6\xc2\x4e\x49\xd7\x61\xe4\x5e\x0e\x06" - "\xf7\xb9\xe2\x59\xe6\x87\x69\x05\x97\x5b\xf3\x4b\xb4\xd1\x8c\x8d" - "\x97\xf0\xd6\x34\x69\x2f\x31\x8c\xaf\xc0\xf1\x68\xd4\xdc\x42\xee" - "\xdd\xf3\xde\xd6\xf4\x2d\x4a\xee\xa7\xc7\xac\x11\x4e\xeb\x90\xfe" - "\x54\xba\xdc\x3f\x1e\x8a\x95\x83\xe9\xa9\xc6\x18\x1d\x93\x9e\x61" - "\xc8\x3d\xe6\xb5\x0c\x37\x66\x9d\x75\xfa\x44\x25\x0b\xd3\x6b\xb5" - "\xe4\xc8\xf9\xda\x74\x69\xff\x19\xeb\xa5\x78\x3f\x31\xa6\x5c\xcc" - "\xfa\xdf\xb4\x0e\xd1\xff\x3a\x7d\x2a\xfa\x37\xc0\x7b\x5b\x2a\x56" - "\xc3\xf4\xa6\x98\xf5\x0a\xff\x06\x79\xfe\xfe\xaf\x80\x3b\x43\xd7" - "\x7b\x0f\x8c\x8f\xa9\xaf\xc3\x75\xe6\x72\xed\x9f\xd1\x4f\xfb\x67" - "\xf4\xb5\x7f\x81\x84\x1b\xb3\x96\x38\x43\xb6\x3f\x7c\x89\xfe\x9b" - "\xc1\x3e\xa4\x06\xdd\x60\x73\xcf\xd8\x6b\xd8\xea\xbc\x7e\xd0\xbf" - "\xad\x3e\xa3\x6f\xfd\x4f\x95\xeb\x5b\xff\xf3\xc7\xb3\xd5\x7d\x24" - "\xf7\x56\xa3\xeb\x6e\xb5\xd6\xc6\x6d\x4b\x3f\xeb\x7f\x0f\xe8\xeb" - "\x7f\x0f\x14\x44\xeb\xb3\x07\xec\xd1\x7d\x38\x23\xa6\x0f\x1f\xc8" - "\x89\xee\xc3\xe9\x1d\xff\xdd\x71\x0d\xcf\x94\x98\x98\x68\x4a\x4c" - "\x30\x25\x24\xe2\x35\x9a\x48\x03\x12\xcd\x89\x49\xf8\x5d\xa5\x5f" - "\x07\x98\x12\x4d\x66\xfc\x92\xf4\xeb\x55\x31\xcf\x03\xb8\x2c\x7e" - "\x66\xfd\x9a\x14\xf3\x7c\xd5\x57\xbc\x1f\xa0\xd7\x6b\xd4\x6f\x8e" - "\x79\x4e\xfa\x8a\xf7\x57\xfd\x0f\xcb\xd3\x25\xcf\xd1\x7e\x68\x93" - "\x17\x2c\x99\x53\x34\xbf\x50\xee\x17\xcf\xb5\xcf\x79\xf2\xc9\xb9" - "\x8b\x17\xdb\x4b\x16\xda\xef\x19\xff\xe0\x1d\x77\xd9\xd5\xb6\x73" - "\xd1\xb8\x11\x85\x29\x34\x75\xe9\x22\x7e\x31\x75\xe6\xe4\x3c\xfb" - "\x8c\x7b\xc6\x47\xbf\x34\xc0\xc8\xed\xe5\xcb\x41\x89\x90\xbf\x9c" - "\xca\x21\x44\xeb\x5e\x91\xba\xa7\x8d\xfd\x7c\xd5\x9a\xc7\xcf\x0e" - "\x35\xb1\xff\x68\xb7\x4b\x78\x6e\xe4\x3d\xfd\x99\x73\xb9\x11\xa3" - "\xb6\x96\x53\xf1\x13\x7c\x7e\x65\xe6\x2a\xf1\x91\x9f\xec\xf7\x93" - "\xe9\x04\xcd\xfe\x73\x63\x2e\xf2\xe2\xd9\xeb\x0b\x91\xdd\x45\x16" - "\x94\x7f\x16\xef\x12\xc4\x8f\x35\xa4\x05\x74\x5f\xe8\x9f\xae\x92" - "\x69\x1f\x95\x1b\xf9\xac\x27\x69\xd6\x08\xf1\x91\x90\xcf\x7c\x3e" - "\x48\xe5\x9b\xf9\xa5\x30\x3d\xb8\x9f\x75\x43\xed\x60\x32\xf3\x5e" - "\xe8\x6b\x83\xc9\xf2\xda\x10\x8e\x59\x32\xb3\xc3\xd8\x0b\xad\xc4" - "\xb3\x8f\x66\x1f\xe5\xba\x39\xaf\x66\x7a\xf0\x04\xe7\xaf\x8b\xca" - "\x3f\x6b\x58\xdf\x5e\xec\xcc\x0e\x13\xf2\x4d\xff\x9c\xac\xd6\xb0" - "\xf8\x47\x30\xe5\xed\x82\xdb\x72\x29\xc1\x8b\xae\x68\x0a\x95\x93" - "\xf2\xf9\x99\x35\x77\x59\x58\x84\xd8\x3f\x7d\x6a\x87\x4b\x54\x3d" - "\x43\x66\xc8\x74\x82\x67\x11\xfb\x28\xcc\x9a\x52\x3f\x97\xcc\x68" - "\xff\xb0\xd3\xf4\x50\xa9\x7d\x1a\x91\x6b\x2a\x99\xff\xe4\x64\x7f" - "\xc3\xbd\xda\x86\xbf\x90\xf9\xad\xee\x72\x53\xb7\xb0\x51\x69\x89" - "\x68\x17\x1c\xc7\x28\x20\x82\xec\xe3\xdf\x54\x10\xe6\x3c\x67\xbb" - "\x5c\x36\x6a\x29\x09\xd0\xca\xe3\x22\x58\xf1\x17\x75\x36\xa0\xb9" - "\x23\xc0\xfe\x8b\x96\x95\x53\x29\xf1\x64\x1e\x99\x9a\x1d\x35\xe4" - "\x9d\x1d\xa0\xd2\xe3\xa2\xbd\xa9\xe0\x0b\x6a\x71\xec\xa6\xfc\x56" - "\x32\x35\xb5\x7d\x46\x32\x16\xcf\xda\x33\xec\xf7\x68\x5b\x39\x9f" - "\xd3\x2e\xd0\xf2\x95\x34\x70\xf9\xa7\x64\xf5\xb6\xb7\xa2\x9e\x33" - "\xf4\xc8\x31\x4a\x00\x3c\xd3\x8a\xcf\xc8\xb6\xe2\x61\xf6\xf3\xcd" - "\xa1\xda\x32\xb2\x09\x57\x66\x6a\xb7\x2b\x33\xad\x5b\x64\x0e\xee" - "\x72\x65\xa6\xb7\x14\x23\x7f\xdb\x87\x34\xa8\x95\xd2\x3f\x3a\xdd" - "\x6a\xaa\x39\x4f\xc3\xb8\x4d\x27\xd1\xb6\xda\xf3\xc8\xbf\xf6\xe3" - "\x72\x0d\x65\x23\xcb\x84\x92\x3f\xae\xf1\xe6\x05\x49\x03\xac\x9a" - "\x6e\x1a\x56\xdb\x4d\x36\xad\xf2\xe3\x72\x2e\xd7\x41\x3f\x5d\xe6" - "\x6d\x22\x2a\x5d\x29\xc2\x3d\x6b\xf7\x16\x40\x27\x0e\x78\xe7\x89" - "\xfd\x66\x6f\x53\x07\x35\x07\xba\xa9\x85\xfe\x4a\x5e\xe7\x29\xcf" - "\x5b\x4f\xec\xe7\x35\xeb\x04\xcf\xf2\x36\xd4\xa5\x78\xc7\xd5\xcc" - "\x67\x95\xcb\xa9\xaa\x8c\x52\x8b\x97\xd3\x80\xd3\x48\x57\x73\xfb" - "\x06\x87\x37\x74\xca\xb3\x5c\xfa\xe3\xce\x3e\x5a\xd6\x4c\x89\x2d" - "\x81\x1a\x6e\xbf\x29\x9c\x72\x86\xbc\x81\xa3\xe4\x2d\xfe\x9b\x47" - "\xb3\x74\xb4\xaf\xd3\xc8\xf2\xf6\xc5\xa3\x26\xaf\xf9\x22\x79\xf3" - "\x02\x74\x10\x75\x8b\xb5\x67\x52\xa1\xb7\x72\x5a\x02\x41\x3e\xef" - "\x94\x25\x3a\x6d\x29\x55\x8b\x68\x64\xdd\x79\xca\xd8\x72\x9e\x32" - "\x45\x57\xa6\x89\x7d\x6c\xf9\x6c\xea\x16\x5c\x53\xdb\xc8\x82\xb6" - "\x2b\x7f\xec\x64\xdd\xd7\xb6\x27\x93\xea\xbb\xfb\x7c\x6d\xbb\x3b" - "\xfb\x7c\x6d\xc1\x53\x7e\xf6\xb7\xf5\xd1\x43\x6b\xac\x4d\x34\x00" - "\x72\xd2\xc0\xfc\x5d\x75\x96\xcc\xab\xcf\x12\xdd\x56\x6e\x22\xfb" - "\x3c\x3e\x67\xf1\xb3\xb9\x5e\xf4\x0d\xdf\x9f\xa0\x9f\x0d\xc3\x35" - "\x15\xbf\x04\xa4\xcb\xf8\x0d\x6d\x3a\x1f\x23\xcd\x84\xb4\x24\x5c" - "\x13\x21\x2f\x61\x57\xad\xf0\xa3\xae\xfd\x9d\x26\x4a\x61\x7e\xd6" - "\xfd\x7b\xf7\x77\xb9\x7f\x1a\xf0\xd1\x33\x1d\x06\x5f\x2b\x1d\x3f" - "\xd3\x7f\xf0\xc4\x19\x8e\x97\xe5\x97\x78\xf5\x38\x12\x38\x76\x96" - "\x9e\xce\x38\x3c\xc6\xf5\xa2\xfe\x1c\x5c\xad\xf8\x41\x4e\x7f\x7a" - "\xcc\x28\xdb\xd9\xe3\x40\x9d\x3f\x7b\x08\xe9\xc2\x48\x47\xbb\xcd" - "\xfc\xee\x77\x27\xce\x98\x54\x9e\x4c\x13\x60\x06\x75\xf8\x90\xfd" - "\x99\x9b\x58\xc6\x3b\x4d\x56\x71\xb8\x60\x0c\xd5\xbe\x22\x9a\xb6" - "\xbc\x22\x1a\x95\xec\xfd\xac\xc6\x47\x0b\x8d\xf8\x42\x8d\xeb\xf0" - "\xee\x30\x46\x1d\xa6\x4b\x63\x21\xfb\x93\xfd\x0c\xf6\xdf\xd5\x07" - "\x22\xdb\x20\xdc\x0f\xd4\xf0\x58\xfa\x9b\xb2\x23\x49\xd0\x01\x35" - "\x2d\x6d\x1d\xf4\x56\x77\x7b\x92\xeb\x8f\x64\xf2\x86\x4e\xd0\xe8" - "\x74\xb2\xb1\x3d\x58\xff\x8a\xf0\x6d\xe4\xf8\x7c\xaf\x88\x0e\xf0" - "\xcb\x0d\xa7\x29\x2f\xe9\xbb\xe9\x94\xfe\xaf\x4e\xd2\xf5\x53\xde" - "\x0d\x11\xfa\x69\x7b\xb3\x6f\x7f\x84\x6e\x9a\xfd\xd0\xa5\xba\xe9" - "\xd1\x07\x94\x6e\x82\xec\x4b\x5d\x14\xf6\xe9\xe9\xe3\x62\xd2\x75" - "\x3f\x91\x47\x87\xc7\xa4\x07\xf5\xf4\x81\x31\xe9\x7e\x95\xfe\xc8" - "\x54\x43\xf7\xb5\x30\x1e\x4b\x59\xf7\x3d\x72\x3b\xeb\xbe\x96\x02" - "\x5d\xf7\x49\xfd\xf3\xc8\x75\xe2\x5f\xa0\x8b\x96\xb0\xbe\x79\xf8" - "\x0c\xe3\x2f\x3e\x22\x03\xf7\x64\xa4\xbd\xcd\x69\xd5\x7f\x25\x33" - "\x7e\x86\xde\x13\xac\xf7\x58\xe7\xb1\xee\xdb\x3c\x44\xb4\x6e\x7e" - "\x45\x1c\xab\x95\xb1\x7f\x1e\xee\xd5\x7f\x2f\x22\x6d\x1d\xd2\x5e" - "\xc4\x7b\xd6\x83\x4c\x93\xe6\xbc\xfd\xc4\xfe\x27\xb0\xb5\x42\x9a" - "\x29\x8b\x36\xa0\xbf\xf9\xbc\xe1\x1a\xd0\xd7\x9a\x40\xc5\xde\x12" - "\x3e\xc3\x1a\x66\x9f\xb4\xb6\x96\x92\x36\x96\xbb\x21\xab\x21\x67" - "\x5e\xe7\x17\x54\x16\x10\xa7\xf9\xdc\x1d\xe3\x90\xbf\xec\x7e\x8e" - "\x97\x94\xd0\x88\xd9\x30\xfb\x85\xb3\xce\x06\x2e\xe6\x6a\xe0\xa4" - "\xe2\xb3\x3c\xbc\xcd\x47\xdb\xca\x55\x5f\xcf\x3e\xca\x71\xd9\x4e" - "\x50\x5e\x3b\xe6\x7b\x41\x6e\x9b\x35\x5c\x4e\x7c\x0e\x86\x63\x15" - "\xf2\x75\xb3\x49\x73\x54\x1b\x67\x61\xdc\xd0\x0d\xc8\xe3\x6d\x0d" - "\x12\xe3\xec\xa3\x87\xc7\x34\x97\xee\xe7\xf2\xad\x4c\x1b\xe1\x76" - "\x19\x30\x12\x24\x0c\x93\x9c\x37\x3a\x90\x4f\xad\x9d\xa7\xec\x2d" - "\x68\x9e\xed\x27\xd6\xfb\xde\x76\xc0\x28\x3d\xa1\x60\x00\x96\xc0" - "\x18\x10\xf5\x4e\x87\x3f\x70\xa5\xf8\x07\xe0\x6f\xe3\xfe\xe2\x73" - "\x91\xbc\xdf\x06\xba\xa4\xb2\xaf\xbc\xb2\x45\x1f\x1e\x55\xff\x57" - "\x22\xfd\x6c\x27\xf8\xed\xe1\x91\x7c\x6e\x89\xcf\x73\x5e\xee\x2c" - "\x27\x68\x94\x61\x9c\xe7\xd4\x96\xfe\xef\x9e\xe5\x04\x6c\x5b\x9d" - "\x49\xec\x06\xfe\x23\xf9\x3c\x27\xf0\x5f\xc7\x7c\xa8\xb7\x29\xeb" - "\xe5\x47\x24\xcd\x4b\x38\x0d\x73\xc7\x23\x46\xff\x73\x7b\xb9\x2d" - "\x78\x97\xa7\x6c\x44\x81\xf9\xc7\xa3\x59\xfc\x1e\x69\x13\x39\xff" - "\x68\xe8\x31\x2f\xc6\xb0\x77\x4e\x84\x4d\x55\xcb\xc9\xac\x74\xda" - "\xec\xc9\x5c\x5e\xe9\xb4\xd9\xd4\xa7\xd3\x1e\xbd\xa0\x74\x9a\xa2" - "\xb1\xd2\x69\x8f\xfe\x5d\xe9\xb4\x47\x3f\x97\xfb\x62\xd0\x69\xfc" - "\x8e\xf5\x9a\xa1\xd3\xb6\x0c\x11\x47\x58\x77\x74\xb9\x1f\x3d\x6a" - "\xe8\xb6\xf5\x48\x63\xdd\xc1\x38\x2a\x3d\xf5\x48\xa6\xf8\x7f\x33" - "\x49\xf9\x1d\xf0\xbd\x83\xcf\x2f\xb4\xeb\xf7\x3c\x9e\x8c\x57\x3a" - "\x6e\x76\x46\x9f\x8e\x7b\xb4\xa1\xaf\x2c\xeb\xb8\xd9\x3f\x54\x3a" - "\x4e\xa5\xd7\x3f\xc2\x3a\xee\x91\x4c\xa6\x81\x0e\xdf\xc4\x6b\x78" - "\x7a\x7e\xa6\x63\x56\xa4\x8e\x8b\x96\xaf\xd9\xa5\x86\x8e\x63\xdd" - "\x86\xe7\x75\xd0\x69\x72\x0e\xc9\x72\xb6\x09\x34\x37\xe4\x8e\xfb" - "\x80\xdb\xcc\xf1\xd7\x98\x6e\x13\xce\xd0\x00\xfd\xec\x90\xde\xee" - "\xd9\x47\x0c\xdf\x47\xd0\xff\x68\x3c\x3b\xba\x2f\x46\x22\x7d\x9b" - "\xcf\xce\x7b\xcb\x4f\x90\xb7\x46\x94\xb7\x84\x8e\x53\x7e\x09\x74" - "\x45\xe2\xd3\x9f\x73\xdf\x62\xde\xf1\x23\xbe\xb2\xee\x39\x4d\x8f" - "\x0d\xcc\x0f\xd0\x55\x98\xab\x7f\x5e\x65\xc2\x3b\x67\xd4\x3b\xb9" - "\xc6\x70\xdb\x22\x8e\xaf\x07\x41\xe8\x67\xbe\x7f\x85\xf5\xad\xbc" - "\x4c\x7d\xaf\xc9\xfa\x60\x53\x61\x0e\x74\xcd\x59\x7a\x4c\xce\x4b" - "\x64\x7c\x9b\xd5\x71\x61\xfd\x51\x7f\x9f\xd4\xcf\xfb\xbf\x5f\xbe" - "\xfc\xe3\xc9\x97\x2f\xff\xf8\x2d\xac\x8b\xd0\x3e\x6b\xd8\x1d\x0d" - "\x67\x50\xc8\xc8\x77\x9a\xf3\x3d\xa0\xaf\xc5\x7c\xee\x1a\x2e\xe7" - "\x68\x36\x03\x26\xf3\xdf\x06\xe4\x93\x31\x43\xa0\x2b\x27\x2e\x23" - "\x8e\xd7\x12\x59\x76\x7d\x1f\x8d\x1f\xcf\xb9\xcc\xba\x5f\xaa\xb7" - "\x86\x64\xcc\xd8\xc3\xb0\x49\x39\xa6\xd1\xa6\xde\xf5\x8f\xc7\xdb" - "\xa0\x37\x7d\x11\x7e\xb1\x3c\x1f\xfb\x36\xc7\x35\x60\xfb\xb2\x4a" - "\xcd\x37\xaf\x87\x7e\x1e\xcc\xe7\x61\xf8\x6c\x4c\x7e\x78\x86\xe9" - "\xb0\x8c\x65\x96\x6f\x37\xca\xf6\xb7\xce\xc2\xf5\xea\x75\xb2\x8f" - "\x69\x00\x65\x66\x19\x65\x18\x36\xfb\x29\x62\x5c\xfe\xb6\x3c\x53" - "\x1a\xea\x60\x5d\x78\x3d\x6c\xd1\xc1\xaa\x9e\x02\xd2\xeb\xa9\xf0" - "\xd1\x63\x33\x2e\x77\x36\xa3\xff\xf6\xe5\x37\x5e\x79\xfb\x48\x6f" - "\x5f\x01\x7d\x45\xfb\x2e\x53\x6f\xc1\xd8\x2b\xaf\x37\xcd\xa8\xd7" - "\x79\xe5\x74\x2d\xd8\xf5\xf5\xe9\x9a\xa5\xd3\xb5\xc0\xf7\x15\x74" - "\x8d\x53\xcf\x9c\xf4\xaf\x5f\x8f\x5d\xaf\x67\x4e\x6e\xbc\x7a\x48" - "\xfe\xf5\x7b\x6e\xca\x62\xc4\xda\xec\x84\xec\xa8\x58\x75\x73\xaa" - "\x23\xe3\x17\x77\x4a\xb9\x9a\xb3\xad\x37\x5e\xb2\xda\x2b\x87\xae" - "\x9e\x73\x28\x7f\x2b\x8f\xef\x42\xf3\xd1\x9c\x46\x8e\xe3\x3a\x71" - "\xa5\x3a\x93\xad\x97\x69\xbd\x5c\xdc\x64\x8e\xd1\xc5\x31\xf9\xbc" - "\x36\xb4\xbd\x86\x63\x97\x1c\x2a\x60\xff\x7b\xcc\xa9\xa0\xe3\x9f" - "\xb8\x81\x63\x8e\xe1\x7e\x00\xee\x33\x95\x0e\x78\x22\x13\xf5\xf4" - "\x7f\x76\x72\xed\xa1\xe2\x6d\x65\x59\x49\xfd\xf9\xd7\xa3\x3c\x6c" - "\x8a\x67\xe5\xda\x94\x96\x72\x70\x06\xe6\x12\x7a\xbc\xbf\xc2\x2f" - "\x64\x0c\x38\x57\x1e\x9f\x27\xc1\xb8\x58\x38\x50\x3f\x07\x00\x7a" - "\x94\x83\xae\x4f\x6c\x35\xe8\x61\xa4\x23\x6d\x8f\x41\x0f\xd8\x37" - "\xa9\xde\xad\x21\x3e\xa7\x13\x50\x67\xb2\x9f\xf8\x77\x51\x79\xc8" - "\xa1\x60\x3f\xa9\xf6\x68\xb8\xbe\x9e\x3c\xb3\x9c\x37\x95\xf1\xbc" - "\xe9\xc9\x03\xfe\xe4\x43\x0e\x03\x0f\xb1\xd8\x66\xe2\xb3\xdf\xa3" - "\x31\x96\x6e\x50\x31\xf7\x12\xf8\x9c\x9c\x7c\xbf\x38\xd3\xa4\x68" - "\xf2\xe4\x38\xd1\xc9\xb1\x63\x24\xec\x54\xe0\xd9\xc6\x70\x7d\xb8" - "\xfa\x57\x64\x72\xdc\x0b\xbd\x3d\x4f\x8e\xd0\xd6\x1e\x9c\xa1\x75" - "\xd9\x4c\x06\xbe\x75\xf2\x4c\xeb\x93\x68\x7f\x81\x8a\x13\x2b\xf1" - "\xb1\x99\xd8\x9f\x5f\x4b\x39\x54\x2c\x56\xd8\x68\xcf\xa2\x76\x39" - "\x6f\xe2\x3a\x47\xa3\x7e\xc1\xf3\x24\xd8\x26\x28\xb7\xb5\x97\x6e" - "\x80\x2b\xba\x0c\xba\x3d\x39\x45\x8d\xcb\xaa\x8d\x81\x15\x36\xd3" - "\x61\xbf\x3c\x6f\x47\x19\x76\xd7\x97\x2a\x16\xf6\x93\xc7\x0d\xda" - "\xf5\xe2\x04\x7c\x38\x8f\xf2\x6f\x7a\x32\x64\xe0\x24\x65\x37\x85" - "\xcf\xef\x3e\xe1\xe7\x73\x43\x8a\xfe\x87\x53\xbb\xdc\x85\xf6\x4b" - "\xe9\x5f\x38\x26\x82\xfe\x89\xcc\x7b\x4c\x7f\x5e\xeb\x00\x5d\x1e" - "\x03\x2d\x2d\xea\xbc\x03\xdb\x33\x85\x73\xf1\x9c\xca\x78\x6a\x95" - "\x06\xcd\xf3\xcc\x6a\x9d\xac\xb0\x26\xa2\x1f\xd0\x5e\x1b\xdb\x6a" - "\x09\x46\xfb\xb9\x0c\xd3\x80\xe3\x4a\x72\xdd\xc0\xe7\x6a\xd4\xbd" - "\x3b\xb6\x4d\xab\xd5\x59\x12\x52\xbe\x25\x85\x47\x23\x62\x8b\xfb" - "\x4b\xec\x22\xa8\xce\x25\x17\x3a\xf7\x94\xf9\xcd\xfd\xe9\x00\xe6" - "\x41\x19\xa3\xd2\x24\xd7\x15\x60\x73\xcd\xfb\x44\x00\x37\xd5\xf7" - "\xf3\xb6\xa8\xb4\xb9\x7f\xc7\x15\x3c\x36\x77\xbc\x40\xdd\x7e\x97" - "\x8c\xb1\x82\xb6\xcd\xf3\x31\xcf\x19\x7c\xc6\xeb\x90\xca\x67\x7c" - "\xee\x76\xd6\x29\x06\xcd\x81\x7f\x4a\x97\x7b\x6e\xb1\x81\xbf\x91" - "\x9f\xfb\x8e\xf3\xf0\x9e\x4d\xa3\x3d\x28\x75\xad\x3a\x33\x34\xb7" - "\xd6\x90\x61\xae\x83\xfb\x99\x75\x0d\xd3\x43\xd1\x62\xee\x81\x68" - "\x58\x36\x93\x8a\x9b\xc9\x3c\x0f\x79\x5c\x1e\x4c\x42\x1e\x5f\x1f" - "\x8c\xb9\xb3\xd5\xbb\x5e\x3c\xd9\xcf\x5f\xfa\xe2\xa9\xfe\x98\x37" - "\x99\xdb\xd5\x87\x2f\xcb\xdf\xbc\xde\xfe\xe7\x77\x01\x97\x8d\x63" - "\xf0\x4a\x1d\x53\x32\x9c\xf1\xf5\x73\x6c\x5b\xc9\xeb\x80\x5f\xcd" - "\xb8\x73\x1e\xa3\xcf\xfa\x78\x71\x9e\x23\x12\x8e\x70\x49\x5c\x25" - "\x1c\xa5\x3b\xfc\xbc\xb7\x6d\x57\xfb\x2d\xf3\x36\x45\xb4\x3b\xd5" - "\xc0\xa7\x4f\x27\xcc\xdb\x13\xcb\x93\x5c\x37\xc7\xe2\xd3\x61\xb3" - "\x2e\x49\x3b\x41\xf3\xb6\xea\x78\xd9\xb8\x1f\xfb\x1b\xdf\x38\xce" - "\x25\xc7\x3e\xdd\xa8\x74\x08\xfa\xd9\x31\x7c\xa3\x3a\x47\x14\x50" - "\xf1\x4f\x7f\x3e\x42\x98\x7e\xc5\xb4\xe2\xf5\x74\xbf\x8c\xd7\x21" - "\xcf\x98\xff\x9c\xf7\xf8\xc5\xa0\xe2\x5f\xc9\x58\xb7\xba\x6f\xa0" - "\xbf\xb1\x38\x24\x63\xf9\xb9\x4a\xf8\xcc\x6d\x88\xe7\x7a\xd2\xf7" - "\xed\x70\x49\x88\x66\x06\x59\x26\x7e\x5e\xc2\x67\xe9\x55\x1c\xf1" - "\x9f\x97\x1b\xe7\xe7\x39\x76\x26\xc7\x7d\x85\x1e\x4a\xec\x8b\xdb" - "\xea\xc8\x63\x1b\x4b\xef\x5f\xda\x60\x12\x47\x95\xfc\xff\xfc\x8f" - "\x7c\x5e\x5e\xed\x63\x9d\x80\x4e\x48\x3c\x75\x82\x7e\xfe\xb9\x5a" - "\xf7\x31\x74\x94\xe3\x61\xde\xcb\xf2\xe9\x30\x50\x57\x07\xe4\x7b" - "\xc6\xa5\xba\xe4\xe7\x7f\x34\xe6\x2e\x7c\xfe\x4e\xed\x8b\xf5\xc1" - "\xf3\xd1\xcf\xe5\x5c\xb0\xaf\x0f\x3e\x06\x2c\x47\xf6\xa5\x7a\xc1" - "\x31\xc5\x90\xbd\xe2\x1b\xf9\x0c\xf7\xcf\xd3\xb8\xfe\xfe\xc6\x0b" - "\xe1\x7a\x98\xfb\xc9\x72\xd2\x1e\xbf\x6f\xe2\xef\xb3\x39\x76\x1b" - "\x6d\x30\x68\xa2\xda\x30\x3f\xb9\x33\x65\xef\xba\xbe\xb6\xcf\x97" - "\xb6\x6b\xc4\xfb\xf1\x11\xb4\xe1\xe7\x1c\x35\xae\xcd\x07\x7d\x0a" - "\xf5\x58\xb5\x2a\x0d\xb2\xf3\xb4\x58\x91\x47\x0a\xc7\xf9\x64\xc8" - "\x3a\xf2\x8e\xf4\xd1\x05\x9b\xda\xef\x9a\x8f\xf6\x3b\x2a\x54\x39" - "\xc7\x31\xc6\x25\x6e\x3b\xa3\x71\xdc\xcf\xb6\x86\x8a\xa9\x30\xff" - "\x7d\xc6\xd7\x7e\x13\xf7\xf1\xfc\xe7\xa5\x0e\xe7\xf8\x0a\x3d\x8e" - "\xa4\x40\x4f\x26\x75\xf6\x38\xa0\x17\x32\x4d\xa8\x07\xfa\xbf\x33" - "\xa0\xd7\xb9\xcb\xc0\x95\x71\x93\xf1\x39\xc5\xfc\xf8\xf4\xe5\x7a" - "\x65\xcc\x27\xc7\x00\xfc\x2c\xf8\x5d\xf5\x75\xed\x12\xd8\xe9\xed" - "\xfe\xca\x03\x69\xda\x12\x71\x84\xe3\x8b\x61\x2e\xd2\x5e\x05\xfe" - "\x1d\xb4\xca\x03\xdb\xfc\x31\x53\xfe\x32\xca\xc1\x9c\x99\xc4\x45" - "\x91\x5d\xa7\xe1\xba\x44\x8c\xe1\x38\xe3\x78\xce\xd2\x9f\x47\xf2" - "\x73\xe7\x12\x31\xbb\xcb\xfd\x54\x81\xb1\x47\xa8\x62\xe3\x3c\x55" - "\xdc\x1b\x4f\x28\xf1\x51\x3e\x4f\xc4\x71\xa7\x34\xcc\x85\xda\xb9" - "\xde\x7c\x9e\xcf\xa2\x3e\xe4\xab\x81\xbd\xd1\xc6\xf9\xfc\x89\xb7" - "\x0e\xc6\x2f\xb3\x9f\xbd\xd4\x76\xc6\xab\x33\xf9\x40\x9a\x81\xeb" - "\xa0\x40\x8e\xe9\x6b\xe2\x16\x32\x70\x43\xfa\x91\x2a\x95\x1e\xe2" - "\xf8\x87\xec\xeb\xd8\xe5\x7e\x7a\x98\x81\xab\x81\x03\xd7\xc7\xe7" - "\x37\x45\xca\xde\x1a\x8e\x3d\xc3\xf5\x71\x3c\x55\xe4\xcd\x35\xf0" - "\xfd\xba\xbc\x5c\x56\x2b\x04\x8f\x9f\xac\x7f\xed\x43\x89\x5a\x02" - "\xac\x53\x9e\xae\x3d\x5c\x1b\xe0\xf5\xee\xd7\x51\xc7\x6b\x9d\xc2" - "\x41\x5a\x8f\x23\x6e\x1f\x73\x19\xe4\x6f\x95\xfa\x61\xed\xde\xd7" - "\x34\x91\x0b\x3d\x81\x72\x3d\xb9\xbc\xd6\x04\xb9\x2d\x32\x37\x96" - "\xb6\xf3\x99\x4b\xe8\x9c\x22\x33\xf2\xd4\xb0\x9d\x85\xf9\x56\x50" - "\x7e\xbf\x02\xba\xc9\xb3\x64\x0c\x60\x14\x25\x99\x9d\x64\x6e\x8c" - "\x89\x53\xd5\x1f\x7f\x74\x5a\x0e\x56\x74\xae\x3d\x58\xd0\xe5\x2e" - "\x82\xfd\xff\x4c\xbf\x7b\xbe\xab\x87\x80\x9e\xc8\x57\x3d\x94\xe7" - "\x7b\x45\x8e\xcb\xe5\x35\xf6\xab\x59\x07\x8d\xb6\x51\xaa\x48\x3e" - "\x58\xc1\xfa\xb6\x33\xe5\x60\x01\x8f\x25\x28\xdf\x60\x94\xe7\x71" - "\x9d\xc7\x0e\xf4\x97\xad\xaa\x57\x1f\x16\x1d\x55\xf2\x5c\x74\xd4" - "\x90\xd1\x78\xf5\x94\x6c\x13\x9a\x6b\x04\x99\xbc\x18\xb7\x6e\x0b" - "\x52\x6a\xdd\xeb\x44\xd5\xcb\x45\x70\xe3\x72\xcc\x61\x86\xf2\xf7" - "\x2e\x8a\x72\x59\x46\x99\xbf\x37\x80\x5f\x12\x81\xcb\xc6\x8b\xa8" - "\xb3\x4c\xe5\xd3\xfd\xd6\x6d\xc8\x57\x82\x6b\xba\x30\x99\x68\x53" - "\x19\x59\x36\x69\x64\xae\x2e\xa3\x61\x48\x83\xad\xfb\xcc\x2c\x43" - "\x66\xe3\xe1\x50\x55\x47\xf4\x12\xea\x5d\x55\x26\x42\x1f\x63\x3c" - "\x77\x6b\x22\xf8\x75\xe8\x8e\xf6\xef\x51\x6d\x7c\x66\x8f\x61\x13" - "\xe2\xde\x13\xed\x77\xf0\xcc\x25\x67\xbc\x9f\x58\xb8\xb0\x24\x7f" - "\xd1\x5c\xbe\x64\x8e\x78\xee\x96\x94\xc8\xb5\x10\x1e\xff\x54\x9c" - "\x8a\x67\x5a\x79\xdd\x71\xe3\x60\x63\x1f\x7d\x81\xcd\x58\xfb\xd4" - "\xfd\xf5\xef\xe6\x39\x1d\xcf\x7d\xf0\x6e\xcc\xa1\xd2\x95\x0c\x26" - "\xe1\x73\x0b\x99\x62\xeb\x9b\x37\xa7\x64\x4e\xd1\x5d\xbc\x63\x96" - "\x12\xa7\x9e\x05\xb9\x31\xf5\x94\xf7\xd6\xa3\xc6\x9f\x80\x89\xf3" - "\xad\x4f\xdc\x2a\x92\xdb\x73\xd4\x59\xe9\x05\xdb\x8c\x35\xad\x7e" - "\xfc\x1c\x5b\xc3\x6b\x3f\xf6\xb0\x3c\xb8\x56\x92\xe9\x77\xcb\x5b" - "\x4d\x6c\x47\x96\xe1\x9e\xd7\x16\xe4\x1a\x99\x1e\x2f\xea\xa3\xf3" - "\xad\x18\xdf\x17\x04\x45\xe5\x5e\xcc\x8f\x16\xf4\xbb\x66\x13\xe9" - "\x23\xc2\x3e\x85\x6d\xb4\x30\xed\x72\x3e\x47\x9c\x9f\xdb\xc3\x3c" - "\x1b\x53\xee\x79\xd5\x67\x0b\xc1\xff\x45\xf6\xde\xf3\xbc\x7a\x9e" - "\xaa\x21\x46\x1c\xae\x85\xb3\xfb\xf5\x17\xa9\x38\x58\xad\x78\x7c" - "\xe1\x27\x8d\x98\xaf\xa1\x9d\xbf\x38\x41\x0b\x0f\x99\x6d\xb0\x11" - "\x86\xd2\x4e\xdc\x7f\xc2\x65\xf9\x5d\x14\x1f\xdd\x70\x66\xab\x19" - "\xda\x05\x5a\x26\x41\xa8\x3f\x32\xeb\x37\x89\xf8\x99\x44\x82\xdc" - "\x4d\x4d\x44\x0f\x0e\xb8\xca\x4c\xd6\x41\xa9\x96\x6f\x7f\x6b\x98" - "\xed\xee\x1f\x8f\xcd\x76\x95\x95\x42\x2b\x87\x82\x56\x11\x19\x3f" - "\xed\x54\xfb\x43\xb7\x94\x93\xf4\xa7\xa9\x3c\x15\xf7\x2c\xe5\x7a" - "\xb7\x28\xe6\xb3\xeb\x5a\x8a\x48\x73\x3d\x47\xa6\x77\xba\x7d\x26" - "\x8e\xd1\xcc\xf6\x33\x7f\xeb\xe2\x04\x15\x3f\x70\x10\x69\xa0\x97" - "\x53\x54\x88\x34\x65\x77\x16\xff\x52\x5b\x2b\xd2\xfa\xe0\x9b\x89" - "\xe1\xbb\x5e\x23\xd3\xb6\xb2\x76\x93\xd7\xfc\x63\xf2\xda\x03\x74" - "\x10\xf7\x71\xfb\x0a\x75\xb2\x2d\xcb\x30\xea\xdd\x1a\xc7\xeb\x32" - "\xe9\xe7\x4f\x4d\x67\xa9\xf8\x8f\xbb\xfb\x29\xc7\xe7\xbd\x3b\x53" - "\x3e\xf8\xb7\x2e\xf7\xb3\x66\x1f\xdd\x33\x51\xb7\x65\x30\xe6\x3e" - "\x8b\xf9\xff\x42\x19\xe7\x09\xef\x3f\xe5\xef\xc2\x20\x2d\xd3\xc8" - "\x13\xdf\x9e\xe1\x35\x78\xe1\x61\x3e\x10\x17\xff\xde\xce\x67\x5b" - "\xfa\xf1\x83\x19\xe0\x75\xde\xc1\x7b\x91\x49\x83\xa0\x7f\x5c\x17" - "\x44\x4f\xd8\x4d\xe9\x10\x27\x53\xd8\x44\xdf\x0e\x5d\x14\x79\xcd" - "\x1d\xe7\x65\x4c\x53\xd6\x35\xbf\x99\xf7\xb1\xc9\x1b\x3c\xe7\xf1" - "\xae\xd1\xa8\x05\x76\xa5\xb7\xf6\x9c\x47\xc5\x3e\x0d\x53\x33\xfd" - "\x95\x9a\x9d\xff\xb7\xdc\x5b\xfe\x57\xa4\x0b\x19\x0b\xbb\xe7\xa2" - "\x98\xe5\x35\xff\x1b\xf1\x77\x8a\x78\x8c\x03\xdd\xed\x67\xe9\xd9" - "\x7f\x7c\x04\x38\xef\xfc\x07\x60\xc9\x98\x69\xe3\xe8\x20\xee\xd1" - "\xa6\xde\xf1\x2f\x6e\xac\x99\x04\xcf\x7a\xab\xf3\x31\x93\x86\xb1" - "\x94\x63\xdb\x61\x0c\x1d\xc3\xed\xc2\x73\x16\x3f\xe3\x3a\x92\xaf" - "\xd6\x55\x9e\x2d\xd6\xd0\x63\x3c\xb6\xe6\xf1\xb8\x89\xf4\x59\xf5" - "\x17\xe5\x58\x3b\x43\x7f\x9e\xa2\x3f\xe7\xea\xcf\x13\xf5\xe7\x1c" - "\xfd\x99\xd7\xe5\xf5\x31\x79\x51\x75\xaf\xbd\x60\x1a\x70\x14\xcf" - "\x5b\x8d\xbe\x00\x3e\x03\xad\xce\x95\x72\x6c\xd7\xf1\x18\xa3\xe3" - "\x95\xa5\x3f\x1b\xf8\xdc\x60\x0d\xad\xfc\x5f\xc2\x67\xb1\x3d\x1a" - "\x9f\xc5\x59\x11\xf8\x90\xd5\x99\xf3\x75\xf0\x49\xb3\xf2\x77\x22" - "\xfe\x07\xf8\x30\x2e\x9c\x86\xfa\x77\xc7\xe0\xe3\x31\xf0\x89\xcb" - "\x6f\x4b\x44\x3b\xdb\x35\x8b\xbf\x21\xe3\x3a\x0f\x60\x9b\xa5\xbe" - "\xdb\x88\x53\xb8\x38\x74\xb9\x38\x85\x90\x05\x8c\xdb\x25\x68\xff" - "\xe2\x26\xdd\x7e\x3b\xa0\xec\xfc\x92\x31\x86\xef\x18\xda\xda\x50" - "\xa5\xda\xba\x6b\x0d\xc7\xea\x5b\x46\xdf\x74\x39\x45\x3b\xe6\xdd" - "\xff\xc9\x73\xc3\x48\xb8\x45\x25\x8b\x17\x3f\x73\x97\xbd\x68\xce" - "\x82\xb9\xf6\x11\x85\xf6\xc5\x8e\xf9\xf3\x4a\xe6\x46\xfb\x53\xa4" - "\xe9\xdf\xef\x91\xe7\x44\x78\x2e\x25\xe7\xd2\xe0\x7f\xa9\x27\xa5" - "\x4f\x5e\xc9\x05\xe1\x2e\x29\x60\x9d\x5b\xf7\x92\xfa\xce\x13\xf0" - "\x69\x34\xc6\x10\x63\xfe\xcb\x63\x08\xd2\x8f\x63\x9c\x9c\x1d\x91" - "\xce\x79\xfd\x46\x1a\xc3\xd7\x75\xd3\x80\x13\x54\xf2\x4b\xae\x33" - "\x2e\x0d\x2f\x8a\xad\xb0\x9b\xf8\x1b\x16\x26\xe8\x14\xc1\x71\xb7" - "\xf8\xfc\x25\xca\x89\x93\xf4\x9c\x9c\x57\xcc\xc2\xb3\x9a\xb3\x09" - "\xe0\xf8\xdc\x43\x28\xb3\x0d\x69\x66\xb6\x21\x30\x0f\x6c\xe7\x72" - "\x48\x7f\x86\xe3\x60\x20\xdd\xa2\xc7\x13\xe3\xb4\x55\x1c\xa7\x02" - "\x69\x69\x11\x69\x2f\x23\xcd\x86\x34\xbb\x0e\x6f\x3b\xd3\x19\xcf" - "\x39\xfa\x3a\x19\xe7\x79\x5f\xaf\xb7\x3c\x12\x67\xfe\x86\xcb\x1d" - "\xb7\x65\xd9\x67\xcd\xfc\xfe\xb8\x1f\x3f\xb9\x70\xc1\xbc\x14\x92" - "\x64\xcf\xc4\x70\x9c\x75\x87\xf3\x96\xbb\xec\xc5\x73\xe7\x2e\xb2" - "\x2f\x9d\xbb\xa0\xc4\x3e\x67\xe9\x9c\x65\x29\x34\x6f\xe1\xa2\x27" - "\x39\xca\x02\x77\xcb\xe2\xfc\x27\xe7\xfd\x9c\x9d\x5e\x54\xee\x94" - "\x28\x3b\x61\x16\xeb\x36\x3d\x2e\xc9\x91\x2a\xb6\x21\x93\x3d\x79" - "\xb8\xe7\x78\x5d\x36\x5c\x1b\xf1\x3b\x80\xdf\x7e\xfc\x8e\xe1\x77" - "\xf4\x34\xad\x58\x83\xeb\x9e\x2e\xf7\x92\x42\xc3\x5e\xe9\xe3\xa1" - "\x25\x4e\x83\x87\x60\x5f\xec\x51\xe3\xdb\x92\x86\x96\x90\x94\x9f" - "\x5e\x9e\xaa\xba\xd8\xc7\x53\x1c\x6f\xb4\x85\x7d\xba\x96\xe0\x7d" - "\xb7\x5c\xab\xe4\x35\x93\x64\xa6\xdb\x49\x5a\xb6\xa5\xfe\x15\xd1" - "\xc4\xb1\x72\x70\x6d\x04\xbf\x34\xa9\xf8\x34\x4b\x33\x90\x6f\x38" - "\xea\x38\xa0\xea\xd0\x9f\x87\x88\x23\xfc\x0d\x97\x13\xfa\x33\xc3" - "\x02\x8c\x3b\xf9\x9e\xaf\xfa\xde\xa9\x55\xff\xc6\x9b\xa9\xef\xdd" - "\xd2\x66\xbd\x0e\x0f\x68\x51\x5e\xe7\x96\x73\x29\x39\x77\xe6\x35" - "\x62\x6b\xc2\xdd\x02\xf8\x9c\xd3\x12\x1f\x6d\x95\xf1\x2f\xcb\xbb" - "\xa1\x23\xbe\xf7\x3d\xaf\x53\xe6\x4f\xe0\x35\xe4\x69\xc5\x42\xe3" - "\x38\xe4\x5a\xe2\xd3\xad\x5c\x4e\x58\x3c\x79\xda\x86\x81\x39\xca" - "\x66\xe0\xb8\x83\x4b\x1b\x74\x98\x41\xa6\xed\x69\x5a\xf2\xb0\x9a" - "\x87\xaf\x58\xa3\x6c\x89\xa5\x7b\x0c\x5f\x4b\xc8\x68\x26\x9e\x1b" - "\x0d\x1d\xe0\xa3\xa5\xd5\xba\x5f\x9c\x47\x6f\x7f\x48\x7f\xde\xaf" - "\xe3\x98\xc0\xb1\x50\x80\xff\x51\xee\x3b\xd8\x2b\xfb\x71\x7f\x0c" - "\xf4\x69\x52\xf4\x71\xca\x38\x07\xb0\x9b\xf8\xfd\x31\xfe\xde\x0d" - "\xde\x1d\x53\x71\x46\x96\x8e\xe1\x36\xf7\xf9\xce\xd6\xe6\x00\xd7" - "\x3b\x79\x8f\x19\xb2\xb4\xdf\x7b\x91\xe5\x73\x69\x16\xe0\xed\x36" - "\xf4\x0e\xeb\x99\xfc\x30\xe4\x54\xce\xa7\x9c\x45\x86\xbe\xe9\xe3" - "\x03\x67\x79\x3c\x5d\x12\xaf\xdf\x15\xfd\x9d\x7f\x17\xee\xe7\x1a" - "\x81\xd3\x6e\xd9\x07\x1c\x8f\xf5\x62\xef\xbc\xad\x47\xe9\x48\xe7" - "\xb1\xde\x39\xa6\x8e\x07\xc7\x76\xf7\x31\x6e\xdd\x72\xdf\x5f\xd7" - "\x1b\xce\x90\xa1\x37\x0c\x38\xd6\x04\xa1\x59\x9d\xf8\x57\xb1\xcf" - "\xc9\x7b\x24\x3c\x5e\x4a\x7b\x04\x70\x06\x5d\x50\x67\xe0\xb4\xca" - "\x7d\xe0\x5d\xe7\x1e\xfe\xe6\x9b\xb4\x69\xdd\xcf\xfd\xdf\x3e\x5d" - "\xb4\x6c\x46\x24\x4c\x61\xd9\xe7\x64\xb8\xac\x8f\xd8\x26\xc9\x0f" - "\x9b\x39\x0e\x8d\x53\x1f\x5f\xa0\x83\x97\x95\x1b\xb8\x82\x86\x47" - "\x0c\x7c\xf5\x6f\x8e\x1d\x41\x3d\xbe\xe9\xe1\x1e\xf6\x05\x6f\x54" - "\xfd\xb9\x42\xea\x1b\xbc\xdb\x85\xb2\x07\x7c\xf4\x5c\x9a\x2e\x43" - "\x4d\x28\xbf\xeb\x70\xd9\x44\xe4\x59\xd6\xaa\xfb\x33\x1f\x45\xff" - "\x1e\xeb\xe3\xfd\x25\xcd\x11\xeb\x3c\xc7\x54\x1f\xfe\xb8\xfc\x04" - "\x2d\xb7\x45\xa4\xeb\x7d\x7b\x78\x06\xd2\x9b\xd5\x9a\xc9\x3e\x3d" - "\xbe\xdf\x72\xe5\xbb\xaa\xe3\xc8\xba\x80\xcf\xeb\xb1\x8c\x4b\xda" - "\xcb\x3e\x5e\x3e\xc3\x18\x2f\x00\x6b\x8f\xa4\xf9\x10\x71\x80\xe9" - "\xa4\xe2\x7d\x3c\x77\x51\xd1\x69\xb9\x33\x8a\xf6\x3c\x6e\xa2\x1e" - "\xa6\xd3\xa0\x55\x42\x1b\x14\x48\x10\xf9\xcb\xcc\xc4\xf2\xc2\x32" - "\xce\x7b\x83\xe0\x0f\x69\x57\x29\xba\x2d\xdf\x6f\xd0\xcd\xe8\x3b" - "\xa6\x93\x8f\x96\x67\x32\x6d\xa3\xdb\x38\xe0\xe8\x09\xa3\xed\xa0" - "\x29\xc7\x34\xc5\x73\x93\x2e\x17\x4d\x9e\xa1\xec\x3b\xb2\xe4\xcf" - "\x87\xcd\xdf\xa7\xc3\xce\x31\xa4\x68\xbb\xc2\xe6\xa3\x12\x67\xc4" - "\xbc\xe4\x08\xd3\x97\x65\x05\x78\x96\xe8\xb1\xb7\x8e\x28\x3f\xa6" - "\x25\x4d\xa2\x72\x5f\x89\x94\xe5\x25\x32\x46\x0a\xc7\xed\x3d\xca" - "\x34\x62\xbd\xc8\xb2\xc4\x32\xc0\xf2\xa4\x68\xb4\xa2\x24\x82\x46" - "\x8d\x4c\x1f\x9d\x4e\x7b\x62\x74\xf9\x5c\x7b\xd1\x38\xa5\x8b\xed" - "\x99\x23\x0a\x47\xcb\x40\x37\xf6\x7b\x27\xdc\x65\x9f\x31\x6e\x84" - "\xd3\x31\x72\x9a\xba\x4c\x98\x31\x85\xaf\x29\xd1\xf3\x3a\x3b\xea" - "\x39\x1e\x3d\x37\x5c\xe5\x50\xfa\x63\x45\xc0\x97\x70\xb5\xfc\x86" - "\x08\xc7\x9d\xad\x5a\x40\x14\x06\xde\x1b\x4e\xa3\x4f\x2d\xfb\xd2" - "\x39\xce\xf1\x74\x27\x71\x5c\xf4\x2f\xeb\xf1\xae\x0e\xe9\x83\x8a" - "\xf9\xfb\x08\x7f\x13\x5a\xf2\xbe\x74\x5e\xb3\x11\x95\x3b\x5a\xfd" - "\xc9\xa7\xda\xf1\xdb\xed\x4f\xfe\xa0\x7d\xd2\x2d\x2e\xd1\xe5\x2e" - "\x9d\x62\xb4\x8b\xd7\x76\x40\xa7\xf4\xe9\x4e\x11\x66\x1a\xe5\x3b" - "\x39\x16\x39\x60\x27\xf2\xda\x4e\x29\xda\x5f\xbc\x5b\xcd\x5f\x4b" - "\xc1\xff\x4b\x74\x7b\x86\x66\xe0\x19\xf6\xdf\xf7\xe5\x1a\x97\xe6" - "\xb6\xc9\x18\xe6\xda\xea\x5b\x1f\xc4\x7c\x60\xb7\x01\x13\xb0\xae" - "\xd2\xfd\x1e\x24\xbc\xaf\xeb\x57\xab\xad\x7d\x2f\xc3\x9a\xa0\xe2" - "\x42\x42\xc6\xcb\xeb\x4d\x5a\x5e\xaf\x9f\x0c\xde\x0d\x5a\x95\xc6" - "\x7e\x34\x79\xe0\xbd\x72\xce\x63\xbc\xab\x72\x6b\xbe\x2a\x93\x16" - "\x44\x3f\xa6\x29\xfb\xb9\x83\xf5\x27\xe6\xae\x2b\xc7\x1a\xe3\x9a" - "\x1c\x0f\x4d\x54\xae\xe6\x33\x2b\x1f\xe3\x72\xe7\xdd\x66\x82\xce" - "\x6e\xba\x31\x5d\xce\x51\x82\x9a\x3b\x81\x94\x2f\xf3\xca\xdb\x0d" - "\x1d\xcb\xfb\xa5\xd6\x55\xc2\xcf\x6b\xc4\xd6\x90\xf0\xcb\x58\xfb" - "\x3c\x76\xd0\x69\xf2\x96\x76\x95\x7b\xe5\x37\x38\xf9\xbb\x22\x01" - "\x7d\xdc\x08\xab\x71\x03\xf5\xfb\x13\x6f\x2d\xc0\xf8\x90\x70\x9a" - "\x60\xeb\x02\x7f\xa6\x0d\xef\xb5\x68\xa0\x95\x97\xc7\x49\xa6\x4f" - "\xca\xfe\x6d\xec\x03\xc3\x6d\xb5\x86\xd0\xe6\xc8\x76\x99\x34\xdf" - "\x06\x37\xda\x65\x42\xbb\x9c\x67\x58\x66\x82\xec\x9b\x04\x79\x1b" - "\x22\xe3\x59\xcb\xf9\x79\x99\x3d\xb2\x8d\xac\xff\x55\x1b\xca\xc6" - "\xc7\x6b\xa3\x30\x71\x1b\x99\x06\x65\xd7\xe9\xf2\x26\xf1\x64\xfd" - "\xd1\x41\x2b\x8f\x0d\x5a\xc5\x3e\x41\xfb\xd2\xa1\xdf\x26\x70\x1f" - "\x62\xfc\xac\x66\x3c\xe3\xf5\x17\xc3\xd3\x61\xf9\xac\xab\xca\x0b" - "\x80\xcb\xae\xf8\xf4\x2e\x6b\xbe\x3c\xbd\xcb\x7e\xc5\xe5\x19\x0f" - "\xde\xdf\xb1\x86\x4c\xd0\xc1\xa7\x76\x63\xbe\x56\x11\xaf\xde\x41" - "\xab\xb6\x32\x5e\x71\xdf\x09\x96\x17\x5d\x07\x81\x0f\x05\xe4\x44" - "\xb0\x4e\xea\x72\xbb\x72\x0d\x7d\x64\x4d\xb0\x27\x4a\xfd\x60\x12" - "\xd5\xf1\x60\x58\x57\x55\xf3\x3e\xd7\x04\xd4\x1f\xf7\xbd\xc6\xdf" - "\xee\xa8\xd8\x47\xda\xea\xef\xde\x68\x4d\xa0\xbb\xfd\x89\xdf\x4d" - "\xb1\x3a\x43\x19\x4c\x43\xc0\x74\x42\x8e\x1f\xe2\x79\xaa\x5a\x1b" - "\x71\xc1\xfe\xff\xa5\x8c\xcf\xe4\x4f\xde\xa7\xef\x1b\xb9\x30\xfe" - "\xd5\xd8\x8d\xb5\x79\x3c\xb7\xf9\xe8\xef\x0e\x25\x97\xdf\x7c\x5d" - "\xac\xfd\x60\x8f\xe6\xb6\x0a\xfb\x72\x2b\xec\xc8\xf2\x95\x9a\xe0" - "\xef\x39\x7c\xb0\xa7\x8f\x4f\x94\xbf\x94\xc1\x27\x5d\xee\xf2\x8c" - "\xf8\x3c\x50\x3e\xe9\xf2\x3c\x50\xfe\x0d\x7e\xcf\x74\x57\x73\x95" - "\xf2\x22\xc3\x4e\x11\xab\xbf\xf9\xba\xbd\x4c\xd6\x4f\xaa\x6e\xa6" - "\x49\x0e\xe3\x3f\x05\x74\x29\x47\xde\x1a\x43\x0f\x30\xbf\x58\xc3" - "\xfc\xad\x0b\x92\x3c\x8d\x77\x18\x57\x4a\x2c\x6a\x1d\xfc\x40\xb1" - "\xfc\x7e\xa5\x7b\x45\xb5\xdf\xe5\xd8\xcc\xdf\x69\x0d\x24\xef\x2b" - "\x45\x9e\x56\x1f\x35\xaa\xfd\x56\xcb\xbe\x12\xc0\x70\x6e\x52\xfe" - "\xd0\x16\x19\x2f\x0a\x32\xcd\x31\xa2\x58\xae\x91\x96\x0e\xbc\x39" - "\x5e\x14\xe6\x3b\xab\xd2\x7a\xc7\x25\x77\x0e\x74\x85\x90\xb6\x18" - "\xc6\xa5\x61\x9d\xa0\xdd\xcb\x26\xad\xe1\xe2\x68\x1b\x71\x9b\x2f" - "\xae\x1e\xda\xf0\x8b\xdb\xc8\xfc\x07\xdb\x13\x54\x7c\x07\xa5\xaf" - "\xfa\xbe\x99\xfe\x2b\x9b\x4c\x4c\x07\x1f\xad\xb2\x2b\xda\xad\x2a" - "\x30\xfa\xc7\x47\xae\x23\x52\x77\xae\x7e\xb4\x7d\x7a\x48\x7c\xa9" - "\xd6\xb9\x57\x41\xff\x3d\x53\xa3\xde\xaf\x68\x8f\x5d\x03\x62\x7b" - "\xde\x3e\x7f\xb1\xbd\x70\xe1\xd2\x05\xc3\x87\x47\xcd\x95\xcc\xea" - "\xbb\xb8\xab\x36\xa9\xf1\x74\xd5\x11\x03\x6f\xb6\x4b\xf0\x8c\xf6" - "\xaf\xb8\x24\x96\xfd\x94\x7c\xdd\xcd\x3d\x3f\x8b\xfa\xee\x6f\xa7" - "\x29\xb7\x47\x3c\x7e\x8f\xa6\xdc\xf1\xbd\xfc\x07\xe7\xce\x29\x5c" - "\x16\x91\x7a\x67\xe4\xba\x61\xd5\xeb\xa8\x3b\x71\xe8\x3d\xd0\x15" - "\x09\xd3\x56\xf0\xd8\xe2\xfe\xb0\x2c\x24\x4e\x41\x5f\x67\x43\xc6" - "\xf2\x9b\x4b\x42\xd4\x0c\x5d\x26\xbe\xc9\x3a\x7c\x80\x3a\xdb\x09" - "\x7b\x0a\xbc\x65\x45\xdb\xfd\xb0\xeb\x2e\xf0\xfa\x0c\xca\x7d\xde" - "\x52\xc3\x31\x9d\x3f\xd0\xfd\x1a\xdc\xb5\x48\xbf\x06\xd7\x4f\x70" - "\xbd\x0a\xd7\x3f\xda\x17\x60\xde\xc3\xbe\xf4\x4b\xd8\x97\xde\xfd" - "\xae\xf4\x07\x0a\x94\x13\xfb\x04\xe1\xfd\x2c\xb6\x41\x7c\xb4\xda" - "\xcc\xeb\xe0\x9c\x17\x69\x5b\xec\x4f\x51\x16\x5f\x85\xdc\x1b\x74" - "\xd7\x8a\xca\x0f\xfc\x62\x73\x1e\x7f\x6f\x2d\xe3\x24\xad\x4e\x48" - "\x4c\xf8\x9c\x12\x6d\x96\xd4\x2e\xf7\x6a\x94\x5d\x30\x8b\xe9\xd4" - "\xdf\xb7\x68\xe5\x37\x80\x63\xec\xc3\x3e\xdb\x70\x2d\x49\xfb\x56" - "\xb7\xe7\xea\xe4\xb8\xb0\x7a\x56\x84\x4d\xc7\x7b\xd3\x29\xca\x3e" - "\x11\x61\x65\x9f\xae\x2e\x31\xe4\x00\xf7\xe5\x06\x9f\x46\xc5\xd7" - "\x5b\x50\x32\x77\xd1\xdc\x42\xfb\x88\xc5\x29\x14\x11\x5d\xcf\x31" - "\x77\x81\x7d\xd1\xdc\x67\x9f\x9b\xbb\x58\x46\xc6\xe3\xb7\x51\x63" - "\x3e\xf4\xfd\xef\x33\x8c\x73\x5f\xf6\xa1\x4c\xdf\xd5\x5f\x70\x4c" - "\x36\xb1\xf6\xf7\xdb\xd8\x77\x47\xcd\x37\x44\x66\xf4\x7c\xe3\x79" - "\x15\x77\xa2\xe2\x03\x9f\x9a\xeb\x3c\x2f\xbf\x63\x7d\x82\xd6\x54" - "\xf7\xc5\x7f\x5f\x33\x1e\xb4\x34\xe9\x74\xbb\xd0\xe5\x5e\x93\x6d" - "\xd0\xcd\x47\xcf\x7b\x74\x5b\xaa\x43\xea\x0f\x8c\xb1\xd0\x7f\x51" - "\xe3\xab\xfa\x06\xed\x1a\x8e\xcb\x91\x28\xd7\x93\x93\x3f\x68\xe3" - "\xba\x18\x26\xea\xf3\xa0\x7f\x7c\xd0\x9b\xac\xdf\x2a\x0c\x78\xa8" - "\x33\x93\xeb\xd3\xe7\x41\xd7\x9f\xa6\xe7\xe5\x9a\xb3\x56\xf1\x41" - "\x1b\xeb\x14\x8e\x21\xa2\x55\x02\x8e\xdc\xa3\x7d\xde\x23\xd7\x61" - "\xf9\x1b\x04\x80\xc5\xeb\xc0\xd0\x73\x01\xfe\x5e\x31\xa7\xa9\xd8" - "\x70\xab\xd7\xf1\xda\x33\xea\x3a\x0e\xfc\x83\x7d\x67\x1b\x9e\xf7" - "\xb0\xdd\xc9\x70\x7d\xb4\xe6\x00\xc3\x53\xb1\xef\x9e\x1f\x06\xde" - "\xc9\xe8\xb3\x9f\x9e\x2f\x88\x98\x97\x31\x3e\x12\xcf\x00\x70\x91" - "\x71\x56\x95\xaf\xa9\x6c\x37\xeb\xcf\x4d\x7a\xdb\x8d\xf6\x00\x1e" - "\xf4\xdf\xea\x34\xc3\x6f\xc2\xa7\xb7\x9b\xf1\x63\xdc\x23\x71\xd6" - "\xf1\xad\x61\x7c\x51\x6e\x5b\x84\x6c\xf3\xba\x4c\x12\xd2\xf6\xf7" - "\xf9\xb0\xaf\xa1\x58\xbd\xb1\x70\x81\xbd\x68\xfe\x82\xa7\xf3\x97" - "\xce\x79\x7a\x6e\xfe\x73\xc5\x23\xed\xcf\x2d\x78\xa2\x68\xe1\x93" - "\x4f\x33\xd7\x2c\x2e\x79\xee\xc9\xa7\xed\xac\x59\xf2\x27\x4e\x99" - "\x92\x7f\xcf\x43\x33\x1f\x4e\xa1\x7b\xe6\x20\x0d\x33\xff\x29\x59" - "\x23\xd5\xab\x07\x27\x4d\xf8\x69\xfe\x84\xe9\x0f\x4d\x9b\x25\x0f" - "\xbd\xf4\xbe\x9f\xb8\x20\x7e\x86\x28\x3e\x4c\x03\x2f\x1d\x47\xff" - "\x26\x9d\xa0\xca\xb1\x2a\x5e\xfa\x0b\x45\xd1\xf1\xd2\x5f\x00\xd2" - "\x2f\x6c\xc5\xef\x00\xd1\x2f\xfc\xf8\x41\xbb\x57\x66\x29\xfe\x4a" - "\x7e\xbc\xcb\xfd\x42\x4d\x1f\x7f\x55\xca\xb3\x94\xec\xa7\xa4\xd6" - "\x67\x5f\x80\xfe\x5f\xbd\x3f\xf2\x5d\xdf\x7c\xf2\x85\xa3\xbd\xf3" - "\xc9\x5e\x9d\xf2\x42\xef\xdc\x12\x69\xed\x98\x57\x26\xf3\xbc\x52" - "\xad\x27\x55\x8e\x93\x3c\xd5\xaf\x7c\x5b\xc8\x98\x57\xb2\x6c\xcb" - "\x3d\x29\x39\xff\xf8\x45\x76\xa4\x8c\xcb\x35\x7d\x5d\xc6\xb9\x9c" - "\x5c\xbf\xb3\x88\x74\x5e\xd3\x86\x7d\x7c\x1c\xb6\x02\xc6\xaf\x2e" - "\x21\x92\x45\xba\xc2\xe9\x17\x4e\x5e\xe3\x66\xbb\x59\xe7\xa7\x41" - "\xa7\xe9\x17\x7b\x85\xfb\xf9\x26\x35\xa7\x7c\x3e\xcc\x7a\x5d\xac" - "\x1e\x7a\x0f\xfb\x16\xf1\xdc\x09\x75\xee\xea\xe3\xd9\xca\xb1\xcc" - "\x0b\x7d\x73\xd9\x5f\x44\xe9\xff\x4e\xf9\x5d\xc2\x5f\x1c\x37\xe2" - "\x3d\x94\x0c\x27\x93\x79\x78\x35\x6d\x32\x09\xe8\x9b\x5f\xac\xe3" - "\x3a\x98\x9e\x3e\x7a\xa1\x01\x79\xcd\x7d\xf4\xab\x48\xeb\xa5\x9f" - "\xbe\xce\x62\xac\xb1\x28\xbc\x2b\xc7\xf5\x47\xab\xf8\x74\xaa\x28" - "\xf8\x4a\x3a\xb9\x29\x89\x65\xd2\xa0\xd7\xa5\xb4\xaa\xd8\x76\x29" - "\xad\x2a\x2e\xf4\xd1\xea\x85\x1b\x2e\xa5\x55\x45\x6b\xc4\xbe\x92" - "\xbe\x8e\x52\x39\x8e\x69\xc6\x3c\x86\x76\xaf\x03\x9f\xd5\xf4\xd1" - "\xaf\xd2\x72\x29\xfd\x2a\x87\xc5\xa7\x5f\x05\x9f\xaf\x8a\x84\x53" - "\x17\x6f\xdc\x18\xb4\xca\xa4\x9f\x07\xab\xfc\x25\x7f\xeb\x9e\xf1" - "\xd8\x68\xd2\x1c\x1b\xdd\xf8\xe1\xca\xf3\x88\x3e\x5b\x5c\x04\x75" - "\xfa\x56\x37\x62\xce\xcb\xeb\x4a\x97\x19\x8b\x8e\x1b\x6b\x1e\xb8" - "\x6f\xe5\xb9\x33\x7f\x13\x8a\xd3\x99\x9e\xfc\x8d\x31\xf0\x7b\xab" - "\xb2\x4b\x2b\x7b\xbf\xff\xd1\x79\xd3\x83\x05\x89\xab\xc8\x7e\xb8" - "\xf6\x0e\x4e\x0f\x82\x87\x72\x39\x9d\x7d\xb7\xfa\x83\x99\x1f\xce" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue May 29 01:48:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04AF11065670; Tue, 29 May 2012 01:48:07 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA47E8FC12; Tue, 29 May 2012 01:48:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4T1m6Yr045503; Tue, 29 May 2012 01:48:06 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4T1m6ZZ045494; Tue, 29 May 2012 01:48:06 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201205290148.q4T1m6ZZ045494@svn.freebsd.org> From: Kevin Lo Date: Tue, 29 May 2012 01:48: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: r236213 - in head: sbin/fsck_msdosfs sbin/restore sys/boot/i386/libi386 sys/compat/ndis sys/i386/i386 usr.bin/chat usr.sbin/pkg_install/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: Tue, 29 May 2012 01:48:07 -0000 Author: kevlo Date: Tue May 29 01:48:06 2012 New Revision: 236213 URL: http://svn.freebsd.org/changeset/base/236213 Log: Make sure that each va_start has one and only one matching va_end, especially in error cases. Modified: head/sbin/fsck_msdosfs/main.c head/sbin/restore/utilities.c head/sys/boot/i386/libi386/biospnp.c head/sys/compat/ndis/subr_ntoskrnl.c head/sys/i386/i386/bios.c head/usr.bin/chat/chat.c head/usr.sbin/pkg_install/lib/exec.c head/usr.sbin/pkg_install/lib/msg.c Modified: head/sbin/fsck_msdosfs/main.c ============================================================================== --- head/sbin/fsck_msdosfs/main.c Tue May 29 00:53:51 2012 (r236212) +++ head/sbin/fsck_msdosfs/main.c Tue May 29 01:48:06 2012 (r236213) @@ -138,6 +138,7 @@ ask(int def, const char *fmt, ...) va_start(ap, fmt); vsnprintf(prompt, sizeof(prompt), fmt, ap); + va_end(ap); if (alwaysyes || rdonly) { printf("%s? %s\n", prompt, rdonly ? "no" : "yes"); return !rdonly; Modified: head/sbin/restore/utilities.c ============================================================================== --- head/sbin/restore/utilities.c Tue May 29 00:53:51 2012 (r236212) +++ head/sbin/restore/utilities.c Tue May 29 01:48:06 2012 (r236213) @@ -411,6 +411,7 @@ panic(const char *fmt, ...) va_list ap; va_start(ap, fmt); vfprintf(stderr, fmt, ap); + va_end(ap); if (yflag) return; if (reply("abort") == GOOD) { Modified: head/sys/boot/i386/libi386/biospnp.c ============================================================================== --- head/sys/boot/i386/libi386/biospnp.c Tue May 29 00:53:51 2012 (r236212) +++ head/sys/boot/i386/libi386/biospnp.c Tue May 29 01:48:06 2012 (r236213) @@ -276,6 +276,7 @@ biospnp_call(int func, const char *fmt, break; } } + va_end(ap); /* BIOS segment last */ *(u_int16_t *)argp = pnp_Icheck->pnp_rmds; Modified: head/sys/compat/ndis/subr_ntoskrnl.c ============================================================================== --- head/sys/compat/ndis/subr_ntoskrnl.c Tue May 29 00:53:51 2012 (r236212) +++ head/sys/compat/ndis/subr_ntoskrnl.c Tue May 29 01:48:06 2012 (r236213) @@ -3591,6 +3591,7 @@ DbgPrint(char *fmt, ...) if (bootverbose) { va_start(ap, fmt); vprintf(fmt, ap); + va_end(ap); } return (STATUS_SUCCESS); Modified: head/sys/i386/i386/bios.c ============================================================================== --- head/sys/i386/i386/bios.c Tue May 29 00:53:51 2012 (r236212) +++ head/sys/i386/i386/bios.c Tue May 29 01:48:06 2012 (r236213) @@ -372,9 +372,11 @@ bios16(struct bios_args *args, char *fmt break; default: + va_end(ap); return (EINVAL); } } + va_end(ap); if (flags & BIOSARGS_FLAG) { if (arg_end - arg_start > ctob(16)) @@ -448,9 +450,11 @@ bios16(struct bios_args *args, char *fmt break; default: + va_end(ap); return (EINVAL); } } + va_end(ap); set_bios_selectors(&args->seg, flags); bioscall_vector.vec16.offset = (u_short)args->entry; Modified: head/usr.bin/chat/chat.c ============================================================================== --- head/usr.bin/chat/chat.c Tue May 29 00:53:51 2012 (r236212) +++ head/usr.bin/chat/chat.c Tue May 29 01:48:06 2012 (r236213) @@ -408,6 +408,7 @@ chat_logf(const char *fmt, ...) va_start(args, fmt); vfmtmsg(line, sizeof(line), fmt, args); + va_end(args); if (to_log) syslog(LOG_INFO, "%s", line); if (to_stderr) @@ -425,6 +426,7 @@ fatal(int code, const char *fmt, ...) va_start(args, fmt); vfmtmsg(line, sizeof(line), fmt, args); + va_end(args); if (to_log) syslog(LOG_ERR, "%s", line); if (to_stderr) Modified: head/usr.sbin/pkg_install/lib/exec.c ============================================================================== --- head/usr.sbin/pkg_install/lib/exec.c Tue May 29 00:53:51 2012 (r236212) +++ head/usr.sbin/pkg_install/lib/exec.c Tue May 29 01:48:06 2012 (r236213) @@ -47,6 +47,7 @@ vsystem(const char *fmt, ...) va_start(args, fmt); if (vsnprintf(cmd, maxargs, fmt, args) > maxargs) { warnx("vsystem args are too long"); + va_end(args); return 1; } #ifdef DEBUG @@ -82,6 +83,7 @@ vpipe(const char *fmt, ...) va_start(args, fmt); if (vsnprintf(cmd, maxargs, fmt, args) > maxargs) { warnx("vsystem args are too long"); + va_end(args); return NULL; } #ifdef DEBUG Modified: head/usr.sbin/pkg_install/lib/msg.c ============================================================================== --- head/usr.sbin/pkg_install/lib/msg.c Tue May 29 00:53:51 2012 (r236212) +++ head/usr.sbin/pkg_install/lib/msg.c Tue May 29 01:48:06 2012 (r236213) @@ -71,5 +71,6 @@ y_or_n(Boolean def, const char *msg, ... ch = (def) ? 'Y' : 'N'; } fclose(tty) ; + va_end(args); return (ch == 'Y') ? TRUE : FALSE; } From owner-svn-src-head@FreeBSD.ORG Tue May 29 01:52:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4A074106564A; Tue, 29 May 2012 01:52:39 +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 2B3E08FC08; Tue, 29 May 2012 01:52:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4T1qdVG045711; Tue, 29 May 2012 01:52:39 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4T1qcl7045707; Tue, 29 May 2012 01:52:38 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201205290152.q4T1qcl7045707@svn.freebsd.org> From: Alan Cox Date: Tue, 29 May 2012 01:52: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: r236214 - in head/sys/sparc64: include sparc64 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, 29 May 2012 01:52:39 -0000 Author: alc Date: Tue May 29 01:52:38 2012 New Revision: 236214 URL: http://svn.freebsd.org/changeset/base/236214 Log: Replace all uses of the vm page queues lock by a r/w lock that is private to this pmap.c. This new r/w lock is used primarily to synchronize access to the TTE lists. However, it will be used in a somewhat unconventional way. As finer-grained TTE list locking is added to each of the pmap functions that acquire this r/w lock, its acquisition will be changed from write to read, enabling concurrent execution of the pmap functions with finer-grained locking. Reviewed by: attilio Tested by: flo MFC after: 10 days Modified: head/sys/sparc64/include/pmap.h head/sys/sparc64/sparc64/pmap.c head/sys/sparc64/sparc64/tsb.c Modified: head/sys/sparc64/include/pmap.h ============================================================================== --- head/sys/sparc64/include/pmap.h Tue May 29 01:48:06 2012 (r236213) +++ head/sys/sparc64/include/pmap.h Tue May 29 01:52:38 2012 (r236214) @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -101,6 +102,7 @@ void pmap_set_kctx(void); extern struct pmap kernel_pmap_store; #define kernel_pmap (&kernel_pmap_store) +extern struct rwlock tte_list_global_lock; extern vm_paddr_t phys_avail[]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Tue May 29 01:48:06 2012 (r236213) +++ head/sys/sparc64/sparc64/pmap.c Tue May 29 01:52:38 2012 (r236214) @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -134,6 +135,11 @@ vm_offset_t vm_max_kernel_address; struct pmap kernel_pmap_store; /* + * Global tte list lock + */ +struct rwlock tte_list_global_lock; + +/* * Allocate physical memory for use in pmap_bootstrap. */ static vm_paddr_t pmap_bootstrap_alloc(vm_size_t size, uint32_t colors); @@ -666,6 +672,11 @@ pmap_bootstrap(u_int cpu_impl) pm->pm_context[i] = TLB_CTX_KERNEL; CPU_FILL(&pm->pm_active); + /* + * Initialize the global tte list lock. + */ + rw_init(&tte_list_global_lock, "tte list global"); + /* * Flush all non-locked TLB entries possibly left over by the * firmware. @@ -876,7 +887,7 @@ pmap_cache_enter(vm_page_t m, vm_offset_ struct tte *tp; int color; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&tte_list_global_lock, RA_WLOCKED); KASSERT((m->flags & PG_FICTITIOUS) == 0, ("pmap_cache_enter: fake page")); PMAP_STATS_INC(pmap_ncache_enter); @@ -951,7 +962,7 @@ pmap_cache_remove(vm_page_t m, vm_offset struct tte *tp; int color; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&tte_list_global_lock, RA_WLOCKED); CTR3(KTR_PMAP, "pmap_cache_remove: m=%p va=%#lx c=%d", m, va, m->md.colors[DCACHE_COLOR(va)]); KASSERT((m->flags & PG_FICTITIOUS) == 0, @@ -1026,7 +1037,7 @@ pmap_kenter(vm_offset_t va, vm_page_t m) vm_page_t om; u_long data; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&tte_list_global_lock, RA_WLOCKED); PMAP_STATS_INC(pmap_nkenter); tp = tsb_kvtotte(va); CTR4(KTR_PMAP, "pmap_kenter: va=%#lx pa=%#lx tp=%p data=%#lx", @@ -1088,7 +1099,7 @@ pmap_kremove(vm_offset_t va) struct tte *tp; vm_page_t m; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&tte_list_global_lock, RA_WLOCKED); PMAP_STATS_INC(pmap_nkremove); tp = tsb_kvtotte(va); CTR3(KTR_PMAP, "pmap_kremove: va=%#lx tp=%p data=%#lx", va, tp, @@ -1139,19 +1150,16 @@ void pmap_qenter(vm_offset_t sva, vm_page_t *m, int count) { vm_offset_t va; - int locked; PMAP_STATS_INC(pmap_nqenter); va = sva; - if (!(locked = mtx_owned(&vm_page_queue_mtx))) - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); while (count-- > 0) { pmap_kenter(va, *m); va += PAGE_SIZE; m++; } - if (!locked) - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); tlb_range_demap(kernel_pmap, sva, va); } @@ -1163,18 +1171,15 @@ void pmap_qremove(vm_offset_t sva, int count) { vm_offset_t va; - int locked; PMAP_STATS_INC(pmap_nqremove); va = sva; - if (!(locked = mtx_owned(&vm_page_queue_mtx))) - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); while (count-- > 0) { pmap_kremove(va); va += PAGE_SIZE; } - if (!locked) - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); tlb_range_demap(kernel_pmap, sva, va); } @@ -1322,7 +1327,7 @@ pmap_remove_tte(struct pmap *pm, struct vm_page_t m; u_long data; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&tte_list_global_lock, RA_WLOCKED); data = atomic_readandclear_long(&tp->tte_data); if ((data & TD_FAKE) == 0) { m = PHYS_TO_VM_PAGE(TD_PA(data)); @@ -1359,7 +1364,7 @@ pmap_remove(pmap_t pm, vm_offset_t start pm->pm_context[curcpu], start, end); if (PMAP_REMOVE_DONE(pm)) return; - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); PMAP_LOCK(pm); if (end - start > PMAP_TSB_THRESH) { tsb_foreach(pm, NULL, start, end, pmap_remove_tte); @@ -1372,7 +1377,7 @@ pmap_remove(pmap_t pm, vm_offset_t start tlb_range_demap(pm, start, end - 1); } PMAP_UNLOCK(pm); - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); } void @@ -1385,7 +1390,7 @@ pmap_remove_all(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_remove_all: page %p is not managed", m)); - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); for (tp = TAILQ_FIRST(&m->md.tte_list); tp != NULL; tp = tpn) { tpn = TAILQ_NEXT(tp, tte_link); if ((tp->tte_data & TD_PV) == 0) @@ -1408,7 +1413,7 @@ pmap_remove_all(vm_page_t m) PMAP_UNLOCK(pm); } vm_page_aflag_clear(m, PGA_WRITEABLE); - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); } static int @@ -1470,10 +1475,10 @@ pmap_enter(pmap_t pm, vm_offset_t va, vm vm_prot_t prot, boolean_t wired) { - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); PMAP_LOCK(pm); pmap_enter_locked(pm, va, m, prot, wired); - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); PMAP_UNLOCK(pm); } @@ -1493,7 +1498,7 @@ pmap_enter_locked(pmap_t pm, vm_offset_t vm_page_t real; u_long data; - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&tte_list_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pm, MA_OWNED); KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0 || VM_OBJECT_LOCKED(m->object), @@ -1636,14 +1641,14 @@ pmap_enter_object(pmap_t pm, vm_offset_t psize = atop(end - start); m = m_start; - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); PMAP_LOCK(pm); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { pmap_enter_locked(pm, start + ptoa(diff), m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE); m = TAILQ_NEXT(m, listq); } - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); PMAP_UNLOCK(pm); } @@ -1651,11 +1656,11 @@ void pmap_enter_quick(pmap_t pm, vm_offset_t va, vm_page_t m, vm_prot_t prot) { - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); PMAP_LOCK(pm); pmap_enter_locked(pm, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE); - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); PMAP_UNLOCK(pm); } @@ -1721,7 +1726,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm if (dst_addr != src_addr) return; - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); if (dst_pmap < src_pmap) { PMAP_LOCK(dst_pmap); PMAP_LOCK(src_pmap); @@ -1739,7 +1744,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm pmap_copy_tte(src_pmap, dst_pmap, tp, va); tlb_range_demap(dst_pmap, src_addr, src_addr + len - 1); } - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); PMAP_UNLOCK(src_pmap); PMAP_UNLOCK(dst_pmap); } @@ -1938,7 +1943,7 @@ pmap_page_exists_quick(pmap_t pm, vm_pag ("pmap_page_exists_quick: page %p is not managed", m)); loops = 0; rv = FALSE; - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) { if ((tp->tte_data & TD_PV) == 0) continue; @@ -1949,7 +1954,7 @@ pmap_page_exists_quick(pmap_t pm, vm_pag if (++loops >= 16) break; } - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); return (rv); } @@ -1966,11 +1971,11 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->oflags & VPO_UNMANAGED) != 0) return (count); - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) if ((tp->tte_data & (TD_PV | TD_WIRED)) == (TD_PV | TD_WIRED)) count++; - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); return (count); } @@ -1997,13 +2002,13 @@ pmap_page_is_mapped(vm_page_t m) rv = FALSE; if ((m->oflags & VPO_UNMANAGED) != 0) return (rv); - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) if ((tp->tte_data & TD_PV) != 0) { rv = TRUE; break; } - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); return (rv); } @@ -2029,7 +2034,7 @@ pmap_ts_referenced(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_ts_referenced: page %p is not managed", m)); count = 0; - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); if ((tp = TAILQ_FIRST(&m->md.tte_list)) != NULL) { tpf = tp; do { @@ -2043,7 +2048,7 @@ pmap_ts_referenced(vm_page_t m) break; } while ((tp = tpn) != NULL && tp != tpf); } - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); return (count); } @@ -2066,7 +2071,7 @@ pmap_is_modified(vm_page_t m) if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return (rv); - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) { if ((tp->tte_data & TD_PV) == 0) continue; @@ -2075,7 +2080,7 @@ pmap_is_modified(vm_page_t m) break; } } - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); return (rv); } @@ -2109,7 +2114,7 @@ pmap_is_referenced(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_is_referenced: page %p is not managed", m)); rv = FALSE; - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) { if ((tp->tte_data & TD_PV) == 0) continue; @@ -2118,7 +2123,7 @@ pmap_is_referenced(vm_page_t m) break; } } - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); return (rv); } @@ -2141,7 +2146,7 @@ pmap_clear_modify(vm_page_t m) */ if ((m->aflags & PGA_WRITEABLE) == 0) return; - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) { if ((tp->tte_data & TD_PV) == 0) continue; @@ -2149,7 +2154,7 @@ pmap_clear_modify(vm_page_t m) if ((data & TD_W) != 0) tlb_page_demap(TTE_GET_PMAP(tp), TTE_GET_VA(tp)); } - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); } void @@ -2160,7 +2165,7 @@ pmap_clear_reference(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_clear_reference: page %p is not managed", m)); - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) { if ((tp->tte_data & TD_PV) == 0) continue; @@ -2168,7 +2173,7 @@ pmap_clear_reference(vm_page_t m) if ((data & TD_REF) != 0) tlb_page_demap(TTE_GET_PMAP(tp), TTE_GET_VA(tp)); } - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); } void @@ -2189,7 +2194,7 @@ pmap_remove_write(vm_page_t m) if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return; - vm_page_lock_queues(); + rw_wlock(&tte_list_global_lock); TAILQ_FOREACH(tp, &m->md.tte_list, tte_link) { if ((tp->tte_data & TD_PV) == 0) continue; @@ -2200,7 +2205,7 @@ pmap_remove_write(vm_page_t m) } } vm_page_aflag_clear(m, PGA_WRITEABLE); - vm_page_unlock_queues(); + rw_wunlock(&tte_list_global_lock); } int Modified: head/sys/sparc64/sparc64/tsb.c ============================================================================== --- head/sys/sparc64/sparc64/tsb.c Tue May 29 01:48:06 2012 (r236213) +++ head/sys/sparc64/sparc64/tsb.c Tue May 29 01:52:38 2012 (r236214) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -131,7 +132,7 @@ tsb_tte_enter(pmap_t pm, vm_page_t m, vm PMAP_STATS_INC(tsb_nenter_u_oc); } - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&tte_list_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pm, MA_OWNED); if (pm == kernel_pmap) { PMAP_STATS_INC(tsb_nenter_k); From owner-svn-src-head@FreeBSD.ORG Tue May 29 03:23:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C6DC106564A; Tue, 29 May 2012 03:23: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 E16488FC18; Tue, 29 May 2012 03:23:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4T3NIvI049620; Tue, 29 May 2012 03:23:18 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4T3NIo9049606; Tue, 29 May 2012 03:23:18 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201205290323.q4T3NIo9049606@svn.freebsd.org> From: Warner Losh Date: Tue, 29 May 2012 03:23: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: r236215 - head/sys/arm/at91 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, 29 May 2012 03:23:19 -0000 Author: imp Date: Tue May 29 03:23:18 2012 New Revision: 236215 URL: http://svn.freebsd.org/changeset/base/236215 Log: Compute the master clock frequency, so we no longer need to have it compiled into the kernel. This allows us to boot the same kernel on machines with different master clock frequencies, so long as we can determine the main clock frequency accurately. Cleanup the pmc clock init function so it can be called in early boot so we can use the serial port just after we call cninit. # We have two calls to at91_pmc_clock_init for reasons unknown, that will # be fixed later -- it is harmless for now. Modified: head/sys/arm/at91/at91.c head/sys/arm/at91/at91_machdep.c head/sys/arm/at91/at91_pmc.c head/sys/arm/at91/at91rm92reg.h head/sys/arm/at91/at91sam9260reg.h head/sys/arm/at91/at91sam9g20reg.h head/sys/arm/at91/at91var.h head/sys/arm/at91/std.ethernut5 head/sys/arm/at91/std.hl200 head/sys/arm/at91/std.hl201 head/sys/arm/at91/std.kb920x head/sys/arm/at91/std.qila9g20 head/sys/arm/at91/std.sam9g20ek Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Tue May 29 01:52:38 2012 (r236214) +++ head/sys/arm/at91/at91.c Tue May 29 03:23:18 2012 (r236215) @@ -56,11 +56,7 @@ extern const struct pmap_devmap at91_dev uint32_t at91_chip_id; -#ifdef AT91C_MASTER_CLOCK -uint32_t at91_master_clock = AT91C_MASTER_CLOCK; -#else uint32_t at91_master_clock; -#endif static int at91_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Tue May 29 01:52:38 2012 (r236214) +++ head/sys/arm/at91/at91_machdep.c Tue May 29 03:23:18 2012 (r236215) @@ -363,6 +363,7 @@ initarm(void *arg, void *arg2) cninit(); + at91_pmc_init_clock(); /* Get chip id so device drivers know about differences */ at91_chip_id = *(volatile uint32_t *) (AT91_BASE + AT91_DBGU_BASE + DBGU_C1R); Modified: head/sys/arm/at91/at91_pmc.c ============================================================================== --- head/sys/arm/at91/at91_pmc.c Tue May 29 01:52:38 2012 (r236214) +++ head/sys/arm/at91/at91_pmc.c Tue May 29 03:23:18 2012 (r236215) @@ -55,12 +55,15 @@ static struct at91_pmc_softc { bus_space_handle_t sc_sh; struct resource *mem_res; /* Memory resource */ device_t dev; - uint32_t pllb_init; } *pmc_softc; +static uint32_t pllb_init; + MALLOC_DECLARE(M_PMC); MALLOC_DEFINE(M_PMC, "at91_pmc_clocks", "AT91 PMC Clock descriptors"); +#define AT91_PMC_BASE 0xffffc00 + static void at91_pmc_set_pllb_mode(struct at91_pmc_clock *, int); static void at91_pmc_set_sys_mode(struct at91_pmc_clock *, int); static void at91_pmc_set_periph_mode(struct at91_pmc_clock *, int); @@ -150,6 +153,11 @@ static inline uint32_t RD4(struct at91_pmc_softc *sc, bus_size_t off) { + if (sc == NULL) { + uint32_t *p = (uint32_t *)(AT91_BASE + AT91_PMC_BASE + off); + + return *p; + } return (bus_read_4(sc->mem_res, off)); } @@ -157,7 +165,12 @@ static inline void WR4(struct at91_pmc_softc *sc, bus_size_t off, uint32_t val) { - bus_write_4(sc->mem_res, off, val); + if (sc == NULL) { + uint32_t *p = (uint32_t *)(AT91_BASE + AT91_PMC_BASE + off); + + *p = val; + } else + bus_write_4(sc->mem_res, off, val); } void @@ -168,7 +181,7 @@ at91_pmc_set_pllb_mode(struct at91_pmc_c if (on) { on = PMC_IER_LOCKB; - value = sc->pllb_init; + value = pllb_init; } else value = 0; @@ -398,15 +411,17 @@ static const unsigned int at91_main_cloc 16000000, 17344700, 18432000, 20000000 }; #define MAIN_CLOCK_TBL_LEN (sizeof(at91_main_clock_tbl) / sizeof(*at91_main_clock_tbl)) +#endif static unsigned int -at91_pmc_sense_main_clock(struct at91_pmc_softc *sc) +at91_pmc_sense_main_clock(void) { +#if !defined(AT91C_MAIN_CLOCK) unsigned int ckgr_val; unsigned int diff, matchdiff, freq; int i; - ckgr_val = (RD4(sc, CKGR_MCFR) & CKGR_MCFR_MAINF_MASK) << 11; + ckgr_val = (RD4(NULL, CKGR_MCFR) & CKGR_MCFR_MAINF_MASK) << 11; /* * Clocks up to 50MHz can be connected to some models. If @@ -432,21 +447,20 @@ at91_pmc_sense_main_clock(struct at91_pm } } return (freq); -} +#else + return (AT91C_MAIN_CLOCK); #endif +} -static void -at91_pmc_init_clock(struct at91_pmc_softc *sc) +void +at91_pmc_init_clock(void) { + struct at91_pmc_softc *sc = NULL; unsigned int main_clock; uint32_t mckr; uint32_t mdiv; -#if !defined(AT91C_MAIN_CLOCK) - main_clock = at91_pmc_sense_main_clock(pmc_softc); -#else - main_clock = AT91C_MAIN_CLOCK; -#endif + main_clock = at91_pmc_sense_main_clock(); if (at91_is_sam9() || at91_is_sam9xe()) { uhpck.pmc_mask = PMC_SCER_UHP_SAM9; @@ -464,8 +478,8 @@ at91_pmc_init_clock(struct at91_pmc_soft * Initialize the usb clock. This sets up pllb, but disables the * actual clock. */ - sc->pllb_init = at91_pmc_pll_calc(&pllb, 48000000 * 2) | 0x10000000; - at91_pmc_pll_rate(&pllb, sc->pllb_init); + pllb_init = at91_pmc_pll_calc(&pllb, 48000000 * 2) | 0x10000000; + at91_pmc_pll_rate(&pllb, pllb_init); #if 0 /* Turn off USB clocks */ @@ -570,8 +584,11 @@ at91_pmc_attach(device_t dev) /* * Configure main clock frequency. */ - at91_pmc_init_clock(pmc_softc); + at91_pmc_init_clock(); + /* + * Display info about clocks previously computed + */ device_printf(dev, "Primary: %d Hz PLLA: %d MHz CPU: %d MHz MCK: %d MHz\n", main_ck.hz, Modified: head/sys/arm/at91/at91rm92reg.h ============================================================================== --- head/sys/arm/at91/at91rm92reg.h Tue May 29 01:52:38 2012 (r236214) +++ head/sys/arm/at91/at91rm92reg.h Tue May 29 03:23:18 2012 (r236215) @@ -403,10 +403,6 @@ #define AT91RM92_CF_PA_BASE 0x51400000 #define AT91RM92_CF_SIZE 0x00100000 -#ifndef AT91C_MASTER_CLOCK -#define AT91C_MASTER_CLOCK 60000000 -#endif - /* SDRAMC */ #define AT91RM92_SDRAMC_BASE 0xfffff90 Modified: head/sys/arm/at91/at91sam9260reg.h ============================================================================== --- head/sys/arm/at91/at91sam9260reg.h Tue May 29 01:52:38 2012 (r236214) +++ head/sys/arm/at91/at91sam9260reg.h Tue May 29 03:23:18 2012 (r236215) @@ -28,10 +28,6 @@ #ifndef AT91SAM9260REG_H_ #define AT91SAM9260REG_H_ -#ifndef AT91SAM9260_MASTER_CLOCK -#define AT91SAM9260_MASTER_CLOCK ((18432000 * 43)/6) -#endif - /* Chip Specific limits */ #define SAM9260_PLL_A_MIN_IN_FREQ 1000000 /* 1 Mhz */ #define SAM9260_PLL_A_MAX_IN_FREQ 32000000 /* 32 Mhz */ Modified: head/sys/arm/at91/at91sam9g20reg.h ============================================================================== --- head/sys/arm/at91/at91sam9g20reg.h Tue May 29 01:52:38 2012 (r236214) +++ head/sys/arm/at91/at91sam9g20reg.h Tue May 29 03:23:18 2012 (r236215) @@ -29,10 +29,6 @@ #ifndef AT91SAM9G20REG_H_ #define AT91SAM9G20REG_H_ -#ifndef AT91SAM9G20_MASTER_CLOCK -#define AT91SAM9G20_MASTER_CLOCK ((18432000 * 43)/6) -#endif - /* Chip Specific limits */ #define SAM9G20_PLL_A_MIN_IN_FREQ 2000000 /* 2 Mhz */ #define SAM9G20_PLL_A_MAX_IN_FREQ 32000000 /* 32 Mhz */ Modified: head/sys/arm/at91/at91var.h ============================================================================== --- head/sys/arm/at91/at91var.h Tue May 29 01:52:38 2012 (r236214) +++ head/sys/arm/at91/at91var.h Tue May 29 03:23:18 2012 (r236215) @@ -97,4 +97,6 @@ at91_cpu_is(u_int cpu) extern uint32_t at91_irq_system; extern uint32_t at91_master_clock; +void at91_pmc_init_clock(void); + #endif /* _AT91VAR_H_ */ Modified: head/sys/arm/at91/std.ethernut5 ============================================================================== --- head/sys/arm/at91/std.ethernut5 Tue May 29 01:52:38 2012 (r236214) +++ head/sys/arm/at91/std.ethernut5 Tue May 29 03:23:18 2012 (r236215) @@ -7,8 +7,5 @@ makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 options KERNVIRTADDR=0xc0000000 -# SAM9XE512 w/ 90.3168 MHz master clock -options AT91C_MASTER_CLOCK=90316800 - device at91_board_ethernut5 nodevice at91sam9g20 Modified: head/sys/arm/at91/std.hl200 ============================================================================== --- head/sys/arm/at91/std.hl200 Tue May 29 01:52:38 2012 (r236214) +++ head/sys/arm/at91/std.hl200 Tue May 29 03:23:18 2012 (r236215) @@ -6,6 +6,5 @@ makeoptions KERNPHYSADDR=0x20100000 options KERNPHYSADDR=0x20100000 makeoptions KERNVIRTADDR=0xc0100000 options KERNVIRTADDR=0xc0100000 -options AT91C_MASTER_CLOCK=45000000 device at91_board_hl200 Modified: head/sys/arm/at91/std.hl201 ============================================================================== --- head/sys/arm/at91/std.hl201 Tue May 29 01:52:38 2012 (r236214) +++ head/sys/arm/at91/std.hl201 Tue May 29 03:23:18 2012 (r236215) @@ -6,6 +6,5 @@ makeoptions KERNPHYSADDR=0x20000000 makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 options KERNVIRTADDR=0xc0000000 -options AT91C_MASTER_CLOCK=132000000 device at91_board_hl201 Modified: head/sys/arm/at91/std.kb920x ============================================================================== --- head/sys/arm/at91/std.kb920x Tue May 29 01:52:38 2012 (r236214) +++ head/sys/arm/at91/std.kb920x Tue May 29 03:23:18 2012 (r236215) @@ -6,6 +6,5 @@ makeoptions KERNPHYSADDR=0x20000000 options KERNPHYSADDR=0x20000000 makeoptions KERNVIRTADDR=0xc0000000 options KERNVIRTADDR=0xc0000000 -options AT91C_MASTER_CLOCK=60000000 device at91_board_kb920x Modified: head/sys/arm/at91/std.qila9g20 ============================================================================== --- head/sys/arm/at91/std.qila9g20 Tue May 29 01:52:38 2012 (r236214) +++ head/sys/arm/at91/std.qila9g20 Tue May 29 03:23:18 2012 (r236215) @@ -6,6 +6,5 @@ makeoptions KERNPHYSADDR=0x20000000 makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 options KERNVIRTADDR=0xc0000000 -options AT91C_MASTER_CLOCK=((12000000*133)/12) device at91_board_qila9g20 Modified: head/sys/arm/at91/std.sam9g20ek ============================================================================== --- head/sys/arm/at91/std.sam9g20ek Tue May 29 01:52:38 2012 (r236214) +++ head/sys/arm/at91/std.sam9g20ek Tue May 29 03:23:18 2012 (r236215) @@ -7,9 +7,4 @@ makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 options KERNVIRTADDR=0xc0000000 -#SAM9G20 w/ 18.432 Mhz Clock -#options AT91C_MASTER_CLOCK=((18432000*43)/6) -#SAM9260 w/ 18.432 Mhz Clock -#options AT91C_MASTER_CLOCK=((18432000*97)/18) - device at91_board_sam9g20ek From owner-svn-src-head@FreeBSD.ORG Tue May 29 05:09:41 2012 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 79A3E106566C; Tue, 29 May 2012 05:09:41 +0000 (UTC) (envelope-from iwasaki@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6422F8FC0C; Tue, 29 May 2012 05:09:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4T59fdk054354; Tue, 29 May 2012 05:09:41 GMT (envelope-from iwasaki@svn.freebsd.org) Received: (from iwasaki@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4T59eoK054352; Tue, 29 May 2012 05:09:40 GMT (envelope-from iwasaki@svn.freebsd.org) Message-Id: <201205290509.q4T59eoK054352@svn.freebsd.org> From: Mitsuru IWASAKI Date: Tue, 29 May 2012 05:09: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: r236220 - 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, 29 May 2012 05:09:41 -0000 Author: iwasaki Date: Tue May 29 05:09:40 2012 New Revision: 236220 URL: http://svn.freebsd.org/changeset/base/236220 Log: Fix the problem acpi_sleep_force() hang. Suspending from callout cause the freeze in DEVICE_SUSPEND(). Suspend from acpi_task thread in stead. MFC after: 3 days Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Tue May 29 04:53:46 2012 (r236219) +++ head/sys/dev/acpica/acpi.c Tue May 29 05:09:40 2012 (r236220) @@ -2449,15 +2449,29 @@ acpi_SetSleepState(struct acpi_softc *sc #if defined(__amd64__) || defined(__i386__) static void +acpi_sleep_force_task(void *context) +{ + struct acpi_softc *sc = (struct acpi_softc *)context; + + if (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_sstate))) + device_printf(sc->acpi_dev, "force sleep state S%d failed\n", + sc->acpi_next_sstate); +} + +static void acpi_sleep_force(void *arg) { struct acpi_softc *sc = (struct acpi_softc *)arg; device_printf(sc->acpi_dev, "suspend request timed out, forcing sleep now\n"); - if (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_sstate))) - device_printf(sc->acpi_dev, "force sleep state S%d failed\n", - sc->acpi_next_sstate); + /* + * XXX Suspending from callout cause the freeze in DEVICE_SUSPEND(). + * Suspend from acpi_task thread in stead. + */ + if (ACPI_FAILURE(AcpiOsExecute(OSL_NOTIFY_HANDLER, + acpi_sleep_force_task, sc))) + device_printf(sc->acpi_dev, "AcpiOsExecute() for sleeping failed\n"); } #endif From owner-svn-src-head@FreeBSD.ORG Tue May 29 05:28:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 84668106566B; Tue, 29 May 2012 05:28:35 +0000 (UTC) (envelope-from iwasaki@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F79B8FC0C; Tue, 29 May 2012 05:28:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4T5SZPQ055210; Tue, 29 May 2012 05:28:35 GMT (envelope-from iwasaki@svn.freebsd.org) Received: (from iwasaki@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4T5SZlN055208; Tue, 29 May 2012 05:28:35 GMT (envelope-from iwasaki@svn.freebsd.org) Message-Id: <201205290528.q4T5SZlN055208@svn.freebsd.org> From: Mitsuru IWASAKI Date: Tue, 29 May 2012 05:28: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: r236221 - 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, 29 May 2012 05:28:35 -0000 Author: iwasaki Date: Tue May 29 05:28:34 2012 New Revision: 236221 URL: http://svn.freebsd.org/changeset/base/236221 Log: Reorder resume procedures. DEVICE_RESUME() should be done before AcpiLeaveSleepState() because PCI config space evaluation can be occurred during control method executions. This should fix one of the hang up problems on resuming. MFC after: 3 days Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Tue May 29 05:09:40 2012 (r236220) +++ head/sys/dev/acpica/acpi.c Tue May 29 05:28:34 2012 (r236221) @@ -2773,12 +2773,12 @@ backout: acpi_wake_prep_walk(state); sc->acpi_sstate = ACPI_STATE_S0; } + if (slp_state >= ACPI_SS_DEV_SUSPEND) + DEVICE_RESUME(root_bus); if (slp_state >= ACPI_SS_SLP_PREP) { AcpiLeaveSleepStatePrep(state, acpi_sleep_flags); AcpiLeaveSleepState(state); } - if (slp_state >= ACPI_SS_DEV_SUSPEND) - DEVICE_RESUME(root_bus); if (slp_state >= ACPI_SS_SLEPT) { acpi_resync_clock(sc); acpi_enable_fixed_events(sc); From owner-svn-src-head@FreeBSD.ORG Tue May 29 09:11:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D228F1065670; Tue, 29 May 2012 09:11:19 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD67B8FC0C; Tue, 29 May 2012 09:11:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4T9BJgN065233; Tue, 29 May 2012 09:11:19 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4T9BJbK065231; Tue, 29 May 2012 09:11:19 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201205290911.q4T9BJbK065231@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 29 May 2012 09:11: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: r236226 - head/usr.bin/unzip 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, 29 May 2012 09:11:19 -0000 Author: des Date: Tue May 29 09:11:19 2012 New Revision: 236226 URL: http://svn.freebsd.org/changeset/base/236226 Log: Pass a filename, rather than a file descriptor, to libarchive. Submitted by: Alex Kozlov MFC after: 1 week Modified: head/usr.bin/unzip/unzip.c Modified: head/usr.bin/unzip/unzip.c ============================================================================== --- head/usr.bin/unzip/unzip.c Tue May 29 08:56:56 2012 (r236225) +++ head/usr.bin/unzip/unzip.c Tue May 29 09:11:19 2012 (r236226) @@ -865,19 +865,14 @@ unzip(const char *fn) { struct archive *a; struct archive_entry *e; - int fd, ret; + int ret; uintmax_t total_size, file_count, error_count; - if (strcmp(fn, "-") == 0) - fd = STDIN_FILENO; - else if ((fd = open(fn, O_RDONLY)) < 0) - error("%s", fn); - if ((a = archive_read_new()) == NULL) error("archive_read_new failed"); ac(archive_read_support_format_zip(a)); - ac(archive_read_open_fd(a, fd, 8192)); + ac(archive_read_open_filename(a, fn, 8192)); if (!zipinfo_mode) { if (!p_opt && !q_opt) @@ -933,9 +928,6 @@ unzip(const char *fn) ac(archive_read_close(a)); (void)archive_read_finish(a); - if (fd != STDIN_FILENO && close(fd) != 0) - error("%s", fn); - if (t_opt) { if (error_count > 0) { errorx("%d checksum error(s) found.", error_count); @@ -1061,6 +1053,9 @@ main(int argc, char *argv[]) usage(); zipfile = argv[nopts++]; + if (strcmp(zipfile, "-") == 0) + zipfile = NULL; /* STDIN */ + while (nopts < argc && *argv[nopts] != '-') add_pattern(&include, argv[nopts++]); From owner-svn-src-head@FreeBSD.ORG Tue May 29 11:22:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1A9561065670; Tue, 29 May 2012 11:22:41 +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 EEB858FC0C; Tue, 29 May 2012 11:22:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TBMeM7074114; Tue, 29 May 2012 11:22:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TBMeRg074111; Tue, 29 May 2012 11:22:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205291122.q4TBMeRg074111@svn.freebsd.org> From: Alexander Motin Date: Tue, 29 May 2012 11:22: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: r236228 - in head/sys/cam: ata scsi 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, 29 May 2012 11:22:41 -0000 Author: mav Date: Tue May 29 11:22:40 2012 New Revision: 236228 URL: http://svn.freebsd.org/changeset/base/236228 Log: Plug request and references leak caused by race between invalidated ond probe periph destruction and new incoming probe request. This at least caused problems with SATA Port Multipliers hot-plug. MFC after: 2 weeks Modified: head/sys/cam/ata/ata_xpt.c head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Tue May 29 10:35:56 2012 (r236227) +++ head/sys/cam/ata/ata_xpt.c Tue May 29 11:22:40 2012 (r236228) @@ -1327,9 +1327,9 @@ done: done_ccb->ccb_h.status = found ? CAM_REQ_CMP : CAM_REQ_CMP_ERR; xpt_done(done_ccb); } + cam_periph_invalidate(periph); cam_release_devq(periph->path, RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_XPT + 1, FALSE); - cam_periph_invalidate(periph); cam_periph_release_locked(periph); } @@ -1580,12 +1580,17 @@ ata_scan_lun(struct cam_periph *periph, } if ((old_periph = cam_periph_find(path, "aprobe")) != NULL) { - probe_softc *softc; + if ((old_periph->flags & CAM_PERIPH_INVALID) == 0) { + probe_softc *softc; - softc = (probe_softc *)old_periph->softc; - TAILQ_INSERT_TAIL(&softc->request_ccbs, &request_ccb->ccb_h, - periph_links.tqe); - softc->restart = 1; + softc = (probe_softc *)old_periph->softc; + TAILQ_INSERT_TAIL(&softc->request_ccbs, + &request_ccb->ccb_h, periph_links.tqe); + softc->restart = 1; + } else { + request_ccb->ccb_h.status = CAM_REQ_CMP_ERR; + xpt_done(request_ccb); + } } else { status = cam_periph_alloc(proberegister, NULL, probecleanup, probestart, "aprobe", Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Tue May 29 10:35:56 2012 (r236227) +++ head/sys/cam/scsi/scsi_xpt.c Tue May 29 11:22:40 2012 (r236228) @@ -1706,9 +1706,9 @@ probe_device_check: done_ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(done_ccb); if (TAILQ_FIRST(&softc->request_ccbs) == NULL) { + cam_periph_invalidate(periph); cam_release_devq(periph->path, RELSIM_RELEASE_RUNLEVEL, 0, CAM_RL_XPT + 1, FALSE); - cam_periph_invalidate(periph); cam_periph_release_locked(periph); } else { probeschedule(periph); @@ -2274,11 +2274,16 @@ scsi_scan_lun(struct cam_periph *periph, } if ((old_periph = cam_periph_find(path, "probe")) != NULL) { - probe_softc *softc; + if ((old_periph->flags & CAM_PERIPH_INVALID) == 0) { + probe_softc *softc; - softc = (probe_softc *)old_periph->softc; - TAILQ_INSERT_TAIL(&softc->request_ccbs, &request_ccb->ccb_h, - periph_links.tqe); + softc = (probe_softc *)old_periph->softc; + TAILQ_INSERT_TAIL(&softc->request_ccbs, + &request_ccb->ccb_h, periph_links.tqe); + } else { + request_ccb->ccb_h.status = CAM_REQ_CMP_ERR; + xpt_done(request_ccb); + } } else { status = cam_periph_alloc(proberegister, NULL, probecleanup, probestart, "probe", From owner-svn-src-head@FreeBSD.ORG Tue May 29 12:52:31 2012 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 26EDC1065670; Tue, 29 May 2012 12:52:31 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 117738FC12; Tue, 29 May 2012 12:52:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TCqUYu078279; Tue, 29 May 2012 12:52:30 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TCqUOg078277; Tue, 29 May 2012 12:52:30 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201205291252.q4TCqUOg078277@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Tue, 29 May 2012 12:52: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: r236231 - 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: Tue, 29 May 2012 12:52:31 -0000 Author: melifaro Date: Tue May 29 12:52:30 2012 New Revision: 236231 URL: http://svn.freebsd.org/changeset/base/236231 Log: Fix BPF_JITTER code broken by r235746. Pointed by: jkim Reviewed by: jkim (except locking changes) Approved by: (mentor) MFC after: 2 weeks Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Tue May 29 12:33:09 2012 (r236230) +++ head/sys/net/bpf.c Tue May 29 12:52:30 2012 (r236231) @@ -1711,7 +1711,7 @@ bpf_setf(struct bpf_d *d, struct bpf_pro struct bpf_insn *fcode, *old; u_int wfilter, flen, size; #ifdef BPF_JITTER - bpf_jit_filter *ofunc, *jfunc; + bpf_jit_filter *jfunc, *ofunc; #endif int need_upgrade; #ifdef COMPAT_FREEBSD32 @@ -1737,13 +1737,20 @@ bpf_setf(struct bpf_d *d, struct bpf_pro need_upgrade = 0; size = flen * sizeof(*fp->bf_insns); - if (size > 0) + if (size > 0) { + /* We're setting up new filter. Copy and check actual data */ fcode = (struct bpf_insn *)malloc(size, M_BPF, M_WAITOK); - else + if (copyin((caddr_t)fp->bf_insns, (caddr_t)fcode, size) != 0 || + bpf_validate(fcode, (int)flen) == 0) { + free(fcode, M_BPF); + return (EINVAL); + } + /* Filter is copied inside fcode and is perfectly valid */ + } else fcode = NULL; /* Make compiler happy */ #ifdef BPF_JITTER - if (fp->bf_insns != NULL) + if (fcode != NULL) jfunc = bpf_jitter(fcode, flen); else jfunc = NULL; /* Make compiler happy */ @@ -1764,7 +1771,7 @@ bpf_setf(struct bpf_d *d, struct bpf_pro ofunc = d->bd_bfilter; #endif } - if (fp->bf_insns == NULL) { + if (fcode == NULL) { /* * Protect filter removal by interface lock. * Additionally, we are protected by global lock here. @@ -1795,55 +1802,50 @@ bpf_setf(struct bpf_d *d, struct bpf_pro return (0); } - if (copyin((caddr_t)fp->bf_insns, (caddr_t)fcode, size) == 0 && - bpf_validate(fcode, (int)flen)) { - /* - * Protect filter change by interface lock - * Additionally, we are protected by global lock here. - */ - if (d->bd_bif != NULL) - BPFIF_WLOCK(d->bd_bif); - BPFD_LOCK(d); - if (wfilter) - d->bd_wfilter = fcode; - else { - d->bd_rfilter = fcode; + /* + * Set up new filter. + * Protect filter change by interface lock + * Additionally, we are protected by global lock here. + */ + if (d->bd_bif != NULL) + BPFIF_WLOCK(d->bd_bif); + BPFD_LOCK(d); + if (wfilter) + d->bd_wfilter = fcode; + else { + d->bd_rfilter = fcode; #ifdef BPF_JITTER - d->bd_bfilter = jfunc; + d->bd_bfilter = jfunc; #endif - if (cmd == BIOCSETF) - reset_d(d); + if (cmd == BIOCSETF) + reset_d(d); - /* - * Do not require upgrade by first BIOCSETF - * (used to set snaplen) by pcap_open_live() - */ - if ((d->bd_writer != 0) && (--d->bd_writer == 0)) - need_upgrade = 1; - CTR4(KTR_NET, "%s: filter function set by pid %d, " - "bd_writer counter %d, need_upgrade %d", - __func__, d->bd_pid, d->bd_writer, need_upgrade); - } - BPFD_UNLOCK(d); - if (d->bd_bif != NULL) - BPFIF_WUNLOCK(d->bd_bif); - if (old != NULL) - free((caddr_t)old, M_BPF); + /* + * Do not require upgrade by first BIOCSETF + * (used to set snaplen) by pcap_open_live() + */ + if ((d->bd_writer != 0) && (--d->bd_writer == 0)) + need_upgrade = 1; + CTR4(KTR_NET, "%s: filter function set by pid %d, " + "bd_writer counter %d, need_upgrade %d", + __func__, d->bd_pid, d->bd_writer, need_upgrade); + } + BPFD_UNLOCK(d); + if (d->bd_bif != NULL) + BPFIF_WUNLOCK(d->bd_bif); + if (old != NULL) + free((caddr_t)old, M_BPF); #ifdef BPF_JITTER - if (ofunc != NULL) - bpf_destroy_jit_filter(ofunc); + if (ofunc != NULL) + bpf_destroy_jit_filter(ofunc); #endif - /* Move d to active readers list */ - if (need_upgrade != 0) - bpf_upgraded(d); + /* Move d to active readers list */ + if (need_upgrade != 0) + bpf_upgraded(d); - BPF_UNLOCK(); - return (0); - } - free((caddr_t)fcode, M_BPF); BPF_UNLOCK(); - return (EINVAL); + return (0); } /* From owner-svn-src-head@FreeBSD.ORG Tue May 29 12:56:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 05E1D1065680; Tue, 29 May 2012 12:56:31 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from dhcp170-36-red.yandex.net (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx2.freebsd.org (Postfix) with ESMTP id 8102B1518B0; Tue, 29 May 2012 12:56:25 +0000 (UTC) Message-ID: <4FC4C62E.2090901@FreeBSD.org> Date: Tue, 29 May 2012 16:50:54 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120511 Thunderbird/12.0.1 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201205291252.q4TCqUOg078277@svn.freebsd.org> In-Reply-To: <201205291252.q4TCqUOg078277@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r236231 - 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: Tue, 29 May 2012 12:56:31 -0000 On 29.05.2012 16:52, Alexander V. Chernikov wrote: > Author: melifaro > Date: Tue May 29 12:52:30 2012 > New Revision: 236231 > URL: http://svn.freebsd.org/changeset/base/236231 > > Log: > Fix BPF_JITTER code broken by r235746. > > Pointed by: jkim > Reviewed by: jkim (except locking changes) > Approved by: (mentor) This meant to be 'Approved by: kib(mentor)' > MFC after: 2 weeks > > Modified: > head/sys/net/bpf.c > From owner-svn-src-head@FreeBSD.ORG Tue May 29 14:28:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E480F106564A; Tue, 29 May 2012 14:28: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 B61C58FC0C; Tue, 29 May 2012 14:28:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TESkgG083701; Tue, 29 May 2012 14:28:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TESktL083698; Tue, 29 May 2012 14:28:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205291428.q4TESktL083698@svn.freebsd.org> From: Alexander Motin Date: Tue, 29 May 2012 14: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: r236234 - in head/sys/cam: . 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, 29 May 2012 14:28:47 -0000 Author: mav Date: Tue May 29 14:28:46 2012 New Revision: 236234 URL: http://svn.freebsd.org/changeset/base/236234 Log: Allow to change number of openings (used tags) for ATA/SATA devices via `camcontrol tags ... -N ...`. There is no need to tune it in usual cases, but some users want to have it for debugging purposes. MFC after: 2 weeks Modified: head/sys/cam/ata/ata_xpt.c head/sys/cam/cam_xpt.c Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Tue May 29 14:23:57 2012 (r236233) +++ head/sys/cam/ata/ata_xpt.c Tue May 29 14:28:46 2012 (r236234) @@ -65,6 +65,7 @@ struct ata_quirk_entry { struct scsi_inquiry_pattern inq_pat; u_int8_t quirks; #define CAM_QUIRK_MAXTAGS 0x01 + u_int mintags; u_int maxtags; }; @@ -153,7 +154,7 @@ static struct ata_quirk_entry ata_quirk_ T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED, /*vendor*/"*", /*product*/"*", /*revision*/"*" }, - /*quirks*/0, /*maxtags*/0 + /*quirks*/0, /*mintags*/0, /*maxtags*/0 }, }; @@ -1019,7 +1020,8 @@ noerror: path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID; } if (ident_buf->satacapabilities & ATA_SUPPORT_NCQ) { - path->device->mintags = path->device->maxtags = + path->device->mintags = 2; + path->device->maxtags = ATA_QUEUE_LEN(ident_buf->queue) + 1; } ata_find_quirk(path->device); @@ -1355,8 +1357,10 @@ ata_find_quirk(struct cam_ed *device) quirk = (struct ata_quirk_entry *)match; device->quirk = quirk; - if (quirk->quirks & CAM_QUIRK_MAXTAGS) - device->mintags = device->maxtags = quirk->maxtags; + if (quirk->quirks & CAM_QUIRK_MAXTAGS) { + device->mintags = quirk->mintags; + device->maxtags = quirk->maxtags; + } } typedef struct { Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Tue May 29 14:23:57 2012 (r236233) +++ head/sys/cam/cam_xpt.c Tue May 29 14:28:46 2012 (r236234) @@ -2905,17 +2905,13 @@ xpt_action_default(union ccb *start_ccb) if ((crs->release_flags & RELSIM_ADJUST_OPENINGS) != 0) { - if (INQ_DATA_TQ_ENABLED(&dev->inq_data)) { - /* Don't ever go below one opening */ - if (crs->openings > 0) { - xpt_dev_ccbq_resize(path, - crs->openings); - - if (bootverbose) { - xpt_print(path, - "tagged openings now %d\n", - crs->openings); - } + /* Don't ever go below one opening */ + if (crs->openings > 0) { + xpt_dev_ccbq_resize(path, crs->openings); + if (bootverbose) { + xpt_print(path, + "number of openings is now %d\n", + crs->openings); } } } From owner-svn-src-head@FreeBSD.ORG Tue May 29 14:41:17 2012 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 22084106566C; Tue, 29 May 2012 14:41:17 +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 0D4FD8FC08; Tue, 29 May 2012 14:41:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TEfGBc084406; Tue, 29 May 2012 14:41:16 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TEfGlA084404; Tue, 29 May 2012 14:41:16 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201205291441.q4TEfGlA084404@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 29 May 2012 14:41: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: r236237 - head/share/man/man9 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, 29 May 2012 14:41:17 -0000 Author: trasz Date: Tue May 29 14:41:16 2012 New Revision: 236237 URL: http://svn.freebsd.org/changeset/base/236237 Log: Fix lock interaction table for rmlocks - by default they cannot sleep, just like rwlocks. MFC after: 1 week Modified: head/share/man/man9/locking.9 Modified: head/share/man/man9/locking.9 ============================================================================== --- head/share/man/man9/locking.9 Tue May 29 14:36:07 2012 (r236236) +++ head/share/man/man9/locking.9 Tue May 29 14:41:16 2012 (r236237) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 3, 2010 +.Dd May 25, 2012 .Dt LOCKING 9 .Os .Sh NAME @@ -298,7 +298,7 @@ one of the synchronization primitives di .It mutex Ta \&ok Ta \&ok-1 Ta \&no Ta \&ok Ta \&ok Ta \&no-3 .It sx Ta \&ok Ta \&ok Ta \&ok-2 Ta \&ok Ta \&ok Ta \&ok-4 .It rwlock Ta \&ok Ta \&ok Ta \&no Ta \&ok-2 Ta \&ok Ta \&no-3 -.It rmlock Ta \&ok Ta \&ok Ta \&ok-5 Ta \&ok Ta \&ok-2 Ta \&ok-5 +.It rmlock Ta \&ok Ta \&ok Ta \&no-5 Ta \&ok Ta \&ok-2 Ta \&no-5 .El .Pp .Em *1 From owner-svn-src-head@FreeBSD.ORG Tue May 29 15:41:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67859106566B; Tue, 29 May 2012 15:41:21 +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 510268FC16; Tue, 29 May 2012 15:41:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TFfLOQ087338; Tue, 29 May 2012 15:41:21 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TFfLuG087336; Tue, 29 May 2012 15:41:21 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201205291541.q4TFfLuG087336@svn.freebsd.org> From: Alan Cox Date: Tue, 29 May 2012 15:41: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: r236240 - head/sys/i386/xen 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, 29 May 2012 15:41:21 -0000 Author: alc Date: Tue May 29 15:41:20 2012 New Revision: 236240 URL: http://svn.freebsd.org/changeset/base/236240 Log: Rename pmap_collect() to pmap_pv_reclaim() and rewrite it such that it no longer uses the active and inactive paging queues. Instead, the pmap now maintains an LRU-ordered list of pv entry pages, and pmap_pv_reclaim() uses this list to select pv entries for reclamation. Note: The old pmap_collect() tried to avoid reclaiming mappings for pages that have either a hold_count or a busy field that is non-zero. However, this isn't necessary for correctness, and the locking in pmap_collect() was insufficient to guarantee that such mappings weren't reclaimed. The new pmap_pv_reclaim() doesn't even try. Tested by: sbruno MFC after: 5 weeks Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Tue May 29 15:08:35 2012 (r236239) +++ head/sys/i386/xen/pmap.c Tue May 29 15:41:20 2012 (r236240) @@ -230,6 +230,7 @@ static int pat_works; /* Is page attri /* * Data for the pv entry allocation mechanism */ +static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; static int shpgperproc = PMAP_SHPGPERPROC; @@ -1958,64 +1959,133 @@ SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry "Current number of pv entry allocs"); SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, &pv_entry_spare, 0, "Current number of spare pv entries"); - -static int pmap_collect_inactive, pmap_collect_active; - -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_inactive, CTLFLAG_RD, &pmap_collect_inactive, 0, - "Current number times pmap_collect called on inactive queue"); -SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_active, CTLFLAG_RD, &pmap_collect_active, 0, - "Current number times pmap_collect called on active queue"); #endif /* * We are in a serious low memory condition. Resort to * drastic measures to free some pages so we can allocate - * another pv entry chunk. This is normally called to - * unmap inactive pages, and if necessary, active pages. + * another pv entry chunk. */ -static void -pmap_collect(pmap_t locked_pmap, struct vpgqueues *vpq) +static vm_page_t +pmap_pv_reclaim(pmap_t locked_pmap) { + struct pch newtail; + struct pv_chunk *pc; pmap_t pmap; pt_entry_t *pte, tpte; - pv_entry_t next_pv, pv; + pv_entry_t pv; vm_offset_t va; - vm_page_t m, free; - + vm_page_t free, m, m_pc; + uint32_t inuse, freemask; + int bit, field, freed; + + PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); + pmap = NULL; + free = m_pc = NULL; + TAILQ_INIT(&newtail); sched_pin(); - TAILQ_FOREACH(m, &vpq->pl, pageq) { - if ((m->flags & PG_MARKER) != 0 || m->hold_count || m->busy) - continue; - TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) { - va = pv->pv_va; - pmap = PV_PMAP(pv); + while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL && (pv_vafree == 0 || + free == NULL)) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + if (pmap != pc->pc_pmap) { + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + pmap = pc->pc_pmap; /* Avoid deadlock and lock recursion. */ if (pmap > locked_pmap) PMAP_LOCK(pmap); - else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) + else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) { + pmap = NULL; + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); continue; - pmap->pm_stats.resident_count--; - pte = pmap_pte_quick(pmap, va); - tpte = pte_load_clear(pte); - KASSERT((tpte & PG_W) == 0, - ("pmap_collect: wired pte %#jx", (uintmax_t)tpte)); - if (tpte & PG_A) - vm_page_aflag_set(m, PGA_REFERENCED); - if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) - vm_page_dirty(m); - free = NULL; - pmap_unuse_pt(pmap, va, &free); - pmap_invalidate_page(pmap, va); - pmap_free_zero_pages(free); - TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - free_pv_entry(pmap, pv); - if (pmap != locked_pmap) - PMAP_UNLOCK(pmap); + } + } + + /* + * Destroy every non-wired, 4 KB page mapping in the chunk. + */ + freed = 0; + for (field = 0; field < _NPCM; field++) { + freemask = 0; + for (inuse = ~pc->pc_map[field] & pc_freemask[field]; + inuse != 0; inuse &= ~(1UL << bit)) { + bit = bsfl(inuse); + pv = &pc->pc_pventry[field * 32 + bit]; + va = pv->pv_va; + pte = pmap_pte_quick(pmap, va); + if ((*pte & PG_W) != 0) + continue; + tpte = pte_load_clear(pte); + if ((tpte & PG_G) != 0) + pmap_invalidate_page(pmap, va); + m = PHYS_TO_VM_PAGE(tpte & PG_FRAME); + if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) + vm_page_dirty(m); + if ((tpte & PG_A) != 0) + vm_page_aflag_set(m, PGA_REFERENCED); + TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); + if (TAILQ_EMPTY(&m->md.pv_list)) + vm_page_aflag_clear(m, PGA_WRITEABLE); + pmap_unuse_pt(pmap, va, &free); + freemask |= 1UL << bit; + freed++; + } + pc->pc_map[field] |= freemask; + } + if (freed == 0) { + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + continue; + } + pmap->pm_stats.resident_count -= freed; + PV_STAT(pv_entry_frees += freed); + PV_STAT(pv_entry_spare += freed); + pv_entry_count -= freed; + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + for (field = 0; field < _NPCM; field++) + if (pc->pc_map[field] != pc_freemask[field]) { + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, + pc_list); + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + + /* + * One freed pv entry in locked_pmap is + * sufficient. + */ + if (pmap == locked_pmap) + goto out; + break; + } + if (field == _NPCM) { + PV_STAT(pv_entry_spare -= _NPCPV); + PV_STAT(pc_chunk_count--); + PV_STAT(pc_chunk_frees++); + /* Entire chunk is free; return it. */ + m_pc = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc)); + pmap_qremove((vm_offset_t)pc, 1); + pmap_ptelist_free(&pv_vafree, (vm_offset_t)pc); + break; } - if (TAILQ_EMPTY(&m->md.pv_list)) - vm_page_aflag_clear(m, PGA_WRITEABLE); } +out: sched_unpin(); + TAILQ_CONCAT(&pv_chunks, &newtail, pc_lru); + if (pmap != NULL) { + pmap_invalidate_all(pmap); + if (pmap != locked_pmap) + PMAP_UNLOCK(pmap); + } + if (m_pc == NULL && pv_vafree != 0 && free != NULL) { + m_pc = free; + free = m_pc->right; + /* Recycle a freed page table page. */ + m_pc->wire_count = 1; + atomic_add_int(&cnt.v_wire_count, 1); + } + pmap_free_zero_pages(free); + return (m_pc); } @@ -2046,6 +2116,7 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); return; } + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); PV_STAT(pv_entry_spare -= _NPCPV); PV_STAT(pc_chunk_count--); PV_STAT(pc_chunk_frees++); @@ -2066,7 +2137,6 @@ get_pv_entry(pmap_t pmap, int try) { static const struct timeval printinterval = { 60, 0 }; static struct timeval lastprint; - struct vpgqueues *pq; int bit, field; pv_entry_t pv; struct pv_chunk *pc; @@ -2081,7 +2151,6 @@ get_pv_entry(pmap_t pmap, int try) printf("Approaching the limit on PV entries, consider " "increasing either the vm.pmap.shpgperproc or the " "vm.pmap.pv_entry_max tunable.\n"); - pq = NULL; retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { @@ -2102,6 +2171,10 @@ retry: } TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); + if (pc != TAILQ_LAST(&pv_chunks, pch)) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); + } PV_STAT(pv_entry_spare--); return (pv); } @@ -2111,29 +2184,16 @@ retry: * queues lock. If "pv_vafree" is currently non-empty, it will * remain non-empty until pmap_ptelist_alloc() completes. */ - if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, (pq == - &vm_page_queues[PQ_ACTIVE] ? VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | + if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) { if (try) { pv_entry_count--; PV_STAT(pc_chunk_tryfail++); return (NULL); } - /* - * Reclaim pv entries: At first, destroy mappings to - * inactive pages. After that, if a pv chunk entry - * is still needed, destroy mappings to active pages. - */ - if (pq == NULL) { - PV_STAT(pmap_collect_inactive++); - pq = &vm_page_queues[PQ_INACTIVE]; - } else if (pq == &vm_page_queues[PQ_INACTIVE]) { - PV_STAT(pmap_collect_active++); - pq = &vm_page_queues[PQ_ACTIVE]; - } else - panic("get_pv_entry: increase vm.pmap.shpgperproc"); - pmap_collect(pmap, pq); - goto retry; + m = pmap_pv_reclaim(pmap); + if (m == NULL) + goto retry; } PV_STAT(pc_chunk_count++); PV_STAT(pc_chunk_allocs++); @@ -2145,6 +2205,7 @@ retry: pc->pc_map[0] = pc_freemask[0] & ~1ul; /* preallocated bit 0 */ for (field = 1; field < _NPCM; field++) pc->pc_map[field] = pc_freemask[field]; + TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); pv = &pc->pc_pventry[0]; TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); PV_STAT(pv_entry_spare += _NPCPV - 1); @@ -3535,6 +3596,7 @@ pmap_remove_pages(pmap_t pmap) PV_STAT(pc_chunk_count--); PV_STAT(pc_chunk_frees++); TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc)); pmap_qremove((vm_offset_t)pc, 1); vm_page_unwire(m, 0); From owner-svn-src-head@FreeBSD.ORG Tue May 29 15:56:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ABF251065670; Tue, 29 May 2012 15:56:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97D608FC08; Tue, 29 May 2012 15:56:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TFuUdg088138; Tue, 29 May 2012 15:56:30 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TFuUXp088136; Tue, 29 May 2012 15:56:30 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201205291556.q4TFuUXp088136@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 29 May 2012 15:56: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: r236242 - head/sys/dev/ahci 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, 29 May 2012 15:56:30 -0000 Author: hselasky Date: Tue May 29 15:56:30 2012 New Revision: 236242 URL: http://svn.freebsd.org/changeset/base/236242 Log: Add quirk for Marvell based AHCI controller. MFC after: 3 days Suggested by: mav @ Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Tue May 29 15:50:44 2012 (r236241) +++ head/sys/dev/ahci/ahci.c Tue May 29 15:56:30 2012 (r236242) @@ -199,6 +199,7 @@ static struct { {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, {0x91251b4b, 0x00, "Marvell 88SE9125", AHCI_Q_NOBSYRES}, {0x91281b4b, 0x00, "Marvell 88SE9128", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, + {0x91301b4b, 0x00, "Marvell 88SE9130", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, {0x91721b4b, 0x00, "Marvell 88SE9172", AHCI_Q_NOBSYRES}, {0x91821b4b, 0x00, "Marvell 88SE9182", AHCI_Q_NOBSYRES}, {0x06201103, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, From owner-svn-src-head@FreeBSD.ORG Tue May 29 16:11:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4A89F106564A; Tue, 29 May 2012 16:11:16 +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 359FF8FC0C; Tue, 29 May 2012 16:11:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TGBG3e088870; Tue, 29 May 2012 16:11:16 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TGBFUs088868; Tue, 29 May 2012 16:11:15 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201205291611.q4TGBFUs088868@svn.freebsd.org> From: Alan Cox Date: Tue, 29 May 2012 16:11: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: r236243 - head/sys/i386/xen 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, 29 May 2012 16:11:16 -0000 Author: alc Date: Tue May 29 16:11:15 2012 New Revision: 236243 URL: http://svn.freebsd.org/changeset/base/236243 Log: MFi386 pmap r233433 Disable detailed PV entry accounting by default. (A config option for enabling it was already introduced in r233433.) Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Tue May 29 15:56:30 2012 (r236242) +++ head/sys/i386/xen/pmap.c Tue May 29 16:11:15 2012 (r236243) @@ -179,7 +179,6 @@ __FBSDID("$FreeBSD$"); #define PMAP_INLINE #endif -#define PV_STATS #ifdef PV_STATS #define PV_STAT(x) do { x ; } while (0) #else From owner-svn-src-head@FreeBSD.ORG Tue May 29 16:25:02 2012 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 0BF3E1065678; Tue, 29 May 2012 16:25:02 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E77D08FC20; Tue, 29 May 2012 16:25:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TGP1tE089553; Tue, 29 May 2012 16:25:01 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TGP18w089551; Tue, 29 May 2012 16:25:01 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <201205291625.q4TGP18w089551@svn.freebsd.org> From: Robert Noland Date: Tue, 29 May 2012 16:25: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: r236245 - head/sys/dev/wbwd 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, 29 May 2012 16:25:02 -0000 Author: rnoland Date: Tue May 29 16:25:01 2012 New Revision: 236245 URL: http://svn.freebsd.org/changeset/base/236245 Log: Fix a typo in wbwd so that CRF5 is actually written to the data register rather than the index register. Reviewed by: bz MFC after: 3 days Modified: head/sys/dev/wbwd/wbwd.c Modified: head/sys/dev/wbwd/wbwd.c ============================================================================== --- head/sys/dev/wbwd/wbwd.c Tue May 29 16:21:43 2012 (r236244) +++ head/sys/dev/wbwd/wbwd.c Tue May 29 16:25:01 2012 (r236245) @@ -638,7 +638,7 @@ wb_attach(device_t dev) */ sc->reg_1 &= ~(WB_LDN8_CRF5_KEYB_P20); write_efir_1(sc, WB_LDN8_CRF5); - write_efir_1(sc, sc->reg_1); + write_efdr_1(sc, sc->reg_1); sc->reg_2 &= ~WB_LDN8_CRF7_CLEAR_MASK; write_efir_1(sc, WB_LDN8_CRF7); From owner-svn-src-head@FreeBSD.ORG Tue May 29 16:39:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8CDF21065677; Tue, 29 May 2012 16:39:43 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 783118FC0C; Tue, 29 May 2012 16:39:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TGdhTI090258; Tue, 29 May 2012 16:39:43 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TGdhqD090256; Tue, 29 May 2012 16:39:43 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <201205291639.q4TGdhqD090256@svn.freebsd.org> From: Robert Noland Date: Tue, 29 May 2012 16:39: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: r236246 - head/sys/dev/wbwd 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, 29 May 2012 16:39:43 -0000 Author: rnoland Date: Tue May 29 16:39:42 2012 New Revision: 236246 URL: http://svn.freebsd.org/changeset/base/236246 Log: Add device ids for the Winbond 83627DHG-P chip and set the registers to trigger the keyboard reset line on timeout. Reviewed by: bz MFC after: 1 week Modified: head/sys/dev/wbwd/wbwd.c Modified: head/sys/dev/wbwd/wbwd.c ============================================================================== --- head/sys/dev/wbwd/wbwd.c Tue May 29 16:25:01 2012 (r236245) +++ head/sys/dev/wbwd/wbwd.c Tue May 29 16:39:42 2012 (r236246) @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); #define WB_LDN8_CRF5 0xF5 #define WB_LDN8_CRF5_SCALE 0x08 /* 0: 1s, 1: 60s */ #define WB_LDN8_CRF5_KEYB_P20 0x04 /* 1: keyb P20 forces timeout */ +#define WB_LDN8_CRF5_KBRST 0x02 /* 1: timeout causes pin60 kbd reset */ /* CRF6: Watchdog Timeout (0 == off). Mapped to reg_timeout. */ #define WB_LDN8_CRF6 0xF6 @@ -180,6 +181,12 @@ struct winbond_vendor_device_id { .device_rev = 0x25, .descr = "Winbond 83627DHG IC ver. 5", }, + { + .vendor_id = 0x5ca3, + .device_id = 0xb0, + .device_rev = 0x73, + .descr = "Winbond 83627DHG-P", + }, }; /* @@ -637,6 +644,7 @@ wb_attach(device_t dev) * Disable all all interrupt reset sources (defaults). */ sc->reg_1 &= ~(WB_LDN8_CRF5_KEYB_P20); + sc->reg_1 |= WB_LDN8_CRF5_KBRST; write_efir_1(sc, WB_LDN8_CRF5); write_efdr_1(sc, sc->reg_1); From owner-svn-src-head@FreeBSD.ORG Tue May 29 17:53:12 2012 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 4795C106566B; Tue, 29 May 2012 17:53:12 +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 325688FC14; Tue, 29 May 2012 17:53:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4THrCkY093532; Tue, 29 May 2012 17:53:12 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4THrBW9093530; Tue, 29 May 2012 17:53:11 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201205291753.q4THrBW9093530@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 29 May 2012 17:53: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: r236247 - 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: Tue, 29 May 2012 17:53:12 -0000 Author: pjd Date: Tue May 29 17:53:11 2012 New Revision: 236247 URL: http://svn.freebsd.org/changeset/base/236247 Log: Remove unused sysctl. MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Tue May 29 16:39:42 2012 (r236246) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Tue May 29 17:53:11 2012 (r236247) @@ -67,12 +67,6 @@ static vdev_ops_t *vdev_ops_table[] = { NULL }; -/* maximum scrub/resilver I/O queue per leaf vdev */ -int zfs_scrub_limit = 10; - -TUNABLE_INT("vfs.zfs.scrub_limit", &zfs_scrub_limit); -SYSCTL_INT(_vfs_zfs, OID_AUTO, scrub_limit, CTLFLAG_RDTUN, &zfs_scrub_limit, 0, - "Maximum scrub/resilver I/O queue"); /* * Given a vdev type, return the appropriate ops vector. From owner-svn-src-head@FreeBSD.ORG Tue May 29 18:05:25 2012 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 1218E106564A; Tue, 29 May 2012 18:05:25 +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 F149B8FC0A; Tue, 29 May 2012 18:05:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TI5OqE094129; Tue, 29 May 2012 18:05:24 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TI5Oal094127; Tue, 29 May 2012 18:05:24 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201205291805.q4TI5Oal094127@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 29 May 2012 18:05:24 +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: r236248 - 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: Tue, 29 May 2012 18:05:25 -0000 Author: pjd Date: Tue May 29 18:05:24 2012 New Revision: 236248 URL: http://svn.freebsd.org/changeset/base/236248 Log: Remove unused variable. MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Tue May 29 17:53:11 2012 (r236247) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Tue May 29 18:05:24 2012 (r236248) @@ -67,7 +67,6 @@ int zfs_resilver_min_time_ms = 3000; /* boolean_t zfs_no_scrub_io = B_FALSE; /* set to disable scrub i/o */ boolean_t zfs_no_scrub_prefetch = B_FALSE; /* set to disable srub prefetching */ enum ddt_class zfs_scrub_ddt_class_max = DDT_CLASS_DUPLICATE; -int dsl_scan_delay_completion = B_FALSE; /* set to delay scan completion */ #define DSL_SCAN_IS_SCRUB_RESILVER(scn) \ ((scn)->scn_phys.scn_func == POOL_SCAN_SCRUB || \ From owner-svn-src-head@FreeBSD.ORG Tue May 29 18:09:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5894C106564A; Tue, 29 May 2012 18:09:15 +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 43C248FC12; Tue, 29 May 2012 18:09:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TI9F7v094353; Tue, 29 May 2012 18:09:15 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TI9FqU094351; Tue, 29 May 2012 18:09:15 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201205291809.q4TI9FqU094351@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 29 May 2012 18:09: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: r236249 - 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: Tue, 29 May 2012 18:09:15 -0000 Author: pjd Date: Tue May 29 18:09:14 2012 New Revision: 236249 URL: http://svn.freebsd.org/changeset/base/236249 Log: Eliminate 'where' argument, we don't use it. MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Tue May 29 18:05:24 2012 (r236248) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Tue May 29 18:09:14 2012 (r236249) @@ -173,7 +173,6 @@ again: void space_map_remove(space_map_t *sm, uint64_t start, uint64_t size) { - avl_index_t where; space_seg_t ssearch, *ss, *newseg; uint64_t end = start + size; int left_over, right_over; @@ -185,7 +184,7 @@ space_map_remove(space_map_t *sm, uint64 ssearch.ss_start = start; ssearch.ss_end = end; - ss = avl_find(&sm->sm_root, &ssearch, &where); + ss = avl_find(&sm->sm_root, &ssearch, NULL); /* Make sure we completely overlap with someone */ if (ss == NULL) { From owner-svn-src-head@FreeBSD.ORG Tue May 29 18:11:46 2012 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 5DCA21065672; Tue, 29 May 2012 18:11:46 +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 491A28FC12; Tue, 29 May 2012 18:11:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TIBkDf094510; Tue, 29 May 2012 18:11:46 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TIBkeI094508; Tue, 29 May 2012 18:11:46 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201205291811.q4TIBkeI094508@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 29 May 2012 18:11: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: r236250 - 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: Tue, 29 May 2012 18:11:46 -0000 Author: pjd Date: Tue May 29 18:11:45 2012 New Revision: 236250 URL: http://svn.freebsd.org/changeset/base/236250 Log: Tighten up the assertion: because size can't be 0 and even if sm_space is equal to sm_size, any 'sm_space - size' will be less than sm_size. MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Tue May 29 18:09:14 2012 (r236249) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Tue May 29 18:11:45 2012 (r236250) @@ -195,7 +195,7 @@ space_map_remove(space_map_t *sm, uint64 } VERIFY3U(ss->ss_start, <=, start); VERIFY3U(ss->ss_end, >=, end); - VERIFY(sm->sm_space - size <= sm->sm_size); + VERIFY(sm->sm_space - size < sm->sm_size); left_over = (ss->ss_start != start); right_over = (ss->ss_end != end); From owner-svn-src-head@FreeBSD.ORG Tue May 29 18:44:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 229AD106566C; Tue, 29 May 2012 18:44:54 +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 0E19F8FC14; Tue, 29 May 2012 18:44:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TIir66095946; Tue, 29 May 2012 18:44:53 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TIirOp095944; Tue, 29 May 2012 18:44:53 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201205291844.q4TIirOp095944@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 29 May 2012 18:44: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: r236251 - 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: Tue, 29 May 2012 18:44:54 -0000 Author: jkim Date: Tue May 29 18:44:53 2012 New Revision: 236251 URL: http://svn.freebsd.org/changeset/base/236251 Log: Fix 32-bit shim for BIOCSETF to drop all packets buffered on the descriptor and reset statistics as it should. MFC after: 3 days Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Tue May 29 18:11:45 2012 (r236250) +++ head/sys/net/bpf.c Tue May 29 18:44:53 2012 (r236251) @@ -1718,13 +1718,23 @@ bpf_setf(struct bpf_d *d, struct bpf_pro struct bpf_program32 *fp32; struct bpf_program fp_swab; - if (cmd == BIOCSETWF32 || cmd == BIOCSETF32 || cmd == BIOCSETFNR32) { + switch (cmd) { + case BIOCSETF32: + case BIOCSETWF32: + case BIOCSETFNR32: fp32 = (struct bpf_program32 *)fp; fp_swab.bf_len = fp32->bf_len; fp_swab.bf_insns = (struct bpf_insn *)(uintptr_t)fp32->bf_insns; fp = &fp_swab; - if (cmd == BIOCSETWF32) + switch (cmd) { + case BIOCSETF32: + cmd = BIOCSETF; + break; + case BIOCSETWF32: cmd = BIOCSETWF; + break; + } + break; } #endif /* From owner-svn-src-head@FreeBSD.ORG Tue May 29 19:49:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 26C371065674; Tue, 29 May 2012 19:49:53 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12E898FC19; Tue, 29 May 2012 19:49:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TJnqAd099252; Tue, 29 May 2012 19:49:52 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TJnqtS099250; Tue, 29 May 2012 19:49:52 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201205291949.q4TJnqtS099250@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 29 May 2012 19:49: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: r236255 - head/contrib/groff/tmac 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, 29 May 2012 19:49:53 -0000 Author: obrien Date: Tue May 29 19:49:52 2012 New Revision: 236255 URL: http://svn.freebsd.org/changeset/base/236255 Log: Add the latest FreeBSD versions. Modified: head/contrib/groff/tmac/doc-common Modified: head/contrib/groff/tmac/doc-common ============================================================================== --- head/contrib/groff/tmac/doc-common Tue May 29 19:48:34 2012 (r236254) +++ head/contrib/groff/tmac/doc-common Tue May 29 19:49:52 2012 (r236255) @@ -574,7 +574,10 @@ .ds doc-operating-system-FreeBSD-8.0 8.0 .ds doc-operating-system-FreeBSD-8.1 8.1 .ds doc-operating-system-FreeBSD-8.2 8.2 +.ds doc-operating-system-FreeBSD-8.3 8.3 .ds doc-operating-system-FreeBSD-9.0 9.0 +.ds doc-operating-system-FreeBSD-9.1 9.1 +.ds doc-operating-system-FreeBSD-10.0 10.0 . .ds doc-operating-system-Darwin-8.0.0 8.0.0 .ds doc-operating-system-Darwin-8.1.0 8.1.0 From owner-svn-src-head@FreeBSD.ORG Tue May 29 19:55:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C5DB91065672; Tue, 29 May 2012 19:55:07 +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 A17548FC08; Tue, 29 May 2012 19:55:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TJt7bk099550; Tue, 29 May 2012 19:55:07 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TJt71s099549; Tue, 29 May 2012 19:55:07 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201205291955.q4TJt71s099549@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 29 May 2012 19:55: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: r236256 - head/sys/modules/netmap 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, 29 May 2012 19:55:07 -0000 Author: luigi Date: Tue May 29 19:55:07 2012 New Revision: 236256 URL: http://svn.freebsd.org/changeset/base/236256 Log: add support to build netmap as a module, but for the time being keep it disconnected from the main build. MFC after: 3 days Added: head/sys/modules/netmap/ head/sys/modules/netmap/Makefile (contents, props changed) Added: head/sys/modules/netmap/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/netmap/Makefile Tue May 29 19:55:07 2012 (r236256) @@ -0,0 +1,14 @@ +# $FreeBSD$ +# +# Compile netmap as a module, useful if you want a netmap bridge +# or loadable drivers. + +.PATH: ${.CURDIR}/../../dev/netmap +.PATH.h: ${.CURDIR}/../../net +KMOD = netmap +SRCS = device_if.h bus_if.h opt_netmap.h +SRCS += netmap.c netmap.h netmap_kern.h + +netmap.o: netmap_mem2.c + +.include From owner-svn-src-head@FreeBSD.ORG Tue May 29 20:16:26 2012 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 CFE971065675; Tue, 29 May 2012 20:16:26 +0000 (UTC) (envelope-from olivierd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC3BA8FC1B; Tue, 29 May 2012 20:16:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TKGQAi000641; Tue, 29 May 2012 20:16:26 GMT (envelope-from olivierd@svn.freebsd.org) Received: (from olivierd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TKGQdB000639; Tue, 29 May 2012 20:16:26 GMT (envelope-from olivierd@svn.freebsd.org) Message-Id: <201205292016.q4TKGQdB000639@svn.freebsd.org> From: Olivier Duchateau Date: Tue, 29 May 2012 20:16: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: r236257 - head/share/misc 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, 29 May 2012 20:16:26 -0000 Author: olivierd (ports committer) Date: Tue May 29 20:16:26 2012 New Revision: 236257 URL: http://svn.freebsd.org/changeset/base/236257 Log: Add myself and my relation to my mentors. Approved by: miwi@, rene@ Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Tue May 29 19:55:07 2012 (r236256) +++ head/share/misc/committers-ports.dot Tue May 29 20:16:26 2012 (r236257) @@ -149,6 +149,7 @@ nork [label="Norikatsu Shigemura\nnork@F novel [label="Roman Bogorodskiy\nnovel@FreeBSD.org\n2005/03/07"] nox [label="Juergen Lock\nnox@FreeBSD.org\n2006/12/22"] obrien [label="David E. O'Brien\nobrien@FreeBSD.org\n1996/10/29"] +olivierd [label="Olivier Duchateau\nolivierd@FreeBSD.org\n2012/05/29"] mharo [label="Michael Haro\nmharo@FreeBSD.org\n1999/04/13"] osa [label="Sergey A. Osokin\nosa@FreeBSD.org\n2003/06/04"] pat [label="Patrick Li\npat@FreeBSD.org\n2001/11/14"] @@ -371,6 +372,7 @@ miwi -> makc miwi -> mandree miwi -> mva miwi -> nox +miwi -> olivierd miwi -> pawel miwi -> rm miwi -> sbz @@ -413,6 +415,7 @@ rafan -> chinsan rene -> crees rene -> jgh +rene -> olivierd sahil -> culot sahil -> eadler From owner-svn-src-head@FreeBSD.ORG Tue May 29 20:21:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B02ED1065675; Tue, 29 May 2012 20:21:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B43F8FC16; Tue, 29 May 2012 20:21:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TKLOGB000889; Tue, 29 May 2012 20:21:24 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TKLOrq000887; Tue, 29 May 2012 20:21:24 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201205292021.q4TKLOrq000887@svn.freebsd.org> From: Dimitry Andric Date: Tue, 29 May 2012 20:21:24 +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: r236258 - head/contrib/llvm/tools/clang/lib/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, 29 May 2012 20:21:24 -0000 Author: dim Date: Tue May 29 20:21:24 2012 New Revision: 236258 URL: http://svn.freebsd.org/changeset/base/236258 Log: For clang, similar to r236137, enable gnu hash generation for dynamic ELF binaries on x86. Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Tue May 29 20:16:26 2012 (r236257) +++ head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Tue May 29 20:21:24 2012 (r236258) @@ -4760,6 +4760,9 @@ void freebsd::Link::ConstructJob(Compila CmdArgs.push_back("-dynamic-linker"); CmdArgs.push_back("/libexec/ld-elf.so.1"); } + llvm::Triple::ArchType Arch = getToolChain().getArch(); + if (Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64) + CmdArgs.push_back("--hash-style=both"); } // When building 32-bit code on FreeBSD/amd64, we have to explicitly From owner-svn-src-head@FreeBSD.ORG Tue May 29 21:59:10 2012 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 0355B106566C; Tue, 29 May 2012 21:59:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E12B78FC16; Tue, 29 May 2012 21:59:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TLx9Dq005382; Tue, 29 May 2012 21:59:09 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TLx9Yf005377; Tue, 29 May 2012 21:59:09 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201205292159.q4TLx9Yf005377@svn.freebsd.org> From: Dimitry Andric Date: Tue, 29 May 2012 21:59: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: r236260 - in head/contrib/llvm: include/llvm/Support lib/Support/Unix lib/Support/Windows tools/clang/lib/Frontend 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, 29 May 2012 21:59:10 -0000 Author: dim Date: Tue May 29 21:59:09 2012 New Revision: 236260 URL: http://svn.freebsd.org/changeset/base/236260 Log: Pull in r156591 from upstream llvm trunk: Allow unique_file to take a mode for file permissions, but default to user only read/write. and r156592 from upstream clang trunk: For final output files create them with mode 0664 to match other compilers and expected defaults. This should fix clang creating files with mode 0600. Reported by: James MFC after: 3 days Modified: head/contrib/llvm/include/llvm/Support/FileSystem.h head/contrib/llvm/lib/Support/Unix/PathV2.inc head/contrib/llvm/lib/Support/Windows/PathV2.inc head/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp Modified: head/contrib/llvm/include/llvm/Support/FileSystem.h ============================================================================== --- head/contrib/llvm/include/llvm/Support/FileSystem.h Tue May 29 21:34:09 2012 (r236259) +++ head/contrib/llvm/include/llvm/Support/FileSystem.h Tue May 29 21:59:09 2012 (r236260) @@ -422,8 +422,8 @@ error_code status_known(const Twine &pat /// @results errc::success if result_{fd,path} have been successfully set, /// otherwise a platform specific error_code. error_code unique_file(const Twine &model, int &result_fd, - SmallVectorImpl &result_path, - bool makeAbsolute = true); + SmallVectorImpl &result_path, + bool makeAbsolute = true, unsigned mode = 0600); /// @brief Canonicalize path. /// Modified: head/contrib/llvm/lib/Support/Unix/PathV2.inc ============================================================================== --- head/contrib/llvm/lib/Support/Unix/PathV2.inc Tue May 29 21:34:09 2012 (r236259) +++ head/contrib/llvm/lib/Support/Unix/PathV2.inc Tue May 29 21:59:09 2012 (r236260) @@ -346,9 +346,10 @@ error_code status(const Twine &path, fil return error_code::success(); } +// Since this is most often used for temporary files, mode defaults to 0600. error_code unique_file(const Twine &model, int &result_fd, - SmallVectorImpl &result_path, - bool makeAbsolute) { + SmallVectorImpl &result_path, + bool makeAbsolute, unsigned mode) { SmallString<128> Model; model.toVector(Model); // Null terminate. @@ -395,7 +396,7 @@ retry_random_path: // Try to open + create the file. rety_open_create: - int RandomFD = ::open(RandomPath.c_str(), O_RDWR | O_CREAT | O_EXCL, 0600); + int RandomFD = ::open(RandomPath.c_str(), O_RDWR | O_CREAT | O_EXCL, mode); if (RandomFD == -1) { // If the file existed, try again, otherwise, error. if (errno == errc::file_exists) Modified: head/contrib/llvm/lib/Support/Windows/PathV2.inc ============================================================================== --- head/contrib/llvm/lib/Support/Windows/PathV2.inc Tue May 29 21:34:09 2012 (r236259) +++ head/contrib/llvm/lib/Support/Windows/PathV2.inc Tue May 29 21:59:09 2012 (r236260) @@ -487,9 +487,11 @@ handle_status_error: return error_code::success(); } +// FIXME: mode should be used here and default to user r/w only, +// it currently comes in as a UNIX mode. error_code unique_file(const Twine &model, int &result_fd, - SmallVectorImpl &result_path, - bool makeAbsolute) { + SmallVectorImpl &result_path, + bool makeAbsolute, unsigned mode) { // Use result_path as temp storage. result_path.set_size(0); StringRef m = model.toStringRef(result_path); Modified: head/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp Tue May 29 21:34:09 2012 (r236259) +++ head/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp Tue May 29 21:59:09 2012 (r236260) @@ -560,7 +560,8 @@ CompilerInstance::createOutputFile(Strin TempPath += "-%%%%%%%%"; int fd; if (llvm::sys::fs::unique_file(TempPath.str(), fd, TempPath, - /*makeAbsolute=*/false) == llvm::errc::success) { + /*makeAbsolute=*/false, 0664) + == llvm::errc::success) { OS.reset(new llvm::raw_fd_ostream(fd, /*shouldClose=*/true)); OSFile = TempFile = TempPath.str(); } From owner-svn-src-head@FreeBSD.ORG Tue May 29 22:21:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D28AD106564A; Tue, 29 May 2012 22:21:54 +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 6AD618FC0A; Tue, 29 May 2012 22:21:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TMLs3P006467; Tue, 29 May 2012 22:21:54 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TMLsTA006465; Tue, 29 May 2012 22:21:54 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201205292221.q4TMLsTA006465@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 29 May 2012 22:21: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: r236261 - 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: Tue, 29 May 2012 22:21:54 -0000 Author: jkim Date: Tue May 29 22:21:53 2012 New Revision: 236261 URL: http://svn.freebsd.org/changeset/base/236261 Log: - Save the previous filter right before we set new one. - Reduce duplicate code and make it little easier to read. MFC after: 2 weeks Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Tue May 29 21:59:09 2012 (r236260) +++ head/sys/net/bpf.c Tue May 29 22:21:53 2012 (r236261) @@ -1709,10 +1709,11 @@ static int bpf_setf(struct bpf_d *d, struct bpf_program *fp, u_long cmd) { struct bpf_insn *fcode, *old; - u_int wfilter, flen, size; #ifdef BPF_JITTER bpf_jit_filter *jfunc, *ofunc; #endif + size_t size; + u_int flen; int need_upgrade; #ifdef COMPAT_FREEBSD32 struct bpf_program32 *fp32; @@ -1737,6 +1738,12 @@ bpf_setf(struct bpf_d *d, struct bpf_pro break; } #endif + + fcode = NULL; +#ifdef BPF_JITTER + jfunc = ofunc = NULL; +#endif + /* * Check new filter validness before acquiring any locks. * Allocate memory for new filter, if needed. @@ -1755,63 +1762,14 @@ bpf_setf(struct bpf_d *d, struct bpf_pro free(fcode, M_BPF); return (EINVAL); } - /* Filter is copied inside fcode and is perfectly valid */ - } else - fcode = NULL; /* Make compiler happy */ - #ifdef BPF_JITTER - if (fcode != NULL) + /* Filter is copied inside fcode and is perfectly valid */ jfunc = bpf_jitter(fcode, flen); - else - jfunc = NULL; /* Make compiler happy */ #endif + } BPF_LOCK(); - if (cmd == BIOCSETWF) { - old = d->bd_wfilter; - wfilter = 1; -#ifdef BPF_JITTER - ofunc = NULL; -#endif - } else { - wfilter = 0; - old = d->bd_rfilter; -#ifdef BPF_JITTER - ofunc = d->bd_bfilter; -#endif - } - if (fcode == NULL) { - /* - * Protect filter removal by interface lock. - * Additionally, we are protected by global lock here. - */ - if (d->bd_bif != NULL) - BPFIF_WLOCK(d->bd_bif); - BPFD_LOCK(d); - if (wfilter) - d->bd_wfilter = NULL; - else { - d->bd_rfilter = NULL; -#ifdef BPF_JITTER - d->bd_bfilter = NULL; -#endif - if (cmd == BIOCSETF) - reset_d(d); - } - BPFD_UNLOCK(d); - if (d->bd_bif != NULL) - BPFIF_WUNLOCK(d->bd_bif); - if (old != NULL) - free((caddr_t)old, M_BPF); -#ifdef BPF_JITTER - if (ofunc != NULL) - bpf_destroy_jit_filter(ofunc); -#endif - BPF_UNLOCK(); - return (0); - } - /* * Set up new filter. * Protect filter change by interface lock @@ -1820,25 +1778,30 @@ bpf_setf(struct bpf_d *d, struct bpf_pro if (d->bd_bif != NULL) BPFIF_WLOCK(d->bd_bif); BPFD_LOCK(d); - if (wfilter) + if (cmd == BIOCSETWF) { + old = d->bd_wfilter; d->bd_wfilter = fcode; - else { + } else { + old = d->bd_rfilter; d->bd_rfilter = fcode; #ifdef BPF_JITTER + ofunc = d->bd_bfilter; d->bd_bfilter = jfunc; #endif if (cmd == BIOCSETF) reset_d(d); - /* - * Do not require upgrade by first BIOCSETF - * (used to set snaplen) by pcap_open_live() - */ - if ((d->bd_writer != 0) && (--d->bd_writer == 0)) - need_upgrade = 1; - CTR4(KTR_NET, "%s: filter function set by pid %d, " - "bd_writer counter %d, need_upgrade %d", - __func__, d->bd_pid, d->bd_writer, need_upgrade); + if (fcode != NULL) { + /* + * Do not require upgrade by first BIOCSETF + * (used to set snaplen) by pcap_open_live() + */ + if ((d->bd_writer != 0) && (--d->bd_writer == 0)) + need_upgrade = 1; + CTR4(KTR_NET, "%s: filter function set by pid %d, " + "bd_writer counter %d, need_upgrade %d", + __func__, d->bd_pid, d->bd_writer, need_upgrade); + } } BPFD_UNLOCK(d); if (d->bd_bif != NULL) From owner-svn-src-head@FreeBSD.ORG Tue May 29 22:28:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EFC891065674; Tue, 29 May 2012 22:28: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 DBDC38FC14; Tue, 29 May 2012 22:28:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4TMSki2006808; Tue, 29 May 2012 22:28:46 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4TMSknT006806; Tue, 29 May 2012 22:28:46 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201205292228.q4TMSknT006806@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 29 May 2012 22: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: r236262 - 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: Tue, 29 May 2012 22:28:47 -0000 Author: jkim Date: Tue May 29 22:28:46 2012 New Revision: 236262 URL: http://svn.freebsd.org/changeset/base/236262 Log: Fix style(9) nits, reduce unnecessary type castings, etc., for bpf_setf(). Modified: head/sys/net/bpf.c Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Tue May 29 22:21:53 2012 (r236261) +++ head/sys/net/bpf.c Tue May 29 22:28:46 2012 (r236262) @@ -159,7 +159,7 @@ static void catchpacket(struct bpf_d *, void (*)(struct bpf_d *, caddr_t, u_int, void *, u_int), struct bintime *); static void reset_d(struct bpf_d *); -static int bpf_setf(struct bpf_d *, struct bpf_program *, u_long cmd); +static int bpf_setf(struct bpf_d *, struct bpf_program *, u_long cmd); static int bpf_getdltlist(struct bpf_d *, struct bpf_dltlist *); static int bpf_setdlt(struct bpf_d *, u_int); static void filt_bpfdetach(struct knote *); @@ -1708,6 +1708,10 @@ bpfioctl(struct cdev *dev, u_long cmd, c static int bpf_setf(struct bpf_d *d, struct bpf_program *fp, u_long cmd) { +#ifdef COMPAT_FREEBSD32 + struct bpf_program fp_swab; + struct bpf_program32 *fp32; +#endif struct bpf_insn *fcode, *old; #ifdef BPF_JITTER bpf_jit_filter *jfunc, *ofunc; @@ -1715,10 +1719,8 @@ bpf_setf(struct bpf_d *d, struct bpf_pro size_t size; u_int flen; int need_upgrade; -#ifdef COMPAT_FREEBSD32 - struct bpf_program32 *fp32; - struct bpf_program fp_swab; +#ifdef COMPAT_FREEBSD32 switch (cmd) { case BIOCSETF32: case BIOCSETWF32: @@ -1743,36 +1745,35 @@ bpf_setf(struct bpf_d *d, struct bpf_pro #ifdef BPF_JITTER jfunc = ofunc = NULL; #endif + need_upgrade = 0; /* * Check new filter validness before acquiring any locks. * Allocate memory for new filter, if needed. */ flen = fp->bf_len; - if ((flen > bpf_maxinsns) || ((fp->bf_insns == NULL) && (flen != 0))) + if (flen > bpf_maxinsns || (fp->bf_insns == NULL && flen != 0)) return (EINVAL); - - need_upgrade = 0; size = flen * sizeof(*fp->bf_insns); if (size > 0) { - /* We're setting up new filter. Copy and check actual data */ - fcode = (struct bpf_insn *)malloc(size, M_BPF, M_WAITOK); - if (copyin((caddr_t)fp->bf_insns, (caddr_t)fcode, size) != 0 || - bpf_validate(fcode, (int)flen) == 0) { + /* We're setting up new filter. Copy and check actual data. */ + fcode = malloc(size, M_BPF, M_WAITOK); + if (copyin(fp->bf_insns, fcode, size) != 0 || + !bpf_validate(fcode, flen)) { free(fcode, M_BPF); return (EINVAL); } #ifdef BPF_JITTER - /* Filter is copied inside fcode and is perfectly valid */ + /* Filter is copied inside fcode and is perfectly valid. */ jfunc = bpf_jitter(fcode, flen); #endif } BPF_LOCK(); - /* + /* * Set up new filter. - * Protect filter change by interface lock + * Protect filter change by interface lock. * Additionally, we are protected by global lock here. */ if (d->bd_bif != NULL) @@ -1794,9 +1795,9 @@ bpf_setf(struct bpf_d *d, struct bpf_pro if (fcode != NULL) { /* * Do not require upgrade by first BIOCSETF - * (used to set snaplen) by pcap_open_live() + * (used to set snaplen) by pcap_open_live(). */ - if ((d->bd_writer != 0) && (--d->bd_writer == 0)) + if (d->bd_writer != 0 && --d->bd_writer == 0) need_upgrade = 1; CTR4(KTR_NET, "%s: filter function set by pid %d, " "bd_writer counter %d, need_upgrade %d", @@ -1807,14 +1808,14 @@ bpf_setf(struct bpf_d *d, struct bpf_pro if (d->bd_bif != NULL) BPFIF_WUNLOCK(d->bd_bif); if (old != NULL) - free((caddr_t)old, M_BPF); + free(old, M_BPF); #ifdef BPF_JITTER if (ofunc != NULL) bpf_destroy_jit_filter(ofunc); #endif - /* Move d to active readers list */ - if (need_upgrade != 0) + /* Move d to active readers list. */ + if (need_upgrade) bpf_upgraded(d); BPF_UNLOCK(); From owner-svn-src-head@FreeBSD.ORG Tue May 29 22:51:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 10D03106564A; Tue, 29 May 2012 22:51:15 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 958248FC0C; Tue, 29 May 2012 22:51:14 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id q4TMmXVr057544; Wed, 30 May 2012 00:48:33 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id q4TMmXha057543; Wed, 30 May 2012 00:48:33 +0200 (CEST) (envelope-from marius) Date: Wed, 30 May 2012 00:48:33 +0200 From: Marius Strobl To: Konstantin Belousov Message-ID: <20120529224833.GW90133@alchemy.franken.de> References: <201205270527.q4R5Rm44028055@svn.freebsd.org> <20120528190355.GA42283@alchemy.franken.de> <20120528204728.GD2358@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120528204728.GD2358@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r236137 - head/contrib/gcc/config/i386 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, 29 May 2012 22:51:15 -0000 On Mon, May 28, 2012 at 11:47:28PM +0300, Konstantin Belousov wrote: > On Mon, May 28, 2012 at 09:03:55PM +0200, Marius Strobl wrote: > > On Sun, May 27, 2012 at 05:27:48AM +0000, Konstantin Belousov wrote: > > > Author: kib > > > Date: Sun May 27 05:27:47 2012 > > > New Revision: 236137 > > > URL: http://svn.freebsd.org/changeset/base/236137 > > > > > > Log: > > > Enable gnu hash generation for dynamic ELF binaries on x86. > > > > > > > As far as I remember from your commit adding GNU hash support to > > rtld(1), there's nothing left to be done for the other architectures > > apart from testing, correct? > > Yes, you are correct. I am not aware of any non-implemented MD parts, > but I was unable to test on !x86, and got no feedback from arch maintainers. Sorry, must have missed that mail. What's the point of letting the linker create both the ELF and the GNU hash tables and not just going with the latter one? Marius From owner-svn-src-head@FreeBSD.ORG Tue May 29 23:45:35 2012 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 CB12F106566C for ; Tue, 29 May 2012 23:45:35 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 98F458FC14 for ; Tue, 29 May 2012 23:45:35 +0000 (UTC) Received: by dadv36 with SMTP id v36so6375991dad.13 for ; Tue, 29 May 2012 16:45:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=+ceQPLAE/je9Cy++m5VJwdxZ+PHXDs63ZaRe4eqyTC8=; b=eioWNzSwarijcfq/GRsxCmIX8E80OK4irX+zpAuvIMOzYJSsOUlTTCWHcuwUQVyoqe eYOP+vJKPfnxPy7mVBb01NzF9bUMEorHPWYGPQ904rAiu52DHd/lBG48WR6f1rdEoyx2 H7IS4/dH5CPREZR/ZbRkbt24uHf0xSWpnDj+ix9BxV3D100JT6kPuNtfNlCmAP7Aaubr RS8eHWV+YzF1QI092WfJnUvMmXSry/AZ/tSnM+uHG/Zqrr3EPRxkg0Gp023ArGtWR6+t ULuuU7aA7Xz/zr/XzEwatM19rojqOszikUjAsiqiZa+4+8+0No3uVj1MjjaPnY7JkIhV DGiA== MIME-Version: 1.0 Received: by 10.68.201.73 with SMTP id jy9mr42184843pbc.19.1338335135369; Tue, 29 May 2012 16:45:35 -0700 (PDT) Sender: andy@fud.org.nz Received: by 10.68.220.72 with HTTP; Tue, 29 May 2012 16:45:35 -0700 (PDT) In-Reply-To: <201112161216.pBGCGu8B006328@svn.freebsd.org> References: <201112161216.pBGCGu8B006328@svn.freebsd.org> Date: Wed, 30 May 2012 11:45:35 +1200 X-Google-Sender-Auth: hQj7x7NT--paPuzgsvbL58cMbc0 Message-ID: From: Andrew Thompson To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQk8R3sTjXA+nk9bUakH10sq6NkNYZ6p+OHjyFtdCW2y/j7WbFvHhviRC77oPWXV4rxiUw21 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228571 - in head: . lib/libc/net sbin/ifconfig share/man/man4 sys/net sys/netinet sys/netinet6 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, 29 May 2012 23:45:35 -0000 On 17 December 2011 01:16, Gleb Smirnoff wrote: > Author: glebius > Date: Fri Dec 16 12:16:56 2011 > New Revision: 228571 > URL: http://svn.freebsd.org/changeset/base/228571 > > Log: > =A0A major overhaul of the CARP implementation. The ip_carp.c was started > =A0from scratch, copying needed functionality from the old implemenation > =A0on demand, with a thorough review of all code. The main change is that > =A0interface layer has been removed from the CARP. Now redundant addresse= s > =A0are configured exactly on the interfaces, they run on. This commit seems to have a mistake in the PACKET_TAG_CARP mtag handling. carp_macmatch6() places the ifp pointer on the tag while carp_output() dereferences it as a softc. Andrew From owner-svn-src-head@FreeBSD.ORG Wed May 30 01:52:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 666921065673; Wed, 30 May 2012 01:52:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 519428FC12; Wed, 30 May 2012 01:52:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U1q2po017987; Wed, 30 May 2012 01:52:02 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U1q2Vq017985; Wed, 30 May 2012 01:52:02 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205300152.q4U1q2Vq017985@svn.freebsd.org> From: Glen Barber Date: Wed, 30 May 2012 01:52: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: r236274 - head/share/man/man7 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, 30 May 2012 01:52:02 -0000 Author: gjb (doc committer) Date: Wed May 30 01:52:01 2012 New Revision: 236274 URL: http://svn.freebsd.org/changeset/base/236274 Log: Fix an mdoc(7) formatting nit. MFC after: 3 days Modified: head/share/man/man7/release.7 Modified: head/share/man/man7/release.7 ============================================================================== --- head/share/man/man7/release.7 Wed May 30 01:02:34 2012 (r236273) +++ head/share/man/man7/release.7 Wed May 30 01:52:01 2012 (r236274) @@ -283,7 +283,7 @@ Typically, one only needs to set .Va TARGET . .El .Sh FILES -.Bl -tag -compact +.Bl -tag -compact -width Pa .It Pa /usr/doc/Makefile .It Pa /usr/doc/share/mk/doc.project.mk .It Pa /usr/ports/Mk/bsd.port.mk From owner-svn-src-head@FreeBSD.ORG Wed May 30 02:02:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 406991065670; Wed, 30 May 2012 02:02:38 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A7268FC19; Wed, 30 May 2012 02:02:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U22ctd018592; Wed, 30 May 2012 02:02:38 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U22bTE018590; Wed, 30 May 2012 02:02:37 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201205300202.q4U22bTE018590@svn.freebsd.org> From: Kevin Lo Date: Wed, 30 May 2012 02:02: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: r236277 - 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, 30 May 2012 02:02:38 -0000 Author: kevlo Date: Wed May 30 02:02:37 2012 New Revision: 236277 URL: http://svn.freebsd.org/changeset/base/236277 Log: Hook up wbwd man page to the build. Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Wed May 30 01:54:14 2012 (r236276) +++ head/share/man/man4/Makefile Wed May 30 02:02:37 2012 (r236277) @@ -522,6 +522,7 @@ MAN= aac.4 \ ${_vxge.4} \ watchdog.4 \ wb.4 \ + ${_wbwd.4} \ wi.4 \ witness.4 \ wlan.4 \ @@ -735,6 +736,7 @@ _spkr.4= spkr.4 _tpm.4= tpm.4 _urtw.4= urtw.4 _viawd.4= viawd.4 +_wbwd.4= wbwd.4 _wpi.4= wpi.4 _xen.4= xen.4 _xnb.4= xnb.4 From owner-svn-src-head@FreeBSD.ORG Wed May 30 02:29:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D83B81065678; Wed, 30 May 2012 02:29:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C42448FC0A; Wed, 30 May 2012 02:29:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U2TlVN019848; Wed, 30 May 2012 02:29:47 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U2Tlvs019845; Wed, 30 May 2012 02:29:47 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205300229.q4U2Tlvs019845@svn.freebsd.org> From: Glen Barber Date: Wed, 30 May 2012 02:29: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: r236278 - 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: Wed, 30 May 2012 02:29:47 -0000 Author: gjb (doc committer) Date: Wed May 30 02:29:47 2012 New Revision: 236278 URL: http://svn.freebsd.org/changeset/base/236278 Log: Fix mdoc(7) style nits. MFC after: 3 days Modified: head/share/man/man5/devfs.conf.5 head/share/man/man5/devfs.rules.5 Modified: head/share/man/man5/devfs.conf.5 ============================================================================== --- head/share/man/man5/devfs.conf.5 Wed May 30 02:02:37 2012 (r236277) +++ head/share/man/man5/devfs.conf.5 Wed May 30 02:29:47 2012 (r236278) @@ -91,7 +91,7 @@ as explained in .Xr chmod 1 . .El .Sh FILES -.Bl -tag -compact +.Bl -tag -compact -width Pa .It Pa /etc/devfs.conf .It Pa /usr/share/examples/etc/devfs.conf .El Modified: head/share/man/man5/devfs.rules.5 ============================================================================== --- head/share/man/man5/devfs.rules.5 Wed May 30 02:02:37 2012 (r236277) +++ head/share/man/man5/devfs.rules.5 Wed May 30 02:29:47 2012 (r236278) @@ -82,7 +82,7 @@ file: devfs_system_ruleset="localrules" .Ed .Sh FILES -.Bl -tag -compact +.Bl -tag -compact -width Pa .It Pa /etc/defaults/devfs.rules Default .Nm From owner-svn-src-head@FreeBSD.ORG Wed May 30 02:37:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EEE7D106566B; Wed, 30 May 2012 02:37:20 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA55A8FC08; Wed, 30 May 2012 02:37:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U2bKww020224; Wed, 30 May 2012 02:37:20 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U2bKUo020221; Wed, 30 May 2012 02:37:20 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205300237.q4U2bKUo020221@svn.freebsd.org> From: Glen Barber Date: Wed, 30 May 2012 02:37: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: r236279 - head/tools/build/options 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, 30 May 2012 02:37:21 -0000 Author: gjb (doc committer) Date: Wed May 30 02:37:20 2012 New Revision: 236279 URL: http://svn.freebsd.org/changeset/base/236279 Log: Add '-width Pa' to src.conf.5 for mdoc(7) style consistency. MFC after: 3 days Modified: head/tools/build/options/makeman Modified: head/tools/build/options/makeman ============================================================================== --- head/tools/build/options/makeman Wed May 30 02:29:47 2012 (r236278) +++ head/tools/build/options/makeman Wed May 30 02:37:20 2012 (r236279) @@ -265,7 +265,7 @@ EOF cat < 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 18BC3106564A; Wed, 30 May 2012 02:41:10 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03F888FC0A; Wed, 30 May 2012 02:41:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U2f96q020430; Wed, 30 May 2012 02:41:09 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U2f9ik020428; Wed, 30 May 2012 02:41:09 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201205300241.q4U2f9ik020428@svn.freebsd.org> From: Glen Barber Date: Wed, 30 May 2012 02:41: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: r236280 - 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: Wed, 30 May 2012 02:41:10 -0000 Author: gjb (doc committer) Date: Wed May 30 02:41:09 2012 New Revision: 236280 URL: http://svn.freebsd.org/changeset/base/236280 Log: Regen src.conf.5 after r236279. MFC after: 3 days Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed May 30 02:37:20 2012 (r236279) +++ head/share/man/man5/src.conf.5 Wed May 30 02:41:09 2012 (r236280) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru +.\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd May 19, 2012 +.Dd May 29, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1032,7 +1032,7 @@ Set to not build ZFS file system. Set to not build the timezone database. .El .Sh FILES -.Bl -tag -compact +.Bl -tag -compact -width Pa .It Pa /etc/src.conf .It Pa /usr/share/mk/bsd.own.mk .El From owner-svn-src-head@FreeBSD.ORG Wed May 30 03:10:23 2012 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 980DA106564A; Wed, 30 May 2012 03:10:23 +0000 (UTC) (envelope-from miwi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83BF28FC14; Wed, 30 May 2012 03:10:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U3ANRs021951; Wed, 30 May 2012 03:10:23 GMT (envelope-from miwi@svn.freebsd.org) Received: (from miwi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U3ANd3021948; Wed, 30 May 2012 03:10:23 GMT (envelope-from miwi@svn.freebsd.org) Message-Id: <201205300310.q4U3ANd3021948@svn.freebsd.org> From: Martin Wilke Date: Wed, 30 May 2012 03:10: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: r236281 - in head: . etc/pam.d 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, 30 May 2012 03:10:23 -0000 Author: miwi Date: Wed May 30 03:10:22 2012 New Revision: 236281 URL: http://svn.freebsd.org/changeset/base/236281 Log: - FreeBSD ships a KDE PAM module in base, but it's missing support for passwordless login (kde-np), and it doesn't really belong in base system. PR: misc/167261 Submitted by: avilla@ Approved by: rwatson (mentor) MFC after: 3 days Deleted: head/etc/pam.d/kde Modified: head/ObsoleteFiles.inc head/etc/pam.d/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed May 30 02:41:09 2012 (r236280) +++ head/ObsoleteFiles.inc Wed May 30 03:10:22 2012 (r236281) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20120530: kde pam lives now in ports +OLD_FILES+=/etc/pam.d/kde # 20120505: new clang import installed a redundant internal header OLD_FILES+=usr/include/clang/3.1/stdalign.h # 20120428: MD2 removed from libmd Modified: head/etc/pam.d/Makefile ============================================================================== --- head/etc/pam.d/Makefile Wed May 30 02:41:09 2012 (r236280) +++ head/etc/pam.d/Makefile Wed May 30 03:10:22 2012 (r236281) @@ -7,7 +7,6 @@ FILES= README \ cron \ ftpd \ imap \ - kde \ login \ other \ passwd pop3 \ From owner-svn-src-head@FreeBSD.ORG Wed May 30 03:34:35 2012 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 08F55106566B; Wed, 30 May 2012 03:34:35 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-gg0-f182.google.com (mail-gg0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7C8B78FC0C; Wed, 30 May 2012 03:34:34 +0000 (UTC) Received: by ggnm2 with SMTP id m2so3876089ggn.13 for ; Tue, 29 May 2012 20:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+2etFhKnGkE9TRQRzgXSdqY9HKNb8DXsvJSsb3I9Qr4=; b=vpS1+1eMnBIeoT5CCjYYEGLiqS1q4tnh8TFxq4hhdOyOj2AV55MpsJ65JAW5e2X8YC WBJ3Eez0n2pG537jFafGrUEXLn5Sasicc+JGZhFCf6aWFKVDB3V7EjEg3N7SbsYqCymO BkA6FQ6YujwK+mzoHx6ZZJrLYgxma9vRybaFv3LlBJVLS203ywykFaNhslqcWqeGJVIC H3NhMEVZNOSFUDA8b5cEgDXcr2x3PB4r/EuKMQdL4DGyOQiFwcLdMS62ZKRpwCtFxmQb HDFsuLr2hcaw0qnWjKYj1U/JUm2guW2lVbfYFd3I5jLW34tnGXkFX+xwCdhfu1nPfEkj p5fQ== MIME-Version: 1.0 Received: by 10.50.222.202 with SMTP id qo10mr9441222igc.0.1338348873427; Tue, 29 May 2012 20:34:33 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.64.8.170 with HTTP; Tue, 29 May 2012 20:34:33 -0700 (PDT) In-Reply-To: <201205291949.q4TJnqtS099250@svn.freebsd.org> References: <201205291949.q4TJnqtS099250@svn.freebsd.org> Date: Wed, 30 May 2012 07:34:33 +0400 X-Google-Sender-Auth: GGc4xhc5Cx2rHe0Fn8ohA-S40cM Message-ID: From: Sergey Kandaurov To: "David E. O'Brien" 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: r236255 - head/contrib/groff/tmac 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, 30 May 2012 03:34:35 -0000 On 29 May 2012 23:49, David E. O'Brien wrote: > Author: obrien > Date: Tue May 29 19:49:52 2012 > New Revision: 236255 > URL: http://svn.freebsd.org/changeset/base/236255 > > Log: > =A0Add the latest FreeBSD versions. > > Modified: > =A0head/contrib/groff/tmac/doc-common > > Modified: head/contrib/groff/tmac/doc-common > =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/contrib/groff/tmac/doc-common =A0Tue May 29 19:48:34 2012 =A0 = =A0 =A0 =A0(r236254) > +++ head/contrib/groff/tmac/doc-common =A0Tue May 29 19:49:52 2012 =A0 = =A0 =A0 =A0(r236255) > @@ -574,7 +574,10 @@ > =A0.ds doc-operating-system-FreeBSD-8.0 =A0 =A0 8.0 > =A0.ds doc-operating-system-FreeBSD-8.1 =A0 =A0 8.1 > =A0.ds doc-operating-system-FreeBSD-8.2 =A0 =A0 8.2 > +.ds doc-operating-system-FreeBSD-8.3 =A0 =A0 8.3 > =A0.ds doc-operating-system-FreeBSD-9.0 =A0 =A0 9.0 > +.ds doc-operating-system-FreeBSD-9.1 =A0 =A0 9.1 > +.ds doc-operating-system-FreeBSD-10.0 =A0 =A010.0 > =A0. > =A0.ds doc-operating-system-Darwin-8.0.0 =A08.0.0 > =A0.ds doc-operating-system-Darwin-8.1.0 =A08.1.0 This should be imported from savannah.gnu.org repository, and not changed directly. For local changes not found in the (latest) contrib doc-common you should use gnu/usr.bin/groff/tmac/mdoc.local --=20 wbr, pluknet From owner-svn-src-head@FreeBSD.ORG Wed May 30 03:47:51 2012 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 C137C106564A; Wed, 30 May 2012 03:47:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC3538FC0C; Wed, 30 May 2012 03:47:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U3lpi5023759; Wed, 30 May 2012 03:47:51 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U3lprH023757; Wed, 30 May 2012 03:47:51 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205300347.q4U3lprH023757@svn.freebsd.org> From: Eitan Adler Date: Wed, 30 May 2012 03:47: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: r236282 - head/sys/dev/puc 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, 30 May 2012 03:47:51 -0000 Author: eadler Date: Wed May 30 03:47:51 2012 New Revision: 236282 URL: http://svn.freebsd.org/changeset/base/236282 Log: Add support for Sun 1040 PCI Quad Serial PR: kern/163450 Submitted by: Anonymous Hardware Hacker Approved by: cperciva MFC after: 1 week Modified: head/sys/dev/puc/pucdata.c Modified: head/sys/dev/puc/pucdata.c ============================================================================== --- head/sys/dev/puc/pucdata.c Wed May 30 03:10:22 2012 (r236281) +++ head/sys/dev/puc/pucdata.c Wed May 30 03:47:51 2012 (r236282) @@ -901,6 +901,12 @@ const struct puc_cfg puc_pci_devices[] = .config_function = puc_config_syba }, + { 0x5372, 0x6873, 0xffff, 0, + "Sun 1040 PCI Quad Serial", + DEFAULT_RCLK, + PUC_PORT_4S, 0x10, 4, 0, + }, + { 0x6666, 0x0001, 0xffff, 0, "Decision Computer Inc, PCCOM 4-port serial", DEFAULT_RCLK, From owner-svn-src-head@FreeBSD.ORG Wed May 30 03:48:00 2012 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 EA20210657FA; Wed, 30 May 2012 03:48:00 +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 62EE08FC08; Wed, 30 May 2012 03:47:59 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4U3llgV083233; Wed, 30 May 2012 06:47:47 +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.5/8.14.5) with ESMTP id q4U3llXd008670; Wed, 30 May 2012 06:47:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4U3llT3008669; Wed, 30 May 2012 06:47:47 +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: Wed, 30 May 2012 06:47:47 +0300 From: Konstantin Belousov To: Marius Strobl Message-ID: <20120530034747.GJ2358@deviant.kiev.zoral.com.ua> References: <201205270527.q4R5Rm44028055@svn.freebsd.org> <20120528190355.GA42283@alchemy.franken.de> <20120528204728.GD2358@deviant.kiev.zoral.com.ua> <20120529224833.GW90133@alchemy.franken.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ivyoJkJAGKloOgd+" Content-Disposition: inline In-Reply-To: <20120529224833.GW90133@alchemy.franken.de> 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=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham 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: r236137 - head/contrib/gcc/config/i386 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, 30 May 2012 03:48:01 -0000 --ivyoJkJAGKloOgd+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 30, 2012 at 12:48:33AM +0200, Marius Strobl wrote: > On Mon, May 28, 2012 at 11:47:28PM +0300, Konstantin Belousov wrote: > > On Mon, May 28, 2012 at 09:03:55PM +0200, Marius Strobl wrote: > > > On Sun, May 27, 2012 at 05:27:48AM +0000, Konstantin Belousov wrote: > > > > Author: kib > > > > Date: Sun May 27 05:27:47 2012 > > > > New Revision: 236137 > > > > URL: http://svn.freebsd.org/changeset/base/236137 > > > >=20 > > > > Log: > > > > Enable gnu hash generation for dynamic ELF binaries on x86. > > > > =20 > > >=20 > > > As far as I remember from your commit adding GNU hash support to > > > rtld(1), there's nothing left to be done for the other architectures > > > apart from testing, correct? > >=20 > > Yes, you are correct. I am not aware of any non-implemented MD parts, > > but I was unable to test on !x86, and got no feedback from arch maintai= ners. >=20 > Sorry, must have missed that mail. > What's the point of letting the linker create both the ELF and the > GNU hash tables and not just going with the latter one? It prevents the flag day. If your binary is built on slightly newer system, using both hashes allows it to be used on the system with slightly older rtld, which was built before gnu hash support was added. --ivyoJkJAGKloOgd+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/FmGMACgkQC3+MBN1Mb4hGmQCgmpcOEH8veHz3HRWy6Ty2m19q RgAAoLwJ6NP23P3bSCKD5JSwN9nwb143 =0uVL -----END PGP SIGNATURE----- --ivyoJkJAGKloOgd+-- From owner-svn-src-head@FreeBSD.ORG Wed May 30 03:50:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 91FED106564A; Wed, 30 May 2012 03:50:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CA488FC08; Wed, 30 May 2012 03:50:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U3oxSW023942; Wed, 30 May 2012 03:50:59 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U3oxs8023940; Wed, 30 May 2012 03:50:59 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205300350.q4U3oxs8023940@svn.freebsd.org> From: Eitan Adler Date: Wed, 30 May 2012 03:50: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: r236283 - head/sys/cam/scsi 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, 30 May 2012 03:50:59 -0000 Author: eadler Date: Wed May 30 03:50:58 2012 New Revision: 236283 URL: http://svn.freebsd.org/changeset/base/236283 Log: Add support for newer garmin devices PR: kern/163932 Submitted by: Bartosz Fabianowski Approved by: cperciva MFC after: 1 week Modified: head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Wed May 30 03:47:51 2012 (r236282) +++ head/sys/cam/scsi/scsi_xpt.c Wed May 30 03:50:58 2012 (r236283) @@ -535,6 +535,10 @@ static struct scsi_quirk_entry scsi_quir CAM_QUIRK_NOLUNS, /*mintags*/0, /*maxtags*/0 }, { + { T_DIRECT, SIP_MEDIA_REMOVABLE, "Garmin", "*", "*" }, + CAM_QUIRK_NORPTLUNS, /*mintags*/2, /*maxtags*/255 + }, + { /* Default tagged queuing parameters for all devices */ { T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED, From owner-svn-src-head@FreeBSD.ORG Wed May 30 03:51:46 2012 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 BB4BC106566B; Wed, 30 May 2012 03:51:46 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5EE18FC17; Wed, 30 May 2012 03:51:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U3pk6L024020; Wed, 30 May 2012 03:51:46 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U3pkY9024018; Wed, 30 May 2012 03:51:46 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205300351.q4U3pkY9024018@svn.freebsd.org> From: Eitan Adler Date: Wed, 30 May 2012 03:51: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: r236284 - head/etc/defaults 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, 30 May 2012 03:51:46 -0000 Author: eadler Date: Wed May 30 03:51:46 2012 New Revision: 236284 URL: http://svn.freebsd.org/changeset/base/236284 Log: Don't attempt to delete .sujournal in /tmp PR: conf/163828 Submitted by: Tatsuki Makino Approved by: cperciva MFC after: 1 week Modified: head/etc/defaults/periodic.conf Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Wed May 30 03:50:58 2012 (r236283) +++ head/etc/defaults/periodic.conf Wed May 30 03:51:46 2012 (r236284) @@ -47,6 +47,7 @@ daily_clean_tmps_dirs="/tmp" # Delete daily_clean_tmps_days="3" # If not accessed for daily_clean_tmps_ignore=".X*-lock .X11-unix .ICE-unix .font-unix .XIM-unix" daily_clean_tmps_ignore="$daily_clean_tmps_ignore quota.user quota.group .snap" +daily_clean_tmps_ignore="$daily_clean_tmps_ignore .sujournal" # Don't delete these daily_clean_tmps_verbose="YES" # Mention files deleted From owner-svn-src-head@FreeBSD.ORG Wed May 30 03:54:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6F9BE106566B; Wed, 30 May 2012 03:54:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A4AD8FC0A; Wed, 30 May 2012 03:54:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U3sBhn024158; Wed, 30 May 2012 03:54:11 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U3sBiH024156; Wed, 30 May 2012 03:54:11 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205300354.q4U3sBiH024156@svn.freebsd.org> From: Eitan Adler Date: Wed, 30 May 2012 03:54: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: r236285 - head/sbin/camcontrol 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, 30 May 2012 03:54:11 -0000 Author: eadler Date: Wed May 30 03:54:10 2012 New Revision: 236285 URL: http://svn.freebsd.org/changeset/base/236285 Log: Add missing flag enable when certain arguments are parsed PR: bin/163053 Submitted by: Peter Approved by: cperciva MFC after: 1 week Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Wed May 30 03:51:46 2012 (r236284) +++ head/sbin/camcontrol/camcontrol.c Wed May 30 03:54:10 2012 (r236285) @@ -3404,6 +3404,7 @@ ratecontrol(struct cam_device *device, i spi->flags &= ~CTS_SPI_FLAGS_DISC_ENB; else spi->flags |= CTS_SPI_FLAGS_DISC_ENB; + didsettings++; } if (scsi && tag_enable != -1) { if ((cpi.hba_inquiry & PI_TAG_ABLE) == 0) { From owner-svn-src-head@FreeBSD.ORG Wed May 30 03:55:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F33F106566B; Wed, 30 May 2012 03:55:44 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8ADBE8FC17; Wed, 30 May 2012 03:55:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U3tiVv024289; Wed, 30 May 2012 03:55:44 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U3tia1024287; Wed, 30 May 2012 03:55:44 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205300355.q4U3tia1024287@svn.freebsd.org> From: Eitan Adler Date: Wed, 30 May 2012 03:55: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: r236286 - head/usr.bin/mail 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, 30 May 2012 03:55:44 -0000 Author: eadler Date: Wed May 30 03:55:44 2012 New Revision: 236286 URL: http://svn.freebsd.org/changeset/base/236286 Log: Fix likely race condition if wait_child() is interrupted by sigchild() PR: bin/102834 Submitted by: Andreas Longwitz Approved by: cperciva MFC after: 2 weeks Modified: head/usr.bin/mail/popen.c Modified: head/usr.bin/mail/popen.c ============================================================================== --- head/usr.bin/mail/popen.c Wed May 30 03:54:10 2012 (r236285) +++ head/usr.bin/mail/popen.c Wed May 30 03:55:44 2012 (r236286) @@ -336,12 +336,14 @@ int wait_child(int pid) { sigset_t nset, oset; - struct child *cp = findchild(pid); + struct child *cp; (void)sigemptyset(&nset); (void)sigaddset(&nset, SIGCHLD); (void)sigprocmask(SIG_BLOCK, &nset, &oset); + cp = findchild(pid); + while (!cp->done) (void)sigsuspend(&oset); wait_status = cp->status; From owner-svn-src-head@FreeBSD.ORG Wed May 30 03:57:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 32BE41065672; Wed, 30 May 2012 03:57:50 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1FF8FC1D; Wed, 30 May 2012 03:57:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U3vnoN024443; Wed, 30 May 2012 03:57:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U3vnRL024441; Wed, 30 May 2012 03:57:49 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205300357.q4U3vnRL024441@svn.freebsd.org> From: Eitan Adler Date: Wed, 30 May 2012 03:57: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: r236287 - head/usr.sbin/mptutil 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, 30 May 2012 03:57:50 -0000 Author: eadler Date: Wed May 30 03:57:49 2012 New Revision: 236287 URL: http://svn.freebsd.org/changeset/base/236287 Log: add missing variable declaration when DEBUG is defined forgotten in r215046 PR: bin/166404 Submitted by: "Conrad J. Sabatier" Approved by: cperciva MFC after: 3 days Modified: head/usr.sbin/mptutil/mpt_show.c Modified: head/usr.sbin/mptutil/mpt_show.c ============================================================================== --- head/usr.sbin/mptutil/mpt_show.c Wed May 30 03:55:44 2012 (r236286) +++ head/usr.sbin/mptutil/mpt_show.c Wed May 30 03:57:49 2012 (r236287) @@ -538,7 +538,7 @@ show_physdisks(int ac, char **av) { CONFIG_PAGE_RAID_PHYS_DISK_0 *pinfo; U16 IOCStatus; - int fd, i; + int error, fd, i; if (ac != 1) { warnx("show drives: extra arguments"); From owner-svn-src-head@FreeBSD.ORG Wed May 30 04:06:39 2012 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 EF0FD106566B; Wed, 30 May 2012 04:06:39 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA0468FC08; Wed, 30 May 2012 04:06:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U46dCU024888; Wed, 30 May 2012 04:06:39 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U46d5W024887; Wed, 30 May 2012 04:06:39 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205300406.q4U46d5W024887@svn.freebsd.org> From: Eitan Adler Date: Wed, 30 May 2012 04:06: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: r236288 - head/lib/libc/stdio 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, 30 May 2012 04:06:40 -0000 Author: eadler Date: Wed May 30 04:06:38 2012 New Revision: 236288 URL: http://svn.freebsd.org/changeset/base/236288 Log: Only set _w to 0 when the file stream is not currently reading. Without this fflush may fail to write data in the buffer. PR: kern/137819 Submitted by: Eric Blake Reviewed by: theraven Approved by: cperciva MFC after: 2 weeks Modified: head/lib/libc/stdio/fpurge.c Modified: head/lib/libc/stdio/fpurge.c ============================================================================== --- head/lib/libc/stdio/fpurge.c Wed May 30 03:57:49 2012 (r236287) +++ head/lib/libc/stdio/fpurge.c Wed May 30 04:06:38 2012 (r236288) @@ -62,7 +62,7 @@ fpurge(fp) FREEUB(fp); fp->_p = fp->_bf._base; fp->_r = 0; - fp->_w = fp->_flags & (__SLBF|__SNBF) ? 0 : fp->_bf._size; + fp->_w = fp->_flags & (__SLBF|__SNBF|__SRD) ? 0 : fp->_bf._size; retval = 0; } FUNLOCKFILE(fp); From owner-svn-src-head@FreeBSD.ORG Wed May 30 04:08:30 2012 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 C8AAA106564A; Wed, 30 May 2012 04:08:30 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 785318FC16; Wed, 30 May 2012 04:08:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U48UBB025021; Wed, 30 May 2012 04:08:30 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U48UVJ025019; Wed, 30 May 2012 04:08:30 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205300408.q4U48UVJ025019@svn.freebsd.org> From: Eitan Adler Date: Wed, 30 May 2012 04:08: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: r236289 - head/usr.sbin/lpr/lpr 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, 30 May 2012 04:08:30 -0000 Author: eadler Date: Wed May 30 04:08:29 2012 New Revision: 236289 URL: http://svn.freebsd.org/changeset/base/236289 Log: Relax security permissions on '.seq' file creation - the strict, but odd permissions resulted in a security alert from 110.neggrpperm PR: kern/165533 Submitted by: Anton Shterenlikht Submitted by: J B Approved by: cperciva MFC after: 1 week Modified: head/usr.sbin/lpr/lpr/lpr.c Modified: head/usr.sbin/lpr/lpr/lpr.c ============================================================================== --- head/usr.sbin/lpr/lpr/lpr.c Wed May 30 04:06:38 2012 (r236288) +++ head/usr.sbin/lpr/lpr/lpr.c Wed May 30 04:08:29 2012 (r236289) @@ -846,7 +846,7 @@ mktemps(const struct printer *pp) (void) snprintf(buf, sizeof(buf), "%s/.seq", pp->spool_dir); seteuid(euid); - if ((fd = open(buf, O_RDWR|O_CREAT, 0661)) < 0) { + if ((fd = open(buf, O_RDWR|O_CREAT, 0664)) < 0) { printf("%s: cannot create %s\n", progname, buf); exit(1); } From owner-svn-src-head@FreeBSD.ORG Wed May 30 04:14:39 2012 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 0CC881065670; Wed, 30 May 2012 04:14:39 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB64C8FC17; Wed, 30 May 2012 04:14:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U4Ecwp025327; Wed, 30 May 2012 04:14:38 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U4EcH0025325; Wed, 30 May 2012 04:14:38 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205300414.q4U4EcH0025325@svn.freebsd.org> From: Eitan Adler Date: Wed, 30 May 2012 04:14: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: r236290 - 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: Wed, 30 May 2012 04:14:39 -0000 Author: eadler Date: Wed May 30 04:14:38 2012 New Revision: 236290 URL: http://svn.freebsd.org/changeset/base/236290 Log: Document daily_status_security_chkportsum_enable PR: docs/167980 Submitted by: "Bryan Drewery" Reported by: rank1seeker@gmail.com Approved by: cperciva MFC after: 2 weeks Modified: head/share/man/man5/periodic.conf.5 Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Wed May 30 04:08:29 2012 (r236289) +++ head/share/man/man5/periodic.conf.5 Wed May 30 04:14:38 2012 (r236290) @@ -504,6 +504,12 @@ Set to .Dq Li YES to compare the modes and modification times of setuid executables with the previous day's values. +.It Va daily_status_security_chkportsum_enable +.Pq Vt bool +Set to +.Dq Li YES +to verify checksums of all installed packages against the known checksums in +.Pa /var/db/pkg . .It Va daily_status_security_neggrpperm_enable .Pq Vt bool Set to From owner-svn-src-head@FreeBSD.ORG Wed May 30 04:16:55 2012 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 17EA4106564A; Wed, 30 May 2012 04:16:55 +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 01E168FC17; Wed, 30 May 2012 04:16:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U4Gs7Q025464; Wed, 30 May 2012 04:16:54 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U4Gs2x025460; Wed, 30 May 2012 04:16:54 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201205300416.q4U4Gs2x025460@svn.freebsd.org> From: Alan Cox Date: Wed, 30 May 2012 04:16: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: r236291 - in head/sys: amd64/amd64 i386/i386 i386/xen 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, 30 May 2012 04:16:55 -0000 Author: alc Date: Wed May 30 04:16:54 2012 New Revision: 236291 URL: http://svn.freebsd.org/changeset/base/236291 Log: Eliminate some purely stylistic differences among the amd64, i386 native, and i386 xen PV entry allocators. Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Wed May 30 04:14:38 2012 (r236290) +++ head/sys/amd64/amd64/pmap.c Wed May 30 04:16:54 2012 (r236291) @@ -219,7 +219,7 @@ caddr_t CADDR1 = 0; static caddr_t crashdumpmap; static void free_pv_entry(pmap_t pmap, pv_entry_t pv); -static pv_entry_t get_pv_entry(pmap_t locked_pmap, boolean_t try); +static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try); static void pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); static boolean_t pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); static void pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); @@ -2001,7 +2001,7 @@ static __inline struct pv_chunk * pv_to_chunk(pv_entry_t pv) { - return (struct pv_chunk *)((uintptr_t)pv & ~(uintptr_t)PAGE_MASK); + return ((struct pv_chunk *)((uintptr_t)pv & ~(uintptr_t)PAGE_MASK)); } #define PV_PMAP(pv) (pv_to_chunk(pv)->pc_pmap) Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Wed May 30 04:14:38 2012 (r236290) +++ head/sys/i386/i386/pmap.c Wed May 30 04:16:54 2012 (r236291) @@ -287,7 +287,7 @@ SYSCTL_INT(_debug, OID_AUTO, PMAP1unchan static struct mtx PMAP2mutex; static void free_pv_entry(pmap_t pmap, pv_entry_t pv); -static pv_entry_t get_pv_entry(pmap_t locked_pmap, int try); +static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try); static void pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); static boolean_t pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); static void pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); @@ -2152,6 +2152,7 @@ pmap_growkernel(vm_offset_t addr) CTASSERT(sizeof(struct pv_chunk) == PAGE_SIZE); CTASSERT(_NPCM == 11); +CTASSERT(_NPCPV == 336); static __inline struct pv_chunk * pv_to_chunk(pv_entry_t pv) @@ -2165,7 +2166,7 @@ pv_to_chunk(pv_entry_t pv) #define PC_FREE0_9 0xfffffffful /* Free values for index 0 through 9 */ #define PC_FREE10 0x0000fffful /* Free values for index 10 */ -static uint32_t pc_freemask[11] = { +static uint32_t pc_freemask[_NPCM] = { PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, @@ -2336,7 +2337,6 @@ out: return (m_pc); } - /* * free the pv_entry back to the free list */ @@ -2381,7 +2381,7 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv * when needed. */ static pv_entry_t -get_pv_entry(pmap_t pmap, int try) +get_pv_entry(pmap_t pmap, boolean_t try) { static const struct timeval printinterval = { 60, 0 }; static struct timeval lastprint; Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Wed May 30 04:14:38 2012 (r236290) +++ head/sys/i386/xen/pmap.c Wed May 30 04:16:54 2012 (r236291) @@ -278,7 +278,7 @@ SYSCTL_INT(_debug, OID_AUTO, PMAP1unchan static struct mtx PMAP2mutex; static void free_pv_entry(pmap_t pmap, pv_entry_t pv); -static pv_entry_t get_pv_entry(pmap_t locked_pmap, int try); +static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try); static void pmap_pvh_free(struct md_page *pvh, pmap_t pmap, vm_offset_t va); static pv_entry_t pmap_pvh_remove(struct md_page *pvh, pmap_t pmap, vm_offset_t va); @@ -1914,6 +1914,7 @@ pmap_growkernel(vm_offset_t addr) CTASSERT(sizeof(struct pv_chunk) == PAGE_SIZE); CTASSERT(_NPCM == 11); +CTASSERT(_NPCPV == 336); static __inline struct pv_chunk * pv_to_chunk(pv_entry_t pv) @@ -1927,7 +1928,7 @@ pv_to_chunk(pv_entry_t pv) #define PC_FREE0_9 0xfffffffful /* Free values for index 0 through 9 */ #define PC_FREE10 0x0000fffful /* Free values for index 10 */ -static uint32_t pc_freemask[11] = { +static uint32_t pc_freemask[_NPCM] = { PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, PC_FREE0_9, @@ -2087,7 +2088,6 @@ out: return (m_pc); } - /* * free the pv_entry back to the free list */ @@ -2132,7 +2132,7 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv * when needed. */ static pv_entry_t -get_pv_entry(pmap_t pmap, int try) +get_pv_entry(pmap_t pmap, boolean_t try) { static const struct timeval printinterval = { 60, 0 }; static struct timeval lastprint; From owner-svn-src-head@FreeBSD.ORG Wed May 30 05:42:41 2012 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 D3C23106564A; Wed, 30 May 2012 05:42:41 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 836F88FC0A; Wed, 30 May 2012 05:42:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U5gfUA029265; Wed, 30 May 2012 05:42:41 GMT (envelope-from bjk@svn.freebsd.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U5gfEn029263; Wed, 30 May 2012 05:42:41 GMT (envelope-from bjk@svn.freebsd.org) Message-Id: <201205300542.q4U5gfEn029263@svn.freebsd.org> From: Benjamin Kaduk Date: Wed, 30 May 2012 05:42: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: r236294 - 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, 30 May 2012 05:42:41 -0000 Author: bjk (doc committer) Date: Wed May 30 05:42:40 2012 New Revision: 236294 URL: http://svn.freebsd.org/changeset/base/236294 Log: Catch up to the carp rewrite and refer to vhids instead of interfaces. Pointy hat to: bjk Submitted by: glebius Approved by: hrs (mentor) Modified: head/share/man/man4/carp.4 Modified: head/share/man/man4/carp.4 ============================================================================== --- head/share/man/man4/carp.4 Wed May 30 04:54:39 2012 (r236293) +++ head/share/man/man4/carp.4 Wed May 30 05:42:40 2012 (r236294) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 22, 2012 +.Dd May 30, 2012 .Dt CARP 4 .Os .Sh NAME @@ -105,7 +105,7 @@ Disabled by default. .It Va net.inet.carp.log Determines what events relating to .Nm -interfaces are logged. +vhids are logged. A value of 0 disables any logging. A value of 1 enables logging state changes of .Nm From owner-svn-src-head@FreeBSD.ORG Wed May 30 07:11:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C99FD106586F; Wed, 30 May 2012 07:11:27 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B44968FC12; Wed, 30 May 2012 07:11:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4U7BRo6033008; Wed, 30 May 2012 07:11:27 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4U7BRi3033006; Wed, 30 May 2012 07:11:27 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201205300711.q4U7BRi3033006@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 30 May 2012 07:11: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: r236297 - 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: Wed, 30 May 2012 07:11:27 -0000 Author: glebius Date: Wed May 30 07:11:27 2012 New Revision: 236297 URL: http://svn.freebsd.org/changeset/base/236297 Log: After r228571 carp_output() expects carp_softc * pointer in the mtag. Noticed by: thompsa Modified: head/sys/netinet/ip_carp.c Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Wed May 30 06:53:09 2012 (r236296) +++ head/sys/netinet/ip_carp.c Wed May 30 07:11:27 2012 (r236297) @@ -1061,13 +1061,13 @@ carp_macmatch6(struct ifnet *ifp, struct IF_ADDR_RUNLOCK(ifp); mtag = m_tag_get(PACKET_TAG_CARP, - sizeof(struct ifnet *), M_NOWAIT); + sizeof(struct carp_softc *), M_NOWAIT); if (mtag == NULL) /* Better a bit than nothing. */ return (LLADDR(&sc->sc_addr)); - bcopy(&ifp, (caddr_t)(mtag + 1), - sizeof(struct ifnet *)); + bcopy(&sc, (caddr_t)(mtag + 1), + sizeof(struct carp_softc *)); m_tag_prepend(m, mtag); return (LLADDR(&sc->sc_addr)); From owner-svn-src-head@FreeBSD.ORG Wed May 30 08:01:53 2012 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 BE017106564A; Wed, 30 May 2012 08:01:53 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 5282C8FC0A; Wed, 30 May 2012 08:01:53 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id q4U81qok062932; Wed, 30 May 2012 10:01:52 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id q4U81qVG062931; Wed, 30 May 2012 10:01:52 +0200 (CEST) (envelope-from marius) Date: Wed, 30 May 2012 10:01:52 +0200 From: Marius Strobl To: Konstantin Belousov Message-ID: <20120530080151.GX90133@alchemy.franken.de> References: <201205270527.q4R5Rm44028055@svn.freebsd.org> <20120528190355.GA42283@alchemy.franken.de> <20120528204728.GD2358@deviant.kiev.zoral.com.ua> <20120529224833.GW90133@alchemy.franken.de> <20120530034747.GJ2358@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120530034747.GJ2358@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r236137 - head/contrib/gcc/config/i386 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, 30 May 2012 08:01:53 -0000 On Wed, May 30, 2012 at 06:47:47AM +0300, Konstantin Belousov wrote: > On Wed, May 30, 2012 at 12:48:33AM +0200, Marius Strobl wrote: > > On Mon, May 28, 2012 at 11:47:28PM +0300, Konstantin Belousov wrote: > > > On Mon, May 28, 2012 at 09:03:55PM +0200, Marius Strobl wrote: > > > > On Sun, May 27, 2012 at 05:27:48AM +0000, Konstantin Belousov wrote: > > > > > Author: kib > > > > > Date: Sun May 27 05:27:47 2012 > > > > > New Revision: 236137 > > > > > URL: http://svn.freebsd.org/changeset/base/236137 > > > > > > > > > > Log: > > > > > Enable gnu hash generation for dynamic ELF binaries on x86. > > > > > > > > > > > > > As far as I remember from your commit adding GNU hash support to > > > > rtld(1), there's nothing left to be done for the other architectures > > > > apart from testing, correct? > > > > > > Yes, you are correct. I am not aware of any non-implemented MD parts, > > > but I was unable to test on !x86, and got no feedback from arch maintainers. > > > > Sorry, must have missed that mail. > > What's the point of letting the linker create both the ELF and the > > GNU hash tables and not just going with the latter one? > > It prevents the flag day. If your binary is built on slightly newer system, > using both hashes allows it to be used on the system with slightly older > rtld, which was built before gnu hash support was added. Ehm, yes, but given that this wouldn't be the first such flag we have is avoiding it really worth the link time and run time overheads in the long term? Do you plan to change it to GNU hash only in HEAD at some point after MFC'ing? Marius From owner-svn-src-head@FreeBSD.ORG Wed May 30 09:00:24 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 41479106572B; Wed, 30 May 2012 09:00:24 +0000 (UTC) (envelope-from theraven@theravensnest.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id B56A28FC0A; Wed, 30 May 2012 09:00:17 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cmbg15-2-0-cust790.5-4.cable.virginmedia.com [86.26.15.23]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q4U905kc009964 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Wed, 30 May 2012 09:00:06 GMT (envelope-from theraven@theravensnest.org) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <20120530080151.GX90133@alchemy.franken.de> Date: Wed, 30 May 2012 10:00:02 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <15CED26F-127B-4736-9E96-6315D6303B31@theravensnest.org> References: <201205270527.q4R5Rm44028055@svn.freebsd.org> <20120528190355.GA42283@alchemy.franken.de> <20120528204728.GD2358@deviant.kiev.zoral.com.ua> <20120529224833.GW90133@alchemy.franken.de> <20120530034747.GJ2358@deviant.kiev.zoral.com.ua> <20120530080151.GX90133@alchemy.franken.de> To: Marius Strobl X-Mailer: Apple Mail (2.1257) Cc: Konstantin Belousov , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r236137 - head/contrib/gcc/config/i386 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, 30 May 2012 09:00:24 -0000 On 30 May 2012, at 09:01, Marius Strobl wrote: > Ehm, yes, but given that this wouldn't be the first such flag we have > is avoiding it really worth the link time and run time overheads in > the long term?=20 Given the small overhead of the extra hashes, yes. At some point in the = future, we can turn off the older ones and get a tiny reduction in = overhead, but doing it now would cause much more pain for users in not = being able to copy binaries from slightly newer to slightly older = machines than we'd save from a tiny increase in binary size. This is the archetypal change for incremental deployment, let's not make = our users' lives difficult just because we can. David Who doesn't want to be woken up by mobs of users with flaming torches = and pitchforks.= From owner-svn-src-head@FreeBSD.ORG Wed May 30 12:01:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B7ED5106567C; Wed, 30 May 2012 12:01:30 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0B688FC2E; Wed, 30 May 2012 12:01:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UC1UBm047281; Wed, 30 May 2012 12:01:30 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UC1UJG047277; Wed, 30 May 2012 12:01:30 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201205301201.q4UC1UJG047277@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 30 May 2012 12:01: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: r236304 - head/crypto/openssl/crypto/buffer head/crypto/openssl/ssl head/secure/lib/libcrypt releng/7.4 releng/7.4/crypto/openssl/crypto/buffer releng/7.4/crypto/openssl/ssl releng/7.4/... 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, 30 May 2012 12:01:30 -0000 Author: bz Date: Wed May 30 12:01:28 2012 New Revision: 236304 URL: http://svn.freebsd.org/changeset/base/236304 Log: Update the previous openssl fix. [12:01] Fix a bug in crypt(3) ignoring characters of a passphrase. [12:02] Security: FreeBSD-SA-12:01.openssl (revised) Security: FreeBSD-SA-12:02.crypt Approved by: so (bz, simon) Modified: head/crypto/openssl/crypto/buffer/buffer.c head/crypto/openssl/ssl/s3_srvr.c head/secure/lib/libcrypt/crypt-des.c Changes in other areas also in this revision: Modified: releng/7.4/UPDATING releng/7.4/crypto/openssl/crypto/buffer/buffer.c releng/7.4/crypto/openssl/ssl/s3_srvr.c releng/7.4/secure/lib/libcrypt/crypt-des.c releng/7.4/sys/conf/newvers.sh releng/8.1/UPDATING releng/8.1/crypto/openssl/crypto/buffer/buffer.c releng/8.1/crypto/openssl/ssl/s3_srvr.c releng/8.1/secure/lib/libcrypt/crypt-des.c releng/8.1/sys/conf/newvers.sh releng/8.2/UPDATING releng/8.2/crypto/openssl/crypto/buffer/buffer.c releng/8.2/crypto/openssl/ssl/s3_srvr.c releng/8.2/secure/lib/libcrypt/crypt-des.c releng/8.2/sys/conf/newvers.sh releng/8.3/UPDATING releng/8.3/crypto/openssl/crypto/buffer/buffer.c releng/8.3/crypto/openssl/ssl/s3_srvr.c releng/8.3/secure/lib/libcrypt/crypt-des.c releng/8.3/sys/conf/newvers.sh releng/9.0/UPDATING releng/9.0/crypto/openssl/crypto/buffer/buffer.c releng/9.0/crypto/openssl/ssl/s3_srvr.c releng/9.0/secure/lib/libcrypt/crypt-des.c releng/9.0/sys/conf/newvers.sh stable/7/crypto/openssl/crypto/buffer/buffer.c stable/7/crypto/openssl/ssl/s3_srvr.c stable/7/secure/lib/libcrypt/crypt-des.c stable/8/crypto/openssl/crypto/buffer/buffer.c stable/8/crypto/openssl/ssl/s3_srvr.c stable/8/secure/lib/libcrypt/crypt-des.c stable/9/crypto/openssl/crypto/buffer/buffer.c stable/9/crypto/openssl/ssl/s3_srvr.c stable/9/secure/lib/libcrypt/crypt-des.c Modified: head/crypto/openssl/crypto/buffer/buffer.c ============================================================================== --- head/crypto/openssl/crypto/buffer/buffer.c Wed May 30 11:48:57 2012 (r236303) +++ head/crypto/openssl/crypto/buffer/buffer.c Wed May 30 12:01:28 2012 (r236304) @@ -166,7 +166,7 @@ int BUF_MEM_grow_clean(BUF_MEM *str, int /* This limit is sufficient to ensure (len+3)/3*4 < 2**31 */ if (len > LIMIT_BEFORE_EXPANSION) { - BUFerr(BUF_F_BUF_MEM_GROW,ERR_R_MALLOC_FAILURE); + BUFerr(BUF_F_BUF_MEM_GROW_CLEAN,ERR_R_MALLOC_FAILURE); return 0; } n=(len+3)/3*4; Modified: head/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- head/crypto/openssl/ssl/s3_srvr.c Wed May 30 11:48:57 2012 (r236303) +++ head/crypto/openssl/ssl/s3_srvr.c Wed May 30 12:01:28 2012 (r236304) @@ -698,14 +698,6 @@ int ssl3_check_client_hello(SSL *s) int ok; long n; - /* We only allow the client to restart the handshake once per - * negotiation. */ - if (s->s3->flags & SSL3_FLAGS_SGC_RESTART_DONE) - { - SSLerr(SSL_F_SSL3_CHECK_CLIENT_HELLO, SSL_R_MULTIPLE_SGC_RESTARTS); - return -1; - } - /* this function is called when we really expect a Certificate message, * so permit appropriate message length */ n=s->method->ssl_get_message(s, @@ -718,6 +710,13 @@ int ssl3_check_client_hello(SSL *s) s->s3->tmp.reuse_message = 1; if (s->s3->tmp.message_type == SSL3_MT_CLIENT_HELLO) { + /* We only allow the client to restart the handshake once per + * negotiation. */ + if (s->s3->flags & SSL3_FLAGS_SGC_RESTART_DONE) + { + SSLerr(SSL_F_SSL3_CHECK_CLIENT_HELLO, SSL_R_MULTIPLE_SGC_RESTARTS); + return -1; + } /* Throw away what we have done so far in the current handshake, * which will now be aborted. (A full SSL_clear would be too much.) */ #ifndef OPENSSL_NO_DH Modified: head/secure/lib/libcrypt/crypt-des.c ============================================================================== --- head/secure/lib/libcrypt/crypt-des.c Wed May 30 11:48:57 2012 (r236303) +++ head/secure/lib/libcrypt/crypt-des.c Wed May 30 12:01:28 2012 (r236304) @@ -606,7 +606,7 @@ crypt_des(const char *key, const char *s q = (u_char *)keybuf; while (q - (u_char *)keybuf - 8) { *q++ = *key << 1; - if (*(q - 1)) + if (*key != '\0') key++; } if (des_setkey((char *)keybuf)) From owner-svn-src-head@FreeBSD.ORG Wed May 30 12:37:57 2012 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 8DF5B1065675; Wed, 30 May 2012 12:37:57 +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 031A38FC1B; Wed, 30 May 2012 12:37:56 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4UCbplE017971; Wed, 30 May 2012 15:37:52 +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.5/8.14.5) with ESMTP id q4UCbpex010807; Wed, 30 May 2012 15:37:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4UCbpnx010806; Wed, 30 May 2012 15:37:51 +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: Wed, 30 May 2012 15:37:51 +0300 From: Konstantin Belousov To: David Chisnall Message-ID: <20120530123751.GL2358@deviant.kiev.zoral.com.ua> References: <201205270527.q4R5Rm44028055@svn.freebsd.org> <20120528190355.GA42283@alchemy.franken.de> <20120528204728.GD2358@deviant.kiev.zoral.com.ua> <20120529224833.GW90133@alchemy.franken.de> <20120530034747.GJ2358@deviant.kiev.zoral.com.ua> <20120530080151.GX90133@alchemy.franken.de> <15CED26F-127B-4736-9E96-6315D6303B31@theravensnest.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1PHFXgj3K5uCxEyX" Content-Disposition: inline In-Reply-To: <15CED26F-127B-4736-9E96-6315D6303B31@theravensnest.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=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham 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, Marius Strobl Subject: Re: svn commit: r236137 - head/contrib/gcc/config/i386 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, 30 May 2012 12:37:57 -0000 --1PHFXgj3K5uCxEyX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 30, 2012 at 10:00:02AM +0100, David Chisnall wrote: > On 30 May 2012, at 09:01, Marius Strobl wrote: >=20 > > Ehm, yes, but given that this wouldn't be the first such flag we have > > is avoiding it really worth the link time and run time overheads in > > the long term?=20 >=20 > Given the small overhead of the extra hashes, yes. At some point in > the future, we can turn off the older ones and get a tiny reduction > in overhead, but doing it now would cause much more pain for users in > not being able to copy binaries from slightly newer to slightly older > machines than we'd save from a tiny increase in binary size. > > This is the archetypal change for incremental deployment, let's not > make our users' lives difficult just because we can. > > David Who doesn't want to be woken up by mobs of users with flaming > torches and pitchforks. I agree, the overhead of additional symbol hash is relatively low, and only impact developers. I do not think that it is reasonable to even start thinking about turning off SysV hash before at least one release passes. Besides this, another consideration to keep SysV hash around is to keep other tools, besides rtld, working. I am not sure whether e.g. libelf or DTrace use hash. But if using hash, I am quite sure that they use SysV one. --1PHFXgj3K5uCxEyX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/GFJ8ACgkQC3+MBN1Mb4jwRwCggQF0Xt7xoj5yphYJ44tHkrld okQAmgP++hLI0VcmrvM2aQPGeZNH1mnf =Xsdo -----END PGP SIGNATURE----- --1PHFXgj3K5uCxEyX-- From owner-svn-src-head@FreeBSD.ORG Wed May 30 13:31:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3769F1065670; Wed, 30 May 2012 13:31:09 +0000 (UTC) (envelope-from gber@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2303F8FC1D; Wed, 30 May 2012 13:31:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UDV8ZG053872; Wed, 30 May 2012 13:31:08 GMT (envelope-from gber@svn.freebsd.org) Received: (from gber@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UDV8Vc053870; Wed, 30 May 2012 13:31:08 GMT (envelope-from gber@svn.freebsd.org) Message-Id: <201205301331.q4UDV8Vc053870@svn.freebsd.org> From: Grzegorz Bernacki Date: Wed, 30 May 2012 13:31: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: r236307 - head/sys/arm/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, 30 May 2012 13:31:09 -0000 Author: gber Date: Wed May 30 13:31:08 2012 New Revision: 236307 URL: http://svn.freebsd.org/changeset/base/236307 Log: Flush D and I caches after setting a breakpoint. Reviewed by: imp Obtained from: Semihalf Modified: head/sys/arm/include/kdb.h Modified: head/sys/arm/include/kdb.h ============================================================================== --- head/sys/arm/include/kdb.h Wed May 30 13:00:43 2012 (r236306) +++ head/sys/arm/include/kdb.h Wed May 30 13:31:08 2012 (r236307) @@ -46,11 +46,14 @@ kdb_cpu_set_singlestep(void) static __inline void kdb_cpu_sync_icache(unsigned char *addr, size_t size) { + + cpu_icache_sync_all(); } static __inline void kdb_cpu_trap(int type, int code) { + cpu_idcache_wbinv_all(); } From owner-svn-src-head@FreeBSD.ORG Wed May 30 13:33:27 2012 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 9E2A4106567C; Wed, 30 May 2012 13:33:27 +0000 (UTC) (envelope-from gber@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8973B8FC1B; Wed, 30 May 2012 13:33:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UDXR8W054147; Wed, 30 May 2012 13:33:27 GMT (envelope-from gber@svn.freebsd.org) Received: (from gber@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UDXR4e054145; Wed, 30 May 2012 13:33:27 GMT (envelope-from gber@svn.freebsd.org) Message-Id: <201205301333.q4UDXR4e054145@svn.freebsd.org> From: Grzegorz Bernacki Date: Wed, 30 May 2012 13:33: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: r236308 - head/sys/arm/arm 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, 30 May 2012 13:33:27 -0000 Author: gber Date: Wed May 30 13:33:27 2012 New Revision: 236308 URL: http://svn.freebsd.org/changeset/base/236308 Log: Print userspace backtrace for current thread. Reviewed by: imp Obtained from: Semihalf Modified: head/sys/arm/arm/db_trace.c Modified: head/sys/arm/arm/db_trace.c ============================================================================== --- head/sys/arm/arm/db_trace.c Wed May 30 13:31:08 2012 (r236307) +++ head/sys/arm/arm/db_trace.c Wed May 30 13:33:27 2012 (r236308) @@ -79,14 +79,13 @@ __FBSDID("$FreeBSD$"); */ static void -db_stack_trace_cmd(db_expr_t addr, db_expr_t count) +db_stack_trace_cmd(db_expr_t addr, db_expr_t count, boolean_t kernel_only) { u_int32_t *frame, *lastframe; c_db_sym_t sym; const char *name; db_expr_t value; db_expr_t offset; - boolean_t kernel_only = TRUE; int scp_offset; frame = (u_int32_t *)addr; @@ -196,8 +195,11 @@ db_trace_thread(struct thread *thr, int { struct pcb *ctx; - ctx = kdb_thr_ctx(thr); - db_stack_trace_cmd(ctx->un_32.pcb32_r11, -1); + if (thr != curthread) { + ctx = kdb_thr_ctx(thr); + db_stack_trace_cmd(ctx->un_32.pcb32_r11, -1, TRUE); + } else + db_trace_self(); return (0); } @@ -207,5 +209,5 @@ db_trace_self(void) db_addr_t addr; addr = (db_addr_t)__builtin_frame_address(0); - db_stack_trace_cmd(addr, -1); + db_stack_trace_cmd(addr, -1, FALSE); } From owner-svn-src-head@FreeBSD.ORG Wed May 30 13:44:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E216106566B; Wed, 30 May 2012 13:44:43 +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 79D748FC08; Wed, 30 May 2012 13:44:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UDih7G055142; Wed, 30 May 2012 13:44:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UDihob055140; Wed, 30 May 2012 13:44:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205301344.q4UDihob055140@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 30 May 2012 13:44: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: r236309 - 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: Wed, 30 May 2012 13:44:43 -0000 Author: kib Date: Wed May 30 13:44:42 2012 New Revision: 236309 URL: http://svn.freebsd.org/changeset/base/236309 Log: Assert that TDP_NOFAULTING and TDP_NOSPEEPING thread flags do not leak when thread returns from a syscall to usermode. Tested by: pho MFC after: 1 week Modified: head/sys/kern/subr_syscall.c Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Wed May 30 13:33:27 2012 (r236308) +++ head/sys/kern/subr_syscall.c Wed May 30 13:44:42 2012 (r236309) @@ -182,6 +182,12 @@ syscallret(struct thread *td, int error, KASSERT(td->td_locks == 0, ("System call %s returning with %d locks held", syscallname(p, sa->code), td->td_locks)); + KASSERT((td->td_pflags & TDP_NOFAULTING) == 0, + ("System call %s returning with pagefaults disabled", + syscallname(p, sa->code))); + KASSERT((td->td_pflags & TDP_NOSLEEPING) == 0, + ("System call %s returning with sleep disabled", + syscallname(p, sa->code))); /* * Handle reschedule and other end-of-syscall issues From owner-svn-src-head@FreeBSD.ORG Wed May 30 13:51:00 2012 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 DFC88106564A; Wed, 30 May 2012 13:51:00 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB7368FC0A; Wed, 30 May 2012 13:51:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UDp0WK055462; Wed, 30 May 2012 13:51:00 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UDp0wZ055460; Wed, 30 May 2012 13:51:00 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201205301351.q4UDp0wZ055460@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 30 May 2012 13:51: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: r236310 - 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: Wed, 30 May 2012 13:51:01 -0000 Author: glebius Date: Wed May 30 13:51:00 2012 New Revision: 236310 URL: http://svn.freebsd.org/changeset/base/236310 Log: Improve style(9) of bcopy() to and from mbuf tag. Submitted by: bde Modified: head/sys/netinet/ip_carp.c Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Wed May 30 13:44:42 2012 (r236309) +++ head/sys/netinet/ip_carp.c Wed May 30 13:51:00 2012 (r236310) @@ -696,7 +696,7 @@ carp_prepare_ad(struct mbuf *m, struct c CARPSTATS_INC(carps_onomem); return (ENOMEM); } - bcopy(&sc, (caddr_t)(mtag + 1), sizeof(struct carp_softc *)); + bcopy(&sc, mtag + 1, sizeof(sc)); m_tag_prepend(m, mtag); return (0); @@ -1066,8 +1066,7 @@ carp_macmatch6(struct ifnet *ifp, struct /* Better a bit than nothing. */ return (LLADDR(&sc->sc_addr)); - bcopy(&sc, (caddr_t)(mtag + 1), - sizeof(struct carp_softc *)); + bcopy(&sc, mtag + 1, sizeof(sc)); m_tag_prepend(m, mtag); return (LLADDR(&sc->sc_addr)); @@ -1391,7 +1390,7 @@ carp_output(struct ifnet *ifp, struct mb if (mtag == NULL) return (0); - bcopy(mtag + 1, &sc, sizeof(struct carp_softc *)); + bcopy(mtag + 1, &sc, sizeof(sc)); /* Set the source MAC address to the Virtual Router MAC Address. */ switch (ifp->if_type) { From owner-svn-src-head@FreeBSD.ORG Wed May 30 13:55:44 2012 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 94EBB106566C; Wed, 30 May 2012 13:55:44 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 805348FC18; Wed, 30 May 2012 13:55:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UDti7N055712; Wed, 30 May 2012 13:55:44 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UDtij8055709; Wed, 30 May 2012 13:55:44 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201205301355.q4UDtij8055709@svn.freebsd.org> From: Ulrich Spoerlein Date: Wed, 30 May 2012 13:55: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: r236311 - in head/sys/modules: cxgb/cxgb ixgbe 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, 30 May 2012 13:55:44 -0000 Author: uqs Date: Wed May 30 13:55:43 2012 New Revision: 236311 URL: http://svn.freebsd.org/changeset/base/236311 Log: Unbreak make depend. Modified: head/sys/modules/cxgb/cxgb/Makefile head/sys/modules/ixgbe/Makefile Modified: head/sys/modules/cxgb/cxgb/Makefile ============================================================================== --- head/sys/modules/cxgb/cxgb/Makefile Wed May 30 13:51:00 2012 (r236310) +++ head/sys/modules/cxgb/cxgb/Makefile Wed May 30 13:55:43 2012 (r236311) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + CXGB = ${.CURDIR}/../../../dev/cxgb .PATH: ${CXGB} ${CXGB}/common ${CXGB}/sys Modified: head/sys/modules/ixgbe/Makefile ============================================================================== --- head/sys/modules/ixgbe/Makefile Wed May 30 13:51:00 2012 (r236310) +++ head/sys/modules/ixgbe/Makefile Wed May 30 13:55:43 2012 (r236311) @@ -1,5 +1,9 @@ #$FreeBSD$ + +.include + .PATH: ${.CURDIR}/../../dev/ixgbe + KMOD = ixgbe SRCS = device_if.h bus_if.h pci_if.h SRCS += opt_inet.h opt_inet6.h From owner-svn-src-head@FreeBSD.ORG Wed May 30 13:58:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7A6781065670; Wed, 30 May 2012 13:58:02 +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 66DA88FC0A; Wed, 30 May 2012 13:58:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UDw20Z055848; Wed, 30 May 2012 13:58:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UDw2of055845; Wed, 30 May 2012 13:58:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205301358.q4UDw2of055845@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 30 May 2012 13:58: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: r236312 - 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: Wed, 30 May 2012 13:58:02 -0000 Author: kib Date: Wed May 30 13:58:01 2012 New Revision: 236312 URL: http://svn.freebsd.org/changeset/base/236312 Log: Clarify that the v_lockf is advisory lock list. MFC after: 3 days Modified: head/sys/sys/vnode.h Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Wed May 30 13:55:43 2012 (r236311) +++ head/sys/sys/vnode.h Wed May 30 13:58:01 2012 (r236312) @@ -164,7 +164,7 @@ struct vnode { */ struct vpollinfo *v_pollinfo; /* i Poll events, p for *v_pi */ struct label *v_label; /* MAC label for vnode */ - struct lockf *v_lockf; /* Byte-level lock list */ + struct lockf *v_lockf; /* Byte-level advisory lock list */ }; #endif /* defined(_KERNEL) || defined(_KVM_VNODE) */ From owner-svn-src-head@FreeBSD.ORG Wed May 30 14:00:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D79AB1065672; Wed, 30 May 2012 14:00:23 +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 C31718FC15; Wed, 30 May 2012 14:00:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UE0N2S056012; Wed, 30 May 2012 14:00:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UE0NlQ056010; Wed, 30 May 2012 14:00:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205301400.q4UE0NlQ056010@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 30 May 2012 14:00: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: r236313 - 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: Wed, 30 May 2012 14:00:23 -0000 Author: kib Date: Wed May 30 14:00:23 2012 New Revision: 236313 URL: http://svn.freebsd.org/changeset/base/236313 Log: Capitalize start of sentence. MFC after: 3 days Modified: head/sys/fs/nfsclient/nfs_clbio.c Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Wed May 30 13:58:01 2012 (r236312) +++ head/sys/fs/nfsclient/nfs_clbio.c Wed May 30 14:00:23 2012 (r236313) @@ -1178,7 +1178,7 @@ again: * significant cache coherency problems with multiple clients, * especially if locking is implemented later on. * - * as an optimization we could theoretically maintain + * As an optimization we could theoretically maintain * a linked list of discontinuous areas, but we would still * have to commit them separately so there isn't much * advantage to it except perhaps a bit of asynchronization. From owner-svn-src-head@FreeBSD.ORG Wed May 30 16:06:39 2012 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 381F11065673; Wed, 30 May 2012 16:06:39 +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 213248FC0C; Wed, 30 May 2012 16:06:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UG6d0A061258; Wed, 30 May 2012 16:06:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UG6c7Y061250; Wed, 30 May 2012 16:06:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205301606.q4UG6c7Y061250@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 30 May 2012 16:06: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: r236317 - in head/sys: conf 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, 30 May 2012 16:06:39 -0000 Author: kib Date: Wed May 30 16:06:38 2012 New Revision: 236317 URL: http://svn.freebsd.org/changeset/base/236317 Log: Add a rangelock implementation, intended to be used to range-locking the i/o regions of the vnode data space. The implementation is quite simple-minded, it uses the list of the lock requests, ordered by arrival time. Each request may be for read or for write. The implementation is fair FIFO. MFC after: 2 month Added: head/sys/kern/kern_rangelock.c (contents, props changed) head/sys/sys/rangelock.h (contents, props changed) Modified: head/sys/conf/files head/sys/kern/kern_thread.c head/sys/kern/vfs_subr.c head/sys/sys/proc.h head/sys/sys/vnode.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed May 30 16:04:10 2012 (r236316) +++ head/sys/conf/files Wed May 30 16:06:38 2012 (r236317) @@ -2562,6 +2562,7 @@ kern/kern_priv.c standard kern/kern_proc.c standard kern/kern_prot.c standard kern/kern_racct.c standard +kern/kern_rangelock.c standard kern/kern_rctl.c standard kern/kern_resource.c standard kern/kern_rmlock.c standard Added: head/sys/kern/kern_rangelock.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/kern/kern_rangelock.c Wed May 30 16:06:38 2012 (r236317) @@ -0,0 +1,246 @@ +/*- + * Copyright (c) 2009 Konstantin Belousov + * 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 unmodified, 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +struct rl_q_entry { + TAILQ_ENTRY(rl_q_entry) rl_q_link; + off_t rl_q_start, rl_q_end; + int rl_q_flags; +}; + +static uma_zone_t rl_entry_zone; + +static void +rangelock_sys_init(void) +{ + + rl_entry_zone = uma_zcreate("rl_entry", sizeof(struct rl_q_entry), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); +} +SYSINIT(vfs, SI_SUB_LOCK, SI_ORDER_ANY, rangelock_sys_init, NULL); + +static struct rl_q_entry * +rlqentry_alloc(void) +{ + + return (uma_zalloc(rl_entry_zone, M_WAITOK)); +} + +void +rlqentry_free(struct rl_q_entry *rleq) +{ + + uma_zfree(rl_entry_zone, rleq); +} + +void +rangelock_init(struct rangelock *lock) +{ + + TAILQ_INIT(&lock->rl_waiters); + lock->rl_currdep = NULL; +} + +void +rangelock_destroy(struct rangelock *lock) +{ + + KASSERT(TAILQ_EMPTY(&lock->rl_waiters), ("Dangling waiters")); +} + +/* + * Verifies the supplied rl_q_entries for compatibility. Returns true + * if the rangelock queue entries are not compatible, false if they are. + * + * Two entries are compatible if their ranges do not overlap, or both + * entries are for read. + */ +static int +rangelock_incompatible(const struct rl_q_entry *e1, + const struct rl_q_entry *e2) +{ + + if ((e1->rl_q_flags & RL_LOCK_TYPE_MASK) == RL_LOCK_READ && + (e2->rl_q_flags & RL_LOCK_TYPE_MASK) == RL_LOCK_READ) + return (0); + if (e1->rl_q_start < e2->rl_q_end && e1->rl_q_end > e2->rl_q_start) + return (1); + return (0); +} + +/* + * Recalculate the lock->rl_currdep after an unlock. + */ +static void +rangelock_calc_block(struct rangelock *lock) +{ + struct rl_q_entry *entry, *entry1, *whead; + + if (lock->rl_currdep == TAILQ_FIRST(&lock->rl_waiters) && + lock->rl_currdep != NULL) + lock->rl_currdep = TAILQ_NEXT(lock->rl_currdep, rl_q_link); + for (entry = lock->rl_currdep; entry != NULL; + entry = TAILQ_NEXT(entry, rl_q_link)) { + TAILQ_FOREACH(entry1, &lock->rl_waiters, rl_q_link) { + if (rangelock_incompatible(entry, entry1)) + goto out; + if (entry1 == entry) + break; + } + } +out: + lock->rl_currdep = entry; + TAILQ_FOREACH(whead, &lock->rl_waiters, rl_q_link) { + if (whead == lock->rl_currdep) + break; + if (!(whead->rl_q_flags & RL_LOCK_GRANTED)) { + whead->rl_q_flags |= RL_LOCK_GRANTED; + wakeup(whead); + } + } +} + +static void +rangelock_unlock_locked(struct rangelock *lock, struct rl_q_entry *entry, + struct mtx *ilk) +{ + + MPASS(lock != NULL && entry != NULL && ilk != NULL); + mtx_assert(ilk, MA_OWNED); + KASSERT(entry != lock->rl_currdep, ("stuck currdep")); + + TAILQ_REMOVE(&lock->rl_waiters, entry, rl_q_link); + rangelock_calc_block(lock); + mtx_unlock(ilk); + if (curthread->td_rlqe == NULL) + curthread->td_rlqe = entry; + else + rlqentry_free(entry); +} + +void +rangelock_unlock(struct rangelock *lock, void *cookie, struct mtx *ilk) +{ + + MPASS(lock != NULL && cookie != NULL && ilk != NULL); + + mtx_lock(ilk); + rangelock_unlock_locked(lock, cookie, ilk); +} + +/* + * Unlock the sub-range of granted lock. + */ +void * +rangelock_unlock_range(struct rangelock *lock, void *cookie, off_t start, + off_t end, struct mtx *ilk) +{ + struct rl_q_entry *entry; + + MPASS(lock != NULL && cookie != NULL && ilk != NULL); + entry = cookie; + KASSERT(entry->rl_q_flags & RL_LOCK_GRANTED, + ("Unlocking non-granted lock")); + KASSERT(entry->rl_q_start == start, ("wrong start")); + KASSERT(entry->rl_q_end >= end, ("wrong end")); + + mtx_lock(ilk); + if (entry->rl_q_end == end) { + rangelock_unlock_locked(lock, cookie, ilk); + return (NULL); + } + entry->rl_q_end = end; + rangelock_calc_block(lock); + mtx_unlock(ilk); + return (cookie); +} + +/* + * Add the lock request to the queue of the pending requests for + * rangelock. Sleep until the request can be granted. + */ +static void * +rangelock_enqueue(struct rangelock *lock, off_t start, off_t end, int mode, + struct mtx *ilk) +{ + struct rl_q_entry *entry; + struct thread *td; + + MPASS(lock != NULL && ilk != NULL); + + td = curthread; + if (td->td_rlqe != NULL) { + entry = td->td_rlqe; + td->td_rlqe = NULL; + } else + entry = rlqentry_alloc(); + MPASS(entry != NULL); + entry->rl_q_flags = mode; + entry->rl_q_start = start; + entry->rl_q_end = end; + + mtx_lock(ilk); + /* + * XXXKIB TODO. Check that a thread does not try to enqueue a + * lock that is incompatible with another request from the same + * thread. + */ + + TAILQ_INSERT_TAIL(&lock->rl_waiters, entry, rl_q_link); + if (lock->rl_currdep == NULL) + lock->rl_currdep = entry; + rangelock_calc_block(lock); + while (!(entry->rl_q_flags & RL_LOCK_GRANTED)) + msleep(entry, ilk, 0, "range", 0); + mtx_unlock(ilk); + return (entry); +} + +void * +rangelock_rlock(struct rangelock *lock, off_t start, off_t end, struct mtx *ilk) +{ + + return (rangelock_enqueue(lock, start, end, RL_LOCK_READ, ilk)); +} + +void * +rangelock_wlock(struct rangelock *lock, off_t start, off_t end, struct mtx *ilk) +{ + + return (rangelock_enqueue(lock, start, end, RL_LOCK_WRITE, ilk)); +} Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Wed May 30 16:04:10 2012 (r236316) +++ head/sys/kern/kern_thread.c Wed May 30 16:06:38 2012 (r236317) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -205,6 +206,7 @@ thread_init(void *mem, int size, int fla td->td_sleepqueue = sleepq_alloc(); td->td_turnstile = turnstile_alloc(); + td->td_rlqe = NULL; EVENTHANDLER_INVOKE(thread_init, td); td->td_sched = (struct td_sched *)&td[1]; umtx_thread_init(td); @@ -222,6 +224,7 @@ thread_fini(void *mem, int size) td = (struct thread *)mem; EVENTHANDLER_INVOKE(thread_fini, td); + rlqentry_free(td->td_rlqe); turnstile_free(td->td_turnstile); sleepq_free(td->td_sleepqueue); umtx_thread_fini(td); Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Wed May 30 16:04:10 2012 (r236316) +++ head/sys/kern/vfs_subr.c Wed May 30 16:06:38 2012 (r236317) @@ -1027,6 +1027,7 @@ alloc: if ((mp->mnt_kern_flag & MNTK_NOKNOTE) != 0) vp->v_vflag |= VV_NOKNOTE; } + rangelock_init(&vp->v_rl); *vpp = vp; return (0); @@ -2468,6 +2469,7 @@ vdropl(struct vnode *vp) /* XXX Elsewhere we detect an already freed vnode via NULL v_op. */ vp->v_op = NULL; #endif + rangelock_destroy(&vp->v_rl); lockdestroy(vp->v_vnlock); mtx_destroy(&vp->v_interlock); mtx_destroy(BO_MTX(bo)); Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Wed May 30 16:04:10 2012 (r236316) +++ head/sys/sys/proc.h Wed May 30 16:06:38 2012 (r236317) @@ -213,6 +213,7 @@ struct thread { struct seltd *td_sel; /* Select queue/channel. */ struct sleepqueue *td_sleepqueue; /* (k) Associated sleep queue. */ struct turnstile *td_turnstile; /* (k) Associated turnstile. */ + struct rl_q_entry *td_rlqe; /* (k) Associated range lock entry. */ struct umtx_q *td_umtxq; /* (c?) Link for when we're blocked. */ lwpid_t td_tid; /* (b) Thread ID. */ sigqueue_t td_sigqueue; /* (c) Sigs arrived, not delivered. */ Added: head/sys/sys/rangelock.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/rangelock.h Wed May 30 16:06:38 2012 (r236317) @@ -0,0 +1,78 @@ +/*- + * Copyright (c) 2009 Konstantin Belousov + * 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 unmodified, 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. + * + * $FreeBSD$ + */ + +#ifndef _SYS_RANGELOCK_H +#define _SYS_RANGELOCK_H + +#include + +#define RL_LOCK_READ 0x0001 +#define RL_LOCK_WRITE 0x0002 +#define RL_LOCK_TYPE_MASK 0x0003 +#define RL_LOCK_GRANTED 0x0004 + +struct rl_q_entry; + +/* + * The structure representing the range lock. Caller may request + * read or write access to the range of bytes. Access is granted if + * all existing lock owners are compatible with the request. Two lock + * owners are compatible if their ranges do not overlap, or both + * owners are for read. + * + * Access to the structure itself is synchronized with the externally + * supplied mutex. + * + * rl_waiters is the queue of lock requests in the order of arrival. + * rl_currdep is the first lock request that cannot be granted now due + * to the preceding requests conflicting with it. + */ +struct rangelock { + TAILQ_HEAD(, rl_q_entry) rl_waiters; + struct rl_q_entry *rl_currdep; +}; + +#ifdef _KERNEL + +struct mtx; + +void rangelock_init(struct rangelock *lock); +void rangelock_destroy(struct rangelock *lock); +void rangelock_unlock(struct rangelock *lock, void *cookie, + struct mtx *ilk); +void *rangelock_unlock_range(struct rangelock *lock, void *cookie, + off_t start, off_t end, struct mtx *ilk); +void *rangelock_rlock(struct rangelock *lock, off_t start, off_t end, + struct mtx *ilk); +void *rangelock_wlock(struct rangelock *lock, off_t start, off_t end, + struct mtx *ilk); +void rlqentry_free(struct rl_q_entry *rlqe); + +#endif /* _KERNEL */ + +#endif /* _SYS_RANGELOCK_H */ Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Wed May 30 16:04:10 2012 (r236316) +++ head/sys/sys/vnode.h Wed May 30 16:06:38 2012 (r236317) @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -165,6 +166,7 @@ struct vnode { struct vpollinfo *v_pollinfo; /* i Poll events, p for *v_pi */ struct label *v_label; /* MAC label for vnode */ struct lockf *v_lockf; /* Byte-level advisory lock list */ + struct rangelock v_rl; /* Byte-range lock */ }; #endif /* defined(_KERNEL) || defined(_KVM_VNODE) */ @@ -679,6 +681,15 @@ int vn_extattr_rm(struct vnode *vp, int int vn_vget_ino(struct vnode *vp, ino_t ino, int lkflags, struct vnode **rvp); +#define vn_rangelock_unlock(vp, cookie) \ + rangelock_unlock(&(vp)->v_rl, (cookie), VI_MTX(vp)) +#define vn_rangelock_unlock_range(vp, cookie, start, end) \ + rangelock_unlock_range(&(vp)->v_rl, (cookie), (start), (end), \ + VI_MTX(vp)) +#define vn_rangelock_rlock(vp, start, end) \ + rangelock_rlock(&(vp)->v_rl, (start), (end), VI_MTX(vp)) +#define vn_rangelock_wlock(vp, start, end) \ + rangelock_wlock(&(vp)->v_rl, (start), (end), VI_MTX(vp)) int vfs_cache_lookup(struct vop_lookup_args *ap); void vfs_timestamp(struct timespec *); From owner-svn-src-head@FreeBSD.ORG Wed May 30 16:22:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6B62D106566B; Wed, 30 May 2012 16:22:56 +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 DC4188FC14; Wed, 30 May 2012 16:22:54 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4UGMnTn061067; Wed, 30 May 2012 19:22:49 +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.5/8.14.5) with ESMTP id q4UGMnWR014078; Wed, 30 May 2012 19:22:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4UGMmCk014077; Wed, 30 May 2012 19:22:48 +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: Wed, 30 May 2012 19:22:48 +0300 From: Konstantin Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20120530162248.GM2358@deviant.kiev.zoral.com.ua> References: <201205301606.q4UG6c7Y061250@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4tWrft2Hllg7Rgpy" Content-Disposition: inline In-Reply-To: <201205301606.q4UG6c7Y061250@svn.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=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Subject: Re: svn commit: r236317 - in head/sys: conf 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, 30 May 2012 16:22:56 -0000 --4tWrft2Hllg7Rgpy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 30, 2012 at 04:06:38PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Wed May 30 16:06:38 2012 > New Revision: 236317 > URL: http://svn.freebsd.org/changeset/base/236317 >=20 > Log: > Add a rangelock implementation, intended to be used to range-locking > the i/o regions of the vnode data space. The implementation is quite > simple-minded, it uses the list of the lock requests, ordered by > arrival time. Each request may be for read or for write. The > implementation is fair FIFO. > =20 > MFC after: 2 month Reviewed by: attilio, bf (comments), mdf, pjd Tested by: pho, flo, Gustau P?rez I am sorry. --4tWrft2Hllg7Rgpy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/GSVgACgkQC3+MBN1Mb4hDigCfe4AdFEVUQ+fB/vQk8+1KCkrI JG0Amwfm5e+GsqhNId9Xm5bj6dV8R1ag =ZqPp -----END PGP SIGNATURE----- --4tWrft2Hllg7Rgpy-- From owner-svn-src-head@FreeBSD.ORG Wed May 30 16:42:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04EED1065670; Wed, 30 May 2012 16:42:09 +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 E1A548FC0C; Wed, 30 May 2012 16:42:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UGg8pR062885; Wed, 30 May 2012 16:42:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UGg8Cc062879; Wed, 30 May 2012 16:42:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205301642.q4UGg8Cc062879@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 30 May 2012 16:42: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: r236321 - 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, 30 May 2012 16:42:09 -0000 Author: kib Date: Wed May 30 16:42:08 2012 New Revision: 236321 URL: http://svn.freebsd.org/changeset/base/236321 Log: vn_io_fault() is a facility to prevent page faults while filesystems perform copyin/copyout of the file data into the usermode buffer. Typical filesystem hold vnode lock and some buffer locks over the VOP_READ() and VOP_WRITE() operations, and since page fault handler may need to recurse into VFS to get the page content, a deadlock is possible. The facility works by disabling page faults handling for the current thread and attempting to execute i/o while allowing uiomove() to access the usermode mapping of the i/o buffer. If all buffer pages are resident, uiomove() is successfull and request is finished. If EFAULT is returned from uiomove(), the pages backing i/o buffer are faulted in and held, and the copyin/out is performed using uiomove_fromphys() over the held pages for the second attempt of VOP call. Since pages are hold in chunks to prevent large i/o requests from starving free pages pool, and since vnode lock is only taken for i/o over the current chunk, the vnode lock no longer protect atomicity of the whole i/o request. Use newly added rangelocks to provide the required atomicity of i/o regardind other i/o and truncations. Filesystems need to explicitely opt-in into the scheme, by setting the MNTK_NO_IOPF struct mount flag, and optionally by using vn_io_fault_uiomove(9) helper which takes care of calling uiomove() or converting uio into request for uiomove_fromphys(). Reviewed by: bf (comments), mdf, pjd (previous version) Tested by: pho Tested by: flo, Gustau P?rez (previous version) MFC after: 2 months Modified: head/sys/kern/vfs_vnops.c head/sys/sys/mount.h head/sys/sys/proc.h head/sys/sys/vnode.h Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Wed May 30 16:30:51 2012 (r236320) +++ head/sys/kern/vfs_vnops.c Wed May 30 16:42:08 2012 (r236321) @@ -65,10 +65,15 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include #include +#include static fo_rdwr_t vn_read; static fo_rdwr_t vn_write; +static fo_rdwr_t vn_io_fault; static fo_truncate_t vn_truncate; static fo_ioctl_t vn_ioctl; static fo_poll_t vn_poll; @@ -77,8 +82,8 @@ static fo_stat_t vn_statfile; static fo_close_t vn_closefile; struct fileops vnops = { - .fo_read = vn_read, - .fo_write = vn_write, + .fo_read = vn_io_fault, + .fo_write = vn_io_fault, .fo_truncate = vn_truncate, .fo_ioctl = vn_ioctl, .fo_poll = vn_poll, @@ -367,57 +372,56 @@ sequential_heuristic(struct uio *uio, st * Package up an I/O request on a vnode into a uio and do it. */ int -vn_rdwr(rw, vp, base, len, offset, segflg, ioflg, active_cred, file_cred, - aresid, td) - enum uio_rw rw; - struct vnode *vp; - void *base; - int len; - off_t offset; - enum uio_seg segflg; - int ioflg; - struct ucred *active_cred; - struct ucred *file_cred; - ssize_t *aresid; - struct thread *td; +vn_rdwr(enum uio_rw rw, struct vnode *vp, void *base, int len, off_t offset, + enum uio_seg segflg, int ioflg, struct ucred *active_cred, + struct ucred *file_cred, ssize_t *aresid, struct thread *td) { struct uio auio; struct iovec aiov; struct mount *mp; struct ucred *cred; + void *rl_cookie; int error, lock_flags; VFS_ASSERT_GIANT(vp->v_mount); + auio.uio_iov = &aiov; + auio.uio_iovcnt = 1; + aiov.iov_base = base; + aiov.iov_len = len; + auio.uio_resid = len; + auio.uio_offset = offset; + auio.uio_segflg = segflg; + auio.uio_rw = rw; + auio.uio_td = td; + error = 0; + if ((ioflg & IO_NODELOCKED) == 0) { + if (rw == UIO_READ) { + rl_cookie = vn_rangelock_rlock(vp, offset, + offset + len); + } else { + rl_cookie = vn_rangelock_wlock(vp, offset, + offset + len); + } mp = NULL; if (rw == UIO_WRITE) { if (vp->v_type != VCHR && (error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) - return (error); + goto out; if (MNT_SHARED_WRITES(mp) || - ((mp == NULL) && MNT_SHARED_WRITES(vp->v_mount))) { + ((mp == NULL) && MNT_SHARED_WRITES(vp->v_mount))) lock_flags = LK_SHARED; - } else { + else lock_flags = LK_EXCLUSIVE; - } - vn_lock(vp, lock_flags | LK_RETRY); } else - vn_lock(vp, LK_SHARED | LK_RETRY); + lock_flags = LK_SHARED; + vn_lock(vp, lock_flags | LK_RETRY); + } else + rl_cookie = NULL; - } ASSERT_VOP_LOCKED(vp, "IO_NODELOCKED with no vp lock held"); - auio.uio_iov = &aiov; - auio.uio_iovcnt = 1; - aiov.iov_base = base; - aiov.iov_len = len; - auio.uio_resid = len; - auio.uio_offset = offset; - auio.uio_segflg = segflg; - auio.uio_rw = rw; - auio.uio_td = td; - error = 0; #ifdef MAC if ((ioflg & IO_NOMACCHECK) == 0) { if (rw == UIO_READ) @@ -429,7 +433,7 @@ vn_rdwr(rw, vp, base, len, offset, segfl } #endif if (error == 0) { - if (file_cred) + if (file_cred != NULL) cred = file_cred; else cred = active_cred; @@ -444,10 +448,13 @@ vn_rdwr(rw, vp, base, len, offset, segfl if (auio.uio_resid && error == 0) error = EIO; if ((ioflg & IO_NODELOCKED) == 0) { - if (rw == UIO_WRITE && vp->v_type != VCHR) - vn_finished_write(mp); VOP_UNLOCK(vp, 0); + if (mp != NULL) + vn_finished_write(mp); } + out: + if (rl_cookie != NULL) + vn_rangelock_unlock(vp, rl_cookie); return (error); } @@ -688,29 +695,269 @@ unlock: return (error); } +static const int io_hold_cnt = 16; + /* - * File table truncate routine. + * The vn_io_fault() is a wrapper around vn_read() and vn_write() to + * prevent the following deadlock: + * + * Assume that the thread A reads from the vnode vp1 into userspace + * buffer buf1 backed by the pages of vnode vp2. If a page in buf1 is + * currently not resident, then system ends up with the call chain + * vn_read() -> VOP_READ(vp1) -> uiomove() -> [Page Fault] -> + * vm_fault(buf1) -> vnode_pager_getpages(vp2) -> VOP_GETPAGES(vp2) + * which establishes lock order vp1->vn_lock, then vp2->vn_lock. + * If, at the same time, thread B reads from vnode vp2 into buffer buf2 + * backed by the pages of vnode vp1, and some page in buf2 is not + * resident, we get a reversed order vp2->vn_lock, then vp1->vn_lock. + * + * To prevent the lock order reversal and deadlock, vn_io_fault() does + * not allow page faults to happen during VOP_READ() or VOP_WRITE(). + * Instead, it first tries to do the whole range i/o with pagefaults + * disabled. If all pages in the i/o buffer are resident and mapped, + * VOP will succeed (ignoring the genuine filesystem errors). + * Otherwise, we get back EFAULT, and vn_io_fault() falls back to do + * i/o in chunks, with all pages in the chunk prefaulted and held + * using vm_fault_quick_hold_pages(). + * + * Filesystems using this deadlock avoidance scheme should use the + * array of the held pages from uio, saved in the curthread->td_ma, + * instead of doing uiomove(). A helper function + * vn_io_fault_uiomove() converts uiomove request into + * uiomove_fromphys() over td_ma array. + * + * Since vnode locks do not cover the whole i/o anymore, rangelocks + * make the current i/o request atomic with respect to other i/os and + * truncations. */ static int -vn_truncate(fp, length, active_cred, td) - struct file *fp; - off_t length; - struct ucred *active_cred; +vn_io_fault(struct file *fp, struct uio *uio, struct ucred *active_cred, + int flags, struct thread *td) +{ + vm_page_t ma[io_hold_cnt + 2]; + struct uio *uio_clone, short_uio; + struct iovec short_iovec[1]; + fo_rdwr_t *doio; + struct vnode *vp; + void *rl_cookie; + struct mount *mp; + vm_page_t *prev_td_ma; + int cnt, error, save, saveheld, prev_td_ma_cnt; + vm_offset_t addr, end; + vm_prot_t prot; + size_t len, resid; + ssize_t adv; + + if (uio->uio_rw == UIO_READ) + doio = vn_read; + else + doio = vn_write; + vp = fp->f_vnode; + if (uio->uio_segflg != UIO_USERSPACE || vp->v_type != VREG || + ((mp = vp->v_mount) != NULL && + (mp->mnt_kern_flag & MNTK_NO_IOPF) == 0)) + return (doio(fp, uio, active_cred, flags, td)); + + /* + * The UFS follows IO_UNIT directive and replays back both + * uio_offset and uio_resid if an error is encountered during the + * operation. But, since the iovec may be already advanced, + * uio is still in an inconsistent state. + * + * Cache a copy of the original uio, which is advanced to the redo + * point using UIO_NOCOPY below. + */ + uio_clone = cloneuio(uio); + resid = uio->uio_resid; + + short_uio.uio_segflg = UIO_USERSPACE; + short_uio.uio_rw = uio->uio_rw; + short_uio.uio_td = uio->uio_td; + + if (uio->uio_rw == UIO_READ) { + prot = VM_PROT_WRITE; + rl_cookie = vn_rangelock_rlock(vp, uio->uio_offset, + uio->uio_offset + uio->uio_resid); + } else { + prot = VM_PROT_READ; + if ((fp->f_flag & O_APPEND) != 0 || (flags & FOF_OFFSET) == 0) + /* For appenders, punt and lock the whole range. */ + rl_cookie = vn_rangelock_wlock(vp, 0, OFF_MAX); + else + rl_cookie = vn_rangelock_wlock(vp, uio->uio_offset, + uio->uio_offset + uio->uio_resid); + } + + save = vm_fault_disable_pagefaults(); + error = doio(fp, uio, active_cred, flags, td); + if (error != EFAULT) + goto out; + + uio_clone->uio_segflg = UIO_NOCOPY; + uiomove(NULL, resid - uio->uio_resid, uio_clone); + uio_clone->uio_segflg = uio->uio_segflg; + + saveheld = curthread_pflags_set(TDP_UIOHELD); + prev_td_ma = td->td_ma; + prev_td_ma_cnt = td->td_ma_cnt; + + while (uio_clone->uio_resid != 0) { + len = uio_clone->uio_iov->iov_len; + if (len == 0) { + KASSERT(uio_clone->uio_iovcnt >= 1, + ("iovcnt underflow")); + uio_clone->uio_iov++; + uio_clone->uio_iovcnt--; + continue; + } + + addr = (vm_offset_t)uio_clone->uio_iov->iov_base; + end = round_page(addr + len); + cnt = howmany(end - trunc_page(addr), PAGE_SIZE); + /* + * A perfectly misaligned address and length could cause + * both the start and the end of the chunk to use partial + * page. +2 accounts for such a situation. + */ + if (cnt > io_hold_cnt + 2) { + len = io_hold_cnt * PAGE_SIZE; + KASSERT(howmany(round_page(addr + len) - + trunc_page(addr), PAGE_SIZE) <= io_hold_cnt + 2, + ("cnt overflow")); + } + cnt = vm_fault_quick_hold_pages(&td->td_proc->p_vmspace->vm_map, + addr, len, prot, ma, io_hold_cnt + 2); + if (cnt == -1) { + error = EFAULT; + break; + } + short_uio.uio_iov = &short_iovec[0]; + short_iovec[0].iov_base = (void *)addr; + short_uio.uio_iovcnt = 1; + short_uio.uio_resid = short_iovec[0].iov_len = len; + short_uio.uio_offset = uio_clone->uio_offset; + td->td_ma = ma; + td->td_ma_cnt = cnt; + + error = doio(fp, &short_uio, active_cred, flags, td); + vm_page_unhold_pages(ma, cnt); + adv = len - short_uio.uio_resid; + + uio_clone->uio_iov->iov_base = + (char *)uio_clone->uio_iov->iov_base + adv; + uio_clone->uio_iov->iov_len -= adv; + uio_clone->uio_resid -= adv; + uio_clone->uio_offset += adv; + + uio->uio_resid -= adv; + uio->uio_offset += adv; + + if (error != 0 || adv == 0) + break; + } + td->td_ma = prev_td_ma; + td->td_ma_cnt = prev_td_ma_cnt; + curthread_pflags_restore(saveheld); +out: + vm_fault_enable_pagefaults(save); + vn_rangelock_unlock(vp, rl_cookie); + free(uio_clone, M_IOV); + return (error); +} + +/* + * Helper function to perform the requested uiomove operation using + * the held pages for io->uio_iov[0].iov_base buffer instead of + * copyin/copyout. Access to the pages with uiomove_fromphys() + * instead of iov_base prevents page faults that could occur due to + * pmap_collect() invalidating the mapping created by + * vm_fault_quick_hold_pages(), or pageout daemon, page laundry or + * object cleanup revoking the write access from page mappings. + * + * Filesystems specified MNTK_NO_IOPF shall use vn_io_fault_uiomove() + * instead of plain uiomove(). + */ +int +vn_io_fault_uiomove(char *data, int xfersize, struct uio *uio) +{ + struct uio transp_uio; + struct iovec transp_iov[1]; struct thread *td; + size_t adv; + int error, pgadv; + + td = curthread; + if ((td->td_pflags & TDP_UIOHELD) == 0 || + uio->uio_segflg != UIO_USERSPACE) + return (uiomove(data, xfersize, uio)); + + KASSERT(uio->uio_iovcnt == 1, ("uio_iovcnt %d", uio->uio_iovcnt)); + transp_iov[0].iov_base = data; + transp_uio.uio_iov = &transp_iov[0]; + transp_uio.uio_iovcnt = 1; + if (xfersize > uio->uio_resid) + xfersize = uio->uio_resid; + transp_uio.uio_resid = transp_iov[0].iov_len = xfersize; + transp_uio.uio_offset = 0; + transp_uio.uio_segflg = UIO_SYSSPACE; + /* + * Since transp_iov points to data, and td_ma page array + * corresponds to original uio->uio_iov, we need to invert the + * direction of the i/o operation as passed to + * uiomove_fromphys(). + */ + switch (uio->uio_rw) { + case UIO_WRITE: + transp_uio.uio_rw = UIO_READ; + break; + case UIO_READ: + transp_uio.uio_rw = UIO_WRITE; + break; + } + transp_uio.uio_td = uio->uio_td; + error = uiomove_fromphys(td->td_ma, + ((vm_offset_t)uio->uio_iov->iov_base) & PAGE_MASK, + xfersize, &transp_uio); + adv = xfersize - transp_uio.uio_resid; + pgadv = + (((vm_offset_t)uio->uio_iov->iov_base + adv) >> PAGE_SHIFT) - + (((vm_offset_t)uio->uio_iov->iov_base) >> PAGE_SHIFT); + td->td_ma += pgadv; + KASSERT(td->td_ma_cnt >= pgadv, ("consumed pages %d %d", td->td_ma_cnt, + pgadv)); + td->td_ma_cnt -= pgadv; + uio->uio_iov->iov_base = (char *)uio->uio_iov->iov_base + adv; + uio->uio_iov->iov_len -= adv; + uio->uio_resid -= adv; + uio->uio_offset += adv; + return (error); +} + +/* + * File table truncate routine. + */ +static int +vn_truncate(struct file *fp, off_t length, struct ucred *active_cred, + struct thread *td) { struct vattr vattr; struct mount *mp; struct vnode *vp; + void *rl_cookie; int vfslocked; int error; vp = fp->f_vnode; + + /* + * Lock the whole range for truncation. Otherwise split i/o + * might happen partly before and partly after the truncation. + */ + rl_cookie = vn_rangelock_wlock(vp, 0, OFF_MAX); vfslocked = VFS_LOCK_GIANT(vp->v_mount); error = vn_start_write(vp, &mp, V_WAIT | PCATCH); - if (error) { - VFS_UNLOCK_GIANT(vfslocked); - return (error); - } + if (error) + goto out1; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (vp->v_type == VDIR) { error = EISDIR; @@ -730,7 +977,9 @@ vn_truncate(fp, length, active_cred, td) out: VOP_UNLOCK(vp, 0); vn_finished_write(mp); +out1: VFS_UNLOCK_GIANT(vfslocked); + vn_rangelock_unlock(vp, rl_cookie); return (error); } Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Wed May 30 16:30:51 2012 (r236320) +++ head/sys/sys/mount.h Wed May 30 16:42:08 2012 (r236321) @@ -370,6 +370,9 @@ void __mnt_vnode_markerfree(str #define MNTK_REFEXPIRE 0x00000020 /* refcount expiring is happening */ #define MNTK_EXTENDED_SHARED 0x00000040 /* Allow shared locking for more ops */ #define MNTK_SHARED_WRITES 0x00000080 /* Allow shared locking for writes */ +#define MNTK_NO_IOPF 0x00000100 /* Disallow page faults during reads + and writes. Filesystem shall properly + handle i/o state on EFAULT. */ #define MNTK_NOASYNC 0x00800000 /* disable async */ #define MNTK_UNMOUNT 0x01000000 /* unmount in progress */ #define MNTK_MWAIT 0x02000000 /* waiting for unmount to finish */ Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Wed May 30 16:30:51 2012 (r236320) +++ head/sys/sys/proc.h Wed May 30 16:42:08 2012 (r236321) @@ -313,7 +313,9 @@ struct thread { struct vnet *td_vnet; /* (k) Effective vnet. */ const char *td_vnet_lpush; /* (k) Debugging vnet push / pop. */ struct trapframe *td_intr_frame;/* (k) Frame of the current irq */ - struct proc *td_rfppwait_p; /* (k) The vforked child */ + struct proc *td_rfppwait_p; /* (k) The vforked child */ + struct vm_page **td_ma; /* (k) uio pages held */ + int td_ma_cnt; /* (k) size of *td_ma */ }; struct mtx *thread_lock_block(struct thread *); @@ -421,6 +423,7 @@ do { \ #define TDP_RFPPWAIT 0x02000000 /* Handle RFPPWAIT on syscall exit */ #define TDP_RESETSPUR 0x04000000 /* Reset spurious page fault history. */ #define TDP_NERRNO 0x08000000 /* Last errno is already in td_errno */ +#define TDP_UIOHELD 0x10000000 /* Current uio has pages held in td_ma */ /* * Reasons that the current thread can not be run yet. Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Wed May 30 16:30:51 2012 (r236320) +++ head/sys/sys/vnode.h Wed May 30 16:42:08 2012 (r236321) @@ -681,6 +681,8 @@ int vn_extattr_rm(struct vnode *vp, int int vn_vget_ino(struct vnode *vp, ino_t ino, int lkflags, struct vnode **rvp); +int vn_io_fault_uiomove(char *data, int xfersize, struct uio *uio); + #define vn_rangelock_unlock(vp, cookie) \ rangelock_unlock(&(vp)->v_rl, (cookie), VI_MTX(vp)) #define vn_rangelock_unlock_range(vp, cookie, start, end) \ From owner-svn-src-head@FreeBSD.ORG Wed May 30 16:45:41 2012 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 C76981065780; Wed, 30 May 2012 16:45:41 +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 B26A38FC15; Wed, 30 May 2012 16:45:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UGjfwi063076; Wed, 30 May 2012 16:45:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UGjfwB063073; Wed, 30 May 2012 16:45:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201205301645.q4UGjfwB063073@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 30 May 2012 16:45: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: r236322 - head/sys/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: Wed, 30 May 2012 16:45:41 -0000 Author: kib Date: Wed May 30 16:45:41 2012 New Revision: 236322 URL: http://svn.freebsd.org/changeset/base/236322 Log: Enable vn_io_fault() lock avoidance for UFS. Tested by: pho MFC after: 2 months Modified: head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ffs/ffs_vnops.c Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Wed May 30 16:42:08 2012 (r236321) +++ head/sys/ufs/ffs/ffs_vfsops.c Wed May 30 16:45:41 2012 (r236322) @@ -1064,7 +1064,7 @@ ffs_mountfs(devvp, mp, td) */ MNT_ILOCK(mp); mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED | - MNTK_EXTENDED_SHARED; + MNTK_EXTENDED_SHARED | MNTK_NO_IOPF; MNT_IUNLOCK(mp); #ifdef UFS_EXTATTR #ifdef UFS_EXTATTR_AUTOSTART Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Wed May 30 16:42:08 2012 (r236321) +++ head/sys/ufs/ffs/ffs_vnops.c Wed May 30 16:45:41 2012 (r236322) @@ -567,7 +567,7 @@ ffs_read(ap) xfersize = size; } - error = uiomove((char *)bp->b_data + blkoffset, + error = vn_io_fault_uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio); if (error) break; @@ -738,8 +738,8 @@ ffs_write(ap) if (size < xfersize) xfersize = size; - error = - uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio); + error = vn_io_fault_uiomove((char *)bp->b_data + blkoffset, + (int)xfersize, uio); /* * If the buffer is not already filled and we encounter an * error while trying to fill it, we have to clear out any From owner-svn-src-head@FreeBSD.ORG Wed May 30 17:07:50 2012 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 C3938106566B; Wed, 30 May 2012 17:07:50 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFC198FC17; Wed, 30 May 2012 17:07:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UH7owH063980; Wed, 30 May 2012 17:07:50 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UH7osI063978; Wed, 30 May 2012 17:07:50 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201205301707.q4UH7osI063978@svn.freebsd.org> From: Sean Bruno Date: Wed, 30 May 2012 17:07: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: r236323 - head/sys/dev/mfi 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, 30 May 2012 17:07:50 -0000 Author: sbruno Date: Wed May 30 17:07:50 2012 New Revision: 236323 URL: http://svn.freebsd.org/changeset/base/236323 Log: Cosmetic nit. If a configured volume has no label, don't emit an empty string for the name during probe. Simply indicate that it has no label. Submitted by: bhaga@ MFC after: 3 days Modified: head/sys/dev/mfi/mfi_disk.c Modified: head/sys/dev/mfi/mfi_disk.c ============================================================================== --- head/sys/dev/mfi/mfi_disk.c Wed May 30 16:45:41 2012 (r236322) +++ head/sys/dev/mfi/mfi_disk.c Wed May 30 17:07:50 2012 (r236323) @@ -130,10 +130,17 @@ mfi_disk_attach(device_t dev) state = "unknown"; break; } - device_printf(dev, "%juMB (%ju sectors) RAID volume '%s' is %s\n", - sectors / (1024 * 1024 / secsize), sectors, - ld_info->ld_config.properties.name, - state); + + if ( strlen(ld_info->ld_config.properties.name) == 0 ) { + device_printf(dev, + "%juMB (%ju sectors) RAID volume (no label) is %s\n", + sectors / (1024 * 1024 / secsize), sectors, state); + } else { + device_printf(dev, + "%juMB (%ju sectors) RAID volume '%s' is %s\n", + sectors / (1024 * 1024 / secsize), sectors, + ld_info->ld_config.properties.name, state); + } sc->ld_disk = disk_alloc(); sc->ld_disk->d_drv1 = sc; From owner-svn-src-head@FreeBSD.ORG Wed May 30 17:34:40 2012 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 D8BD91065675; Wed, 30 May 2012 17:34:40 +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 C0BAA8FC08; Wed, 30 May 2012 17:34:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UHYeo9065122; Wed, 30 May 2012 17:34:40 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UHYeWP065116; Wed, 30 May 2012 17:34:40 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201205301734.q4UHYeWP065116@svn.freebsd.org> From: Rafal Jaworowski Date: Wed, 30 May 2012 17:34: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: r236324 - in head/sys: conf powerpc/booke 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: Wed, 30 May 2012 17:34:40 -0000 Author: raj Date: Wed May 30 17:34:40 2012 New Revision: 236324 URL: http://svn.freebsd.org/changeset/base/236324 Log: Extract vendor specific Book-E pieces into separate files and have a common skeleton (maybe we should kobj-tize this one day). Note the PPC4xx bit is not connected to the build yet. Obtained from: AppliedMicro, Semihalf. Added: head/sys/powerpc/booke/machdep_e500.c (contents, props changed) head/sys/powerpc/booke/machdep_ppc4xx.c (contents, props changed) head/sys/powerpc/include/machdep.h (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/booke/machdep.c Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Wed May 30 17:07:50 2012 (r236323) +++ head/sys/conf/files.powerpc Wed May 30 17:34:40 2012 (r236324) @@ -102,6 +102,7 @@ powerpc/booke/copyinout.c optional booke powerpc/booke/interrupt.c optional booke powerpc/booke/locore.S optional booke no-obj powerpc/booke/machdep.c optional booke +powerpc/booke/machdep_e500.c optional booke_e500 powerpc/booke/mp_cpudep.c optional booke smp powerpc/booke/platform_bare.c optional mpc85xx powerpc/booke/pmap.c optional booke Modified: head/sys/powerpc/booke/machdep.c ============================================================================== --- head/sys/powerpc/booke/machdep.c Wed May 30 17:07:50 2012 (r236323) +++ head/sys/powerpc/booke/machdep.c Wed May 30 17:34:40 2012 (r236324) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2006 Semihalf, Marian Balakowicz + * Copyright (C) 2006-2012 Semihalf * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -129,6 +129,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -138,8 +139,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #ifdef DDB extern vm_offset_t ksym_start, ksym_end; #endif @@ -158,11 +157,6 @@ extern unsigned char __sbss_start[]; extern unsigned char __sbss_end[]; extern unsigned char _end[]; -extern void dcache_enable(void); -extern void dcache_inval(void); -extern void icache_enable(void); -extern void icache_inval(void); - /* * Bootinfo is passed to us by legacy loaders. Save the address of the * structure to handle backward compatibility. @@ -286,7 +280,6 @@ booke_init(uint32_t arg1, uint32_t arg2) struct pcpu *pc; void *kmdp, *mdp; vm_offset_t dtbp, end; - uint32_t csr; kmdp = NULL; @@ -359,9 +352,9 @@ booke_init(uint32_t arg1, uint32_t arg2) while (1); OF_interpret("perform-fixup", 0); - - /* Initialize TLB1 handling */ - tlb1_init(fdt_immr_pa); + + /* Set up TLB initially */ + booke_init_tlb(fdt_immr_pa); /* Reset Time Base */ mttb(0); @@ -396,10 +389,6 @@ booke_init(uint32_t arg1, uint32_t arg2) debugf(" HID0 = 0x%08x\n", mfspr(SPR_HID0)); debugf(" HID1 = 0x%08x\n", mfspr(SPR_HID1)); debugf(" BUCSR = 0x%08x\n", mfspr(SPR_BUCSR)); - - __asm __volatile("msync; isync"); - csr = ccsr_read4(OCP85XX_L2CTL); - debugf(" L2CTL = 0x%08x\n", csr); #endif debugf(" dtbp = 0x%08x\n", (uint32_t)dtbp); @@ -447,29 +436,8 @@ booke_init(uint32_t arg1, uint32_t arg2) mtmsr(mfmsr() | PSL_ME); isync(); - /* Enable D-cache if applicable */ - csr = mfspr(SPR_L1CSR0); - if ((csr & L1CSR0_DCE) == 0) { - dcache_inval(); - dcache_enable(); - } - - csr = mfspr(SPR_L1CSR0); - if ((boothowto & RB_VERBOSE) != 0 || (csr & L1CSR0_DCE) == 0) - printf("L1 D-cache %sabled\n", - (csr & L1CSR0_DCE) ? "en" : "dis"); - - /* Enable L1 I-cache if applicable. */ - csr = mfspr(SPR_L1CSR1); - if ((csr & L1CSR1_ICE) == 0) { - icache_inval(); - icache_enable(); - } - - csr = mfspr(SPR_L1CSR1); - if ((boothowto & RB_VERBOSE) != 0 || (csr & L1CSR1_ICE) == 0) - printf("L1 I-cache %sabled\n", - (csr & L1CSR1_ICE) ? "en" : "dis"); + /* Enable L1 caches */ + booke_enable_l1_cache(); debugf("%s: SP = 0x%08x\n", __func__, ((uintptr_t)thread0.td_pcb - 16) & ~15); Added: head/sys/powerpc/booke/machdep_e500.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/booke/machdep_e500.c Wed May 30 17:34:40 2012 (r236324) @@ -0,0 +1,158 @@ +/*- + * Copyright (c) 2011-2012 Semihalf. + * 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$"); + +#include +#include + +#include + +#include + +#include + +extern void dcache_enable(void); +extern void dcache_inval(void); +extern void icache_enable(void); +extern void icache_inval(void); +extern void l2cache_enable(void); +extern void l2cache_inval(void); + +void +booke_init_tlb(vm_paddr_t fdt_immr_pa) +{ + + /* Initialize TLB1 handling */ + tlb1_init(fdt_immr_pa); +} + +void +booke_enable_l1_cache(void) +{ + uint32_t csr; + + /* Enable D-cache if applicable */ + csr = mfspr(SPR_L1CSR0); + if ((csr & L1CSR0_DCE) == 0) { + dcache_inval(); + dcache_enable(); + } + + csr = mfspr(SPR_L1CSR0); + if ((boothowto & RB_VERBOSE) != 0 || (csr & L1CSR0_DCE) == 0) + printf("L1 D-cache %sabled\n", + (csr & L1CSR0_DCE) ? "en" : "dis"); + + /* Enable L1 I-cache if applicable. */ + csr = mfspr(SPR_L1CSR1); + if ((csr & L1CSR1_ICE) == 0) { + icache_inval(); + icache_enable(); + } + + csr = mfspr(SPR_L1CSR1); + if ((boothowto & RB_VERBOSE) != 0 || (csr & L1CSR1_ICE) == 0) + printf("L1 I-cache %sabled\n", + (csr & L1CSR1_ICE) ? "en" : "dis"); +} + +#if 0 +void +booke_enable_l2_cache(void) +{ + uint32_t csr; + + /* Enable L2 cache on E500mc */ + if ((((mfpvr() >> 16) & 0xFFFF) == FSL_E500mc) || + (((mfpvr() >> 16) & 0xFFFF) == FSL_E5500)) { + csr = mfspr(SPR_L2CSR0); + if ((csr & L2CSR0_L2E) == 0) { + l2cache_inval(); + l2cache_enable(); + } + + csr = mfspr(SPR_L2CSR0); + if ((boothowto & RB_VERBOSE) != 0 || (csr & L2CSR0_L2E) == 0) + printf("L2 cache %sabled\n", + (csr & L2CSR0_L2E) ? "en" : "dis"); + } +} + +void +booke_enable_l3_cache(void) +{ + uint32_t csr, size, ver; + + /* Enable L3 CoreNet Platform Cache (CPC) */ + ver = SVR_VER(mfspr(SPR_SVR)); + if (ver == SVR_P2041 || ver == SVR_P2041E || ver == SVR_P3041 || + ver == SVR_P3041E || ver == SVR_P5020 || ver == SVR_P5020E) { + csr = ccsr_read4(OCP85XX_CPC_CSR0); + if ((csr & OCP85XX_CPC_CSR0_CE) == 0) { + l3cache_inval(); + l3cache_enable(); + } + + csr = ccsr_read4(OCP85XX_CPC_CSR0); + if ((boothowto & RB_VERBOSE) != 0 || + (csr & OCP85XX_CPC_CSR0_CE) == 0) { + size = OCP85XX_CPC_CFG0_SZ_K(ccsr_read4(OCP85XX_CPC_CFG0)); + printf("L3 Corenet Platform Cache: %d KB %sabled\n", + size, (csr & OCP85XX_CPC_CSR0_CE) == 0 ? + "dis" : "en"); + } + } +} + +void +booke_disable_l2_cache(void) +{ +} + +static void +l3cache_inval(void) +{ + + /* Flash invalidate the CPC and clear all the locks */ + ccsr_write4(OCP85XX_CPC_CSR0, OCP85XX_CPC_CSR0_FI | + OCP85XX_CPC_CSR0_LFC); + while (ccsr_read4(OCP85XX_CPC_CSR0) & (OCP85XX_CPC_CSR0_FI | + OCP85XX_CPC_CSR0_LFC)) + ; +} + +static void +l3cache_enable(void) +{ + + ccsr_write4(OCP85XX_CPC_CSR0, OCP85XX_CPC_CSR0_CE | + OCP85XX_CPC_CSR0_PE); + /* Read back to sync write */ + ccsr_read4(OCP85XX_CPC_CSR0); +} +#endif Added: head/sys/powerpc/booke/machdep_ppc4xx.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/booke/machdep_ppc4xx.c Wed May 30 17:34:40 2012 (r236324) @@ -0,0 +1,219 @@ +/*- + * Copyright (c) 2011-2012 Semihalf. + * 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$"); + +#include +#include + +#include + +#include +#include + +#include + +#define OCP_ADDR_WORDLO(addr) ((uint32_t)((uint64_t)(addr) & 0xFFFFFFFF)) +#define OCP_ADDR_WORDHI(addr) ((uint32_t)((uint64_t)(addr) >> 32)) + +extern void tlb_write(u_int, uint32_t, uint32_t, uint32_t, tlbtid_t, uint32_t, + uint32_t); +extern void tlb_read(u_int, uint32_t *, uint32_t *, uint32_t *, uint32_t *, + uint32_t *, uint32_t *); + +unsigned int tlb_static_entries; +unsigned int tlb_current_entry = TLB_SIZE; +unsigned int tlb_misses = 0; +unsigned int tlb_invals = 0; + +void tlb_map(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t); +void tlb_map_mem(uint32_t, uint32_t, uint32_t); +void tlb_dump(void); + +void +booke_init_tlb(vm_paddr_t fdt_immr_pa) +{ + + /* Map register space */ + tlb_map(APM86XXX_DEEP_SLEEP_VA, + OCP_ADDR_WORDLO(APM86XXX_DEEP_SLEEP_PA), + OCP_ADDR_WORDHI(APM86XXX_DEEP_SLEEP_PA), TLB_VALID | TLB_SIZE_16M, + TLB_SW | TLB_SR | TLB_I | TLB_G); + + tlb_map(APM86XXX_CSR_VA, OCP_ADDR_WORDLO(APM86XXX_CSR_PA), + OCP_ADDR_WORDHI(APM86XXX_CSR_PA), TLB_VALID | TLB_SIZE_16M, + TLB_SW | TLB_SR | TLB_I | TLB_G); + + tlb_map(APM86XXX_PRIMARY_FABRIC_VA, + OCP_ADDR_WORDLO(APM86XXX_PRIMARY_FABRIC_PA), + OCP_ADDR_WORDHI(APM86XXX_PRIMARY_FABRIC_PA), + TLB_VALID | TLB_SIZE_16M, + TLB_SW | TLB_SR | TLB_I | TLB_G); + + tlb_map(APM86XXX_AHB_VA, OCP_ADDR_WORDLO(APM86XXX_AHB_PA), + OCP_ADDR_WORDHI(APM86XXX_AHB_PA), + TLB_VALID | TLB_SIZE_16M, + TLB_SW | TLB_SR | TLB_I | TLB_G); + + /* Map MailBox space */ + tlb_map(APM86XXX_MBOX_VA, OCP_ADDR_WORDLO(APM86XXX_MBOX_PA), + OCP_ADDR_WORDHI(APM86XXX_MBOX_PA), + TLB_VALID | TLB_SIZE_4K, + TLB_UX | TLB_UW | TLB_UR | + TLB_SX | TLB_SW | TLB_SR | + TLB_I | TLB_G); + + tlb_map(APM86XXX_MBOX_VA + 0x1000, + OCP_ADDR_WORDLO(APM86XXX_MBOX_PA) + 0x1000, + OCP_ADDR_WORDHI(APM86XXX_MBOX_PA), + TLB_VALID | TLB_SIZE_4K, + TLB_UX | TLB_UW | TLB_UR | + TLB_SX | TLB_SW | TLB_SR | + TLB_I | TLB_G); + + tlb_map(APM86XXX_MBOX_VA + 0x2000, + OCP_ADDR_WORDLO(APM86XXX_MBOX_PA)+ 0x2000, + OCP_ADDR_WORDHI(APM86XXX_MBOX_PA), + TLB_VALID | TLB_SIZE_4K, + TLB_UX | TLB_UW | TLB_UR | + TLB_SX | TLB_SW | TLB_SR | + TLB_I | TLB_G); +} + +void +booke_enable_l1_cache(void) +{ +} + +void +booke_enable_l2_cache(void) +{ +} + +void +booke_enable_l3_cache(void) +{ +} + +void +booke_disable_l2_cache(void) +{ + uint32_t ccr1,l2cr0; + + /* Disable L2 cache op broadcast */ + ccr1 = mfspr(SPR_CCR1); + ccr1 &= ~CCR1_L2COBE; + mtspr(SPR_CCR1, ccr1); + + /* Set L2 array size to 0 i.e. disable L2 cache */ + mtdcr(DCR_L2DCDCRAI, DCR_L2CR0); + l2cr0 = mfdcr(DCR_L2DCDCRDI); + l2cr0 &= ~L2CR0_AS; + mtdcr(DCR_L2DCDCRDI, l2cr0); +} + +void tlb_map(uint32_t epn, uint32_t rpn, uint32_t erpn, uint32_t flags, + uint32_t perms) +{ + + tlb_write(++tlb_static_entries, epn, rpn, erpn, 0, flags, perms); +} + +static void tlb_dump_entry(u_int entry) +{ + uint32_t epn, rpn, erpn, tid, flags, perms; + const char *size; + + tlb_read(entry, &epn, &rpn, &erpn, &tid, &flags, &perms); + + switch (flags & TLB_SIZE_MASK) { + case TLB_SIZE_1K: + size = " 1k"; + break; + case TLB_SIZE_4K: + size = " 4k"; + break; + case TLB_SIZE_16K: + size = " 16k"; + break; + case TLB_SIZE_256K: + size = "256k"; + break; + case TLB_SIZE_1M: + size = " 1M"; + break; + case TLB_SIZE_16M: + size = " 16M"; + break; + case TLB_SIZE_256M: + size = "256M"; + break; + case TLB_SIZE_1G: + size = " 1G"; + break; + default: + size = "????"; + break; + } + + + printf("TLB[%02u]: 0x%08X => " + "0x%01X_%08X %s %c %c %s %s %s %s %s " + "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c (%u)\n", + entry, epn, erpn, rpn, size, + (flags & TLB_TS) ? '1' : '0', + (flags & TLB_VALID) ? 'V' : '.', + (perms & TLB_WL1) ? "WL1" : "___", + (perms & TLB_IL1I) ? "IL1I" : "____", + (perms & TLB_IL1D) ? "IL1D" : "____", + (perms & TLB_IL2I) ? "IL2I" : "____", + (perms & TLB_IL2D) ? "IL2D" : "____", + (perms & TLB_U0) ? '1' : '.', + (perms & TLB_U1) ? '2' : '.', + (perms & TLB_U2) ? '3' : '.', + (perms & TLB_U3) ? '4' : '.', + (perms & TLB_W) ? 'W' : '.', + (perms & TLB_I) ? 'I' : '.', + (perms & TLB_M) ? 'M' : '.', + (perms & TLB_G) ? 'G' : '.', + (perms & TLB_E) ? 'E' : '.', + (perms & TLB_UX) ? 'x' : '.', + (perms & TLB_UW) ? 'w' : '.', + (perms & TLB_UR) ? 'r' : '.', + (perms & TLB_SX) ? 'X' : '.', + (perms & TLB_SW) ? 'W' : '.', + (perms & TLB_SR) ? 'R' : '.', + tid); +} + +void tlb_dump(void) +{ + int i; + + for (i = 0; i < TLB_SIZE; i++) + tlb_dump_entry(i); +} Added: head/sys/powerpc/include/machdep.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/include/machdep.h Wed May 30 17:34:40 2012 (r236324) @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2011-2012 Semihalf + * 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 _POWERPC_MACHDEP_H_ +#define _POWERPC_MACHDEP_H_ + +void booke_disable_l2_cache(void); +void booke_enable_l1_cache(void); +void booke_enable_l2_cache(void); +void booke_enable_l3_cache(void); +void booke_enable_bpred(void); +void booke_init_tlb(vm_paddr_t); + +#endif /* _POWERPC_MACHDEP_H_ */ From owner-svn-src-head@FreeBSD.ORG Wed May 30 18:05:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 225741065673; Wed, 30 May 2012 18:05:49 +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 0DA128FC17; Wed, 30 May 2012 18:05:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UI5mPb066490; Wed, 30 May 2012 18:05:48 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UI5mTg066488; Wed, 30 May 2012 18:05:48 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201205301805.q4UI5mTg066488@svn.freebsd.org> From: Rafal Jaworowski Date: Wed, 30 May 2012 18: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: r236325 - head/sys/powerpc/booke 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, 30 May 2012 18:05:49 -0000 Author: raj Date: Wed May 30 18:05:48 2012 New Revision: 236325 URL: http://svn.freebsd.org/changeset/base/236325 Log: Panic openly if we cannot retrieve memory information from the device tree. This is a critical condition and can lead to all sorts of misterious hangs if not handled. Obtained from: Semihalf Also reported by: thompsa Modified: head/sys/powerpc/booke/platform_bare.c Modified: head/sys/powerpc/booke/platform_bare.c ============================================================================== --- head/sys/powerpc/booke/platform_bare.c Wed May 30 17:34:40 2012 (r236324) +++ head/sys/powerpc/booke/platform_bare.c Wed May 30 18:05:48 2012 (r236325) @@ -76,7 +76,7 @@ static int bare_smp_start_cpu(platform_t static void booke_reset(platform_t); static platform_method_t bare_methods[] = { - PLATFORMMETHOD(platform_probe, bare_probe), + PLATFORMMETHOD(platform_probe, bare_probe), PLATFORMMETHOD(platform_mem_regions, bare_mem_regions), PLATFORMMETHOD(platform_timebase_freq, bare_timebase_freq), @@ -143,9 +143,9 @@ bare_mem_regions(platform_t plat, struct int i, rv; rv = fdt_get_mem_regions(avail_regions, availsz, &memsize); - if (rv != 0) - return; + panic("%s: could not retrieve mem regions from the 'memory' " + "node, error: %d", __func__, rv); for (i = 0; i < *availsz; i++) { if (avail_regions[i].mr_start < 1048576) { From owner-svn-src-head@FreeBSD.ORG Wed May 30 20:02:40 2012 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 3C5071065674; Wed, 30 May 2012 20:02:40 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 276B68FC1B; Wed, 30 May 2012 20:02:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UK2eE4071805; Wed, 30 May 2012 20:02:40 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UK2d5T071803; Wed, 30 May 2012 20:02:39 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <201205302002.q4UK2d5T071803@svn.freebsd.org> From: Maksim Yevmenkin Date: Wed, 30 May 2012 20:02: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: r236327 - head/sys/netinet6 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, 30 May 2012 20:02:40 -0000 Author: emax Date: Wed May 30 20:02:39 2012 New Revision: 236327 URL: http://svn.freebsd.org/changeset/base/236327 Log: When we return deprecated addresses, we need to reference them. Reviewed by: bz, scottl MFC after: 3 days Modified: head/sys/netinet6/in6.c Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Wed May 30 19:21:54 2012 (r236326) +++ head/sys/netinet6/in6.c Wed May 30 20:02:39 2012 (r236327) @@ -2265,14 +2265,20 @@ in6_ifawithifp(struct ifnet *ifp, struct IF_ADDR_RUNLOCK(ifp); return (struct in6_ifaddr *)ifa; } - IF_ADDR_RUNLOCK(ifp); /* use the last-resort values, that are, deprecated addresses */ - if (dep[0]) + if (dep[0]) { + ifa_ref((struct ifaddr *)dep[0]); + IF_ADDR_RUNLOCK(ifp); return dep[0]; - if (dep[1]) + } + if (dep[1]) { + ifa_ref((struct ifaddr *)dep[1]); + IF_ADDR_RUNLOCK(ifp); return dep[1]; + } + IF_ADDR_RUNLOCK(ifp); return NULL; } From owner-svn-src-head@FreeBSD.ORG Wed May 30 20:04:09 2012 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 18C9A1065672; Wed, 30 May 2012 20:04:08 +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 C5A9A8FC1F; Wed, 30 May 2012 20:04:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UK486D071911; Wed, 30 May 2012 20:04:08 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UK48lw071908; Wed, 30 May 2012 20:04:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201205302004.q4UK48lw071908@svn.freebsd.org> From: Marius Strobl Date: Wed, 30 May 2012 20:04: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: r236328 - 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, 30 May 2012 20:04:09 -0000 Author: marius Date: Wed May 30 20:04:07 2012 New Revision: 236328 URL: http://svn.freebsd.org/changeset/base/236328 Log: Try to finally get the point in time at which bge_add_sysctls() is called right; it needs to be called before bge_can_use_msi() but in turn requires bge_flags to be properly set. Submitted by: yongari MFC after: 3 days Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed May 30 20:02:39 2012 (r236327) +++ head/sys/dev/bge/if_bge.c Wed May 30 20:04:07 2012 (r236328) @@ -2368,7 +2368,6 @@ bge_dma_free(struct bge_softc *sc) if (sc->bge_cdata.bge_tx_mtag) bus_dma_tag_destroy(sc->bge_cdata.bge_tx_mtag); - /* Destroy standard RX ring. */ if (sc->bge_cdata.bge_rx_std_ring_map) bus_dmamap_unload(sc->bge_cdata.bge_rx_std_ring_tag, @@ -2869,8 +2868,6 @@ bge_attach(device_t dev) sc = device_get_softc(dev); sc->bge_dev = dev; - bge_add_sysctls(sc); - TASK_INIT(&sc->bge_intr_task, 0, bge_intr_task, sc); /* @@ -3016,6 +3013,9 @@ bge_attach(device_t dev) break; } + /* Add SYSCTLs, requires the chipset family to be set. */ + bge_add_sysctls(sc); + /* Set various PHY bug flags. */ if (sc->bge_chipid == BGE_CHIPID_BCM5701_A0 || sc->bge_chipid == BGE_CHIPID_BCM5701_B0) From owner-svn-src-head@FreeBSD.ORG Wed May 30 20:13:50 2012 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 1C2B1106566B; Wed, 30 May 2012 20:13:50 +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 070FE8FC19; Wed, 30 May 2012 20:13:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UKDnQh072648; Wed, 30 May 2012 20:13:49 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UKDnQY072646; Wed, 30 May 2012 20:13:49 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201205302013.q4UKDnQY072646@svn.freebsd.org> From: Marius Strobl Date: Wed, 30 May 2012 20:13: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: r236329 - head/contrib/gcc/config/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: Wed, 30 May 2012 20:13:50 -0000 Author: marius Date: Wed May 30 20:13:49 2012 New Revision: 236329 URL: http://svn.freebsd.org/changeset/base/236329 Log: Merge r236137 from x86: Enable GNU hash generation for dynamic ELF binaries. While at it, sync the order of options with x86 and pass along the verbose flag. Modified: head/contrib/gcc/config/sparc/freebsd.h Modified: head/contrib/gcc/config/sparc/freebsd.h ============================================================================== --- head/contrib/gcc/config/sparc/freebsd.h Wed May 30 20:04:07 2012 (r236328) +++ head/contrib/gcc/config/sparc/freebsd.h Wed May 30 20:13:49 2012 (r236329) @@ -45,14 +45,16 @@ Boston, MA 02110-1301, USA. */ #define LINK_SPEC "%(link_arch) \ %{!mno-relax:%{!r:-relax}} \ %{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \ + %{v:-V} \ %{assert*} %{R*} %{rpath*} %{defsym*} \ %{shared:-Bshareable %{h*} %{soname*}} \ - %{symbolic:-Bsymbolic} \ %{!shared: \ %{!static: \ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ - %{static:-Bstatic}}" + %{static:-Bstatic}} \ + %{!static:--hash-style=both} \ + %{symbolic:-Bsymbolic}" /************************[ Target stuff ]***********************************/ From owner-svn-src-head@FreeBSD.ORG Wed May 30 20:44:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E3461065674; Wed, 30 May 2012 20:44:05 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 696EA8FC19; Wed, 30 May 2012 20:44:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UKi5Bi075124; Wed, 30 May 2012 20:44:05 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UKi5HJ075122; Wed, 30 May 2012 20:44:05 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205302044.q4UKi5HJ075122@svn.freebsd.org> From: Josh Paetzel Date: Wed, 30 May 2012 20:44: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: r236330 - head/usr.sbin/pc-sysinstall/backend 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, 30 May 2012 20:44:05 -0000 Author: jpaetzel Date: Wed May 30 20:44:04 2012 New Revision: 236330 URL: http://svn.freebsd.org/changeset/base/236330 Log: Fix French Canadian console keyboard layout Submitted by: kmoore Obtained from: PC-BSD MFC after: 3 days Sponsored by: iXsystems Modified: head/usr.sbin/pc-sysinstall/backend/functions-localize.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-localize.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-localize.sh Wed May 30 20:13:49 2012 (r236329) +++ head/usr.sbin/pc-sysinstall/backend/functions-localize.sh Wed May 30 20:44:04 2012 (r236330) @@ -168,6 +168,7 @@ localize_key_layout() # Set the keylayout in rc.conf case ${KEYLAYOUT} in am) KEYLAYOUT_CONSOLE="hy.armscii-8" ;; + ca) KEYLAYOUT_CONSOLE="fr_CA.acc.iso" ;; ch) KEYLAYOUT_CONSOLE="swissgerman.iso" ;; cz) KEYLAYOUT_CONSOLE="cz.iso2" ;; de) KEYLAYOUT_CONSOLE="german.iso" ;; From owner-svn-src-head@FreeBSD.ORG Wed May 30 20:49:29 2012 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 50A421065673; Wed, 30 May 2012 20:49:29 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B59E8FC0A; Wed, 30 May 2012 20:49:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UKnTH9075677; Wed, 30 May 2012 20:49:29 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UKnTVa075675; Wed, 30 May 2012 20:49:29 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205302049.q4UKnTVa075675@svn.freebsd.org> From: Josh Paetzel Date: Wed, 30 May 2012 20:49: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: r236331 - head/usr.sbin/pc-sysinstall/backend 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, 30 May 2012 20:49:29 -0000 Author: jpaetzel Date: Wed May 30 20:49:28 2012 New Revision: 236331 URL: http://svn.freebsd.org/changeset/base/236331 Log: Fix detecting available zpool names. Submitted by: kmoore Obtained from: PC-BSD MFC after: 3 days Sponsored by: iXsystems Modified: head/usr.sbin/pc-sysinstall/backend/functions.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions.sh Wed May 30 20:44:04 2012 (r236330) +++ head/usr.sbin/pc-sysinstall/backend/functions.sh Wed May 30 20:49:28 2012 (r236331) @@ -277,7 +277,7 @@ get_zpool_name() while : do NEWNAME="${BASENAME}${NUM}" - zpool import | grep -qw "${NEWNAME}" && break + zpool import | grep -qw "${NEWNAME}" || break NUM=$((NUM+1)) done From owner-svn-src-head@FreeBSD.ORG Wed May 30 20:56:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 55ABA106566C; Wed, 30 May 2012 20:56:08 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F21D8FC0A; Wed, 30 May 2012 20:56:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UKu8U3076323; Wed, 30 May 2012 20:56:08 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UKu74T076317; Wed, 30 May 2012 20:56:07 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205302056.q4UKu74T076317@svn.freebsd.org> From: Michael Tuexen Date: Wed, 30 May 2012 20:56: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: r236332 - in head/sys: net netinet netinet6 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, 30 May 2012 20:56:08 -0000 Author: tuexen Date: Wed May 30 20:56:07 2012 New Revision: 236332 URL: http://svn.freebsd.org/changeset/base/236332 Log: Seperate SCTP checksum offloading for IPv4 and IPv6. While there: remove some trainling whitespaces. MFC after: 3 days X-MFC with: 236170 Modified: head/sys/net/if_loop.c head/sys/netinet/sctp_output.c head/sys/netinet6/ip6_forward.c head/sys/netinet6/ip6_output.c head/sys/sys/mbuf.h Modified: head/sys/net/if_loop.c ============================================================================== --- head/sys/net/if_loop.c Wed May 30 20:49:28 2012 (r236331) +++ head/sys/net/if_loop.c Wed May 30 20:56:07 2012 (r236332) @@ -92,7 +92,7 @@ #endif #define LO_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP | CSUM_SCTP) -#define LO_CSUM_FEATURES6 (CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | CSUM_SCTP) +#define LO_CSUM_FEATURES6 (CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | CSUM_SCTP_IPV6) #define LO_CSUM_SET (CSUM_DATA_VALID | CSUM_DATA_VALID_IPV6 | \ CSUM_PSEUDO_HDR | \ CSUM_IP_CHECKED | CSUM_IP_VALID | \ Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Wed May 30 20:49:28 2012 (r236331) +++ head/sys/netinet/sctp_output.c Wed May 30 20:56:07 2012 (r236332) @@ -4478,7 +4478,7 @@ sctp_lowlevel_chunk_output(struct sctp_i #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_sendnocrc); #else - m->m_pkthdr.csum_flags = CSUM_SCTP; + m->m_pkthdr.csum_flags = CSUM_SCTP_IPV6; m->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); #endif @@ -11072,7 +11072,7 @@ sctp_send_shutdown_complete2(struct mbuf #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_sendnocrc); #else - mout->m_pkthdr.csum_flags = CSUM_SCTP; + mout->m_pkthdr.csum_flags = CSUM_SCTP_IPV6; mout->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); #endif @@ -12179,7 +12179,7 @@ sctp_send_abort(struct mbuf *m, int iphl #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_sendnocrc); #else - mout->m_pkthdr.csum_flags = CSUM_SCTP; + mout->m_pkthdr.csum_flags = CSUM_SCTP_IPV6; mout->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); #endif @@ -12443,7 +12443,7 @@ sctp_send_operr_to(struct mbuf *m, int i #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_sendnocrc); #else - mout->m_pkthdr.csum_flags = CSUM_SCTP; + mout->m_pkthdr.csum_flags = CSUM_SCTP_IPV6; mout->m_pkthdr.csum_data = 0; SCTP_STAT_INCR(sctps_sendhwcrc); #endif Modified: head/sys/netinet6/ip6_forward.c ============================================================================== --- head/sys/netinet6/ip6_forward.c Wed May 30 20:49:28 2012 (r236331) +++ head/sys/netinet6/ip6_forward.c Wed May 30 20:56:07 2012 (r236332) @@ -587,7 +587,7 @@ skip_routing: m->m_pkthdr.csum_data = 0xffff; } #ifdef SCTP - if (m->m_pkthdr.csum_flags & CSUM_SCTP) + if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID; #endif error = netisr_queue(NETISR_IPV6, m); @@ -607,9 +607,9 @@ skip_routing: m->m_pkthdr.csum_data = 0xffff; } #ifdef SCTP - if (m->m_pkthdr.csum_flags & CSUM_SCTP) - m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID; -#endif + if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) + m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID; +#endif error = netisr_queue(NETISR_IPV6, m); goto out; } Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Wed May 30 20:49:28 2012 (r236331) +++ head/sys/netinet6/ip6_output.c Wed May 30 20:56:07 2012 (r236332) @@ -508,7 +508,7 @@ skip_ipsec2:; #ifdef FLOWTABLE if (ro == &ip6route) { struct flentry *fle; - + /* * The flow table returns route entries valid for up to 30 * seconds; we rely on the remainder of ip_output() taking no @@ -521,7 +521,7 @@ skip_ipsec2:; flevalid = 1; } } -#endif +#endif again: /* * if specified, try to fill in the traffic class field. @@ -667,7 +667,7 @@ again: /* * The outgoing interface must be in the zone of source and - * destination addresses. + * destination addresses. */ origifp = ifp; @@ -693,7 +693,7 @@ again: goto badscope; } - /* We should use ia_ifp to support the case of + /* We should use ia_ifp to support the case of * sending packets to an address of our own. */ if (ia != NULL && ia->ia_ifp) @@ -891,7 +891,7 @@ again: m->m_pkthdr.csum_data = 0xffff; } #ifdef SCTP - if (m->m_pkthdr.csum_flags & CSUM_SCTP) + if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID; #endif error = netisr_queue(NETISR_IPV6, m); @@ -911,9 +911,9 @@ again: m->m_pkthdr.csum_data = 0xffff; } #ifdef SCTP - if (m->m_pkthdr.csum_flags & CSUM_SCTP) + if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID; -#endif +#endif error = netisr_queue(NETISR_IPV6, m); goto done; } @@ -965,8 +965,8 @@ passout: in6_delayed_cksum(m, plen, sizeof(struct ip6_hdr)); } #ifdef SCTP - if (sw_csum & CSUM_SCTP) { - sw_csum &= ~CSUM_SCTP; + if (sw_csum & CSUM_SCTP_IPV6) { + sw_csum &= ~CSUM_SCTP_IPV6; sctp_delayed_cksum(m, sizeof(struct ip6_hdr)); } #endif @@ -1081,9 +1081,9 @@ passout: m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; } #ifdef SCTP - if (m->m_pkthdr.csum_flags & CSUM_SCTP) { + if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) { sctp_delayed_cksum(m, hlen); - m->m_pkthdr.csum_flags &= ~CSUM_SCTP; + m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; } #endif mnext = &m->m_nextpkt; Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Wed May 30 20:49:28 2012 (r236331) +++ head/sys/sys/mbuf.h Wed May 30 20:56:07 2012 (r236332) @@ -115,7 +115,7 @@ struct pkthdr { /* variables for ip and tcp reassembly */ void *header; /* pointer to packet header */ int len; /* total packet length */ - uint32_t flowid; /* packet's 4-tuple system + uint32_t flowid; /* packet's 4-tuple system * flow identifier */ /* variables for hardware checksum */ @@ -283,7 +283,7 @@ struct mbuf { #define CSUM_FRAGMENT 0x0010 /* will do IP fragmentation */ #define CSUM_TSO 0x0020 /* will do TSO */ #define CSUM_SCTP 0x0040 /* will csum SCTP */ -/* CSUM_SCTP_IPV6 0x0080 will csum IPv6/SCTP */ +#define CSUM_SCTP_IPV6 0x0080 /* will csum IPv6/SCTP */ #define CSUM_IP_CHECKED 0x0100 /* did csum IP */ #define CSUM_IP_VALID 0x0200 /* ... the csum is valid */ @@ -427,7 +427,7 @@ static __inline int m_gettype(int size) { int type; - + switch (size) { case MSIZE: type = EXT_MBUF; @@ -457,7 +457,7 @@ static __inline uma_zone_t m_getzone(int size) { uma_zone_t zone; - + switch (size) { case MCLBYTES: zone = zone_clust; @@ -639,7 +639,7 @@ m_free_fast(struct mbuf *m) if (m->m_flags & M_PKTHDR) KASSERT(SLIST_EMPTY(&m->m_pkthdr.tags), ("doing fast free of mbuf with tags")); #endif - + uma_zfree_arg(zone_mbuf, m, (void *)MB_NOTAGS); } @@ -699,7 +699,7 @@ m_cljset(struct mbuf *m, void *cl, int t { uma_zone_t zone; int size; - + switch (type) { case EXT_CLUSTER: size = MCLBYTES; @@ -751,7 +751,7 @@ m_last(struct mbuf *m) extern void (*m_addr_chg_pf_p)(struct mbuf *m); -static __inline void +static __inline void m_addr_changed(struct mbuf *m) { @@ -1119,7 +1119,7 @@ m_tag_find(struct mbuf *m, int type, str #define M_SETFIB(_m, _fib) do { \ _m->m_flags &= ~M_FIB; \ _m->m_flags |= (((_fib) << M_FIBSHIFT) & M_FIB); \ -} while (0) +} while (0) #endif /* _KERNEL */ From owner-svn-src-head@FreeBSD.ORG Wed May 30 21:01:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C946106566B; Wed, 30 May 2012 21:01:07 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F07F58FC12; Wed, 30 May 2012 21:01:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UL16Tr076750; Wed, 30 May 2012 21:01:06 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UL16uF076744; Wed, 30 May 2012 21:01:06 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205302101.q4UL16uF076744@svn.freebsd.org> From: Josh Paetzel Date: Wed, 30 May 2012 21:01: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: r236333 - in head/usr.sbin/pkg_install: add 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: Wed, 30 May 2012 21:01:07 -0000 Author: jpaetzel Date: Wed May 30 21:01:06 2012 New Revision: 236333 URL: http://svn.freebsd.org/changeset/base/236333 Log: Let pkg_add use the ENV variable PACKAGESUFFIX. This can be used to override the default .tbz package extension to .txz .tgz or .tar Submitted by: kmoore Obtained from: PC-BSD Sponsored by: iXsystems MFC after: 3 days Modified: head/usr.sbin/pkg_install/add/main.c head/usr.sbin/pkg_install/add/perform.c head/usr.sbin/pkg_install/add/pkg_add.1 head/usr.sbin/pkg_install/lib/file.c head/usr.sbin/pkg_install/lib/url.c Modified: head/usr.sbin/pkg_install/add/main.c ============================================================================== --- head/usr.sbin/pkg_install/add/main.c Wed May 30 20:56:07 2012 (r236332) +++ head/usr.sbin/pkg_install/add/main.c Wed May 30 21:01:06 2012 (r236333) @@ -234,10 +234,17 @@ main(int argc, char **argv) remotepkg = temppackageroot; if (!((ptr = strrchr(remotepkg, '.')) && ptr[1] == 't' && (ptr[2] == 'b' || ptr[2] == 'g' || ptr[2] == 'x') && - ptr[3] == 'z' && !ptr[4])) - if (strlcat(remotepkg, ".tbz", - sizeof(temppackageroot)) >= sizeof(temppackageroot)) - errx(1, "package name too long"); + ptr[3] == 'z' && !ptr[4])) { + if (getenv("PACKAGESUFFIX")) { + if (strlcat(remotepkg, getenv("PACKAGESUFFIX"), + sizeof(temppackageroot)) >= sizeof(temppackageroot)) + errx(1, "package name too long"); + } else { + if (strlcat(remotepkg, ".tbz", + sizeof(temppackageroot)) >= sizeof(temppackageroot)) + errx(1, "package name too long"); + } + } } if (!strcmp(*argv, "-")) /* stdin? */ pkgs[ch] = (char *)"-"; Modified: head/usr.sbin/pkg_install/add/perform.c ============================================================================== --- head/usr.sbin/pkg_install/add/perform.c Wed May 30 20:56:07 2012 (r236332) +++ head/usr.sbin/pkg_install/add/perform.c Wed May 30 21:01:06 2012 (r236333) @@ -307,8 +307,12 @@ pkg_do(char *pkg) *sep = '\0'; strlcat(subpkg, "/All/", sizeof subpkg); strlcat(subpkg, p->name, sizeof subpkg); - if ((ext = strrchr(pkg, '.')) == NULL) - ext = ".tbz"; + if ((ext = strrchr(pkg, '.')) == NULL) { + if (getenv("PACKAGESUFFIX")) + ext = getenv("PACKAGESUFFIX"); + else + ext = ".tbz"; + } strlcat(subpkg, ext, sizeof subpkg); pkg_do(subpkg); } @@ -345,8 +349,13 @@ pkg_do(char *pkg) const char *ext; ext = strrchr(pkg_fullname, '.'); - if (ext == NULL) - ext = ".tbz"; + if (ext == NULL) { + if (getenv("PACKAGESUFFIX")) { + ext = getenv("PACKAGESUFFIX"); + } else { + ext = ".tbz"; + } + } snprintf(path, FILENAME_MAX, "%s/%s%s", getenv("_TOP"), p->name, ext); if (fexists(path)) cp = path; Modified: head/usr.sbin/pkg_install/add/pkg_add.1 ============================================================================== --- head/usr.sbin/pkg_install/add/pkg_add.1 Wed May 30 20:56:07 2012 (r236332) +++ head/usr.sbin/pkg_install/add/pkg_add.1 Wed May 30 21:01:06 2012 (r236333) @@ -553,6 +553,11 @@ The environment variable specifies an alternative location to save downloaded packages to when .Fl K option is used. +.Pp +The environment variable +.Ev PACKAGESUFFIX +specifies an alternative file extension to use when fetching remote +packages. Default is .tbz .Sh FILES .Bl -tag -width /var/db/pkg -compact .It Pa /var/tmp Modified: head/usr.sbin/pkg_install/lib/file.c ============================================================================== --- head/usr.sbin/pkg_install/lib/file.c Wed May 30 20:56:07 2012 (r236332) +++ head/usr.sbin/pkg_install/lib/file.c Wed May 30 21:01:06 2012 (r236333) @@ -140,7 +140,7 @@ fileFindByPath(const char *base, const c { static char tmp[FILENAME_MAX]; char *cp; - const char *suffixes[] = {".tbz", ".tgz", ".tar", NULL}; + const char *suffixes[] = {".tbz", ".tgz", ".tar", ".txz", NULL}; int i; if (fexists(fname) && isfile(fname)) { Modified: head/usr.sbin/pkg_install/lib/url.c ============================================================================== --- head/usr.sbin/pkg_install/lib/url.c Wed May 30 20:56:07 2012 (r236332) +++ head/usr.sbin/pkg_install/lib/url.c Wed May 30 21:01:06 2012 (r236333) @@ -73,7 +73,10 @@ fileGetURL(const char *base, const char *(cp + 1) = '\0'; strcat(cp, "All/"); strcat(cp, spec); - strcat(cp, ".tbz"); + if (getenv("PACKAGESUFFIX")) + strcat(cp, getenv("PACKAGESUFFIX")); + else + strcat(cp, ".tbz"); } else return NULL; @@ -85,7 +88,10 @@ fileGetURL(const char *base, const char */ strcpy(fname, hint); strcat(fname, spec); - strcat(fname, ".tbz"); + if (getenv("PACKAGESUFFIX")) + strcat(fname, getenv("PACKAGESUFFIX")); + else + strcat(fname, ".tbz"); } } else From owner-svn-src-head@FreeBSD.ORG Wed May 30 21:02:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDD4B1065673; Wed, 30 May 2012 21:02:12 +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 BF5CF8FC1B; Wed, 30 May 2012 21:02:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UL2CBt076868; Wed, 30 May 2012 21:02:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UL2CO8076866; Wed, 30 May 2012 21:02:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205302102.q4UL2CO8076866@svn.freebsd.org> From: John Baldwin Date: Wed, 30 May 2012 21:02: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: r236334 - 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, 30 May 2012 21:02:13 -0000 Author: jhb Date: Wed May 30 21:02:12 2012 New Revision: 236334 URL: http://svn.freebsd.org/changeset/base/236334 Log: - Witness doesn't verify the old MTX_NOSWITCH flag's correctness (that was obsoleted when critical sections were added). Instead, list a check that witness does perform. - Note that 'show locks' in DDB takes an optional thread argument. - Document 'show all locks'. - Remove the BUGS section, the bug in question was fixed 11 years ago in r76272. Modified: head/share/man/man4/witness.4 Modified: head/share/man/man4/witness.4 ============================================================================== --- head/share/man/man4/witness.4 Wed May 30 21:01:06 2012 (r236333) +++ head/share/man/man4/witness.4 Wed May 30 21:02:12 2012 (r236334) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 18, 2001 +.Dd May 30, 2012 .Dt WITNESS 4 .Os .Sh NAME @@ -52,11 +52,8 @@ violation occurs. The .Nm code also checks various other conditions such as verifying that one -does not recurse on a non-recursive lock. -For sleep locks, -.Nm -verifies that a new process would not be switched to when a lock is released -or a lock is blocked on during an acquire while any spin locks are held. +does not recurse on a non-recursive lock, +or attempt an upgrade on a shared lock held by another thread. If any of these checks fail, then the kernel will panic. .Pp The flag that controls whether or not the kernel debugger is entered when a @@ -97,7 +94,7 @@ specifies the level of witness involveme A value of 1 specifies that witness is enabled. A value of 0 specifies that witness is disabled, but that can be enabled again. This will maintain a small amount of overhead in the system. -A value of -1 specifies that witness is disabled permanently and that +A value of -1 specifies that witness is disabled permanently and cannot be enabled again. The sysctl .Va debug.witness.watch @@ -114,10 +111,22 @@ and .Xr ddb 4 are compiled into the kernel: .Bl -ohang -.It Ic show locks -Outputs the list of locks held by the current thread to the kernel console +.It Ic show locks Op thread +Outputs the list of locks held by a thread to the kernel console along with the filename and line number at which each lock was last acquired -by this thread. +by the thread. +The optional +.Ar thread +argument may be either a TID, +PID, +or pointer to a thread structure. +If +.Ar thread +is not specified, +then the locks held by the current thread are displayed. +.It Ic show all locks +Outputs the list of locks held by all threads in the system to the +kernel console. .It Ic show witness Dump the current order list to the kernel console. The code first displays the lock order tree for all of the sleep locks. @@ -136,9 +145,3 @@ code first appeared in .Bsx 5.0 and was imported from there into .Fx 5.0 . -.Sh BUGS -The -.Nm -code currently does not handle recursion of shared -.Xr sx 9 -locks properly. From owner-svn-src-head@FreeBSD.ORG Wed May 30 21:11:53 2012 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 372C4106566B; Wed, 30 May 2012 21:11:53 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 18D4F8FC19; Wed, 30 May 2012 21:11:53 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q4ULBqBo082129; Wed, 30 May 2012 21:11:52 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4ULBqdu082079; Wed, 30 May 2012 21:11:52 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Wed, 30 May 2012 23:11:48 +0200 From: Baptiste Daroussin To: Josh Paetzel Message-ID: <20120530211148.GA85232@ithaqua.etoilebsd.net> References: <201205302101.q4UL16uF076744@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline In-Reply-To: <201205302101.q4UL16uF076744@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r236333 - in head/usr.sbin/pkg_install: add 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: Wed, 30 May 2012 21:11:53 -0000 --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 30, 2012 at 09:01:06PM +0000, Josh Paetzel wrote: > Author: jpaetzel > Date: Wed May 30 21:01:06 2012 > New Revision: 236333 > URL: http://svn.freebsd.org/changeset/base/236333 >=20 > Log: > Let pkg_add use the ENV variable PACKAGESUFFIX. This > can be used to override the default .tbz package extension to > .txz .tgz or .tar > =20 > Submitted by: kmoore > Obtained from: PC-BSD > Sponsored by: iXsystems > MFC after: 3 days >=20 > Modified: > head/usr.sbin/pkg_install/add/main.c > head/usr.sbin/pkg_install/add/perform.c > head/usr.sbin/pkg_install/add/pkg_add.1 > head/usr.sbin/pkg_install/lib/file.c > head/usr.sbin/pkg_install/lib/url.c >=20 > Modified: head/usr.sbin/pkg_install/add/main.c > =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.sbin/pkg_install/add/main.c Wed May 30 20:56:07 2012 (r23633= 2) > +++ head/usr.sbin/pkg_install/add/main.c Wed May 30 21:01:06 2012 (r23633= 3) > @@ -234,10 +234,17 @@ main(int argc, char **argv) > remotepkg =3D temppackageroot; > if (!((ptr =3D strrchr(remotepkg, '.')) && ptr[1] =3D=3D 't' && > (ptr[2] =3D=3D 'b' || ptr[2] =3D=3D 'g' || ptr[2] =3D=3D 'x') && > - ptr[3] =3D=3D 'z' && !ptr[4])) > - if (strlcat(remotepkg, ".tbz", > - sizeof(temppackageroot)) >=3D sizeof(temppackageroot)) > - errx(1, "package name too long"); > + ptr[3] =3D=3D 'z' && !ptr[4])) { > + if (getenv("PACKAGESUFFIX")) { > + if (strlcat(remotepkg, getenv("PACKAGESUFFIX"), > + sizeof(temppackageroot)) >=3D sizeof(temppackageroot)) > + errx(1, "package name too long"); > + } else { > + if (strlcat(remotepkg, ".tbz", > + sizeof(temppackageroot)) >=3D sizeof(temppackageroot)) > + errx(1, "package name too long"); > + } > + } > } > if (!strcmp(*argv, "-")) /* stdin? */ > pkgs[ch] =3D (char *)"-"; >=20 > Modified: head/usr.sbin/pkg_install/add/perform.c > =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.sbin/pkg_install/add/perform.c Wed May 30 20:56:07 2012 (r23= 6332) > +++ head/usr.sbin/pkg_install/add/perform.c Wed May 30 21:01:06 2012 (r23= 6333) > @@ -307,8 +307,12 @@ pkg_do(char *pkg) > *sep =3D '\0'; > strlcat(subpkg, "/All/", sizeof subpkg); > strlcat(subpkg, p->name, sizeof subpkg); > - if ((ext =3D strrchr(pkg, '.')) =3D=3D NULL) > - ext =3D ".tbz"; > + if ((ext =3D strrchr(pkg, '.')) =3D=3D NULL) { > + if (getenv("PACKAGESUFFIX")) > + ext =3D getenv("PACKAGESUFFIX"); > + else > + ext =3D ".tbz"; > + } > strlcat(subpkg, ext, sizeof subpkg); > pkg_do(subpkg); > } > @@ -345,8 +349,13 @@ pkg_do(char *pkg) > const char *ext; > =20 > ext =3D strrchr(pkg_fullname, '.'); > - if (ext =3D=3D NULL) > - ext =3D ".tbz"; > + if (ext =3D=3D NULL) { > + if (getenv("PACKAGESUFFIX")) { > + ext =3D getenv("PACKAGESUFFIX"); > + } else { > + ext =3D ".tbz"; > + } > + } > snprintf(path, FILENAME_MAX, "%s/%s%s", getenv("_TOP"), p->name, e= xt); > if (fexists(path)) > cp =3D path; >=20 > Modified: head/usr.sbin/pkg_install/add/pkg_add.1 > =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.sbin/pkg_install/add/pkg_add.1 Wed May 30 20:56:07 2012 (r23= 6332) > +++ head/usr.sbin/pkg_install/add/pkg_add.1 Wed May 30 21:01:06 2012 (r23= 6333) > @@ -553,6 +553,11 @@ The environment variable > specifies an alternative location to save downloaded packages to when > .Fl K > option is used. > +.Pp > +The environment variable > +.Ev PACKAGESUFFIX > +specifies an alternative file extension to use when fetching remote > +packages. Default is .tbz > .Sh FILES > .Bl -tag -width /var/db/pkg -compact > .It Pa /var/tmp >=20 > Modified: head/usr.sbin/pkg_install/lib/file.c > =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.sbin/pkg_install/lib/file.c Wed May 30 20:56:07 2012 (r23633= 2) > +++ head/usr.sbin/pkg_install/lib/file.c Wed May 30 21:01:06 2012 (r23633= 3) > @@ -140,7 +140,7 @@ fileFindByPath(const char *base, const c > { > static char tmp[FILENAME_MAX]; > char *cp; > - const char *suffixes[] =3D {".tbz", ".tgz", ".tar", NULL}; > + const char *suffixes[] =3D {".tbz", ".tgz", ".tar", ".txz", NULL}; > int i; > =20 > if (fexists(fname) && isfile(fname)) { >=20 > Modified: head/usr.sbin/pkg_install/lib/url.c > =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.sbin/pkg_install/lib/url.c Wed May 30 20:56:07 2012 (r236332) > +++ head/usr.sbin/pkg_install/lib/url.c Wed May 30 21:01:06 2012 (r236333) > @@ -73,7 +73,10 @@ fileGetURL(const char *base, const char=20 > *(cp + 1) =3D '\0'; > strcat(cp, "All/"); > strcat(cp, spec); > - strcat(cp, ".tbz"); > + if (getenv("PACKAGESUFFIX")) > + strcat(cp, getenv("PACKAGESUFFIX")); > + else > + strcat(cp, ".tbz"); > } > else > return NULL; > @@ -85,7 +88,10 @@ fileGetURL(const char *base, const char=20 > */ > strcpy(fname, hint); > strcat(fname, spec); > - strcat(fname, ".tbz"); > + if (getenv("PACKAGESUFFIX")) > + strcat(fname, getenv("PACKAGESUFFIX")); > + else > + strcat(fname, ".tbz"); > } > } > else pkg_install is under maintainership of portmgr, while we appreciate to see people proposing new features and improving pkg_install, we could appreciate to be asked for reviews. regards, Bapt --AhhlLboLdkugWU4S Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/GjRQACgkQ8kTtMUmk6Ey9ewCggr5oXDM9xWWx/MCr7DC6WoPG AyoAoI42YcPEOfWeDnye8yC4/B1ZTrSe =xzvg -----END PGP SIGNATURE----- --AhhlLboLdkugWU4S-- From owner-svn-src-head@FreeBSD.ORG Wed May 30 21:28:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4D15D106566C; Wed, 30 May 2012 21:28:38 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37D558FC12; Wed, 30 May 2012 21:28:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4ULSccP079034; Wed, 30 May 2012 21:28:38 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4ULScKq079032; Wed, 30 May 2012 21:28:38 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201205302128.q4ULScKq079032@svn.freebsd.org> From: Josh Paetzel Date: Wed, 30 May 2012 21:28: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: r236336 - head/usr.sbin/pkg_install/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: Wed, 30 May 2012 21:28:38 -0000 Author: jpaetzel Date: Wed May 30 21:28:37 2012 New Revision: 236336 URL: http://svn.freebsd.org/changeset/base/236336 Log: Bump PKG_INSTALL_VERSION which should've been done in r236233 MFC after: 3 days Pointed out by: bapt Modified: head/usr.sbin/pkg_install/lib/lib.h Modified: head/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- head/usr.sbin/pkg_install/lib/lib.h Wed May 30 21:04:14 2012 (r236335) +++ head/usr.sbin/pkg_install/lib/lib.h Wed May 30 21:28:37 2012 (r236336) @@ -99,7 +99,7 @@ * Version of the package tools - increase whenever you make a change * in the code that is not cosmetic only. */ -#define PKG_INSTALL_VERSION 20100403 +#define PKG_INSTALL_VERSION 20120530 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) From owner-svn-src-head@FreeBSD.ORG Wed May 30 22:21:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 187F3106566C; Wed, 30 May 2012 22:21:26 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F32928FC1A; Wed, 30 May 2012 22:21:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UMLP54083473; Wed, 30 May 2012 22:21:25 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UMLPlw083444; Wed, 30 May 2012 22:21:25 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201205302221.q4UMLPlw083444@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 30 May 2012 22: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: r236337 - in head/kerberos5: lib/libgssapi_krb5 lib/libgssapi_ntlm lib/libgssapi_spnego lib/libhdb lib/libheimbase lib/libheimipcc lib/libheimipcs lib/libhx509 lib/libkadm5clnt lib/libk... 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, 30 May 2012 22:21:26 -0000 Author: obrien Date: Wed May 30 22:21:25 2012 New Revision: 236337 URL: http://svn.freebsd.org/changeset/base/236337 Log: * Remove headers from SRCS that are not generated (and are in /usr/src/crypto/heimdal/). * Avoid race conditions with 'make -j'. Modified: head/kerberos5/lib/libgssapi_krb5/Makefile head/kerberos5/lib/libgssapi_ntlm/Makefile head/kerberos5/lib/libgssapi_spnego/Makefile head/kerberos5/lib/libhdb/Makefile head/kerberos5/lib/libheimbase/Makefile head/kerberos5/lib/libheimipcc/Makefile head/kerberos5/lib/libheimipcs/Makefile head/kerberos5/lib/libhx509/Makefile head/kerberos5/lib/libkadm5clnt/Makefile head/kerberos5/lib/libkadm5srv/Makefile head/kerberos5/lib/libkafs5/Makefile head/kerberos5/lib/libkdc/Makefile head/kerberos5/lib/libkrb5/Makefile head/kerberos5/lib/libvers/Makefile head/kerberos5/libexec/hprop/Makefile head/kerberos5/libexec/kadmind/Makefile head/kerberos5/libexec/kcm/Makefile head/kerberos5/libexec/kdigest/Makefile head/kerberos5/libexec/kfd/Makefile head/kerberos5/tools/asn1_compile/Makefile head/kerberos5/usr.bin/hxtool/Makefile head/kerberos5/usr.bin/kadmin/Makefile head/kerberos5/usr.bin/kcc/Makefile head/kerberos5/usr.bin/kf/Makefile head/kerberos5/usr.bin/string2key/Makefile head/kerberos5/usr.sbin/iprop-log/Makefile head/kerberos5/usr.sbin/ktutil/Makefile Modified: head/kerberos5/lib/libgssapi_krb5/Makefile ============================================================================== --- head/kerberos5/lib/libgssapi_krb5/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/lib/libgssapi_krb5/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -38,8 +38,6 @@ SRCS= 8003.c \ get_mic.c \ gkrb5_err.c \ gkrb5_err.h \ - gsskrb5-private.h \ - gsskrb5_locl.h \ import_name.c \ import_sec_context.c \ indicate_mechs.c \ Modified: head/kerberos5/lib/libgssapi_ntlm/Makefile ============================================================================== --- head/kerberos5/lib/libgssapi_ntlm/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/lib/libgssapi_ntlm/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -21,8 +21,6 @@ SRCS= accept_sec_context.c \ export_name.c \ export_sec_context.c \ external.c \ - ntlm.h \ - ntlm-private.h \ import_name.c \ import_sec_context.c \ indicate_mechs.c \ Modified: head/kerberos5/lib/libgssapi_spnego/Makefile ============================================================================== --- head/kerberos5/lib/libgssapi_spnego/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/lib/libgssapi_spnego/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -13,9 +13,6 @@ SRCS= accept_sec_context.c \ external.c \ init_sec_context.c \ freebsd_compat.c \ - spnego-private.h \ - spnego_locl.h \ - spnego_asn1.h \ ${GEN:S/.x$/.c/:S/.hx$/.h/} \ gss_oid.c Modified: head/kerberos5/lib/libhdb/Makefile ============================================================================== --- head/kerberos5/lib/libhdb/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/lib/libhdb/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -48,8 +48,6 @@ SRCS= common.c \ hdb-sqlite.c \ hdb-keytab.c \ hdb-mitdb.c \ - hdb_locl.h \ - hdb-private.h \ keys.c \ keytab.c \ mkey.c \ Modified: head/kerberos5/lib/libheimbase/Makefile ============================================================================== --- head/kerberos5/lib/libheimbase/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/lib/libheimbase/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -9,12 +9,9 @@ INCS= heimbase.h SRCS= \ array.c \ - baselocl.h \ bool.c \ dict.c \ heimbase.c \ - heimbasepriv.h \ - heimqueue.h \ null.c \ number.c \ string.c Modified: head/kerberos5/lib/libheimipcc/Makefile ============================================================================== --- head/kerberos5/lib/libheimipcc/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/lib/libheimipcc/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -5,8 +5,7 @@ INTERNALLIB= LDADD= -lheimbase -lroken -lpthread DPADD= ${LIBHEIMBASE} ${LIBROKEN} ${LIBPTHREAD} -SRCS= hi_locl.h \ - heim_ipc_types.h \ +SRCS= \ client.c \ common.c Modified: head/kerberos5/lib/libheimipcs/Makefile ============================================================================== --- head/kerberos5/lib/libheimipcs/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/lib/libheimipcs/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -6,8 +6,7 @@ LDADD= -lheimbase -lroken LDFLAGS= -pthread DPADD= ${LIBHEIMBASE} ${LIBROKEN} -SRCS= hi_locl.h \ - heim_ipc_types.h \ +SRCS= \ server.c \ common.c Modified: head/kerberos5/lib/libhx509/Makefile ============================================================================== --- head/kerberos5/lib/libhx509/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/lib/libhx509/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -176,7 +176,6 @@ INCS= hx509-private.h \ SRCS= ca.c \ cert.c \ - char_map.h \ cms.c \ collector.c \ crypto.c \ @@ -184,12 +183,7 @@ SRCS= ca.c \ error.c \ env.c \ file.c \ - hx509-private.h \ - hx509-protos.h \ - hx509.h \ - hx_locl.h \ sel.c \ - sel.h \ sel-gram.y \ sel-lex.l \ keyset.c \ @@ -205,7 +199,6 @@ SRCS= ca.c \ peer.c \ print.c \ softp11.c \ - ref/pkcs11.h \ req.c \ revoke.c Modified: head/kerberos5/lib/libkadm5clnt/Makefile ============================================================================== --- head/kerberos5/lib/libkadm5clnt/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/lib/libkadm5clnt/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -26,17 +26,14 @@ SRCS= ad.c \ get_c.c \ get_princs_c.c \ init_c.c \ - kadm5_locl.h \ kadm5_err.c \ kadm5_err.h \ marshall.c \ modify_c.c \ - private.h \ privs_c.c \ randkey_c.c \ rename_c.c \ - send_recv.c \ - admin.h + send_recv.c CFLAGS+=-I${KRB5DIR}/lib/kadm5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken -I. Modified: head/kerberos5/lib/libkadm5srv/Makefile ============================================================================== --- head/kerberos5/lib/libkadm5srv/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/lib/libkadm5srv/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -8,8 +8,6 @@ VERSION_MAP= ${KRB5DIR}/lib/kadm5/versio MAN= kadm5_pwcheck.3 SRCS= acl.c \ - admin.h \ - admin.h \ bump_pw_expire.c \ chpass_s.c \ common_glue.c \ @@ -26,13 +24,11 @@ SRCS= acl.c \ init_s.c \ kadm5_err.c \ kadm5_err.h \ - kadm5_locl.h \ keys.c \ log.c \ marshall.c \ modify_s.c \ password_quality.c \ - private.h \ privs_s.c \ randkey_s.c \ rename_s.c \ Modified: head/kerberos5/lib/libkafs5/Makefile ============================================================================== --- head/kerberos5/lib/libkafs5/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/lib/libkafs5/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -26,10 +26,8 @@ MLINKS= kafs5.3 k_afs_cell_of_file.3 \ SRCS= afssys.c afskrb5.c common.c krb5_err.h SRCS= afssys.c \ afskrb5.c \ - common.c \ - kafs_locl.h \ - afssysdefs.h \ - roken_rename.h + common.c + CFLAGS+= -I${KRB5DIR}/lib/kafs \ -I${KRB5DIR}/lib/krb5 \ -I${.OBJDIR}/../libkrb5/ \ Modified: head/kerberos5/lib/libkdc/Makefile ============================================================================== --- head/kerberos5/lib/libkdc/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/lib/libkdc/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -14,12 +14,10 @@ KRB5INCS= windc_plugin.h KRB5INCSDIR= ${INCLUDEDIR}/krb5 INCSGROUPS= INCS KRB5INCS -SRCS= kdc-private.h \ - kdc-protos.h \ +SRCS= \ default_config.c \ set_dbinfo.c \ digest.c \ - kdc_locl.h\ kerberos5.c \ krb5tgs.c \ pkinit.c \ @@ -27,8 +25,7 @@ SRCS= kdc-private.h \ misc.c \ kx509.c \ process.c \ - windc.c \ - rx.h + windc.c CFLAGS+= -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/lib/krb5 \ Modified: head/kerberos5/lib/libkrb5/Makefile ============================================================================== --- head/kerberos5/lib/libkrb5/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/lib/libkrb5/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -531,7 +531,6 @@ SRCS= acache.c \ crypto-pk.c \ crypto-rand.c \ crypto.c \ - crypto.h \ data.c \ deprecated.c \ digest.c \ @@ -562,8 +561,6 @@ SRCS= acache.c \ keytab_file.c \ keytab_keyfile.c \ keytab_memory.c \ - krb5-v4compat.h \ - krb5_locl.h \ krbhst.c \ kuserok.c \ log.c \ Modified: head/kerberos5/lib/libvers/Makefile ============================================================================== --- head/kerberos5/lib/libvers/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/lib/libvers/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -5,7 +5,7 @@ INTERNALLIB= SRCS= print_version.c roken.h CFLAGS+=-I. -I${KRB5DIR}/lib/roken -CLEANFILES= roken.h print_version.h +CLEANFILES= roken.h MAKE_ROKEN= make-roken Modified: head/kerberos5/libexec/hprop/Makefile ============================================================================== --- head/kerberos5/libexec/hprop/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/libexec/hprop/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -2,7 +2,7 @@ PROG= hprop MAN= hprop.8 -SRCS= hprop.c mit_dump.c hprop.h +SRCS= hprop.c mit_dump.c CFLAGS+=-I${KRB5DIR}/lib/roken CFLAGS+=-I${KRB5DIR}/lib/krb5 CFLAGS+=-I${KRB5DIR}/lib/asn1 Modified: head/kerberos5/libexec/kadmind/Makefile ============================================================================== --- head/kerberos5/libexec/kadmind/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/libexec/kadmind/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -5,7 +5,6 @@ MAN= kadmind.8 SRCS= rpc.c \ server.c \ kadmind.c \ - kadmin_locl.h \ kadm_conn.c CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ Modified: head/kerberos5/libexec/kcm/Makefile ============================================================================== --- head/kerberos5/libexec/kcm/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/libexec/kcm/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -11,9 +11,6 @@ SRCS= acl.c \ connect.c \ events.c \ glue.c \ - headers.h \ - kcm_locl.h \ - kcm-protos.h \ log.c \ main.c \ protocol.c \ Modified: head/kerberos5/libexec/kdigest/Makefile ============================================================================== --- head/kerberos5/libexec/kdigest/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/libexec/kdigest/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -13,9 +13,13 @@ SRCS= kdigest.c \ kdigest-commands.c \ kdigest-commands.h -kdigest-commands.c kdigest-commands.h: kdigest-commands.in +kdigest-commands.h: kdigest-commands.in slc ${.ALLSRC:M*.in} +.for ext in c o +kdigest-commands.${ext}: kdigest-commands.h +.endfor + .include .PATH: ${KRB5DIR}/kuser Modified: head/kerberos5/libexec/kfd/Makefile ============================================================================== --- head/kerberos5/libexec/kfd/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/libexec/kfd/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -2,7 +2,6 @@ PROG= kfd MAN= kfd.8 -SRCS= kfd.c kf_locl.h CFLAGS+= -I${KRB5DIR}/lib/asn1 \ -I${KRB5DIR}/lib/roken DPADD= ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ Modified: head/kerberos5/tools/asn1_compile/Makefile ============================================================================== --- head/kerberos5/tools/asn1_compile/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/tools/asn1_compile/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -6,9 +6,8 @@ LIBROKEN_A= ${.OBJDIR}/../../lib/libroke LDADD= ${LIBROKEN_A} ${LIBVERS} DPADD= ${LIBROKEN_A} ${LIBVERS} -SRCS= asn1_queue.h \ +SRCS= \ asn1parse.y \ - der.h \ gen.c \ gen_copy.c \ gen_decode.c \ @@ -16,18 +15,13 @@ SRCS= asn1_queue.h \ gen_free.c \ gen_glue.c \ gen_length.c \ - gen_locl.h \ gen_seq.c \ gen_template.c \ hash.c \ - hash.h \ lex.l \ - lex.h \ main.c \ - asn1-template.h \ roken.h \ - symbol.c \ - symbol.h + symbol.c CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/asn1 -I. Modified: head/kerberos5/usr.bin/hxtool/Makefile ============================================================================== --- head/kerberos5/usr.bin/hxtool/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/usr.bin/hxtool/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -10,9 +10,13 @@ DPADD= ${LIBHX509} ${LIBROKEN} ${LIBASN1 LDADD= -lhx509 -lroken -lasn1 -lcrypto -lcrypt ${LIBSL} ${LIBVERS} -ledit SRCS= hxtool.c hxtool-commands.c hxtool-commands.h -hxtool-commands.c hxtool-commands.h: hxtool-commands.in +hxtool-commands.h: hxtool-commands.in slc ${.ALLSRC:M*.in} +.for ext in c o +hxtool-commands.${ext}: hxtool-commands.h +.endfor + .include .PATH: ${KRB5DIR}/lib/hx509 Modified: head/kerberos5/usr.bin/kadmin/Makefile ============================================================================== --- head/kerberos5/usr.bin/kadmin/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/usr.bin/kadmin/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -38,8 +38,12 @@ LDFLAGS=${LDAPLDFLAGS} .include -kadmin-commands.c kadmin-commands.h: ${KRB5DIR}/kadmin/kadmin-commands.in +kadmin-commands.h: ${KRB5DIR}/kadmin/kadmin-commands.in slc ${.ALLSRC:M*.in} +.for ext in o c +kadmin-commands.${ext}: kadmin-commands.h +.endfor + .PATH: ${KRB5DIR}/kadmin Modified: head/kerberos5/usr.bin/kcc/Makefile ============================================================================== --- head/kerberos5/usr.bin/kcc/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/usr.bin/kcc/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -19,9 +19,13 @@ SRCS= kcc.c \ kswitch.c \ copy_cred_cache.c -kcc-commands.c kcc-commands.h: kcc-commands.in +kcc-commands.h: kcc-commands.in slc ${.ALLSRC:M*.in} +.for ext in c o +kcc-commands.${ext}: kcc-commands.h +.endfor + .include .PATH: ${KRB5DIR}/kuser Modified: head/kerberos5/usr.bin/kf/Makefile ============================================================================== --- head/kerberos5/usr.bin/kf/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/usr.bin/kf/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -2,7 +2,6 @@ PROG= kf MAN= kf.1 -SRCS= kf.c kf_locl.h CFLAGS+= -I${KRB5DIR}/lib/asn1 \ -I${KRB5DIR}/lib/roken DPADD= ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ Modified: head/kerberos5/usr.bin/string2key/Makefile ============================================================================== --- head/kerberos5/usr.bin/string2key/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/usr.bin/string2key/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -10,7 +10,6 @@ CFLAGS+= -I${KRB5DIR}/kdc \ DPADD= ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ ${LIBCRYPT} ${LIBVERS} LDADD= -lhdb -lkrb5 -lroken -lasn1 -lcrypto -lcrypt ${LIBVERS} -SRCS= string2key.c headers.h .include Modified: head/kerberos5/usr.sbin/iprop-log/Makefile ============================================================================== --- head/kerberos5/usr.sbin/iprop-log/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/usr.sbin/iprop-log/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -13,9 +13,13 @@ DPADD= ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB LDADD= -lkadm5srv -lhdb -lkrb5 -lasn1 -lcrypto -lcrypt ${LIBSL} -lroken \ ${LIBVERS} -ledit -iprop-commands.c iprop-commands.h: iprop-commands.in +iprop-commands.h: iprop-commands.in slc ${.ALLSRC:M*.in} +.for ext in c o +iprop-commands.${ext}: iprop-commands.h +.endfor + .include .PATH: ${KRB5DIR}/lib/kadm5 Modified: head/kerberos5/usr.sbin/ktutil/Makefile ============================================================================== --- head/kerberos5/usr.sbin/ktutil/Makefile Wed May 30 21:28:37 2012 (r236336) +++ head/kerberos5/usr.sbin/ktutil/Makefile Wed May 30 22:21:25 2012 (r236337) @@ -9,7 +9,6 @@ SRCS= add.c \ destroy.c \ get.c \ ktutil.c \ - ktutil_locl.h \ ktutil-commands.c \ ktutil-commands.h \ list.c \ @@ -25,7 +24,11 @@ LDADD= -lkadm5clnt -lkrb5 ${LIBSL} -lrok .include -ktutil-commands.c ktutil-commands.h: ${KRB5DIR}/admin/ktutil-commands.in +ktutil-commands.h: ${KRB5DIR}/admin/ktutil-commands.in slc ${.ALLSRC:M*.in} +.for ext in c o +ktutil-commands.${ext}: ktutil-commands.h +.endfor + .PATH: ${KRB5DIR}/admin From owner-svn-src-head@FreeBSD.ORG Wed May 30 22:22:35 2012 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 19817106566C; Wed, 30 May 2012 22:22:35 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 96EBF8FC19; Wed, 30 May 2012 22:22:34 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 75F0F25D3A90; Wed, 30 May 2012 22:22:33 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 97F65BE8144; Wed, 30 May 2012 22:22:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id C1MWI-GYoesN; Wed, 30 May 2012 22:22:31 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 79E01BE8143; Wed, 30 May 2012 22:22:31 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201205301355.q4UDtij8055709@svn.freebsd.org> Date: Wed, 30 May 2012 22:22:30 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201205301355.q4UDtij8055709@svn.freebsd.org> To: Ulrich Spoerlein X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r236311 - in head/sys/modules: cxgb/cxgb ixgbe 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, 30 May 2012 22:22:35 -0000 On 30. May 2012, at 13:55 , Ulrich Spoerlein wrote: > Author: uqs > Date: Wed May 30 13:55:43 2012 > New Revision: 236311 > URL: http://svn.freebsd.org/changeset/base/236311 >=20 > Log: > Unbreak make depend. thanks >=20 > Modified: > head/sys/modules/cxgb/cxgb/Makefile > head/sys/modules/ixgbe/Makefile >=20 > Modified: head/sys/modules/cxgb/cxgb/Makefile > = =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/modules/cxgb/cxgb/Makefile Wed May 30 13:51:00 2012 = (r236310) > +++ head/sys/modules/cxgb/cxgb/Makefile Wed May 30 13:55:43 2012 = (r236311) > @@ -1,5 +1,7 @@ > # $FreeBSD$ >=20 > +.include > + > CXGB =3D ${.CURDIR}/../../../dev/cxgb > .PATH: ${CXGB} ${CXGB}/common ${CXGB}/sys >=20 >=20 > Modified: head/sys/modules/ixgbe/Makefile > = =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/modules/ixgbe/Makefile Wed May 30 13:51:00 2012 = (r236310) > +++ head/sys/modules/ixgbe/Makefile Wed May 30 13:55:43 2012 = (r236311) > @@ -1,5 +1,9 @@ > #$FreeBSD$ > + > +.include > + > .PATH: ${.CURDIR}/../../dev/ixgbe > + > KMOD =3D ixgbe > SRCS =3D device_if.h bus_if.h pci_if.h > SRCS +=3D opt_inet.h opt_inet6.h --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-head@FreeBSD.ORG Wed May 30 22:23:09 2012 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 7A36C10656E1; Wed, 30 May 2012 22:23:09 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AFCD8FC0C; Wed, 30 May 2012 22:23:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UMN9Ve083683; Wed, 30 May 2012 22:23:09 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UMN95p083678; Wed, 30 May 2012 22:23:09 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201205302223.q4UMN95p083678@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 30 May 2012 22:23: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: r236338 - 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: Wed, 30 May 2012 22:23:09 -0000 Author: obrien Date: Wed May 30 22:23:08 2012 New Revision: 236338 URL: http://svn.freebsd.org/changeset/base/236338 Log: Deprecate the FreeBSD make's ":U" (to-upper case) and ":L" (to-lower case) modifiers for ":tu" and ":tl" from OSF's ODE, which made its way into NetBSD's make, which is the source for the Portable Berkeley Make. Submitted by: Simon Gerraty Modified: head/usr.bin/make/Makefile head/usr.bin/make/make.1 head/usr.bin/make/var.c Modified: head/usr.bin/make/Makefile ============================================================================== --- head/usr.bin/make/Makefile Wed May 30 22:21:25 2012 (r236337) +++ head/usr.bin/make/Makefile Wed May 30 22:23:08 2012 (r236338) @@ -15,7 +15,7 @@ NO_SHARED?= YES .endif # Version has the RYYYYMMDDX format, where R is from RELENG_ -CFLAGS+=-DMAKE_VERSION=\"5201111300\" +CFLAGS+=-DMAKE_VERSION=\"10201120530\" # There is no obvious performance improvement currently. # CFLAGS+=-DUSE_KQUEUE Modified: head/usr.bin/make/make.1 ============================================================================== --- head/usr.bin/make/make.1 Wed May 30 22:21:25 2012 (r236337) +++ head/usr.bin/make/make.1 Wed May 30 22:23:08 2012 (r236338) @@ -902,6 +902,7 @@ Replaces each word in the variable with Replaces each word in the variable with everything but the last component. .It Cm :L Converts variable to lower-case letters. +(deprecated) .It Cm :M Ns Ar pattern Select only those words that match the rest of the modifier. The standard shell wildcard characters @@ -993,8 +994,13 @@ to be replaced in .Ar new_string . .It Cm :T Replaces each word in the variable with its last component. +.It Cm :tl +Converts variable to lower-case letters. +.It Cm :tu +Converts variable to upper-case letters. .It Cm :U Converts variable to upper-case letters. +(deprecated) .It Cm :u Remove adjacent duplicate words (like .Xr uniq 1 ) . @@ -1742,6 +1748,19 @@ is set to the same value as .Va .MAKE ; support for this may be removed in the future. .Pp +The use of the +.Cm :L +and +.Cm :U +modifiers are deprecated +in +.Fx 10.0 +and the more portable (among Pmake decedents) +.Cm :tl +and +.Cm :tu +should be used instead. +.Pp Most of the more esoteric features of .Nm should probably be avoided for greater compatibility. Modified: head/usr.bin/make/var.c ============================================================================== --- head/usr.bin/make/var.c Wed May 30 22:21:25 2012 (r236337) +++ head/usr.bin/make/var.c Wed May 30 22:23:08 2012 (r236338) @@ -1746,6 +1746,19 @@ ParseModifier(VarParser *vp, char startc case 'C': newStr = modifier_C(vp, value, v); break; + case 't': + /* :tl :tu for OSF ODE & NetBSD make compatibility */ + switch (vp->ptr[1]) { + case 'l': + vp->ptr++; + goto mod_lower; + break; + case 'u': + vp->ptr++; + goto mod_upper; + break; + } + /* FALLTHROUGH */ default: if (vp->ptr[1] != endc && vp->ptr[1] != ':') { #ifdef SUNSHCMD @@ -1774,6 +1787,7 @@ ParseModifier(VarParser *vp, char startc switch (vp->ptr[0]) { case 'L': + mod_lower: { const char *cp; Buffer *buf; @@ -1799,6 +1813,7 @@ ParseModifier(VarParser *vp, char startc vp->ptr++; break; case 'U': + mod_upper: { const char *cp; Buffer *buf; From owner-svn-src-head@FreeBSD.ORG Wed May 30 22:26:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4FFEC106572F; Wed, 30 May 2012 22:26:17 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3AD558FC08; Wed, 30 May 2012 22:26:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UMQH5d084024; Wed, 30 May 2012 22:26:17 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UMQHSY084023; Wed, 30 May 2012 22:26:17 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201205302226.q4UMQHSY084023@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 30 May 2012 22:26: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: r236339 - head/tools/regression/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: Wed, 30 May 2012 22:26:17 -0000 Author: obrien Date: Wed May 30 22:26:16 2012 New Revision: 236339 URL: http://svn.freebsd.org/changeset/base/236339 Log: make it easier to test newly-built make. Added: head/tools/regression/usr.bin/make/test-new.mk (contents, props changed) Modified: Directory Properties: head/tools/regression/usr.bin/make/all.sh (props changed) Added: head/tools/regression/usr.bin/make/test-new.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/test-new.mk Wed May 30 22:26:16 2012 (r236339) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +NEW_DIR!= make -C ${.CURDIR}/../../../../usr.bin/make -V .OBJDIR + +all: + rm -rf /tmp/${USER}.make.test + env MAKE_PROG=${NEW_DIR}/make ${.SHELL} ./all.sh + +.include From owner-svn-src-head@FreeBSD.ORG Wed May 30 22:27:34 2012 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 A0AA81065674; Wed, 30 May 2012 22:27:34 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B9198FC18; Wed, 30 May 2012 22:27:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UMRYBp084195; Wed, 30 May 2012 22:27:34 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UMRY9n084194; Wed, 30 May 2012 22:27:34 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201205302227.q4UMRY9n084194@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 30 May 2012 22:27: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: r236340 - head/tools/build/make_check 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, 30 May 2012 22:27:34 -0000 Author: obrien Date: Wed May 30 22:27:34 2012 New Revision: 236340 URL: http://svn.freebsd.org/changeset/base/236340 Log: make it easier to check newly-built make Added: head/tools/build/make_check/check.mk (contents, props changed) Added: head/tools/build/make_check/check.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/make_check/check.mk Wed May 30 22:27:34 2012 (r236340) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +all: + ${MK} ${MK_ARG} + +.if exists(${.OBJDIR}/../../../usr.bin/make/make) +MK= ${.OBJDIR}/../../../usr.bin/make/make +new: + ${MK} ${MK_ARG} 2>&1 | tee out-new + @echo "-=-=-=-=-=-" + make ${MK_ARG} 2>&1 | tee out-old + @echo "-=-=-=-=-=-" + diff -s out-old out-new +.else +MK= make +.endif +MK_ARG= -C ${.CURDIR} + +.include From owner-svn-src-head@FreeBSD.ORG Wed May 30 22:48:01 2012 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 B1893106564A; Wed, 30 May 2012 22:48:01 +0000 (UTC) (envelope-from jase@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C0198FC12; Wed, 30 May 2012 22:48:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UMm17o086092; Wed, 30 May 2012 22:48:01 GMT (envelope-from jase@svn.freebsd.org) Received: (from jase@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UMm1xL086090; Wed, 30 May 2012 22:48:01 GMT (envelope-from jase@svn.freebsd.org) Message-Id: <201205302248.q4UMm1xL086090@svn.freebsd.org> From: Jase Thew Date: Wed, 30 May 2012 22:48: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: r236343 - head/share/misc 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, 30 May 2012 22:48:01 -0000 Author: jase (ports committer) Date: Wed May 30 22:48:01 2012 New Revision: 236343 URL: http://svn.freebsd.org/changeset/base/236343 Log: Add myself and mentors relationship. Approved by: flo (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Wed May 30 22:31:45 2012 (r236342) +++ head/share/misc/committers-ports.dot Wed May 30 22:48:01 2012 (r236343) @@ -100,6 +100,7 @@ ijliao [label="Ying-Chieh Liao\nijliao@F itetcu [label="Ion-Mihai Tetcu\nitetcu@FreeBSD.org\n2006/06/07"] jacula [label="Giuseppe Pilichi\njacula@FreeBSD.org\n2010/04/05"] jadawin [label="Philippe Audeoud\njadawin@FreeBSD.org\n2008/03/02"] +jase [label="Jase Thew\njase@FreeBSD.org\n2012/05/30"] jgh [label="Jason Helfman\njgh@FreeBSD.org\n2011/12/16"] jkim [label="Jung-uk Kim\njkim@FreeBSD.org\n2007/09/12"] jlaffaye [label="Julien Laffaye\njlaffaye@FreeBSD.org\n2011/06/06"] @@ -246,6 +247,8 @@ clsung -> tabthorpe crees -> jgh crees -> madpilot +culot -> jase + decke -> sperber delphij -> nemoliu @@ -278,6 +281,8 @@ fjoe -> flo fjoe -> krion fjoe -> osa +flo -> jase + flz -> garga flz -> johans flz -> laszlof From owner-svn-src-head@FreeBSD.ORG Thu May 31 00:36:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24E941065672; Thu, 31 May 2012 00:36:57 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1033C8FC0A; Thu, 31 May 2012 00:36:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4V0auhx094938; Thu, 31 May 2012 00:36:56 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4V0auQh094934; Thu, 31 May 2012 00:36:56 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201205310036.q4V0auQh094934@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 31 May 2012 00:36:56 +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: r236346 - 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: Thu, 31 May 2012 00:36:57 -0000 Author: obrien Date: Thu May 31 00:36:56 2012 New Revision: 236346 URL: http://svn.freebsd.org/changeset/base/236346 Log: Add "-V '${VAR}'" variable expansion from Portable Berkeley Make. Submitted by: Simon Gerraty Modified: head/usr.bin/make/make.1 head/usr.bin/make/var.c Modified: head/usr.bin/make/make.1 ============================================================================== --- head/usr.bin/make/make.1 Wed May 30 23:42:48 2012 (r236345) +++ head/usr.bin/make/make.1 Thu May 31 00:36:56 2012 (r236346) @@ -320,6 +320,11 @@ Do not build any targets. Multiple instances of this option may be specified; the variables will be printed one per line, with a blank line for each null or undefined variable. +If +.Ar variable +contains a +.Sq Ic $ +then the value will be expanded before printing. .It Fl v Be extra verbose. Print any extra information. Modified: head/usr.bin/make/var.c ============================================================================== --- head/usr.bin/make/var.c Wed May 30 23:42:48 2012 (r236345) +++ head/usr.bin/make/var.c Thu May 31 00:36:56 2012 (r236346) @@ -2593,7 +2593,7 @@ void Var_Print(Lst *vlist, Boolean expandVars) { LstNode *n; - const char *name; + char *name; LST_FOREACH(n, vlist) { name = Lst_Datum(n); @@ -2601,13 +2601,17 @@ Var_Print(Lst *vlist, Boolean expandVars char *value; char *v; - v = emalloc(strlen(name) + 1 + 3); - sprintf(v, "${%s}", name); - + if (*name == '$') { + v = name; + } else { + v = emalloc(strlen(name) + 1 + 3); + sprintf(v, "${%s}", name); + } value = Buf_Peel(Var_Subst(v, VAR_GLOBAL, FALSE)); printf("%s\n", value); - free(v); + if (v != name) + free(v); free(value); } else { const char *value = Var_Value(name, VAR_GLOBAL); From owner-svn-src-head@FreeBSD.ORG Thu May 31 01:07:52 2012 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 B88971065677; Thu, 31 May 2012 01:07:52 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A20588FC0A; Thu, 31 May 2012 01:07:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4V17q4B097518; Thu, 31 May 2012 01:07:52 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4V17qKV097510; Thu, 31 May 2012 01:07:52 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201205310107.q4V17qKV097510@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 31 May 2012 01:07: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: r236347 - head/tools/regression/usr.bin/make/variables/opt_V 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, 31 May 2012 01:07:52 -0000 Author: obrien Date: Thu May 31 01:07:52 2012 New Revision: 236347 URL: http://svn.freebsd.org/changeset/base/236347 Log: Add regression test for '-V' command line option (requires r236346). Added: head/tools/regression/usr.bin/make/variables/opt_V/ head/tools/regression/usr.bin/make/variables/opt_V/Makefile (contents, props changed) head/tools/regression/usr.bin/make/variables/opt_V/expected.status.1 (contents, props changed) head/tools/regression/usr.bin/make/variables/opt_V/expected.status.2 (contents, props changed) head/tools/regression/usr.bin/make/variables/opt_V/expected.stderr.1 (contents, props changed) head/tools/regression/usr.bin/make/variables/opt_V/expected.stderr.2 (contents, props changed) head/tools/regression/usr.bin/make/variables/opt_V/expected.stdout.1 (contents, props changed) head/tools/regression/usr.bin/make/variables/opt_V/expected.stdout.2 (contents, props changed) head/tools/regression/usr.bin/make/variables/opt_V/test.t (contents, props changed) Added: head/tools/regression/usr.bin/make/variables/opt_V/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/variables/opt_V/Makefile Thu May 31 01:07:52 2012 (r236347) @@ -0,0 +1,15 @@ +# $FreeBSD$ +# +# Test the -V option +# + +FOO= foo +FOOBAR= ${FOO}bar + +test1: + @echo "-V FOOBAR" + @${MAKE} -V FOOBAR + +test2: + @echo '-V "$${FOOBAR}"' + @${MAKE} -V '$${FOOBAR}' Added: head/tools/regression/usr.bin/make/variables/opt_V/expected.status.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/variables/opt_V/expected.status.1 Thu May 31 01:07:52 2012 (r236347) @@ -0,0 +1 @@ +0 Added: head/tools/regression/usr.bin/make/variables/opt_V/expected.status.2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/variables/opt_V/expected.status.2 Thu May 31 01:07:52 2012 (r236347) @@ -0,0 +1 @@ +0 Added: head/tools/regression/usr.bin/make/variables/opt_V/expected.stderr.1 ============================================================================== Added: head/tools/regression/usr.bin/make/variables/opt_V/expected.stderr.2 ============================================================================== Added: head/tools/regression/usr.bin/make/variables/opt_V/expected.stdout.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/variables/opt_V/expected.stdout.1 Thu May 31 01:07:52 2012 (r236347) @@ -0,0 +1,2 @@ +-V FOOBAR +foobar Added: head/tools/regression/usr.bin/make/variables/opt_V/expected.stdout.2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/variables/opt_V/expected.stdout.2 Thu May 31 01:07:52 2012 (r236347) @@ -0,0 +1,2 @@ +-V "${FOOBAR}" +foobar Added: head/tools/regression/usr.bin/make/variables/opt_V/test.t ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/make/variables/opt_V/test.t Thu May 31 01:07:52 2012 (r236347) @@ -0,0 +1,14 @@ +#!/bin/sh + +# $FreeBSD$ + +cd `dirname $0` +. ../../common.sh + +# Description +DESC="Variable expansion using command line '-V'" + +# Run +TEST_N=2 + +eval_cmd $* From owner-svn-src-head@FreeBSD.ORG Thu May 31 02:36:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A7E3106566B; Thu, 31 May 2012 02:36:31 +0000 (UTC) (envelope-from tj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7655B8FC0C; Thu, 31 May 2012 02:36:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4V2aVxO005376; Thu, 31 May 2012 02:36:31 GMT (envelope-from tj@svn.freebsd.org) Received: (from tj@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4V2aVci005374; Thu, 31 May 2012 02:36:31 GMT (envelope-from tj@svn.freebsd.org) Message-Id: <201205310236.q4V2aVci005374@svn.freebsd.org> From: Tom Judge Date: Thu, 31 May 2012 02:36: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: r236348 - head/share/misc 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, 31 May 2012 02:36:31 -0000 Author: tj (ports committer) Date: Thu May 31 02:36:30 2012 New Revision: 236348 URL: http://svn.freebsd.org/changeset/base/236348 Log: Add my mentor relationships. Approved by: eadler (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Thu May 31 01:07:52 2012 (r236347) +++ head/share/misc/committers-ports.dot Thu May 31 02:36:30 2012 (r236348) @@ -185,6 +185,7 @@ swills [label="Steve Wills\nswills@FreeB tabthorpe [label="Thomas Abthorpe\ntabthorpe@FreeBSD.org\n2007/08/20"] tdb [label="Tim Bishop\ntdb@FreeBSD.org\n2005/11/30"] timur [label="Timur Bakeyev\ntimur@FreeBSD.org\n2007/06/07"] +tj [label="Tom Judge\tj@FreeBSD.org\n2012/05/28"] tota [label="TAKATSU Tomonari\ntota@FreeBSD.org\n2009/03/30"] trasz [label="Edward Tomasz Napierala\ntrasz@FreeBSD.org\n2007/04/12"] trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2004/07/06"] @@ -247,6 +248,8 @@ clsung -> tabthorpe crees -> jgh crees -> madpilot +db -> tj + culot -> jase decke -> sperber @@ -257,6 +260,7 @@ delphij -> rafan demon -> mat eadler -> ak +eadler -> tj edwin -> cperciva edwin -> erwin From owner-svn-src-head@FreeBSD.ORG Thu May 31 03:08:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15EF81065753; Thu, 31 May 2012 03:08:08 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id CA3178FC1B; Thu, 31 May 2012 03:07:44 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.5/8.14.5) with ESMTP id q4V37cFx077785; Wed, 30 May 2012 20:07:38 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.5/8.14.5/Submit) id q4V37ccI077784; Wed, 30 May 2012 20:07:38 -0700 (PDT) (envelope-from obrien) Date: Wed, 30 May 2012 20:07:38 -0700 From: "David O'Brien" To: Sergey Kandaurov Message-ID: <20120531030738.GA77656@dragon.NUXI.org> References: <201205291949.q4TJnqtS099250@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? 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: r236255 - head/contrib/groff/tmac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@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: Thu, 31 May 2012 03:08:08 -0000 On Wed, May 30, 2012 at 07:34:33AM +0400, Sergey Kandaurov wrote: > On 29 May 2012 23:49, David E. O'Brien wrote: ... > > Modified: head/contrib/groff/tmac/doc-common ... > > +.ds doc-operating-system-FreeBSD-8.3     8.3 > > +.ds doc-operating-system-FreeBSD-9.1     9.1 > > +.ds doc-operating-system-FreeBSD-10.0    10.0 > This should be imported from savannah.gnu.org repository, > and not changed directly. Unfortunately we cannot do that per r217595: This is a direct commit to contrib/ as we will no longer import any newer groff snapshots, due to licensing issues. > For local changes not found in the (latest) contrib doc-common > you should use gnu/usr.bin/groff/tmac/mdoc.local I followed r217595, was that commit the wrong approach? -- -- David (obrien@FreeBSD.org) From owner-svn-src-head@FreeBSD.ORG Thu May 31 03:12:07 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4F778106564A; Thu, 31 May 2012 03:12:07 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id D19B58FC0A; Thu, 31 May 2012 03:12:06 +0000 (UTC) Received: from server.rulingia.com (c220-239-254-65.belrs5.nsw.optusnet.com.au [220.239.254.65]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q4V3C5Ta065906 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 31 May 2012 13:12:05 +1000 (EST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q4V3BvXm028647 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 31 May 2012 13:11:57 +1000 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q4V3Bvuc028646; Thu, 31 May 2012 13:11:57 +1000 (EST) (envelope-from peter) Date: Thu, 31 May 2012 13:11:57 +1000 From: Peter Jeremy To: John Baldwin Message-ID: <20120531031157.GA28573@server.rulingia.com> References: <201204051713.q35HDE3d067735@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: <201204051713.q35HDE3d067735@svn.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r233925 - in head: sys/kern sys/sys sys/vm usr.bin/kdump 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: Thu, 31 May 2012 03:12:07 -0000 --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Apr-05 17:13:14 +0000, John Baldwin wrote: >Log: > Add new ktrace records for the start and end of VM faults. This gives > a pair of records similar to syscall entry and return that a user can > use to determine how long page faults take. The new ktrace records are > enabled via the 'p' trace type, and are enabled in the default set of > trace points. I've just found a case where this is very useful but I find that the PFLT/PRET entries are clutter much of the time and would suggest that they be off by default. > MFC after: 2 weeks This expired some time ago, do you intend to MFC these changes in the near future? --=20 Peter Jeremy --BOKacYhQ+x31HxR3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/G4X0ACgkQ/opHv/APuIfbZwCgkGhztwUn2LeHgLui4hw00CMD HJEAnRwkGDD6JtN46aPFVLe8V4r61vqC =wq94 -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3-- From owner-svn-src-head@FreeBSD.ORG Thu May 31 03:14:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 40DC2106566B; Thu, 31 May 2012 03:14:53 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 7A13E14D9A7; Thu, 31 May 2012 03:14:51 +0000 (UTC) Message-ID: <4FC6E22A.9020401@FreeBSD.org> Date: Wed, 30 May 2012 20:14:50 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120506 Thunderbird/12.0.1 MIME-Version: 1.0 To: obrien@freebsd.org References: <201205291949.q4TJnqtS099250@svn.freebsd.org> <20120531030738.GA77656@dragon.NUXI.org> In-Reply-To: <20120531030738.GA77656@dragon.NUXI.org> X-Enigmail-Version: 1.5pre OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Sergey Kandaurov , src-committers@freebsd.org Subject: Re: svn commit: r236255 - head/contrib/groff/tmac 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, 31 May 2012 03:14:53 -0000 On 05/30/2012 20:07, David O'Brien wrote: > On Wed, May 30, 2012 at 07:34:33AM +0400, Sergey Kandaurov wrote: >> On 29 May 2012 23:49, David E. O'Brien wrote: > ... >>> Modified: head/contrib/groff/tmac/doc-common > ... >>> +.ds doc-operating-system-FreeBSD-8.3 � � 8.3 >>> +.ds doc-operating-system-FreeBSD-9.1 � � 9.1 >>> +.ds doc-operating-system-FreeBSD-10.0 � �10.0 >> This should be imported from savannah.gnu.org repository, >> and not changed directly. > > Unfortunately we cannot do that per r217595: > > This is a direct commit to contrib/ as we will no longer import > any newer groff snapshots, due to licensing issues. > >> For local changes not found in the (latest) contrib doc-common >> you should use gnu/usr.bin/groff/tmac/mdoc.local > > I followed r217595, was that commit the wrong approach? TMK all our local changes have always been made to mdoc.local. The history on both files seems to support this as well. Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Thu May 31 06:12:15 2012 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 C24FE106566B; Thu, 31 May 2012 06:12:15 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from exprod7og119.obsmtp.com (exprod7og119.obsmtp.com [64.18.2.16]) by mx1.freebsd.org (Postfix) with ESMTP id 869F38FC08; Thu, 31 May 2012 06:12:12 +0000 (UTC) Received: from P-EMHUB01-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob119.postini.com ([64.18.6.12]) with SMTP ID DSNKT8cLu12KKk03aMEhWWThgIUY/VYgiiND@postini.com; Wed, 30 May 2012 23:12:15 PDT Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB01-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Wed, 30 May 2012 23:10:48 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id q4V6Am140238; Wed, 30 May 2012 23:10:48 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id B91AC5807B; Wed, 30 May 2012 23:04:51 -0700 (PDT) To: "Kevin P. Neal" In-Reply-To: <20120531024557.GA3609@neutralgood.org> References: <201205302223.q4UMN95p083678@svn.freebsd.org> <20120531024557.GA3609@neutralgood.org> Comments: In-reply-to: "Kevin P. Neal" message dated "Wed, 30 May 2012 22:45:57 -0400." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Wed, 30 May 2012 23:04:51 -0700 Message-ID: <20120531060451.B91AC5807B@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, "David E. O'Brien" Subject: Re: svn commit: r236338 - 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: Thu, 31 May 2012 06:12:15 -0000 Hi Kevin, On Wed, 30 May 2012 22:45:57 -0400, "Kevin P. Neal" writes: >> Deprecate the FreeBSD make's ":U" (to-upper case) and ":L" (to-lower case) >> modifiers for ":tu" and ":tl" from OSF's ODE, which made its way into >> NetBSD's make, which is the source for the Portable Berkeley Make. > >This is an incorrect history. I'm the source of NetBSD make's ":tu" and ":tl" >modifiers. The closest I've ever come to OSF ODE is reading about it a little >in NetBSD make's man page. Yes, you are right, :t* were not from ODE. I think David was refering to the :L and :U modifiers that (as you noted) I added to NetBSD make along with :D, :P, and :@, that all originated in ODE. This patch adds :tu and :tl as aliases for freebsd's :U and :L, so that makefiles at least can start to converge. --sjg From owner-svn-src-head@FreeBSD.ORG Thu May 31 07:16:51 2012 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 BF1CD106566B; Thu, 31 May 2012 07:16:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA6208FC0A; Thu, 31 May 2012 07:16:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4V7GpVY022972; Thu, 31 May 2012 07:16:51 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4V7Gpxc022970; Thu, 31 May 2012 07:16:51 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205310716.q4V7Gpxc022970@svn.freebsd.org> From: Eitan Adler Date: Thu, 31 May 2012 07:16: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: r236352 - 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: Thu, 31 May 2012 07:16:51 -0000 Author: eadler Date: Thu May 31 07:16:50 2012 New Revision: 236352 URL: http://svn.freebsd.org/changeset/base/236352 Log: Bump date for content missed in r236290 Submitted by: gjb Approved by: cperciva (implicit) MFC after: 3 days X-MFC-With: r236290 Modified: head/share/man/man5/periodic.conf.5 Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Thu May 31 02:53:28 2012 (r236351) +++ head/share/man/man5/periodic.conf.5 Thu May 31 07:16:50 2012 (r236352) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2012 +.Dd May 30, 2012 .Dt PERIODIC.CONF 5 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Thu May 31 08:22:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7DB4106566C; Thu, 31 May 2012 08:22:02 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B3BA58FC12; Thu, 31 May 2012 08:22:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4V8M2iA025708; Thu, 31 May 2012 08:22:02 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4V8M2Ux025704; Thu, 31 May 2012 08:22:02 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201205310822.q4V8M2Ux025704@svn.freebsd.org> From: Eitan Adler Date: Thu, 31 May 2012 08:22: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: r236355 - head/sbin/mca 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, 31 May 2012 08:22:02 -0000 Author: eadler Date: Thu May 31 08:22:02 2012 New Revision: 236355 URL: http://svn.freebsd.org/changeset/base/236355 Log: Fix a variety of compile errors with gcc48 and clang PR: bin/165699 Submitted by: Arne Meyer Approved by: cperciva MFC after: 1 week Modified: head/sbin/mca/Makefile head/sbin/mca/mca.c Modified: head/sbin/mca/Makefile ============================================================================== --- head/sbin/mca/Makefile Thu May 31 07:44:27 2012 (r236354) +++ head/sbin/mca/Makefile Thu May 31 08:22:02 2012 (r236355) @@ -1,6 +1,5 @@ # $FreeBSD$ PROG= mca -WARNS?= 4 MAN= mca.8 .include Modified: head/sbin/mca/mca.c ============================================================================== --- head/sbin/mca/mca.c Thu May 31 07:44:27 2012 (r236354) +++ head/sbin/mca/mca.c Thu May 31 08:22:02 2012 (r236355) @@ -55,10 +55,10 @@ __FBSDID("$FreeBSD$"); #define HW_MCA_MAX_CPUID 255 -static char hw_mca_count[] = "hw.mca.count"; -static char hw_mca_first[] = "hw.mca.first"; -static char hw_mca_last[] = "hw.mca.last"; -static char hw_mca_recid[] = "hw.mca.%lu.%u"; +static const char hw_mca_count[] = "hw.mca.count"; +static const char hw_mca_first[] = "hw.mca.first"; +static const char hw_mca_last[] = "hw.mca.last"; +static const char hw_mca_recid[] = "hw.mca.%d.%u"; static char default_dumpfile[] = "/var/log/mca.log"; @@ -162,7 +162,9 @@ show_cpu(struct mca_cpu_record *cpu) char var[16]; struct mca_cpu_mod *mod; struct mca_cpu_cpuid *cpuid; +#ifdef notyet struct mca_cpu_psi *psi; +#endif int i, n; printf(" \n"); @@ -200,8 +202,10 @@ show_cpu(struct mca_cpu_record *cpu) show_value(6, var, "0x%016llx", (long long)cpuid->cpuid[i]); } - psi = (struct mca_cpu_psi*)(cpuid + 1); - /* TODO: Dump PSI */ +#ifdef notyet + psi = (struct mca_cpu_psi*)(cpuid + 1); +#endif + /* TODO: Dump PSI */ printf(" \n"); } From owner-svn-src-head@FreeBSD.ORG Thu May 31 14:46:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 756EC1065676; Thu, 31 May 2012 14:46: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 609238FC28; Thu, 31 May 2012 14:46:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4VEk3C5048112; Thu, 31 May 2012 14:46:03 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4VEk3b2048109; Thu, 31 May 2012 14:46:03 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205311446.q4VEk3b2048109@svn.freebsd.org> From: John Baldwin Date: Thu, 31 May 2012 14:46: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: r236357 - 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: Thu, 31 May 2012 14:46:03 -0000 Author: jhb Date: Thu May 31 14:46:02 2012 New Revision: 236357 URL: http://svn.freebsd.org/changeset/base/236357 Log: Don't trace or dump page fault records in the default set of tracepoints as they can be quite noisy. Requested by: Peter Jeremy MFC after: 3 days Modified: head/usr.bin/ktrace/ktrace.1 head/usr.bin/ktrace/ktrace.h Modified: head/usr.bin/ktrace/ktrace.1 ============================================================================== --- head/usr.bin/ktrace/ktrace.1 Thu May 31 14:18:19 2012 (r236356) +++ head/usr.bin/ktrace/ktrace.1 Thu May 31 14:46:02 2012 (r236357) @@ -28,7 +28,7 @@ .\" @(#)ktrace.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd April 5, 2012 +.Dd May 31, 2012 .Dt KTRACE 1 .Os .Sh NAME @@ -131,7 +131,7 @@ trace requests .It Cm + trace the default set of trace points - -.Cm c , f , i , n , p , s , t , u , y +.Cm c , i , n , p , s , t , u , y .El .It Ar command Execute Modified: head/usr.bin/ktrace/ktrace.h ============================================================================== --- head/usr.bin/ktrace/ktrace.h Thu May 31 14:18:19 2012 (r236356) +++ head/usr.bin/ktrace/ktrace.h Thu May 31 14:46:02 2012 (r236357) @@ -32,12 +32,12 @@ #define DEF_POINTS (KTRFAC_SYSCALL | KTRFAC_SYSRET | KTRFAC_NAMEI | \ KTRFAC_GENIO | KTRFAC_PSIG | KTRFAC_USER | \ - KTRFAC_STRUCT | KTRFAC_SYSCTL | KTRFAC_CAPFAIL | \ - KTRFAC_FAULT | KTRFAC_FAULTEND) + KTRFAC_STRUCT | KTRFAC_SYSCTL | KTRFAC_CAPFAIL) #define PROC_ABI_POINTS (KTRFAC_PROCCTOR | KTRFAC_PROCDTOR) -#define ALL_POINTS (DEF_POINTS | KTRFAC_CSW | PROC_ABI_POINTS) +#define ALL_POINTS (DEF_POINTS | KTRFAC_CSW | PROC_ABI_POINTS | \ + KTRFAC_FAULT | KTRFAC_FAULTEND) #define DEF_TRACEFILE "ktrace.out" From owner-svn-src-head@FreeBSD.ORG Thu May 31 14:48:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2BBAE1065670; Thu, 31 May 2012 14:48:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id F3AF88FC0C; Thu, 31 May 2012 14:48:47 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 69A4EB968; Thu, 31 May 2012 10:48:47 -0400 (EDT) From: John Baldwin To: Peter Jeremy Date: Thu, 31 May 2012 10:15:55 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201204051713.q35HDE3d067735@svn.freebsd.org> <20120531031157.GA28573@server.rulingia.com> In-Reply-To: <20120531031157.GA28573@server.rulingia.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201205311015.56102.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 31 May 2012 10:48:47 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233925 - in head: sys/kern sys/sys sys/vm usr.bin/kdump 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: Thu, 31 May 2012 14:48:48 -0000 On Wednesday, May 30, 2012 11:11:57 pm Peter Jeremy wrote: > On 2012-Apr-05 17:13:14 +0000, John Baldwin wrote: > >Log: > > Add new ktrace records for the start and end of VM faults. This gives > > a pair of records similar to syscall entry and return that a user can > > use to determine how long page faults take. The new ktrace records are > > enabled via the 'p' trace type, and are enabled in the default set of > > trace points. > > I've just found a case where this is very useful but I find that > the PFLT/PRET entries are clutter much of the time and would suggest > that they be off by default. I'm not opposed to doing that. I also find that it results in clutter more often than not. > > MFC after: 2 weeks > > This expired some time ago, do you intend to MFC these changes in > the near future? Yes, I have that and some other changes I need to MFC. These require a bit more testing than simple fixes which I have been more diligent about merging. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu May 31 17:27:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D7A09106564A; Thu, 31 May 2012 17:27:05 +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 C35098FC0C; Thu, 31 May 2012 17:27:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4VHR5Em054903; Thu, 31 May 2012 17:27:05 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4VHR52J054901; Thu, 31 May 2012 17:27:05 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201205311727.q4VHR52J054901@svn.freebsd.org> From: Warner Losh Date: Thu, 31 May 2012 17:27: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: r236359 - 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, 31 May 2012 17:27:05 -0000 Author: imp Date: Thu May 31 17:27:05 2012 New Revision: 236359 URL: http://svn.freebsd.org/changeset/base/236359 Log: Unlock in the error path to prevent a lock leak. PR: 162174 Submitted by: Ian Lepore MFC after: 2 weeks Modified: head/sys/kern/subr_rman.c Modified: head/sys/kern/subr_rman.c ============================================================================== --- head/sys/kern/subr_rman.c Thu May 31 14:47:02 2012 (r236358) +++ head/sys/kern/subr_rman.c Thu May 31 17:27:05 2012 (r236359) @@ -161,6 +161,7 @@ int rman_manage_region(struct rman *rm, u_long start, u_long end) { struct resource_i *r, *s, *t; + int rv = 0; DPRINTF(("rman_manage_region: <%s> request: start %#lx, end %#lx\n", rm->rm_descr, start, end)); @@ -188,13 +189,17 @@ rman_manage_region(struct rman *rm, u_lo TAILQ_INSERT_TAIL(&rm->rm_list, r, r_link); } else { /* Check for any overlap with the current region. */ - if (r->r_start <= s->r_end && r->r_end >= s->r_start) - return EBUSY; + if (r->r_start <= s->r_end && r->r_end >= s->r_start) { + rv = EBUSY; + goto out; + } /* Check for any overlap with the next region. */ t = TAILQ_NEXT(s, r_link); - if (t && r->r_start <= t->r_end && r->r_end >= t->r_start) - return EBUSY; + if (t && r->r_start <= t->r_end && r->r_end >= t->r_start) { + rv = EBUSY; + goto out; + } /* * See if this region can be merged with the next region. If @@ -225,9 +230,9 @@ rman_manage_region(struct rman *rm, u_lo TAILQ_INSERT_BEFORE(s, r, r_link); } } - +out: mtx_unlock(rm->rm_mtx); - return 0; + return rv; } int From owner-svn-src-head@FreeBSD.ORG Thu May 31 19:31:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9C2381065676; Thu, 31 May 2012 19:31:29 +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 6DE038FC26; Thu, 31 May 2012 19:31:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4VJVTMm060111; Thu, 31 May 2012 19:31:29 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4VJVT9T060109; Thu, 31 May 2012 19:31:29 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201205311931.q4VJVT9T060109@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 31 May 2012 19:31: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: r236360 - 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, 31 May 2012 19:31:29 -0000 Author: pjd Date: Thu May 31 19:31:28 2012 New Revision: 236360 URL: http://svn.freebsd.org/changeset/base/236360 Log: There is no rmdirat system call. Weird, I know. MFC after: 3 days Modified: head/sys/kern/capabilities.conf Modified: head/sys/kern/capabilities.conf ============================================================================== --- head/sys/kern/capabilities.conf Thu May 31 17:27:05 2012 (r236359) +++ head/sys/kern/capabilities.conf Thu May 31 19:31:28 2012 (r236360) @@ -447,7 +447,6 @@ fstatat fchmodat futimesat mkdirat -rmdirat mkfifoat mknodat openat From owner-svn-src-head@FreeBSD.ORG Thu May 31 19:32:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80B951065677; Thu, 31 May 2012 19:32:38 +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 6C3C08FC18; Thu, 31 May 2012 19:32:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4VJWcQd060199; Thu, 31 May 2012 19:32:38 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4VJWcuX060197; Thu, 31 May 2012 19:32:38 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201205311932.q4VJWcuX060197@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 31 May 2012 19: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: r236361 - 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, 31 May 2012 19:32:38 -0000 Author: pjd Date: Thu May 31 19:32:37 2012 New Revision: 236361 URL: http://svn.freebsd.org/changeset/base/236361 Log: Add missing system calls. MFC after: 3 days Modified: head/sys/kern/capabilities.conf Modified: head/sys/kern/capabilities.conf ============================================================================== --- head/sys/kern/capabilities.conf Thu May 31 19:31:28 2012 (r236360) +++ head/sys/kern/capabilities.conf Thu May 31 19:32:37 2012 (r236361) @@ -445,12 +445,17 @@ olio_listio faccessat fstatat fchmodat +fchownat futimesat +linkat mkdirat mkfifoat mknodat openat +readlinkat renameat +symlinkat +unlinkat ## ## Allow entry into open(2). This system call will fail, since access to the From owner-svn-src-head@FreeBSD.ORG Thu May 31 19:33:51 2012 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 E03CF1065678; Thu, 31 May 2012 19:33:51 +0000 (UTC) (envelope-from tj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C061D8FC0A; Thu, 31 May 2012 19:33:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4VJXpH0060292; Thu, 31 May 2012 19:33:51 GMT (envelope-from tj@svn.freebsd.org) Received: (from tj@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4VJXpnE060290; Thu, 31 May 2012 19:33:51 GMT (envelope-from tj@svn.freebsd.org) Message-Id: <201205311933.q4VJXpnE060290@svn.freebsd.org> From: Tom Judge Date: Thu, 31 May 2012 19:33: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: r236362 - head/share/misc 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, 31 May 2012 19:33:52 -0000 Author: tj (ports committer) Date: Thu May 31 19:33:51 2012 New Revision: 236362 URL: http://svn.freebsd.org/changeset/base/236362 Log: - Fix my botched merge and correct mentor ordering. (Spotted by flo) - Fix missing new line in node block. (Spotted by gavin) - Sort the node list while I'm here. Approved by: eadler (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Thu May 31 19:32:37 2012 (r236361) +++ head/share/misc/committers-ports.dot Thu May 31 19:33:51 2012 (r236362) @@ -59,8 +59,8 @@ az [label="Andrej Zverev\naz@FreeBSD.org bapt [label="Baptiste Daroussin\nbapt@FreeBSD.org\n2010/07/27"] beat [label="Beat Gaetzi\nbeat@FreeBSD.org\n2009/01/28"] beech [label="Beech Rintoul\nbeech@FreeBSD.org\n2007/05/30"] -bland [label="Alexander Nedotsukov\nbland@FreeBSD.org\n2003/08/14"] bf [label="Brendan Fabeny\nbf@FreeBSD.org\n2010/06/02"] +bland [label="Alexander Nedotsukov\nbland@FreeBSD.org\n2003/08/14"] brix [label="Henrik Brix Andersen\nbrix@FreeBSD.org\n2007/10/31"] brooks [label="Brooks Davies\nbrooks@FreeBSD.org\n2004/05/03"] bsam [label="Boris Samorodov\nbsam@FreeBSD.org\n2006/07/20"] @@ -112,11 +112,11 @@ jpaetzel [label="Josh Paetzel\njpaetzel@ 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"] +kmoore [label="Kris Moore\nkmoore@FreeBSD.org\n2009/04/14"] knu [label="Akinori Musha\nknu@FreeBSD.org\n2000/03/22"] +koitsu [label="Jeremy Chadwick\nkoitsu@FreeBSD.org\n2006/11/10"] krion [label="Kirill Ponomarew\nkrion@FreeBSD.org\n2003/07/20"] -kmoore [label="Kris Moore\nkmoore@FreeBSD.org\n2009/04/14"] kwm [label="Koop Mast\nkwm@FreeBSD.org\n2004/09/14"] -koitsu [label="Jeremy Chadwick\nkoitsu@FreeBSD.org\n2006/11/10"] laszlof [label="Frank Laszlo\nlaszlof@FreeBSD.org\n2006/11/07"] lawrance [label="Sam Lawrance\nlawrance@FreeBSD.org\n2005/04/11\n2007/02/21"] lbr [label="Lars Balker Rasmussen\nlbr@FreeBSD.org\n2006/04/30"] @@ -139,6 +139,7 @@ martymac [label="Ganael Laplanche\nmarty mat [label="Mathieu Arnold\nmat@FreeBSD.org\n2003/08/15"] matthew [label="Matthew Seaman\nmatthew@FreeBSD.org\n2012/02/07"] mezz [label="Jeremy Messenger\nmezz@FreeBSD.org\n2004/04/30"] +mharo [label="Michael Haro\nmharo@FreeBSD.org\n1999/04/13"] miwi [label="Martin Wilke\nmiwi@FreeBSD.org\n2006/06/04"] mm [label="Martin Matuska\nmm@FreeBSD.org\n2007/04/04"] mnag [label="Marcus Alves Grando\nmnag@FreeBSD.org\n2005/09/15"] @@ -151,14 +152,13 @@ novel [label="Roman Bogorodskiy\nnovel@F nox [label="Juergen Lock\nnox@FreeBSD.org\n2006/12/22"] obrien [label="David E. O'Brien\nobrien@FreeBSD.org\n1996/10/29"] olivierd [label="Olivier Duchateau\nolivierd@FreeBSD.org\n2012/05/29"] -mharo [label="Michael Haro\nmharo@FreeBSD.org\n1999/04/13"] osa [label="Sergey A. Osokin\nosa@FreeBSD.org\n2003/06/04"] pat [label="Patrick Li\npat@FreeBSD.org\n2001/11/14"] pav [label="Pav Lucistnik\npav@FreeBSD.org\n2003/11/12"] pawel [label="Pawel Pekala\npawel@FreeBSD.org\n2011/03/11"] pgj [label="Gabor Pali\npgj@FreeBSD.org\n2009/04/12"] -philip [label="Philip Paeps\nphilip@FreeBSD.org\n2005/10/19"] pgollucci [label="Philip M. Gollucci\npgollucci@FreeBSD.org\n2008/07/21"] +philip [label="Philip Paeps\nphilip@FreeBSD.org\n2005/10/19"] rafan [label="Rong-En Fan\nrafan@FreeBSD.org\n2006/06/23"] rakuco [label="Raphael Kubo da Costa\nrakuco@FreeBSD.org\n2011/08/22"] rene [label="Rene Ladan\nrene@FreeBSD.org\n2010/04/11"] @@ -180,17 +180,17 @@ stas [label="Stanislav Sedov\nstas@FreeB stefan [label="Stefan Walter\nstefan@FreeBSD.org\n2006/05/07"] stephen [label="Stephen Montgomery-Smith\nstephen@FreeBSD.org\n2011/06/13"] sunpoet [label="Po-Chuan Hsieh\nsunpoet@FreeBSD.org\n2010/09/21"] -sylvio [label="Sylvio Cesar Teixeira\nsylvio@FreeBSD.org\n2009/10/29"] swills [label="Steve Wills\nswills@FreeBSD.org\n2010/09/03"] +sylvio [label="Sylvio Cesar Teixeira\nsylvio@FreeBSD.org\n2009/10/29"] tabthorpe [label="Thomas Abthorpe\ntabthorpe@FreeBSD.org\n2007/08/20"] tdb [label="Tim Bishop\ntdb@FreeBSD.org\n2005/11/30"] +thierry [label="Thierry Thomas\nthierry@FreeBSD.org\n2004/03/15"] timur [label="Timur Bakeyev\ntimur@FreeBSD.org\n2007/06/07"] -tj [label="Tom Judge\tj@FreeBSD.org\n2012/05/28"] +tj [label="Tom Judge\ntj@FreeBSD.org\n2012/05/28"] +tmclaugh [label="Tom McLaughlin\ntmclaugh@FreeBSD.org\n2005/09/15"] tota [label="TAKATSU Tomonari\ntota@FreeBSD.org\n2009/03/30"] trasz [label="Edward Tomasz Napierala\ntrasz@FreeBSD.org\n2007/04/12"] trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2004/07/06"] -thierry [label="Thierry Thomas\nthierry@FreeBSD.org\n2004/03/15"] -tmclaugh [label="Tom McLaughlin\ntmclaugh@FreeBSD.org\n2005/09/15"] uqs [label="Ulrich Spoerlein\nuqs@FreeBSD.org\n2012/01/19"] vd [label="Vasil Dimov\nvd@FreeBSD.org\n2006/01/19"] wen [label="Wen Heping\nwen@FreeBSD.org\n2010/12/13"] @@ -248,10 +248,10 @@ clsung -> tabthorpe crees -> jgh crees -> madpilot -db -> tj - culot -> jase +db -> tj + decke -> sperber delphij -> nemoliu From owner-svn-src-head@FreeBSD.ORG Thu May 31 19:34:54 2012 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 8B7931065679; Thu, 31 May 2012 19:34:54 +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 767258FC14; Thu, 31 May 2012 19:34:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4VJYsu0060374; Thu, 31 May 2012 19:34:54 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4VJYsOw060372; Thu, 31 May 2012 19:34:54 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201205311934.q4VJYsOw060372@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 31 May 2012 19:34: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: r236363 - 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, 31 May 2012 19:34:54 -0000 Author: pjd Date: Thu May 31 19:34:53 2012 New Revision: 236363 URL: http://svn.freebsd.org/changeset/base/236363 Log: Regenerate after r236361. MFC after: 3 days Modified: head/sys/kern/init_sysent.c Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Thu May 31 19:33:51 2012 (r236362) +++ head/sys/kern/init_sysent.c Thu May 31 19:34:53 2012 (r236363) @@ -525,19 +525,19 @@ struct sysent sysent[] = { { AS(cpuset_setaffinity_args), (sy_call_t *)sys_cpuset_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 488 = cpuset_setaffinity */ { AS(faccessat_args), (sy_call_t *)sys_faccessat, AUE_FACCESSAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 489 = faccessat */ { AS(fchmodat_args), (sy_call_t *)sys_fchmodat, AUE_FCHMODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 490 = fchmodat */ - { AS(fchownat_args), (sy_call_t *)sys_fchownat, AUE_FCHOWNAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 491 = fchownat */ + { AS(fchownat_args), (sy_call_t *)sys_fchownat, AUE_FCHOWNAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 491 = fchownat */ { AS(fexecve_args), (sy_call_t *)sys_fexecve, AUE_FEXECVE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 492 = fexecve */ { AS(fstatat_args), (sy_call_t *)sys_fstatat, AUE_FSTATAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 493 = fstatat */ { AS(futimesat_args), (sy_call_t *)sys_futimesat, AUE_FUTIMESAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 494 = futimesat */ - { AS(linkat_args), (sy_call_t *)sys_linkat, AUE_LINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 495 = linkat */ + { AS(linkat_args), (sy_call_t *)sys_linkat, AUE_LINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 495 = linkat */ { AS(mkdirat_args), (sy_call_t *)sys_mkdirat, AUE_MKDIRAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 496 = mkdirat */ { AS(mkfifoat_args), (sy_call_t *)sys_mkfifoat, AUE_MKFIFOAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 497 = mkfifoat */ { AS(mknodat_args), (sy_call_t *)sys_mknodat, AUE_MKNODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 498 = mknodat */ { AS(openat_args), (sy_call_t *)sys_openat, AUE_OPENAT_RWTC, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 499 = openat */ - { AS(readlinkat_args), (sy_call_t *)sys_readlinkat, AUE_READLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 500 = readlinkat */ + { AS(readlinkat_args), (sy_call_t *)sys_readlinkat, AUE_READLINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 500 = readlinkat */ { AS(renameat_args), (sy_call_t *)sys_renameat, AUE_RENAMEAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 501 = renameat */ - { AS(symlinkat_args), (sy_call_t *)sys_symlinkat, AUE_SYMLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 502 = symlinkat */ - { AS(unlinkat_args), (sy_call_t *)sys_unlinkat, AUE_UNLINKAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 503 = unlinkat */ + { AS(symlinkat_args), (sy_call_t *)sys_symlinkat, AUE_SYMLINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 502 = symlinkat */ + { AS(unlinkat_args), (sy_call_t *)sys_unlinkat, AUE_UNLINKAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 503 = unlinkat */ { AS(posix_openpt_args), (sy_call_t *)sys_posix_openpt, AUE_POSIX_OPENPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 504 = posix_openpt */ { AS(gssd_syscall_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 505 = gssd_syscall */ { AS(jail_get_args), (sy_call_t *)sys_jail_get, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 506 = jail_get */ From owner-svn-src-head@FreeBSD.ORG Thu May 31 20:10:05 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF0701065674; Thu, 31 May 2012 20:10:05 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A2EE18FC0C; Thu, 31 May 2012 20:10:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4VKA5Sj061990; Thu, 31 May 2012 20:10:05 GMT (envelope-from eri@svn.freebsd.org) Received: (from eri@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4VKA5Ys061986; Thu, 31 May 2012 20:10:05 GMT (envelope-from eri@svn.freebsd.org) Message-Id: <201205312010.q4VKA5Ys061986@svn.freebsd.org> From: Ermal Luçi Date: Thu, 31 May 2012 20:10: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: r236364 - head/sys/contrib/pf/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, 31 May 2012 20:10:06 -0000 Author: eri Date: Thu May 31 20:10:05 2012 New Revision: 236364 URL: http://svn.freebsd.org/changeset/base/236364 Log: Correct table counter functionality to not panic. This was caused by not proper initialization of necessary parameters. PR: 168200 Reviewed by: bz@, glebius@ MFC after: 1 week Modified: head/sys/contrib/pf/net/pf_ioctl.c head/sys/contrib/pf/net/pf_table.c head/sys/contrib/pf/net/pfvar.h Modified: head/sys/contrib/pf/net/pf_ioctl.c ============================================================================== --- head/sys/contrib/pf/net/pf_ioctl.c Thu May 31 19:34:53 2012 (r236363) +++ head/sys/contrib/pf/net/pf_ioctl.c Thu May 31 20:10:05 2012 (r236364) @@ -298,7 +298,7 @@ init_zone_var(void) V_pf_altq_pl = V_pf_pooladdr_pl = NULL; V_pf_frent_pl = V_pf_frag_pl = V_pf_cache_pl = V_pf_cent_pl = NULL; V_pf_state_scrub_pl = NULL; - V_pfr_ktable_pl = V_pfr_kentry_pl = NULL; + V_pfr_ktable_pl = V_pfr_kentry_pl = V_pfr_kcounters_pl = NULL; } void @@ -317,6 +317,7 @@ cleanup_pf_zone(void) UMA_DESTROY(V_pf_cent_pl); UMA_DESTROY(V_pfr_ktable_pl); UMA_DESTROY(V_pfr_kentry_pl); + UMA_DESTROY(V_pfr_kcounters_pl); UMA_DESTROY(V_pf_state_scrub_pl); UMA_DESTROY(V_pfi_addr_pl); } @@ -337,6 +338,7 @@ pfattach(void) UMA_CREATE(V_pf_pooladdr_pl, struct pf_pooladdr, "pfpooladdrpl"); UMA_CREATE(V_pfr_ktable_pl, struct pfr_ktable, "pfrktable"); UMA_CREATE(V_pfr_kentry_pl, struct pfr_kentry, "pfrkentry"); + UMA_CREATE(V_pfr_kcounters_pl, struct pfr_kcounters, "pfrkcounters"); UMA_CREATE(V_pf_frent_pl, struct pf_frent, "pffrent"); UMA_CREATE(V_pf_frag_pl, struct pf_fragment, "pffrag"); UMA_CREATE(V_pf_cache_pl, struct pf_fragment, "pffrcache"); Modified: head/sys/contrib/pf/net/pf_table.c ============================================================================== --- head/sys/contrib/pf/net/pf_table.c Thu May 31 19:34:53 2012 (r236363) +++ head/sys/contrib/pf/net/pf_table.c Thu May 31 20:10:05 2012 (r236364) @@ -179,7 +179,6 @@ struct pfr_walktree { VNET_DEFINE(uma_zone_t, pfr_ktable_pl); VNET_DEFINE(uma_zone_t, pfr_kentry_pl); VNET_DEFINE(uma_zone_t, pfr_kcounters_pl); -#define V_pfr_kcounters_pl VNET(pfr_kcounters_pl) VNET_DEFINE(struct sockaddr_in, pfr_sin); #define V_pfr_sin VNET(pfr_sin) VNET_DEFINE(struct sockaddr_in6, pfr_sin6); Modified: head/sys/contrib/pf/net/pfvar.h ============================================================================== --- head/sys/contrib/pf/net/pfvar.h Thu May 31 19:34:53 2012 (r236363) +++ head/sys/contrib/pf/net/pfvar.h Thu May 31 20:10:05 2012 (r236364) @@ -1868,6 +1868,8 @@ VNET_DECLARE(uma_zone_t, pfr_ktable_pl #define V_pfr_ktable_pl VNET(pfr_ktable_pl) VNET_DECLARE(uma_zone_t, pfr_kentry_pl); #define V_pfr_kentry_pl VNET(pfr_kentry_pl) +VNET_DECLARE(uma_zone_t, pfr_kcounters_pl); +#define V_pfr_kcounters_pl VNET(pfr_kcounters_pl) VNET_DECLARE(uma_zone_t, pf_cache_pl); #define V_pf_cache_pl VNET(pf_cache_pl) VNET_DECLARE(uma_zone_t, pf_cent_pl); From owner-svn-src-head@FreeBSD.ORG Thu May 31 20:13:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9747D106564A; Thu, 31 May 2012 20:13:45 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68CFE8FC0C; Thu, 31 May 2012 20:13:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4VKDjOo062187; Thu, 31 May 2012 20:13:45 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4VKDjYP062185; Thu, 31 May 2012 20:13:45 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201205312013.q4VKDjYP062185@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 31 May 2012 20:13: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: r236365 - 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: Thu, 31 May 2012 20:13:45 -0000 Author: obrien Date: Thu May 31 20:13:44 2012 New Revision: 236365 URL: http://svn.freebsd.org/changeset/base/236365 Log: Update date for r236338 & r236346. Modified: head/usr.bin/make/make.1 Modified: head/usr.bin/make/make.1 ============================================================================== --- head/usr.bin/make/make.1 Thu May 31 20:10:05 2012 (r236364) +++ head/usr.bin/make/make.1 Thu May 31 20:13:44 2012 (r236365) @@ -32,7 +32,7 @@ .\" @(#)make.1 8.8 (Berkeley) 6/13/95 .\" $FreeBSD$ .\" -.Dd November 5, 2011 +.Dd May 30, 2012 .Dt MAKE 1 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Thu May 31 23:56:11 2012 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 440241065670; Thu, 31 May 2012 23:56:11 +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 2F66A8FC0A; Thu, 31 May 2012 23:56:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4VNuB8d071714; Thu, 31 May 2012 23:56:11 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4VNuAuc071712; Thu, 31 May 2012 23:56:10 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201205312356.q4VNuAuc071712@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 31 May 2012 23:56: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: r236371 - 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, 31 May 2012 23:56:11 -0000 Author: yongari Date: Thu May 31 23:56:10 2012 New Revision: 236371 URL: http://svn.freebsd.org/changeset/base/236371 Log: Remove unnecessary device_printfs. Pointed out by: marius Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Thu May 31 23:22:00 2012 (r236370) +++ head/sys/dev/bge/if_bge.c Thu May 31 23:56:10 2012 (r236371) @@ -2776,17 +2776,9 @@ bge_mbox_reorder(struct bge_softc *sc) for (;;) { dev = device_get_parent(bus); bus = device_get_parent(dev); - device_printf(sc->bge_dev, "dev : %s%d, bus : %s%d\n", - device_get_name(dev), device_get_unit(dev), - device_get_name(bus), device_get_unit(bus)); if (device_get_devclass(dev) != pcib) break; for (i = 0; i < count; i++) { - device_printf(sc->bge_dev, - "probing dev : %s%d, vendor : 0x%04x " - "device : 0x%04x\n", - device_get_name(dev), device_get_unit(dev), - pci_get_vendor(dev), pci_get_device(dev)); if (pci_get_vendor(dev) == mbox_reorder_lists[i].vendor && pci_get_device(dev) == From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 01:29:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id AA9C6106564A; Fri, 1 Jun 2012 01:29:07 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 3ABBD153CD8; Fri, 1 Jun 2012 01:29:07 +0000 (UTC) Message-ID: <4FC81AE3.10304@FreeBSD.org> Date: Thu, 31 May 2012 18:29:07 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Tom Judge References: <201205311933.q4VJXpnE060290@svn.freebsd.org> In-Reply-To: <201205311933.q4VJXpnE060290@svn.freebsd.org> X-Enigmail-Version: 1.4.1 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, Eitan Adler Subject: Re: svn commit: r236362 - head/share/misc 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, 01 Jun 2012 01:29:07 -0000 On 5/31/2012 12:33 PM, Tom Judge wrote: > - Sort the node list while I'm here. This falls under the category of a "whitespace" change, which should have been done as a separate commit (usually first, then substantive changes second). This is a tiny bit more work for you, but down the road when someone who is !tj is reviewing the logs, diffs, etc. it really helps to make the substantive changes stand out. Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 02:00:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F18F71065691 for ; Fri, 1 Jun 2012 02:00:21 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id B92288FC12 for ; Fri, 1 Jun 2012 02:00:04 +0000 (UTC) Received: by obcni5 with SMTP id ni5so2757838obc.13 for ; Thu, 31 May 2012 19:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=l7i1thtiOhvSV/i/MjXcVjpAWtcF9Lvx3JlyAhL66vs=; b=BJr7CDD70z3Q1OZsgePe1bryYKBnKfMbh5K7ViQCJc/l7/nkogPyP4uLHz8w8vWdJq K44nUDjzXnMbm+OXDB1trq1UrE5l19M/OKX/Al6GWwXdmaSPUlAvP614usfddMrLWd7s tSKd3oq2URxjN7XcOLx2N03x7j+x2YBvWyJck= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=l7i1thtiOhvSV/i/MjXcVjpAWtcF9Lvx3JlyAhL66vs=; b=ZXIb2TJ/eqWDVvXSgyrqJF3GDv5dC76oLBcDpi9fi/QdbSJ+wE6+LFdM3QFO74Z1ao 3gmb6XGTXSDrwHhddr1fCIet+HTxl6xPIKE2LtFa5X1/Yah1JUiNcIwwnjXWd3QCBaNS apFBN/GyQ8lIhC2tByyY7DZLppJRzAIQoqH53NM4fCPyEGDMCfcPEAZ69Ir+aVGI/1wF Bl/n3lfrdCpMbWHTXcHdfJH0iKr3s19E0ZiFZGoyQS8PBNu2AQTIMqn1cVEHKMCay5jI +KQzcVnonzRYxpMoYXvj2SpPYRCcxzhix/HjnC+9i961XjQOZ9WGkLo23fWh4/aGzNMg s3Fw== Received: by 10.182.48.100 with SMTP id k4mr825833obn.21.1338516003838; Thu, 31 May 2012 19:00:03 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.182.204.69 with HTTP; Thu, 31 May 2012 18:59:33 -0700 (PDT) In-Reply-To: <4FC81AE3.10304@FreeBSD.org> References: <201205311933.q4VJXpnE060290@svn.freebsd.org> <4FC81AE3.10304@FreeBSD.org> From: Eitan Adler Date: Thu, 31 May 2012 18:59:33 -0700 X-Google-Sender-Auth: vZJRC2ERP21BKcGd6QZ6D02XUfQ Message-ID: To: Doug Barton Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQmdk6tapNWwvK7GXARB4y02ahm4KMv8HZbh0zSUEViqdi5YBDMrwhMBPveVBCrDFDVmPTqq Cc: svn-src-head@freebsd.org, Tom Judge , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r236362 - head/share/misc 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, 01 Jun 2012 02:00:22 -0000 On 31 May 2012 18:29, Doug Barton wrote: > On 5/31/2012 12:33 PM, Tom Judge wrote: >> =C2=A0 - Sort the node list while I'm here. > > This falls under the category of a "whitespace" change, which should > have been done as a separate commit (usually first, then substantive > changes second). I figured none of the changes were really substantive so it was okay to sort and fix the \n at the same time. --=20 Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 02:04:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 651261065670 for ; Fri, 1 Jun 2012 02:04:14 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 06B788FC14 for ; Fri, 1 Jun 2012 02:04:13 +0000 (UTC) Received: by vcbfy7 with SMTP id fy7so1263081vcb.13 for ; Thu, 31 May 2012 19:04:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tomjudge.com; s=google; h=sender:message-id:date:from:organization:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=H+PNi2jDT0PVttbfrrqCJL6+n0TwKgOYDMTdgbDNNgA=; b=Ud6BcVh7fmCwcWpCTN2M4DilUyf7R8TV6D9if5ecmJqKuHwsv8p0/g9p/fHOi4FJ6V mTlQp8KDgoDGFSYjmIcnpVkP9MdEO0Sv6wkznSZnjdqpTDN+s5ry++poQUUmFsHqTpib gn2dWUvFgaeUmgIGxF7AnvnQCdGAZ/5F/8Neo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:message-id:date:from:organization:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=H+PNi2jDT0PVttbfrrqCJL6+n0TwKgOYDMTdgbDNNgA=; b=KHUQa0IZ8t7SNY3Aw6i7WndHQ69qV6MNJXhxpxFZ5aUZFpGmI3lbWd5IbOxAzJmgIS hsBQcLDwcvAyVMsQeVgFpzOul/3ApQpnBKrfKOMQrUev65BbMpRMei1UwVV9rG5QeU82 eW/rcEuy2VZ10eUJxP+sgaHB0Epsp4cwuToviK+iHNc7U4pQlvXKVvw8dZy65V0gPKp4 FXk3DjdLZN/ToHbf7S4ao8RzHRkos7BVrdCC7xhA6icMj7V/lP4tKaCws5VN71Vh0hvC 8U0KA9aUWHAMflfaR3wypRZfoEK6llMua0HQZ3BeFz+IETu3nzOFXX/Y+61auBqNl7N8 qhTg== Received: by 10.52.20.143 with SMTP id n15mr723119vde.112.1338516253269; Thu, 31 May 2012 19:04:13 -0700 (PDT) Received: from 192-168-200-48.lan.tj.home.tomjudge.com (ip98-169-143-54.dc.dc.cox.net. [98.169.143.54]) by mx.google.com with ESMTPS id c17sm828784vdj.11.2012.05.31.19.04.11 (version=SSLv3 cipher=OTHER); Thu, 31 May 2012 19:04:12 -0700 (PDT) Sender: Tom Judge Message-ID: <4FC82319.4050307@freebsd.org> Date: Thu, 31 May 2012 22:04:09 -0400 From: Tom Judge Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Doug Barton References: <201205311933.q4VJXpnE060290@svn.freebsd.org> <4FC81AE3.10304@FreeBSD.org> In-Reply-To: <4FC81AE3.10304@FreeBSD.org> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmTqz44ic8swmmHHkgm0yh9lm5ovGLPmQ6UM1Kl4kYDeee5lahPSw/GP8A4d42TTfKKH+Rb Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Eitan Adler Subject: Re: svn commit: r236362 - head/share/misc 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, 01 Jun 2012 02:04:14 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 31/05/2012 21:29, Doug Barton wrote: > On 5/31/2012 12:33 PM, Tom Judge wrote: >> - Sort the node list while I'm here. > > This falls under the category of a "whitespace" change, which > should have been done as a separate commit (usually first, then > substantive changes second). > > This is a tiny bit more work for you, but down the road when > someone who is !tj is reviewing the logs, diffs, etc. it really > helps to make the substantive changes stand out. Feedback noted for next time. Tom -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJPyCMZAAoJEEJSM9yB4iIWo1cH/130Fb9qDCpI8jJnukHR4EI1 4LJj7q0TLSNoocvB+JleVpO1i3wOuFJX+jj64yTC/BOuMU9Z/FJ7MxoyBTEOXpBO AfUibDN3jquHKIP1eZLZzGYVSOLUg9sXCTG+yryPKfGvaC5iNhkhH3rL3+QBCLzA pQLEG65rcG2yTgzohEejCyJxSBxNl+8O5WmLRUvn+GQlmefBYh2kHyphLAA2iFE+ J8jC7afDZQMg3TA8OhllEcfg3ErbIpzI/CPoHbr+6A2tKTlbzcb1AKUBFkZPLDib 1uSHkEvLUT+ZTsB+8qDiGbbZ42eMlF206jGf5vXdG5AD9C2Xp2zwVVeya8G5o9Y= =LwiQ -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 02:36:05 2012 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 E48E5106566B; Fri, 1 Jun 2012 02:36:04 +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 8E2908FC0C; Fri, 1 Jun 2012 02:36:04 +0000 (UTC) Received: from 63.imp.bsdimp.com (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id q512ZsOP064711 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Thu, 31 May 2012 20:35:54 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <201205302223.q4UMN95p083678@svn.freebsd.org> Date: Thu, 31 May 2012 20:35:54 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <1008BCB1-59A9-472C-9D64-1AD57B0A9F43@bsdimp.com> References: <201205302223.q4UMN95p083678@svn.freebsd.org> To: "David E. O'Brien" X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Thu, 31 May 2012 20:35:54 -0600 (MDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r236338 - 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: Fri, 01 Jun 2012 02:36:05 -0000 What are your MFC plans for 9.x and 8.x? Warner On May 30, 2012, at 4:23 PM, David E. O'Brien wrote: > Author: obrien > Date: Wed May 30 22:23:08 2012 > New Revision: 236338 > URL: http://svn.freebsd.org/changeset/base/236338 >=20 > Log: > Deprecate the FreeBSD make's ":U" (to-upper case) and ":L" (to-lower = case) > modifiers for ":tu" and ":tl" from OSF's ODE, which made its way into > NetBSD's make, which is the source for the Portable Berkeley Make. >=20 > Submitted by: Simon Gerraty >=20 > Modified: > head/usr.bin/make/Makefile > head/usr.bin/make/make.1 > head/usr.bin/make/var.c >=20 > Modified: head/usr.bin/make/Makefile > = =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/make/Makefile Wed May 30 22:21:25 2012 = (r236337) > +++ head/usr.bin/make/Makefile Wed May 30 22:23:08 2012 = (r236338) > @@ -15,7 +15,7 @@ NO_SHARED?=3D YES > .endif >=20 > # Version has the RYYYYMMDDX format, where R is from RELENG_ > -CFLAGS+=3D-DMAKE_VERSION=3D\"5201111300\" > +CFLAGS+=3D-DMAKE_VERSION=3D\"10201120530\" >=20 > # There is no obvious performance improvement currently. > # CFLAGS+=3D-DUSE_KQUEUE >=20 > Modified: head/usr.bin/make/make.1 > = =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/make/make.1 Wed May 30 22:21:25 2012 = (r236337) > +++ head/usr.bin/make/make.1 Wed May 30 22:23:08 2012 = (r236338) > @@ -902,6 +902,7 @@ Replaces each word in the variable with=20 > Replaces each word in the variable with everything but the last = component. > .It Cm :L > Converts variable to lower-case letters. > +(deprecated) > .It Cm :M Ns Ar pattern > Select only those words that match the rest of the modifier. > The standard shell wildcard characters > @@ -993,8 +994,13 @@ to be replaced in > .Ar new_string . > .It Cm :T > Replaces each word in the variable with its last component. > +.It Cm :tl > +Converts variable to lower-case letters. > +.It Cm :tu > +Converts variable to upper-case letters. > .It Cm :U > Converts variable to upper-case letters. > +(deprecated) > .It Cm :u > Remove adjacent duplicate words (like > .Xr uniq 1 ) . > @@ -1742,6 +1748,19 @@ is set to the same value as > .Va .MAKE ; > support for this may be removed in the future. > .Pp > +The use of the > +.Cm :L > +and > +.Cm :U > +modifiers are deprecated > +in > +.Fx 10.0 > +and the more portable (among Pmake decedents) > +.Cm :tl > +and > +.Cm :tu > +should be used instead. > +.Pp > Most of the more esoteric features of > .Nm > should probably be avoided for greater compatibility. >=20 > Modified: head/usr.bin/make/var.c > = =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/make/var.c Wed May 30 22:21:25 2012 = (r236337) > +++ head/usr.bin/make/var.c Wed May 30 22:23:08 2012 = (r236338) > @@ -1746,6 +1746,19 @@ ParseModifier(VarParser *vp, char startc > case 'C': > newStr =3D modifier_C(vp, value, v); > break; > + case 't': > + /* :tl :tu for OSF ODE & NetBSD make = compatibility */ > + switch (vp->ptr[1]) { > + case 'l': > + vp->ptr++; > + goto mod_lower; > + break; > + case 'u': > + vp->ptr++; > + goto mod_upper; > + break; > + } > + /* FALLTHROUGH */ > default: > if (vp->ptr[1] !=3D endc && vp->ptr[1] !=3D ':') = { > #ifdef SUNSHCMD > @@ -1774,6 +1787,7 @@ ParseModifier(VarParser *vp, char startc >=20 > switch (vp->ptr[0]) { > case 'L': > + mod_lower: > { > const char *cp; > Buffer *buf; > @@ -1799,6 +1813,7 @@ ParseModifier(VarParser *vp, char startc > vp->ptr++; > break; > case 'U': > + mod_upper: > { > const char *cp; > Buffer *buf; >=20 >=20 From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 02:55:42 2012 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 C48631065672; Fri, 1 Jun 2012 02:55:42 +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 AE2DD8FC15; Fri, 1 Jun 2012 02:55:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q512tgmL078857; Fri, 1 Jun 2012 02:55:42 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q512tgHS078850; Fri, 1 Jun 2012 02:55:42 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201206010255.q512tgHS078850@svn.freebsd.org> From: Warner Losh Date: Fri, 1 Jun 2012 02:55: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: r236372 - head/sys/arm/at91 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, 01 Jun 2012 02:55:42 -0000 Author: imp Date: Fri Jun 1 02:55:42 2012 New Revision: 236372 URL: http://svn.freebsd.org/changeset/base/236372 Log: Initialize the clocks before we call cninit() so that the serial console so initialized will work upon return from cninit. While this is the very next line, other platforms setup all this stuff before calling cninit. Also, initialize the SDRAM base register in the inner block in at91_ramsize(). Modified: head/sys/arm/at91/at91_machdep.c head/sys/arm/at91/at91_mci.c head/sys/arm/at91/at91reg.h head/sys/arm/at91/at91rm92reg.h head/sys/arm/at91/files.at91sam9 head/sys/arm/at91/std.at91sam9 Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Thu May 31 23:56:10 2012 (r236371) +++ head/sys/arm/at91/at91_machdep.c Fri Jun 1 02:55:42 2012 (r236372) @@ -209,12 +209,11 @@ const struct pmap_devmap at91_devmap[] = long at91_ramsize(void) { - uint32_t *SDRAMC = (uint32_t *)(AT91_BASE + AT91RM92_SDRAMC_BASE); uint32_t cr, mr; int banks, rows, cols, bw; if (at91_is_rm92()) { - SDRAMC = (uint32_t *)(AT91_BASE + AT91RM92_SDRAMC_BASE); + uint32_t *SDRAMC = (uint32_t *)(AT91_BASE + AT91RM92_SDRAMC_BASE); cr = SDRAMC[AT91RM92_SDRAMC_CR / 4]; mr = SDRAMC[AT91RM92_SDRAMC_MR / 4]; banks = (cr & AT91RM92_SDRAMC_CR_NB_4) ? 2 : 1; @@ -222,9 +221,9 @@ at91_ramsize(void) cols = (cr & AT91RM92_SDRAMC_CR_NC_MASK) + 8; bw = (mr & AT91RM92_SDRAMC_MR_DBW_16) ? 1 : 2; } else { - /* This should be good for the 9260, 9261 and 9G20 as addresses + /* This should be good for the 9260, 9261, 9G20, 9G35 and 9X25 as addresses * and registers are the same */ - SDRAMC = (uint32_t *)(AT91_BASE + AT91SAM9G20_SDRAMC_BASE); + uint32_t *SDRAMC = (uint32_t *)(AT91_BASE + AT91SAM9G20_SDRAMC_BASE); cr = SDRAMC[AT91SAM9G20_SDRAMC_CR / 4]; mr = SDRAMC[AT91SAM9G20_SDRAMC_MR / 4]; banks = (cr & AT91SAM9G20_SDRAMC_CR_NB_4) ? 2 : 1; @@ -361,12 +360,13 @@ initarm(void *arg, void *arg2) cpu_tlb_flushID(); cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)); - cninit(); + /* Initialize all the clocks, so that the console can work */ + at91_pmc_init_clock(); - at91_pmc_init_clock(); /* Get chip id so device drivers know about differences */ - at91_chip_id = *(volatile uint32_t *) - (AT91_BASE + AT91_DBGU_BASE + DBGU_C1R); + at91_chip_id = *(uint32_t *)(AT91_BASE + AT91_DBGU_BASE + DBGU_C1R); + + cninit(); memsize = board_init(); physmem = memsize / PAGE_SIZE; Modified: head/sys/arm/at91/at91_mci.c ============================================================================== --- head/sys/arm/at91/at91_mci.c Thu May 31 23:56:10 2012 (r236371) +++ head/sys/arm/at91/at91_mci.c Fri Jun 1 02:55:42 2012 (r236372) @@ -69,6 +69,11 @@ __FBSDID("$FreeBSD$"); #define BBSZ 512 +/* + * Note: This driver only supports the SlotA card. No attempt has been made + * to support SlotB. + */ + struct at91_mci_softc { void *intrhand; /* Interrupt handle */ device_t dev; @@ -244,6 +249,13 @@ at91_mci_attach(device_t dev) sc->host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340; sc->host.caps = 0; + /* + * The in-tree Linux driver doesn't allow 4-wire operation for the + * at91rm9200, but does for other members of the family. The atmel + * patches to this do allow it, or have in the past. It is unclear + * that the hardware even works, but my boot loader uses 4-bit bus + * in polling mode successfully. + */ if (sc->sc_cap & CAP_HAS_4WIRE) sc->host.caps |= MMC_CAP_4_BIT_DATA; child = device_add_child(dev, "mmc", 0); @@ -363,9 +375,9 @@ at91_mci_update_ios(device_t brdev, devi clkdiv = (at91_master_clock / ios->clock) / 2; } if (ios->bus_width == bus_width_4) - WR4(sc, MCI_SDCR, RD4(sc, MCI_SDCR) | MCI_SDCR_SDCBUS); + WR4(sc, MCI_SDCR, MCI_SDCR_SDCBUS); else - WR4(sc, MCI_SDCR, RD4(sc, MCI_SDCR) & ~MCI_SDCR_SDCBUS); + WR4(sc, MCI_SDCR, 0); WR4(sc, MCI_MR, (RD4(sc, MCI_MR) & ~MCI_MR_CLKDIV) | clkdiv); /* Do we need a settle time here? */ /* XXX We need to turn the device on/off here with a GPIO pin */ @@ -407,7 +419,9 @@ at91_mci_start_cmd(struct at91_mci_softc if (!data) { // The no data case is fairly simple at91_mci_pdc_disable(sc); -// printf("CMDR %x ARGR %x\n", cmdr, cmd->arg); +#ifdef AT91_MCI_DEBUG + printf("CMDR %x ARGR %x\n", cmdr, cmd->arg); +#endif WR4(sc, MCI_ARGR, cmd->arg); WR4(sc, MCI_CMDR, cmdr); WR4(sc, MCI_IER, MCI_SR_ERROR | MCI_SR_CMDRDY); @@ -479,7 +493,9 @@ at91_mci_start_cmd(struct at91_mci_softc ier = MCI_SR_TXBUFE; } } -// printf("CMDR %x ARGR %x with data\n", cmdr, cmd->arg); +#ifdef AT91_MCI_DEBUG + printf("CMDR %x ARGR %x with data\n", cmdr, cmd->arg); +#endif WR4(sc, MCI_ARGR, cmd->arg); if (cmdr & MCI_CMDR_TRCMD_START) { if (cmdr & MCI_CMDR_TRDIR) { @@ -518,6 +534,14 @@ at91_mci_start(struct at91_mci_softc *sc sc->req = NULL; sc->curcmd = NULL; req->done(req); + /* + * Attempted hack-a-round for the DMA bug for multiple reads. + */ + if (req->cmd->opcode == MMC_READ_MULTIPLE_BLOCK) { + at91_mci_fini(sc->dev); + at91_mci_init(sc->dev); + at91_mci_update_ios(sc->dev, NULL); + } } static int @@ -578,7 +602,9 @@ at91_mci_read_done(struct at91_mci_softc uint32_t *walker; struct mmc_command *cmd; int i, len; - +#ifdef AT91_MCI_DEBUG + char *w2; +#endif cmd = sc->curcmd; bus_dmamap_sync(sc->dmatag, sc->map, BUS_DMASYNC_POSTREAD); bus_dmamap_unload(sc->dmatag, sc->map); @@ -589,6 +615,15 @@ at91_mci_read_done(struct at91_mci_softc for (i = 0; i < len; i++) walker[i] = bswap32(walker[i]); } +#ifdef AT91_MCI_DEBUG + printf("Read data\n"); + for (i = 0, w2 = cmd->data->data; i < cmd->data->len; i++) { + if (i % 16 == 0) + printf("%08x ", cmd->arg + i); + printf("%02x%s", w2[i], (i + 1) % 16 ? " " : "\n"); + } + printf("\n"); +#endif // Finish up the sequence... WR4(sc, MCI_IDR, MCI_SR_ENDRX); WR4(sc, MCI_IER, MCI_SR_RXBUFF); @@ -624,14 +659,19 @@ at91_mci_intr(void *arg) if ((sr & MCI_SR_RCRCE) && (cmd->opcode == MMC_SEND_OP_COND || cmd->opcode == ACMD_SD_SEND_OP_COND)) cmd->error = MMC_ERR_NONE; - else if (sr & (MCI_SR_RTOE | MCI_SR_DTOE)) + else if (sr & (MCI_SR_RTOE | MCI_SR_DTOE)) { + printf("TIMEOUT %#x\n", sr); cmd->error = MMC_ERR_TIMEOUT; - else if (sr & (MCI_SR_RCRCE | MCI_SR_DCRCE)) + } else if (sr & (MCI_SR_RCRCE | MCI_SR_DCRCE)) { + printf("CRC %#x\n", sr); cmd->error = MMC_ERR_BADCRC; - else if (sr & (MCI_SR_OVRE | MCI_SR_UNRE)) + } else if (sr & (MCI_SR_OVRE | MCI_SR_UNRE)) { + printf("FIFO %#x\n", sr); cmd->error = MMC_ERR_FIFO; - else + } else { + printf("FAILED %#x\n", sr); cmd->error = MMC_ERR_FAILED; + } done = 1; if (sc->mapped && cmd->error) { bus_dmamap_unload(sc->dmatag, sc->map); @@ -743,7 +783,7 @@ at91_mci_read_ivar(device_t bus, device_ *(int *)result = sc->host.caps; break; case MMCBR_IVAR_MAX_DATA: - *(int *)result = 1; + *(int *)result = 1024; break; } return (0); Modified: head/sys/arm/at91/at91reg.h ============================================================================== --- head/sys/arm/at91/at91reg.h Thu May 31 23:56:10 2012 (r236371) +++ head/sys/arm/at91/at91reg.h Fri Jun 1 02:55:42 2012 (r236372) @@ -67,6 +67,7 @@ #define AT91_CPU_SAM9XE128 0x329973a0 #define AT91_CPU_SAM9XE256 0x329a93a0 #define AT91_CPU_SAM9XE512 0x329aa3a0 +#define AT91_CPU_SAM9X25 0x819a05a0 /* Same as the SAM9G35 */ #define AT91_ARCH(chipid) ((chipid >> 20) & 0xff) #define AT91_CPU(chipid) (chipid & ~AT91_CPU_VERSION_MASK) Modified: head/sys/arm/at91/at91rm92reg.h ============================================================================== --- head/sys/arm/at91/at91rm92reg.h Thu May 31 23:56:10 2012 (r236371) +++ head/sys/arm/at91/at91rm92reg.h Fri Jun 1 02:55:42 2012 (r236372) @@ -399,6 +399,10 @@ #define AT91RM92_OHCI_PA_BASE 0x00300000 #define AT91RM92_OHCI_SIZE 0x00100000 +#define AT91RM92_FLS_BASE 0xdf000000 +#define AT91RM92_FLS_PA_BASE 0x10000000 +#define AT91RM92_FLS_SIZE 0x02000000 /* Support up to 32MB flash */ + #define AT91RM92_CF_BASE 0xdfd00000 #define AT91RM92_CF_PA_BASE 0x51400000 #define AT91RM92_CF_SIZE 0x00100000 Modified: head/sys/arm/at91/files.at91sam9 ============================================================================== --- head/sys/arm/at91/files.at91sam9 Thu May 31 23:56:10 2012 (r236371) +++ head/sys/arm/at91/files.at91sam9 Fri Jun 1 02:55:42 2012 (r236372) @@ -25,13 +25,15 @@ dev/usb/controller/ohci_atmelarm.c optio # # All the "systems on a chip" we support # -arm/at91/at91sam9g20.c optional at91sam9g20 arm/at91/at91sam9260.c optional at91sam9260 +arm/at91/at91sam9g20.c optional at91sam9g20 +arm/at91/at91sam9x25.c optional at91sam9x25 # # # All the boards we support # arm/at91/board_ethernut5.c optional at91_board_ethernut5 arm/at91/board_hl201.c optional at91_board_hl201 -arm/at91/board_sam9g20ek.c optional at91_board_sam9g20ek arm/at91/board_qila9g20.c optional at91_board_qila9g20 +arm/at91/board_sam9g20ek.c optional at91_board_sam9g20ek +arm/at91/board_sam9x25ek.c optional at91_board_sam9x25ek Modified: head/sys/arm/at91/std.at91sam9 ============================================================================== --- head/sys/arm/at91/std.at91sam9 Thu May 31 23:56:10 2012 (r236371) +++ head/sys/arm/at91/std.at91sam9 Fri Jun 1 02:55:42 2012 (r236372) @@ -7,3 +7,4 @@ options PHYSADDR=0x20000000 device at91sam9g20 device at91sam9260 +device at91sam9x25 From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 03:00:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E21701065678; Fri, 1 Jun 2012 03:00: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 CCFC08FC0A; Fri, 1 Jun 2012 03:00:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5130aOx079115; Fri, 1 Jun 2012 03:00:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5130aSK079109; Fri, 1 Jun 2012 03:00:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201206010300.q5130aSK079109@svn.freebsd.org> From: Warner Losh Date: Fri, 1 Jun 2012 03:00: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: r236373 - head/sys/arm/at91 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, 01 Jun 2012 03:00:37 -0000 Author: imp Date: Fri Jun 1 03:00:36 2012 New Revision: 236373 URL: http://svn.freebsd.org/changeset/base/236373 Log: Revert debug and other immature code accidentally committed in r236372. Modified: head/sys/arm/at91/at91_mci.c head/sys/arm/at91/at91reg.h head/sys/arm/at91/at91rm92reg.h head/sys/arm/at91/files.at91sam9 head/sys/arm/at91/std.at91sam9 Modified: head/sys/arm/at91/at91_mci.c ============================================================================== --- head/sys/arm/at91/at91_mci.c Fri Jun 1 02:55:42 2012 (r236372) +++ head/sys/arm/at91/at91_mci.c Fri Jun 1 03:00:36 2012 (r236373) @@ -69,11 +69,6 @@ __FBSDID("$FreeBSD$"); #define BBSZ 512 -/* - * Note: This driver only supports the SlotA card. No attempt has been made - * to support SlotB. - */ - struct at91_mci_softc { void *intrhand; /* Interrupt handle */ device_t dev; @@ -249,13 +244,6 @@ at91_mci_attach(device_t dev) sc->host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340; sc->host.caps = 0; - /* - * The in-tree Linux driver doesn't allow 4-wire operation for the - * at91rm9200, but does for other members of the family. The atmel - * patches to this do allow it, or have in the past. It is unclear - * that the hardware even works, but my boot loader uses 4-bit bus - * in polling mode successfully. - */ if (sc->sc_cap & CAP_HAS_4WIRE) sc->host.caps |= MMC_CAP_4_BIT_DATA; child = device_add_child(dev, "mmc", 0); @@ -375,9 +363,9 @@ at91_mci_update_ios(device_t brdev, devi clkdiv = (at91_master_clock / ios->clock) / 2; } if (ios->bus_width == bus_width_4) - WR4(sc, MCI_SDCR, MCI_SDCR_SDCBUS); + WR4(sc, MCI_SDCR, RD4(sc, MCI_SDCR) | MCI_SDCR_SDCBUS); else - WR4(sc, MCI_SDCR, 0); + WR4(sc, MCI_SDCR, RD4(sc, MCI_SDCR) & ~MCI_SDCR_SDCBUS); WR4(sc, MCI_MR, (RD4(sc, MCI_MR) & ~MCI_MR_CLKDIV) | clkdiv); /* Do we need a settle time here? */ /* XXX We need to turn the device on/off here with a GPIO pin */ @@ -419,9 +407,7 @@ at91_mci_start_cmd(struct at91_mci_softc if (!data) { // The no data case is fairly simple at91_mci_pdc_disable(sc); -#ifdef AT91_MCI_DEBUG - printf("CMDR %x ARGR %x\n", cmdr, cmd->arg); -#endif +// printf("CMDR %x ARGR %x\n", cmdr, cmd->arg); WR4(sc, MCI_ARGR, cmd->arg); WR4(sc, MCI_CMDR, cmdr); WR4(sc, MCI_IER, MCI_SR_ERROR | MCI_SR_CMDRDY); @@ -493,9 +479,7 @@ at91_mci_start_cmd(struct at91_mci_softc ier = MCI_SR_TXBUFE; } } -#ifdef AT91_MCI_DEBUG - printf("CMDR %x ARGR %x with data\n", cmdr, cmd->arg); -#endif +// printf("CMDR %x ARGR %x with data\n", cmdr, cmd->arg); WR4(sc, MCI_ARGR, cmd->arg); if (cmdr & MCI_CMDR_TRCMD_START) { if (cmdr & MCI_CMDR_TRDIR) { @@ -534,14 +518,6 @@ at91_mci_start(struct at91_mci_softc *sc sc->req = NULL; sc->curcmd = NULL; req->done(req); - /* - * Attempted hack-a-round for the DMA bug for multiple reads. - */ - if (req->cmd->opcode == MMC_READ_MULTIPLE_BLOCK) { - at91_mci_fini(sc->dev); - at91_mci_init(sc->dev); - at91_mci_update_ios(sc->dev, NULL); - } } static int @@ -602,9 +578,7 @@ at91_mci_read_done(struct at91_mci_softc uint32_t *walker; struct mmc_command *cmd; int i, len; -#ifdef AT91_MCI_DEBUG - char *w2; -#endif + cmd = sc->curcmd; bus_dmamap_sync(sc->dmatag, sc->map, BUS_DMASYNC_POSTREAD); bus_dmamap_unload(sc->dmatag, sc->map); @@ -615,15 +589,6 @@ at91_mci_read_done(struct at91_mci_softc for (i = 0; i < len; i++) walker[i] = bswap32(walker[i]); } -#ifdef AT91_MCI_DEBUG - printf("Read data\n"); - for (i = 0, w2 = cmd->data->data; i < cmd->data->len; i++) { - if (i % 16 == 0) - printf("%08x ", cmd->arg + i); - printf("%02x%s", w2[i], (i + 1) % 16 ? " " : "\n"); - } - printf("\n"); -#endif // Finish up the sequence... WR4(sc, MCI_IDR, MCI_SR_ENDRX); WR4(sc, MCI_IER, MCI_SR_RXBUFF); @@ -659,19 +624,14 @@ at91_mci_intr(void *arg) if ((sr & MCI_SR_RCRCE) && (cmd->opcode == MMC_SEND_OP_COND || cmd->opcode == ACMD_SD_SEND_OP_COND)) cmd->error = MMC_ERR_NONE; - else if (sr & (MCI_SR_RTOE | MCI_SR_DTOE)) { - printf("TIMEOUT %#x\n", sr); + else if (sr & (MCI_SR_RTOE | MCI_SR_DTOE)) cmd->error = MMC_ERR_TIMEOUT; - } else if (sr & (MCI_SR_RCRCE | MCI_SR_DCRCE)) { - printf("CRC %#x\n", sr); + else if (sr & (MCI_SR_RCRCE | MCI_SR_DCRCE)) cmd->error = MMC_ERR_BADCRC; - } else if (sr & (MCI_SR_OVRE | MCI_SR_UNRE)) { - printf("FIFO %#x\n", sr); + else if (sr & (MCI_SR_OVRE | MCI_SR_UNRE)) cmd->error = MMC_ERR_FIFO; - } else { - printf("FAILED %#x\n", sr); + else cmd->error = MMC_ERR_FAILED; - } done = 1; if (sc->mapped && cmd->error) { bus_dmamap_unload(sc->dmatag, sc->map); @@ -783,7 +743,7 @@ at91_mci_read_ivar(device_t bus, device_ *(int *)result = sc->host.caps; break; case MMCBR_IVAR_MAX_DATA: - *(int *)result = 1024; + *(int *)result = 1; break; } return (0); Modified: head/sys/arm/at91/at91reg.h ============================================================================== --- head/sys/arm/at91/at91reg.h Fri Jun 1 02:55:42 2012 (r236372) +++ head/sys/arm/at91/at91reg.h Fri Jun 1 03:00:36 2012 (r236373) @@ -67,7 +67,6 @@ #define AT91_CPU_SAM9XE128 0x329973a0 #define AT91_CPU_SAM9XE256 0x329a93a0 #define AT91_CPU_SAM9XE512 0x329aa3a0 -#define AT91_CPU_SAM9X25 0x819a05a0 /* Same as the SAM9G35 */ #define AT91_ARCH(chipid) ((chipid >> 20) & 0xff) #define AT91_CPU(chipid) (chipid & ~AT91_CPU_VERSION_MASK) Modified: head/sys/arm/at91/at91rm92reg.h ============================================================================== --- head/sys/arm/at91/at91rm92reg.h Fri Jun 1 02:55:42 2012 (r236372) +++ head/sys/arm/at91/at91rm92reg.h Fri Jun 1 03:00:36 2012 (r236373) @@ -399,10 +399,6 @@ #define AT91RM92_OHCI_PA_BASE 0x00300000 #define AT91RM92_OHCI_SIZE 0x00100000 -#define AT91RM92_FLS_BASE 0xdf000000 -#define AT91RM92_FLS_PA_BASE 0x10000000 -#define AT91RM92_FLS_SIZE 0x02000000 /* Support up to 32MB flash */ - #define AT91RM92_CF_BASE 0xdfd00000 #define AT91RM92_CF_PA_BASE 0x51400000 #define AT91RM92_CF_SIZE 0x00100000 Modified: head/sys/arm/at91/files.at91sam9 ============================================================================== --- head/sys/arm/at91/files.at91sam9 Fri Jun 1 02:55:42 2012 (r236372) +++ head/sys/arm/at91/files.at91sam9 Fri Jun 1 03:00:36 2012 (r236373) @@ -25,15 +25,13 @@ dev/usb/controller/ohci_atmelarm.c optio # # All the "systems on a chip" we support # -arm/at91/at91sam9260.c optional at91sam9260 arm/at91/at91sam9g20.c optional at91sam9g20 -arm/at91/at91sam9x25.c optional at91sam9x25 +arm/at91/at91sam9260.c optional at91sam9260 # # # All the boards we support # arm/at91/board_ethernut5.c optional at91_board_ethernut5 arm/at91/board_hl201.c optional at91_board_hl201 -arm/at91/board_qila9g20.c optional at91_board_qila9g20 arm/at91/board_sam9g20ek.c optional at91_board_sam9g20ek -arm/at91/board_sam9x25ek.c optional at91_board_sam9x25ek +arm/at91/board_qila9g20.c optional at91_board_qila9g20 Modified: head/sys/arm/at91/std.at91sam9 ============================================================================== --- head/sys/arm/at91/std.at91sam9 Fri Jun 1 02:55:42 2012 (r236372) +++ head/sys/arm/at91/std.at91sam9 Fri Jun 1 03:00:36 2012 (r236373) @@ -7,4 +7,3 @@ options PHYSADDR=0x20000000 device at91sam9g20 device at91sam9260 -device at91sam9x25 From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 03:04:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 14DE11065672; Fri, 1 Jun 2012 03:04:18 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 9C19CB36E0; Fri, 1 Jun 2012 03:04:16 +0000 (UTC) Message-ID: <4FC83131.4010702@FreeBSD.org> Date: Thu, 31 May 2012 20:04:17 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Eitan Adler References: <201205311933.q4VJXpnE060290@svn.freebsd.org> <4FC81AE3.10304@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.4.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Tom Judge , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r236362 - head/share/misc 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, 01 Jun 2012 03:04:18 -0000 On 5/31/2012 6:59 PM, Eitan Adler wrote: > On 31 May 2012 18:29, Doug Barton wrote: >> On 5/31/2012 12:33 PM, Tom Judge wrote: >>> - Sort the node list while I'm here. >> >> This falls under the category of a "whitespace" change, which should >> have been done as a separate commit (usually first, then substantive >> changes second). > > I figured none of the changes were really substantive so it was okay > to sort and fix the \n at the same time. These were the changes: Log: - Fix my botched merge and correct mentor ordering. (Spotted by flo) - Fix missing new line in node block. (Spotted by gavin) - Sort the node list while I'm here. The last is definitely WS, the second probably is, the first definitely isn't. hth, Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 03:56:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6122E1065670; Fri, 1 Jun 2012 03:56:13 +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 4C4F48FC1B; Fri, 1 Jun 2012 03:56:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q513uDuh081736; Fri, 1 Jun 2012 03:56:13 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q513uDIC081734; Fri, 1 Jun 2012 03:56:13 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201206010356.q513uDIC081734@svn.freebsd.org> From: Alan Cox Date: Fri, 1 Jun 2012 03:56: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: r236375 - head/sys/ia64/ia64 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, 01 Jun 2012 03:56:13 -0000 Author: alc Date: Fri Jun 1 03:56:12 2012 New Revision: 236375 URL: http://svn.freebsd.org/changeset/base/236375 Log: pmap_alloc_vhpt() doesn't need the pages that it allocates to be mapped into the kernel map, so vm_page_alloc_contig() can be used in place of contigmalloc(). Reviewed by: marcel Modified: head/sys/ia64/ia64/pmap.c Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Fri Jun 1 03:46:28 2012 (r236374) +++ head/sys/ia64/ia64/pmap.c Fri Jun 1 03:56:12 2012 (r236375) @@ -289,21 +289,23 @@ pmap_initialize_vhpt(vm_offset_t vhpt) } #ifdef SMP -MALLOC_DECLARE(M_SMP); - vm_offset_t pmap_alloc_vhpt(void) { vm_offset_t vhpt; + vm_page_t m; vm_size_t size; size = 1UL << pmap_vhpt_log2size; - vhpt = (uintptr_t)contigmalloc(size, M_SMP, 0, 0UL, ~0UL, size, 0UL); - if (vhpt != 0) { - vhpt = IA64_PHYS_TO_RR7(ia64_tpa(vhpt)); + m = vm_page_alloc_contig(NULL, 0, VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ | + VM_ALLOC_WIRED, atop(size), 0UL, ~0UL, size, 0UL, + VM_MEMATTR_DEFAULT); + if (m != NULL) { + vhpt = IA64_PHYS_TO_RR7(VM_PAGE_TO_PHYS(m)); pmap_initialize_vhpt(vhpt); + return (vhpt); } - return (vhpt); + return (0); } #endif From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 03:59:09 2012 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 2ADF31065676; Fri, 1 Jun 2012 03:59:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B2978FC19; Fri, 1 Jun 2012 03:59:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q513x8nw081886; Fri, 1 Jun 2012 03:59:08 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q513x8K7081883; Fri, 1 Jun 2012 03:59:08 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201206010359.q513x8K7081883@svn.freebsd.org> From: Eitan Adler Date: Fri, 1 Jun 2012 03:59: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: r236376 - in head: lib/libncp sys/netncp 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, 01 Jun 2012 03:59:09 -0000 Author: eadler Date: Fri Jun 1 03:59:08 2012 New Revision: 236376 URL: http://svn.freebsd.org/changeset/base/236376 Log: Add characters mapping for codepages used in Germany. (not verified by me to be accurate) PR: bin/163847 Submitted by: Gabor Fischer Reviewed by: bp Approved by: cperciva MFC after: 3 weeks Modified: head/lib/libncp/ncpl_nls.c head/sys/netncp/ncp_nls.h Modified: head/lib/libncp/ncpl_nls.c ============================================================================== --- head/lib/libncp/ncpl_nls.c Fri Jun 1 03:56:12 2012 (r236375) +++ head/lib/libncp/ncpl_nls.c Fri Jun 1 03:59:08 2012 (r236376) @@ -200,6 +200,79 @@ static u_int8_t se_unix2nw[] = { 0x9c, 0x9b, 0x87, 0x98, 0x9d, 0x99, 0x97, 0x9a }; +/* + * Characters mapping for codepages used in Germany. + */ +static u_int8_t de_nw2unix[] = { + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, /* 0x00 */ + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, + 0x5f, 0x5f, 0x5f, 0x5f, 0xb6, 0xa7, 0x5f, 0x5f, /* 0x10 */ + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, /* 0x20 */ + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0x30 */ + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* 0x40 */ + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* 0x50 */ + 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 0x60 */ + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 0x70 */ + 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, + 0xc7, 0xfc, 0xe9, 0xe2, 0xe4, 0xe0, 0xe5, 0xe7, /* 0x80 */ + 0xea, 0xeb, 0xe8, 0xef, 0xee, 0xec, 0xc4, 0xc5, + 0xc9, 0xe6, 0xc6, 0xf4, 0xf6, 0xf2, 0xfb, 0xf9, /* 0x90 */ + 0xff, 0xd6, 0xdc, 0xa2, 0xa3, 0xa5, 0x5f, 0x5f, + 0xe1, 0xed, 0xf3, 0xfa, 0xf1, 0xd1, 0xaa, 0xba, /* 0xA0 */ + 0xbf, 0x5f, 0xac, 0xbd, 0xbc, 0xa1, 0xab, 0xbb, + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, /* 0xB0 */ + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, /* 0xC0 */ + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, /* 0xD0 */ + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, + 0x5f, 0xdf, 0x5f, 0x5f, 0x5f, 0x5f, 0xb5, 0x5f, /* 0xE0 */ + 0x5f, 0x5f, 0x5f, 0xf0, 0x5f, 0xf8, 0x5f, 0x5f, + 0x5f, 0xb1, 0x5f, 0x5f, 0x5f, 0x5f, 0xf7, 0x5f, /* 0xF0 */ + 0xb0, 0x5f, 0xb7, 0x5f, 0x5f, 0xb2, 0x5f, 0xa0 +}; + +static u_int8_t de_unix2nw[] = { + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, /* 0x00 */ + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, /* 0x10 */ + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, /* 0x20 */ + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0x30 */ + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* 0x40 */ + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* 0x50 */ + 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 0x60 */ + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 0x70 */ + 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, /* 0x80 */ + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, /* 0x90 */ + 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, + 0xff, 0xad, 0x9b, 0x9c, 0x5f, 0x9d, 0x5f, 0x15, /* 0xA0 */ + 0x5f, 0x5f, 0xa6, 0xae, 0xaa, 0x5f, 0x5f, 0x5f, + 0xf8, 0xf1, 0xfd, 0x5f, 0x5f, 0xe6, 0x14, 0xfa, /* 0xB0 */ + 0x5f, 0x5f, 0xa7, 0xaf, 0xac, 0xab, 0x5f, 0xa8, + 0x5f, 0x5f, 0x5f, 0x5f, 0x8e, 0x8f, 0x92, 0x80, /* 0xC0 */ + 0x5f, 0x90, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, + 0x5f, 0xa5, 0x5f, 0x5f, 0x5f, 0x5f, 0x99, 0x5f, /* 0xD0 */ + 0x5f, 0x5f, 0x5f, 0x5f, 0x9a, 0x5f, 0x5f, 0xe1, + 0x85, 0xa0, 0x83, 0x5f, 0x84, 0x86, 0x91, 0x87, /* 0xE0 */ + 0x8a, 0x82, 0x88, 0x89, 0x8d, 0xa1, 0x8c, 0x8b, + 0xeb, 0xa4, 0x95, 0xa2, 0x93, 0x5f, 0x94, 0xf6, /* 0xF0 */ + 0xed, 0x97, 0xa3, 0x96, 0x81, 0x5f, 0x5f, 0x98 +}; + static u_int8_t def2lower[256]; static u_int8_t def2upper[256]; @@ -225,6 +298,9 @@ static struct ncp_nlsdesc ncp_nlslist[] {NCP_NLS_SE, NCP_NLS_SE_NAME, {def2lower, def2upper, se_nw2unix, se_unix2nw, 0} }, + {NCP_NLS_DE, NCP_NLS_DE_NAME, + {def2lower, def2upper, de_nw2unix, de_unix2nw, 0} + }, {0} }; Modified: head/sys/netncp/ncp_nls.h ============================================================================== --- head/sys/netncp/ncp_nls.h Fri Jun 1 03:56:12 2012 (r236375) +++ head/sys/netncp/ncp_nls.h Fri Jun 1 03:59:08 2012 (r236376) @@ -52,9 +52,11 @@ struct ncp_nlstables { #define NCP_NLS_AS_IS 1 #define NCP_NLS_AS_IS_NAME "asis" #define NCP_NLS_KOI_866 2 -#define NCP_NLS_SE 3 #define NCP_NLS_KOI_866_NAME "koi2cp866" +#define NCP_NLS_SE 3 #define NCP_NLS_SE_NAME "se" +#define NCP_NLS_DE 4 +#define NCP_NLS_DE_NAME "de" extern struct ncp_nlstables ncp_nls; /* active nls */ From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 04:23:21 2012 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 1452F106564A; Fri, 1 Jun 2012 04:23:21 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F2C668FC0C; Fri, 1 Jun 2012 04:23:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q514NKQ6083045; Fri, 1 Jun 2012 04:23:20 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q514NKtf083043; Fri, 1 Jun 2012 04:23:20 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201206010423.q514NKtf083043@svn.freebsd.org> From: Eitan Adler Date: Fri, 1 Jun 2012 04:23: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: r236377 - head/sys/dev/vxge/vxgehal 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, 01 Jun 2012 04:23:21 -0000 Author: eadler Date: Fri Jun 1 04:23:20 2012 New Revision: 236377 URL: http://svn.freebsd.org/changeset/base/236377 Log: Fix warning generated by clang; warning: equality comparison with extraneous parentheses [-Wparentheses-equality] Reported by: arundel Reviewed by: gnn Approved by: cperciva MFC after: 3 days Modified: head/sys/dev/vxge/vxgehal/vxgehal-channel.h Modified: head/sys/dev/vxge/vxgehal/vxgehal-channel.h ============================================================================== --- head/sys/dev/vxge/vxgehal/vxgehal-channel.h Fri Jun 1 03:59:08 2012 (r236376) +++ head/sys/dev/vxge/vxgehal/vxgehal-channel.h Fri Jun 1 04:23:20 2012 (r236377) @@ -291,7 +291,7 @@ __hal_channel_dtr_restore(__hal_channel_ else dtr_index = channel->reserve_index - 1; - if ((channel->dtr_arr[dtr_index].dtr == dtrh)) { + if ((channel->dtr_arr[dtr_index].dtr = dtrh) != NULL) { channel->reserve_index = dtr_index; channel->dtr_arr[dtr_index].state = VXGE_HAL_CHANNEL_DTR_FREE; From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 04:26:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CB984106566B; Fri, 1 Jun 2012 04:26:50 +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 ABD528FC15; Fri, 1 Jun 2012 04:26:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q514Qour083217; Fri, 1 Jun 2012 04:26:50 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q514Qo0w083212; Fri, 1 Jun 2012 04:26:50 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201206010426.q514Qo0w083212@svn.freebsd.org> From: Alan Cox Date: Fri, 1 Jun 2012 04:26: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: r236378 - in head/sys: amd64/amd64 i386/i386 i386/xen 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, 01 Jun 2012 04:26:50 -0000 Author: alc Date: Fri Jun 1 04:26:50 2012 New Revision: 236378 URL: http://svn.freebsd.org/changeset/base/236378 Log: Eliminate code duplication in free_pv_entry() and pmap_remove_pages() by introducing free_pv_chunk(). Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Jun 1 04:23:20 2012 (r236377) +++ head/sys/amd64/amd64/pmap.c Fri Jun 1 04:26:50 2012 (r236378) @@ -218,6 +218,7 @@ caddr_t CADDR1 = 0; */ static caddr_t crashdumpmap; +static void free_pv_chunk(struct pv_chunk *pc); static void free_pv_entry(pmap_t pmap, pv_entry_t pv); static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try); static void pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); @@ -2174,7 +2175,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) static void free_pv_entry(pmap_t pmap, pv_entry_t pv) { - vm_page_t m; struct pv_chunk *pc; int idx, field, bit; @@ -2198,6 +2198,14 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv return; } TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + free_pv_chunk(pc); +} + +static void +free_pv_chunk(struct pv_chunk *pc) +{ + vm_page_t m; + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); PV_STAT(pv_entry_spare -= _NPCPV); PV_STAT(pc_chunk_count--); @@ -4211,15 +4219,8 @@ pmap_remove_pages(pmap_t pmap) } } if (allfree) { - PV_STAT(pv_entry_spare -= _NPCPV); - PV_STAT(pc_chunk_count--); - PV_STAT(pc_chunk_frees++); TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); - TAILQ_REMOVE(&pv_chunks, pc, pc_lru); - m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); - dump_drop_page(m->phys_addr); - vm_page_unwire(m, 0); - vm_page_free(m); + free_pv_chunk(pc); } } pmap_invalidate_all(pmap); Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Fri Jun 1 04:23:20 2012 (r236377) +++ head/sys/i386/i386/pmap.c Fri Jun 1 04:26:50 2012 (r236378) @@ -286,6 +286,7 @@ SYSCTL_INT(_debug, OID_AUTO, PMAP1unchan "Number of times pmap_pte_quick didn't change PMAP1"); static struct mtx PMAP2mutex; +static void free_pv_chunk(struct pv_chunk *pc); static void free_pv_entry(pmap_t pmap, pv_entry_t pv); static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try); static void pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); @@ -2343,7 +2344,6 @@ out: static void free_pv_entry(pmap_t pmap, pv_entry_t pv) { - vm_page_t m; struct pv_chunk *pc; int idx, field, bit; @@ -2364,6 +2364,14 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); return; } + free_pv_chunk(pc); +} + +static void +free_pv_chunk(struct pv_chunk *pc) +{ + vm_page_t m; + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); PV_STAT(pv_entry_spare -= _NPCPV); PV_STAT(pc_chunk_count--); @@ -4445,16 +4453,8 @@ pmap_remove_pages(pmap_t pmap) } } if (allfree) { - PV_STAT(pv_entry_spare -= _NPCPV); - PV_STAT(pc_chunk_count--); - PV_STAT(pc_chunk_frees++); TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); - TAILQ_REMOVE(&pv_chunks, pc, pc_lru); - m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc)); - pmap_qremove((vm_offset_t)pc, 1); - vm_page_unwire(m, 0); - vm_page_free(m); - pmap_ptelist_free(&pv_vafree, (vm_offset_t)pc); + free_pv_chunk(pc); } } sched_unpin(); Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Fri Jun 1 04:23:20 2012 (r236377) +++ head/sys/i386/xen/pmap.c Fri Jun 1 04:26:50 2012 (r236378) @@ -277,6 +277,7 @@ SYSCTL_INT(_debug, OID_AUTO, PMAP1unchan "Number of times pmap_pte_quick didn't change PMAP1"); static struct mtx PMAP2mutex; +static void free_pv_chunk(struct pv_chunk *pc); static void free_pv_entry(pmap_t pmap, pv_entry_t pv); static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try); static void pmap_pvh_free(struct md_page *pvh, pmap_t pmap, vm_offset_t va); @@ -2094,7 +2095,6 @@ out: static void free_pv_entry(pmap_t pmap, pv_entry_t pv) { - vm_page_t m; struct pv_chunk *pc; int idx, field, bit; @@ -2115,6 +2115,14 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); return; } + free_pv_chunk(pc); +} + +static void +free_pv_chunk(struct pv_chunk *pc) +{ + vm_page_t m; + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); PV_STAT(pv_entry_spare -= _NPCPV); PV_STAT(pc_chunk_count--); @@ -3591,16 +3599,8 @@ pmap_remove_pages(pmap_t pmap) } PT_UPDATES_FLUSH(); if (allfree) { - PV_STAT(pv_entry_spare -= _NPCPV); - PV_STAT(pc_chunk_count--); - PV_STAT(pc_chunk_frees++); TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); - TAILQ_REMOVE(&pv_chunks, pc, pc_lru); - m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc)); - pmap_qremove((vm_offset_t)pc, 1); - vm_page_unwire(m, 0); - vm_page_free(m); - pmap_ptelist_free(&pv_vafree, (vm_offset_t)pc); + free_pv_chunk(pc); } } PT_UPDATES_FLUSH(); From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 04:34:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F025E106566B; Fri, 1 Jun 2012 04:34:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C18F68FC08; Fri, 1 Jun 2012 04:34:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q514Yno3083572; Fri, 1 Jun 2012 04:34:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q514YnbU083567; Fri, 1 Jun 2012 04:34:49 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201206010434.q514YnbU083567@svn.freebsd.org> From: Eitan Adler Date: Fri, 1 Jun 2012 04:34: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: r236379 - in head/sys/dev: hptiop hptmv isp 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, 01 Jun 2012 04:34:50 -0000 Author: eadler Date: Fri Jun 1 04:34:49 2012 New Revision: 236379 URL: http://svn.freebsd.org/changeset/base/236379 Log: Adding missing dependancies for loading hptiop(4), hptmv(4) and isp(4) as modules. PR: kern/166239 Submitted by: Pavel Timofeev Discussed on: -stable, -scsi Reviewed by: scottl No objection from: mjacob Approved by: cperciva MFC after: 3 days Modified: head/sys/dev/hptiop/hptiop.c head/sys/dev/hptmv/entry.c head/sys/dev/isp/isp_pci.c head/sys/dev/isp/isp_sbus.c Modified: head/sys/dev/hptiop/hptiop.c ============================================================================== --- head/sys/dev/hptiop/hptiop.c Fri Jun 1 04:26:50 2012 (r236378) +++ head/sys/dev/hptiop/hptiop.c Fri Jun 1 04:34:49 2012 (r236379) @@ -1268,6 +1268,7 @@ static driver_t hptiop_pci_driver = { }; DRIVER_MODULE(hptiop, pci, hptiop_pci_driver, hptiop_devclass, 0, 0); +MODULE_DEPEND(hptiop, cam, 1, 1, 1); static int hptiop_probe(device_t dev) { Modified: head/sys/dev/hptmv/entry.c ============================================================================== --- head/sys/dev/hptmv/entry.c Fri Jun 1 04:26:50 2012 (r236378) +++ head/sys/dev/hptmv/entry.c Fri Jun 1 04:34:49 2012 (r236379) @@ -108,6 +108,7 @@ static devclass_t hpt_devclass; #define __DRIVER_MODULE(p1, p2, p3, p4, p5, p6) DRIVER_MODULE(p1, p2, p3, p4, p5, p6) __DRIVER_MODULE(PROC_DIR_NAME, pci, hpt_pci_driver, hpt_devclass, 0, 0); +MODULE_DEPEND(PROC_DIR_NAME, cam, 1, 1, 1); #define ccb_ccb_ptr spriv_ptr0 #define ccb_adapter ccb_h.spriv_ptr1 Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Fri Jun 1 04:26:50 2012 (r236378) +++ head/sys/dev/isp/isp_pci.c Fri Jun 1 04:34:49 2012 (r236379) @@ -372,6 +372,8 @@ static driver_t isp_pci_driver = { }; static devclass_t isp_devclass; DRIVER_MODULE(isp, pci, isp_pci_driver, isp_devclass, 0, 0); +MODULE_DEPEND(isp, cam, 1, 1, 1); +MODULE_DEPEND(isp, firmware, 1, 1, 1); static int isp_pci_probe(device_t dev) Modified: head/sys/dev/isp/isp_sbus.c ============================================================================== --- head/sys/dev/isp/isp_sbus.c Fri Jun 1 04:26:50 2012 (r236378) +++ head/sys/dev/isp/isp_sbus.c Fri Jun 1 04:34:49 2012 (r236379) @@ -106,6 +106,8 @@ static driver_t isp_sbus_driver = { }; static devclass_t isp_devclass; DRIVER_MODULE(isp, sbus, isp_sbus_driver, isp_devclass, 0, 0); +MODULE_DEPEND(isp, cam, 1, 1, 1); +MODULE_DEPEND(isp, firmware, 1, 1, 1); static int isp_sbus_probe(device_t dev) From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 04:42:52 2012 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 C676D1065670; Fri, 1 Jun 2012 04:42:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1A7F8FC1A; Fri, 1 Jun 2012 04:42:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q514gqdS084150; Fri, 1 Jun 2012 04:42:52 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q514gqqv084148; Fri, 1 Jun 2012 04:42:52 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201206010442.q514gqqv084148@svn.freebsd.org> From: Eitan Adler Date: Fri, 1 Jun 2012 04:42: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: r236380 - head/sys/vm 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, 01 Jun 2012 04:42:52 -0000 Author: eadler Date: Fri Jun 1 04:42:52 2012 New Revision: 236380 URL: http://svn.freebsd.org/changeset/base/236380 Log: Add sysctl to query amount of swap space free PR: kern/166780 Submitted by: Radim Kolar Approved by: cperciva MFC after: 1 week Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Fri Jun 1 04:34:49 2012 (r236379) +++ head/sys/vm/swap_pager.c Fri Jun 1 04:42:52 2012 (r236380) @@ -2692,3 +2692,18 @@ swaponvp(struct thread *td, struct vnode NODEV); return (0); } + +static int +sysctl_vm_swap_free(SYSCTL_HANDLER_ARGS) { + int swap_free, used; + int total; + + swap_pager_status(&total, &used); + + swap_free = (total - used) * PAGE_SIZE; + return SYSCTL_OUT(req, &swap_free, sizeof(swap_free)); +} + +SYSCTL_OID(_vm, OID_AUTO, swap_free, CTLTYPE_INT|CTLFLAG_RD|CTLFLAG_MPSAFE, + NULL, 0, sysctl_vm_swap_free, "Q", + "Blocks of free swap storage."); From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 05:14:38 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 18F9D1067FE9; Fri, 1 Jun 2012 05:13:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail16.syd.optusnet.com.au (mail16.syd.optusnet.com.au [211.29.132.197]) by mx1.freebsd.org (Postfix) with ESMTP id 0E8868FC0C; Fri, 1 Jun 2012 05:13:56 +0000 (UTC) Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail16.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q515DmrV001102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 1 Jun 2012 15:13:49 +1000 Date: Fri, 1 Jun 2012 15:13:48 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler In-Reply-To: <201206010423.q514NKtf083043@svn.freebsd.org> Message-ID: <20120601150242.V1226@besplex.bde.org> References: <201206010423.q514NKtf083043@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: r236377 - head/sys/dev/vxge/vxgehal 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, 01 Jun 2012 05:14:38 -0000 On Fri, 1 Jun 2012, Eitan Adler wrote: > Author: eadler > Date: Fri Jun 1 04:23:20 2012 > New Revision: 236377 > URL: http://svn.freebsd.org/changeset/base/236377 > > Log: > Fix warning generated by clang; > warning: equality comparison with extraneous parentheses > [-Wparentheses-equality] > > Reported by: arundel > Reviewed by: gnn > Approved by: cperciva > MFC after: 3 days > > Modified: > head/sys/dev/vxge/vxgehal/vxgehal-channel.h > > Modified: head/sys/dev/vxge/vxgehal/vxgehal-channel.h > ============================================================================== > --- head/sys/dev/vxge/vxgehal/vxgehal-channel.h Fri Jun 1 03:59:08 2012 (r236376) > +++ head/sys/dev/vxge/vxgehal/vxgehal-channel.h Fri Jun 1 04:23:20 2012 (r236377) > @@ -291,7 +291,7 @@ __hal_channel_dtr_restore(__hal_channel_ > else > dtr_index = channel->reserve_index - 1; > > - if ((channel->dtr_arr[dtr_index].dtr == dtrh)) { > + if ((channel->dtr_arr[dtr_index].dtr = dtrh) != NULL) { > > channel->reserve_index = dtr_index; > channel->dtr_arr[dtr_index].state = VXGE_HAL_CHANNEL_DTR_FREE; > This seems to change a style by (excessive parentheses for a normal equality test) into logic bug (assignment of dtrh instead of compariing with it). Bruce From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 06:08:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 39FE1106566C; Fri, 1 Jun 2012 06:08:16 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id ADC008FC19; Fri, 1 Jun 2012 06:08:15 +0000 (UTC) Received: by yenl8 with SMTP id l8so1774408yen.13 for ; Thu, 31 May 2012 23:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=uYKfBF5rQ7+znH8Ti58EHJysV/ikc7TSxrQ7g28eBPQ=; b=xta4VGHcttus8SuceQIc4RKEct+N7qRQ9OBAylCJroFyE5uIcayMkyt6Mk5THeG50S AQfu8jEi3h154xrH0SRfsssLvbrO2Kjr/Lk9wdqizqCLMkL6f3Wb9WT6uHuEuXGybGz8 vWo/8PSy+dzayeltBw+0flbcaUk0hAhULTWkbZ4fjCFB7R9bCL9nM6w3EbXgzi2eK2h0 mSPrmcP2zMvMk04+1Hj2GuPPF3nlFi/eXDmyodyOhJbXNbefWIYCsAgncdU4jJJzgKmX paUv22VJyLDgvKiUnjJAHrLh20fhHc6hpWxp4KHZyIVUaWDNKML5aDDnGwjSdw2xoFNd 6n5g== MIME-Version: 1.0 Received: by 10.50.47.164 with SMTP id e4mr280916ign.10.1338530894835; Thu, 31 May 2012 23:08:14 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.64.8.170 with HTTP; Thu, 31 May 2012 23:08:14 -0700 (PDT) In-Reply-To: <201206010442.q514gqqv084148@svn.freebsd.org> References: <201206010442.q514gqqv084148@svn.freebsd.org> Date: Fri, 1 Jun 2012 10:08:14 +0400 X-Google-Sender-Auth: sH8c0t4VmmnvNI1-oJ6_A6qfRnA Message-ID: From: Sergey Kandaurov To: Eitan Adler 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: r236380 - head/sys/vm 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, 01 Jun 2012 06:08:16 -0000 On 1 June 2012 08:42, Eitan Adler wrote: > Author: eadler > Date: Fri Jun =A01 04:42:52 2012 > New Revision: 236380 > URL: http://svn.freebsd.org/changeset/base/236380 > > Log: > =A0Add sysctl to query amount of swap space free > > =A0PR: =A0 =A0 =A0 =A0 =A0 kern/166780 > =A0Submitted by: Radim Kolar > =A0Approved by: =A0cperciva > =A0MFC after: =A0 =A01 week Well, we already have more powerful vm.swap_info, so I see no reason to add yet another one to do the same thing (but now with a human interface). Probably sysctl(8) should be enhanced to parse it instead. > > Modified: > =A0head/sys/vm/swap_pager.c > > Modified: head/sys/vm/swap_pager.c > =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/vm/swap_pager.c =A0 =A0Fri Jun =A01 04:34:49 2012 =A0 =A0 = =A0 =A0(r236379) > +++ head/sys/vm/swap_pager.c =A0 =A0Fri Jun =A01 04:42:52 2012 =A0 =A0 = =A0 =A0(r236380) > @@ -2692,3 +2692,18 @@ swaponvp(struct thread *td, struct vnode > =A0 =A0 =A0 =A0 =A0 =A0NODEV); > =A0 =A0 =A0 =A0return (0); > =A0} > + > +static int > +sysctl_vm_swap_free(SYSCTL_HANDLER_ARGS) { > + =A0 =A0 =A0 int swap_free, used; > + =A0 =A0 =A0 int total; > + > + =A0 =A0 =A0 swap_pager_status(&total, &used); > + > + =A0 =A0 =A0 swap_free =3D (total - used) * PAGE_SIZE; > + =A0 =A0 =A0 return SYSCTL_OUT(req, &swap_free, sizeof(swap_free)); > +} > + > +SYSCTL_OID(_vm, OID_AUTO, swap_free, CTLTYPE_INT|CTLFLAG_RD|CTLFLAG_MPSA= FE, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 NULL, 0, sysctl_vm_swap_free, "Q", > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 "Blocks of free swap storage."); --=20 wbr, pluknet From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 06:20:40 2012 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 B30721065689; Fri, 1 Jun 2012 06:20:40 +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 84AB58FC12; Fri, 1 Jun 2012 06:20:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q516Ke30091614; Fri, 1 Jun 2012 06:20:40 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q516KeZ9091612; Fri, 1 Jun 2012 06:20:40 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201206010620.q516KeZ9091612@svn.freebsd.org> From: Adrian Chadd Date: Fri, 1 Jun 2012 06:20: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: r236381 - head/sys/dev/wpi 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, 01 Jun 2012 06:20:40 -0000 Author: adrian Date: Fri Jun 1 06:20:39 2012 New Revision: 236381 URL: http://svn.freebsd.org/changeset/base/236381 Log: Add a missing #include, required for IEEE80211_DEBUG. Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Fri Jun 1 04:42:52 2012 (r236380) +++ head/sys/dev/wpi/if_wpi.c Fri Jun 1 06:20:39 2012 (r236381) @@ -59,6 +59,8 @@ __FBSDID("$FreeBSD$"); * via the firmware. */ +#include "opt_wlan.h" + #include #include #include From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 06:24:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DAEFE1065670 for ; Fri, 1 Jun 2012 06:24:13 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 925D48FC21 for ; Fri, 1 Jun 2012 06:24:13 +0000 (UTC) Received: by obcni5 with SMTP id ni5so3110468obc.13 for ; Thu, 31 May 2012 23:24:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=hdD3gQLdSIWzwW6eOLWL7dnZYYyrm5058wju2mH7+Tc=; b=jMK/4XjIVqgiin6a1wk4X85du2BZh5kf4sK+3dBEPbkZVHAOop2H1+SJlMdikHcTmq 9v1fViDcLxdHDhivpYIEB87lKONOXDQWSbW4m9WqNx+mw7I7m9Te6JHTSCC5LASOKpdJ 7QFYNe94GxZ8usWnD8/1CZljoX2UJYpVqIKWY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=hdD3gQLdSIWzwW6eOLWL7dnZYYyrm5058wju2mH7+Tc=; b=FNvIQXSh3Gs6EomO1G3+O00Ve1U04CXxw+B9seVQtwOACyS7rRYPCG7JpzavEak3gx QNGyC4U7S/dqkHAg6iP0wZZ7csmBJxAtnB3u+WjzR3TLLPQ0du22k7rZu/ljLrILcetR 3TYiGbqxYejyI8cq/P9w/mLHCMPaNCZz1kVqHlFYGGyHEvOOQj+EvCMkU4bYb8bMzPH/ AD0tGUiDJliBOTUZfy4ol8LYMNTKYIiQwj6bCnppP1JfwRvXKFGQlwizQfjRCxzQ+1BZ fqf4iENiTYI9lz0OVFk+UA5UV64gGPf7t0pAK+wLSfHfLnmrLNF3O5ZYngJN7kctlVw6 sdzA== Received: by 10.182.131.2 with SMTP id oi2mr1289887obb.43.1338531852980; Thu, 31 May 2012 23:24:12 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.182.204.69 with HTTP; Thu, 31 May 2012 23:23:42 -0700 (PDT) In-Reply-To: <20120601150242.V1226@besplex.bde.org> References: <201206010423.q514NKtf083043@svn.freebsd.org> <20120601150242.V1226@besplex.bde.org> From: Eitan Adler Date: Thu, 31 May 2012 23:23:42 -0700 X-Google-Sender-Auth: jo31WrorbtctJZdUPPm_uftyzwM Message-ID: To: Bruce Evans Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQljP3Uz0qB3USUgbUSxrMZrSXTkCLexAFK6Idgn5vWrAWGFGWp71FeO2XC4IVIv8EY2i76C Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r236377 - head/sys/dev/vxge/vxgehal 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, 01 Jun 2012 06:24:13 -0000 On 31 May 2012 22:13, Bruce Evans wrote: > This seems to change a style by (excessive parentheses for a normal > equality test) into logic bug (assignment of dtrh instead of compariing > with it). intentional - perhaps my commit message was poorly worded. The comment above says 283 /* 284 * restore a previously allocated dtrh at current offset and update 285 * the available reserve length accordingly. If dtrh is null just 286 * update the reserve length, only 287 */ and gnn confirmed that the patch as committed is correct. -- Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 06:50:38 2012 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 655C21065670; Fri, 1 Jun 2012 06:50:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50D7D8FC15; Fri, 1 Jun 2012 06:50:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q516oc8d093136; Fri, 1 Jun 2012 06:50:38 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q516ocOh093134; Fri, 1 Jun 2012 06:50:38 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201206010650.q516ocOh093134@svn.freebsd.org> From: Dimitry Andric Date: Fri, 1 Jun 2012 06:50: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: r236386 - head/contrib/llvm/tools/bugpoint 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, 01 Jun 2012 06:50:38 -0000 Author: dim Date: Fri Jun 1 06:50:37 2012 New Revision: 236386 URL: http://svn.freebsd.org/changeset/base/236386 Log: Pull in r155978 from upstream llvm trunk: Fix unintentional use of operator bool. This enables llvm's bugpoint tool to build with libc++. MFC after: 3 days Modified: head/contrib/llvm/tools/bugpoint/ToolRunner.cpp Modified: head/contrib/llvm/tools/bugpoint/ToolRunner.cpp ============================================================================== --- head/contrib/llvm/tools/bugpoint/ToolRunner.cpp Fri Jun 1 06:45:14 2012 (r236385) +++ head/contrib/llvm/tools/bugpoint/ToolRunner.cpp Fri Jun 1 06:50:37 2012 (r236386) @@ -128,7 +128,7 @@ static int RunProgramRemotelyWithTimeout ErrorFile.close(); } - errs() << OS; + errs() << OS.str(); } return ReturnCode; From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 06:55:02 2012 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 5CDDE1065781; Fri, 1 Jun 2012 06:55:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E0B78FC17; Fri, 1 Jun 2012 06:55:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q516t2FC093372; Fri, 1 Jun 2012 06:55:02 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q516t2gU093370; Fri, 1 Jun 2012 06:55:02 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201206010655.q516t2gU093370@svn.freebsd.org> From: Dimitry Andric Date: Fri, 1 Jun 2012 06:55: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: r236387 - head/contrib/libc++/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, 01 Jun 2012 06:55:02 -0000 Author: dim Date: Fri Jun 1 06:55:01 2012 New Revision: 236387 URL: http://svn.freebsd.org/changeset/base/236387 Log: Fix dangling else in libc++'s __bit_reference header. This has also been sent upstream. MFC after: 3 days Modified: head/contrib/libc++/include/__bit_reference Modified: head/contrib/libc++/include/__bit_reference ============================================================================== --- head/contrib/libc++/include/__bit_reference Fri Jun 1 06:50:37 2012 (r236386) +++ head/contrib/libc++/include/__bit_reference Fri Jun 1 06:55:01 2012 (r236387) @@ -950,11 +950,15 @@ __equal_unaligned(__bit_iterator<_Cp, tr __storage_type __ddn = _VSTD::min<__storage_type>(__dn, __clz_r); __m = (~__storage_type(0) << __first2.__ctz_) & (~__storage_type(0) >> (__clz_r - __ddn)); if (__first2.__ctz_ > __first1.__ctz_) + { if ((*__first2.__seg_ & __m) != (__b << (__first2.__ctz_ - __first1.__ctz_))) return false; + } else + { if ((*__first2.__seg_ & __m) != (__b >> (__first1.__ctz_ - __first2.__ctz_))) return false; + } __first2.__seg_ += (__ddn + __first2.__ctz_) / __bits_per_word; __first2.__ctz_ = static_cast((__ddn + __first2.__ctz_) % __bits_per_word); __dn -= __ddn; From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 06:56:35 2012 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 BAF9C1065680; Fri, 1 Jun 2012 06:56:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A75D88FC19; Fri, 1 Jun 2012 06:56:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q516uZUn093475; Fri, 1 Jun 2012 06:56:35 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q516uZ1V093473; Fri, 1 Jun 2012 06:56:35 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201206010656.q516uZ1V093473@svn.freebsd.org> From: Dimitry Andric Date: Fri, 1 Jun 2012 06:56: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: r236388 - head/sbin/devd 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, 01 Jun 2012 06:56:35 -0000 Author: dim Date: Fri Jun 1 06:56:35 2012 New Revision: 236388 URL: http://svn.freebsd.org/changeset/base/236388 Log: Make devd build with libc++. MFC after: 3 days Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Fri Jun 1 06:55:01 2012 (r236387) +++ head/sbin/devd/devd.cc Fri Jun 1 06:56:35 2012 (r236388) @@ -807,7 +807,7 @@ create_socket(const char *name) unlink(name); if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) err(1, "fcntl"); - if (bind(fd, (struct sockaddr *) & sun, slen) < 0) + if (::bind(fd, (struct sockaddr *) & sun, slen) < 0) err(1, "bind"); listen(fd, 4); chown(name, 0, 0); /* XXX - root.wheel */ From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 07:20:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A2971065676; Fri, 1 Jun 2012 07:20:35 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id C37268FC16; Fri, 1 Jun 2012 07:20:34 +0000 (UTC) Received: from ur.dons.net.au (ppp14-2-17-50.lns21.adl2.internode.on.net [14.2.17.50]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id q517KRcv036367 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 1 Jun 2012 16:50:33 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: "Daniel O'Connor" In-Reply-To: Date: Fri, 1 Jun 2012 16:50:26 +0930 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201206010442.q514gqqv084148@svn.freebsd.org> To: Sergey Kandaurov X-Mailer: Apple Mail (2.1278) X-Spam-Score: 2.162 (**) BAYES_00,KHOP_DYNAMIC,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Eitan Adler Subject: Re: svn commit: r236380 - head/sys/vm 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, 01 Jun 2012 07:20:35 -0000 On 01/06/2012, at 15:38, Sergey Kandaurov wrote: > Well, we already have more powerful vm.swap_info, so > I see no reason to add yet another one to do the same thing > (but now with a human interface). > Probably sysctl(8) should be enhanced to parse it instead. There are already sysctls which have duplicate information, eg = kern.geom.conf* (text, XML & dot versions of the same data) -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 08:26:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF09C10656B9; Fri, 1 Jun 2012 08:26:50 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA87C8FC14; Fri, 1 Jun 2012 08:26:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q518QodY097367; Fri, 1 Jun 2012 08:26:50 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q518QoUc097364; Fri, 1 Jun 2012 08:26:50 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201206010826.q518QoUc097364@svn.freebsd.org> From: Michael Tuexen Date: Fri, 1 Jun 2012 08:26: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: r236391 - 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: Fri, 01 Jun 2012 08:26:51 -0000 Author: tuexen Date: Fri Jun 1 08:26:50 2012 New Revision: 236391 URL: http://svn.freebsd.org/changeset/base/236391 Log: Small cleanups. No functional change. MFC after: 3 days Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctputil.h Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Fri Jun 1 07:07:36 2012 (r236390) +++ head/sys/netinet/sctp_asconf.c Fri Jun 1 08:26:50 2012 (r236391) @@ -48,8 +48,6 @@ __FBSDID("$FreeBSD$"); * SCTP_DEBUG_ASCONF1: protocol info, general info and errors * SCTP_DEBUG_ASCONF2: detailed info */ -#ifdef SCTP_DEBUG -#endif /* SCTP_DEBUG */ static void Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Fri Jun 1 07:07:36 2012 (r236390) +++ head/sys/netinet/sctputil.h Fri Jun 1 08:26:50 2012 (r236391) @@ -381,7 +381,5 @@ sctp_auditing(int, struct sctp_inpcb *, void sctp_audit_log(uint8_t, uint8_t); #endif - - #endif /* _KERNEL */ #endif From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 08:28:27 2012 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 124231065670; Fri, 1 Jun 2012 08:28:27 +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 814EB8FC14; Fri, 1 Jun 2012 08:28:26 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q518S7XL023490; Fri, 1 Jun 2012 11:28:07 +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.5/8.14.5) with ESMTP id q518S607052985; Fri, 1 Jun 2012 11:28:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q518S6W0052984; Fri, 1 Jun 2012 11:28:06 +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, 1 Jun 2012 11:28:06 +0300 From: Konstantin Belousov To: Eitan Adler Message-ID: <20120601082806.GR2358@deviant.kiev.zoral.com.ua> References: <201206010442.q514gqqv084148@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KHxoa/2yf2SjDQvg" Content-Disposition: inline In-Reply-To: <201206010442.q514gqqv084148@svn.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=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham 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: r236380 - head/sys/vm 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, 01 Jun 2012 08:28:27 -0000 --KHxoa/2yf2SjDQvg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 01, 2012 at 04:42:52AM +0000, Eitan Adler wrote: > Author: eadler > Date: Fri Jun 1 04:42:52 2012 > New Revision: 236380 > URL: http://svn.freebsd.org/changeset/base/236380 >=20 > Log: > Add sysctl to query amount of swap space free > =20 > PR: kern/166780 > Submitted by: Radim Kolar > Approved by: cperciva > MFC after: 1 week >=20 > Modified: > head/sys/vm/swap_pager.c The commit messages lack any rationale for the change. The rationale specified in the PR is wrong, there _is_ the sysctl interface to read the swap use, vm.swap_info.N. It is used by e.g. swapinfo(8)/libkvm(3) on live system. >=20 > Modified: head/sys/vm/swap_pager.c > =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/vm/swap_pager.c Fri Jun 1 04:34:49 2012 (r236379) > +++ head/sys/vm/swap_pager.c Fri Jun 1 04:42:52 2012 (r236380) > @@ -2692,3 +2692,18 @@ swaponvp(struct thread *td, struct vnode > NODEV); > return (0); > } > + > +static int > +sysctl_vm_swap_free(SYSCTL_HANDLER_ARGS) { > + int swap_free, used; > + int total; > + > + swap_pager_status(&total, &used); > + > + swap_free =3D (total - used) * PAGE_SIZE; > + return SYSCTL_OUT(req, &swap_free, sizeof(swap_free)); > +} This just overflows at swap sizes greater then 2GB. > + > +SYSCTL_OID(_vm, OID_AUTO, swap_free, CTLTYPE_INT|CTLFLAG_RD|CTLFLAG_MPSA= FE, > + NULL, 0, sysctl_vm_swap_free, "Q", > + "Blocks of free swap storage."); Please revert the commit. --KHxoa/2yf2SjDQvg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/IfRYACgkQC3+MBN1Mb4jbxwCglxOXsoKwgOSPPe26n20E/vYY hWAAniG9a3SxbtiBOs+euXhw0ZQUdcOt =OWVg -----END PGP SIGNATURE----- --KHxoa/2yf2SjDQvg-- From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 08:44:18 2012 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 29521106566C; Fri, 1 Jun 2012 08:44:18 +0000 (UTC) (envelope-from jase@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1525B8FC17; Fri, 1 Jun 2012 08:44:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q518iH6o098148; Fri, 1 Jun 2012 08:44:17 GMT (envelope-from jase@svn.freebsd.org) Received: (from jase@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q518iHLa098146; Fri, 1 Jun 2012 08:44:17 GMT (envelope-from jase@svn.freebsd.org) Message-Id: <201206010844.q518iHLa098146@svn.freebsd.org> From: Jase Thew Date: Fri, 1 Jun 2012 08:44: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: r236392 - head/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, 01 Jun 2012 08:44:18 -0000 Author: jase (ports committer) Date: Fri Jun 1 08:44:17 2012 New Revision: 236392 URL: http://svn.freebsd.org/changeset/base/236392 Log: Add myself as a new committer. Approved by: flo, culot (mentors) Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Fri Jun 1 08:26:50 2012 (r236391) +++ head/usr.bin/calendar/calendars/calendar.freebsd Fri Jun 1 08:44:17 2012 (r236392) @@ -144,6 +144,7 @@ 05/08 Sean Kelly born in Walnut Creek, California, United States, 1982 05/09 Daniel Eischen born in Syracuse, New York, United States, 1963 05/09 Aaron Dalton born in Boise, Idaho, United States, 1973 +05/09 Jase Thew born in Abergavenny, Gwent, United Kingdom, 1974 05/10 Markus Brueffer born in Gronau, Nordrhein-Westfalen, Germany, 1977 05/11 Jesus Rodriguez born in Barcelona, Spain, 1972 05/11 Roman Kurakin born in Moscow, USSR, 1979 From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 09:14:21 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 14EFA1065674; Fri, 1 Jun 2012 09:14:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id 4FF458FC18; Fri, 1 Jun 2012 09:14:20 +0000 (UTC) Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q519E9Ym032736 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 1 Jun 2012 19:14:11 +1000 Date: Fri, 1 Jun 2012 19:14:09 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Sergey Kandaurov In-Reply-To: Message-ID: <20120601175403.H1865@besplex.bde.org> References: <201206010442.q514gqqv084148@svn.freebsd.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1047696930-1338542049=:1865" Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Eitan Adler Subject: Re: svn commit: r236380 - head/sys/vm 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, 01 Jun 2012 09:14:21 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1047696930-1338542049=:1865 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Fri, 1 Jun 2012, Sergey Kandaurov wrote: > On 1 June 2012 08:42, Eitan Adler wrote: >> ... >> Log: >> =A0Add sysctl to query amount of swap space free >> >> =A0PR: =A0 =A0 =A0 =A0 =A0 kern/166780 >> =A0Submitted by: Radim Kolar >> =A0Approved by: =A0cperciva >> =A0MFC after: =A0 =A01 week > > Well, we already have more powerful vm.swap_info, so > I see no reason to add yet another one to do the same thing > (but now with a human interface). The new interface provides many more bugs. Mostly style bugs, but also type mismatches and potential overflow. > Probably sysctl(8) should be enhanced to parse it instead. That would be another bug. sysctl(8) already does too much parsing. Parsing belongs in specialized utilities, and I think there are already some that do it for swap. sysctl(8) largest existing exessive parsing and presenting is for related vmtotal things. >> Modified: >> =A0head/sys/vm/swap_pager.c >> >> Modified: head/sys/vm/swap_pager.c >> =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/vm/swap_pager.c =A0 =A0Fri Jun =A01 04:34:49 2012 =A0 =A0 = =A0 =A0(r236379) >> +++ head/sys/vm/swap_pager.c =A0 =A0Fri Jun =A01 04:42:52 2012 =A0 =A0 = =A0 =A0(r236380) >> @@ -2692,3 +2692,18 @@ swaponvp(struct thread *td, struct vnode >> =A0 =A0 =A0 =A0 =A0 =A0NODEV); >> =A0 =A0 =A0 =A0return (0); >> =A0} Please don't put binary characters in mail. >> + >> +static int >> +sysctl_vm_swap_free(SYSCTL_HANDLER_ARGS) { First style bug: misplaced brace. >> + =A0 =A0 =A0 int swap_free, used; >> + =A0 =A0 =A0 int total; Second and third style bugs: int variables not altogther, and not sorted. But these are probably actually type and overflow errors (bugs 4 and 5)... >> + >> + =A0 =A0 =A0 swap_pager_status(&total, &used); >> + Bug 6 is a style bug (extra blank line). >> + =A0 =A0 =A0 swap_free =3D (total - used) * PAGE_SIZE; We multiply by PAGE_SIZE. This can probably overflow at 2G. Then assigning to the int variable overflows at the same point. This gives bugs 4 and 5. Related sysctls for memory sizes (see kern_mib.c) avoid this problem by using u_long instead of int. But for disk sizes, using u_long only reduces the problem to overflow at 4G, since systems with 32-bit longs can have larger disks than memory, and large disks can have large swap. I'm not sure if old restrictions on swap size have been fixed so that more than 2G can actually be allocated, but most places that muliply by PAGE_SIZE aee now careful to use expressions like '(vm_ooffset_t)nblks * PAGE_SIZE' and to assign the result to a variable of type vm_ooffset_t. swap_total is one such variable. But its sysctl has type errors too. vm_ooffset_t is just not a supported type in sysctl. SYSCTL_QUAD() is used for it. Quads shouldn't exist, and SYSCTL_QUAD() should never be used, especially for non-quads. There are now some support for 64-bit types in sysctl. Using these would be less bogus. Bug 7 is a style bug: the related sysctls for memory sizes use ctob() instead of hard-coding PAGE_SIZE. Avoiding this style bug also avoids multiplication overflow (else you need a cast to go above 2G starting with an int page count). ctob() is bogus too (seen any clicks lately?). >> + =A0 =A0 =A0 return SYSCTL_OUT(req, &swap_free, sizeof(swap_free)); Bug 8 is a style bug (no spaces around return value). >> +} >> + >> +SYSCTL_OID(_vm, OID_AUTO, swap_free, CTLTYPE_INT|CTLFLAG_RD|CTLFLAG_MPS= AFE, >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 NULL, 0, sysctl_vm_swap_free, "Q", >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 "Blocks of free swap storage."); Bug 9 is a style bug. I didn't even know that the raw SYSCTL_OID() could be misused like this. The normal SYSCTL_PROC() is identical with SYSCTL_OID() except it checks that the access flags are not 0. Few or no SYSCTL_FOO()s have no access flags, and this is not one. It has rather excessive access flags (I think CTLFLAG_MPSAFE is unnecessary. It is not used for the related memory sysctls). vm has 4 existing SYSCTL_OID()s; kern has 3; ia64/ia64 has 1; i386/i386 has 1; netipsec has 1. These are the only matches for ^SYSCTL_OID in /sys, and they all seem to be just style bugs. Bug 10 is a collection of style bugs (missing spaces around binary operator '|'). Bug 11 is a collection of style bugs (weird 2-tab continuation indentation instead of the normal 4 spaces. 5 out of 7 existing SYSCTL_*()s in this file including the vm_swap ones use normal continuation indentation. Bug 12 is the most serious type error. The format is "Q", but only an int is returned. I don't see how this can result in anything except garbage printing in sysctl(8). The access flag gives the type correctly as int, but sysctl(8) mostly uses the format string for output. Oops, that was in an old version. sysctl(8) now mostly uses the access flag, and has no literal Q's in it any more. So this error might not be serious, depending on whether the bad format string is actually used. The sysctl data doesn't give the size of type type, but leaves it as 0. This works because the size is given as sizeof(swap_free) in the call to SYSCTL_OUT(). This can be confusing, and use of the raw SYSCTL_OUT() should be avoided if possible. Many SYSCTL_PROC() routines and of course all macros like SYSCTL_INT() use sysctl_handle_foo() to handle integers. For this, the size is unfortunately encoded in the name of the function (so the function must be matched to the actual type in callers) and and is hard-coded in sysctl_handle_foo(). But unlike the raw SYSCTL_OUT(), sysctl_handle_foo() can in theory check for consistency between its name and the types in the data and thus detect type errors like the "Q" in the above. Bug 13 is a style bug (termination of the sysctl description with a "."). Bruce --0-1047696930-1338542049=:1865-- From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 09:32:38 2012 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 94C19106566B; Fri, 1 Jun 2012 09:32:38 +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 757908FC19; Fri, 1 Jun 2012 09:32:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q519WcKa000366; Fri, 1 Jun 2012 09:32:38 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q519Wc53000362; Fri, 1 Jun 2012 09:32:38 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201206010932.q519Wc53000362@svn.freebsd.org> From: Alexander Motin Date: Fri, 1 Jun 2012 09: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: r236393 - in head/sys/cam: . 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, 01 Jun 2012 09:32:38 -0000 Author: mav Date: Fri Jun 1 09:32:37 2012 New Revision: 236393 URL: http://svn.freebsd.org/changeset/base/236393 Log: Use AC_GETDEV_CHANGED async to notify ada driver about DMA and NCQ status change. Now that allows switching between PIO and DMA modes on the fly. Modified: head/sys/cam/ata/ata_da.c head/sys/cam/ata/ata_xpt.c head/sys/cam/cam_xpt.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Fri Jun 1 08:44:17 2012 (r236392) +++ head/sys/cam/ata/ata_da.c Fri Jun 1 09:32:37 2012 (r236393) @@ -742,6 +742,7 @@ static void adaasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg) { + struct ccb_getdev cgd; struct cam_periph *periph; struct ada_softc *softc; @@ -776,6 +777,32 @@ adaasync(void *callback_arg, u_int32_t c "due to status 0x%x\n", status); break; } + case AC_GETDEV_CHANGED: + { + softc = (struct ada_softc *)periph->softc; + xpt_setup_ccb(&cgd.ccb_h, periph->path, CAM_PRIORITY_NORMAL); + cgd.ccb_h.func_code = XPT_GDEV_TYPE; + xpt_action((union ccb *)&cgd); + + if ((cgd.ident_data.capabilities1 & ATA_SUPPORT_DMA) && + (cgd.inq_flags & SID_DMA)) + softc->flags |= ADA_FLAG_CAN_DMA; + else + softc->flags &= ~ADA_FLAG_CAN_DMA; + if ((cgd.ident_data.satacapabilities & ATA_SUPPORT_NCQ) && + (cgd.inq_flags & SID_DMA) && (cgd.inq_flags & SID_CmdQue)) + softc->flags |= ADA_FLAG_CAN_NCQ; + else + softc->flags &= ~ADA_FLAG_CAN_NCQ; + if ((cgd.ident_data.support_dsm & ATA_SUPPORT_DSM_TRIM) && + (cgd.inq_flags & SID_DMA)) + softc->flags |= ADA_FLAG_CAN_TRIM; + else + softc->flags &= ~ADA_FLAG_CAN_TRIM; + + cam_periph_async(periph, code, path, arg); + break; + } case AC_ADVINFO_CHANGED: { uintptr_t buftype; @@ -793,8 +820,6 @@ adaasync(void *callback_arg, u_int32_t c case AC_SENT_BDR: case AC_BUS_RESET: { - struct ccb_getdev cgd; - softc = (struct ada_softc *)periph->softc; cam_periph_async(periph, code, path, arg); if (softc->state != ADA_STATE_NORMAL) @@ -933,7 +958,7 @@ adaregister(struct cam_periph *periph, v bioq_init(&softc->bio_queue); bioq_init(&softc->trim_queue); - if (cgd->ident_data.capabilities1 & ATA_SUPPORT_DMA && + if ((cgd->ident_data.capabilities1 & ATA_SUPPORT_DMA) && (cgd->inq_flags & SID_DMA)) softc->flags |= ADA_FLAG_CAN_DMA; if (cgd->ident_data.support.command2 & ATA_SUPPORT_ADDRESS48) @@ -942,10 +967,11 @@ adaregister(struct cam_periph *periph, v softc->flags |= ADA_FLAG_CAN_FLUSHCACHE; if (cgd->ident_data.support.command1 & ATA_SUPPORT_POWERMGT) softc->flags |= ADA_FLAG_CAN_POWERMGT; - if (cgd->ident_data.satacapabilities & ATA_SUPPORT_NCQ && + if ((cgd->ident_data.satacapabilities & ATA_SUPPORT_NCQ) && (cgd->inq_flags & SID_DMA) && (cgd->inq_flags & SID_CmdQue)) softc->flags |= ADA_FLAG_CAN_NCQ; - if (cgd->ident_data.support_dsm & ATA_SUPPORT_DSM_TRIM) { + if ((cgd->ident_data.support_dsm & ATA_SUPPORT_DSM_TRIM) && + (cgd->inq_flags & SID_DMA)) { softc->flags |= ADA_FLAG_CAN_TRIM; softc->trim_max_ranges = TRIM_MAX_RANGES; if (cgd->ident_data.max_dsm_blocks != 0) { @@ -1103,7 +1129,8 @@ adaregister(struct cam_periph *periph, v * not attach the device on failure. */ xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE | - AC_ADVINFO_CHANGED, adaasync, periph, periph->path); + AC_GETDEV_CHANGED | AC_ADVINFO_CHANGED, + adaasync, periph, periph->path); /* * Schedule a periodic event to occasionally send an Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Fri Jun 1 08:44:17 2012 (r236392) +++ head/sys/cam/ata/ata_xpt.c Fri Jun 1 09:32:37 2012 (r236393) @@ -413,6 +413,7 @@ negotiate: path->device->inq_flags &= ~SID_DMA; else path->device->inq_flags |= SID_DMA; + xpt_async(AC_GETDEV_CHANGED, path, NULL); cam_fill_ataio(ataio, 1, probedone, @@ -1018,6 +1019,7 @@ noerror: } path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID; + xpt_async(AC_GETDEV_CHANGED, path, NULL); } if (ident_buf->satacapabilities & ATA_SUPPORT_NCQ) { path->device->mintags = 2; Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Fri Jun 1 08:44:17 2012 (r236392) +++ head/sys/cam/cam_xpt.c Fri Jun 1 09:32:37 2012 (r236393) @@ -4715,6 +4715,7 @@ xpt_start_tags(struct cam_path *path) newopenings = min(device->maxtags, sim->max_tagged_dev_openings); xpt_dev_ccbq_resize(path, newopenings); + xpt_async(AC_GETDEV_CHANGED, path, NULL); xpt_setup_ccb(&crs.ccb_h, path, CAM_PRIORITY_NORMAL); crs.ccb_h.func_code = XPT_REL_SIMQ; crs.release_flags = RELSIM_RELEASE_AFTER_QEMPTY; @@ -4739,6 +4740,7 @@ xpt_stop_tags(struct cam_path *path) xpt_freeze_devq(path, /*count*/1); device->inq_flags &= ~SID_CmdQue; xpt_dev_ccbq_resize(path, sim->max_dev_openings); + xpt_async(AC_GETDEV_CHANGED, path, NULL); xpt_setup_ccb(&crs.ccb_h, path, CAM_PRIORITY_NORMAL); crs.ccb_h.func_code = XPT_REL_SIMQ; crs.release_flags = RELSIM_RELEASE_AFTER_QEMPTY; From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 11:42:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7F47D106564A; Fri, 1 Jun 2012 11:42:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B1108FC14; Fri, 1 Jun 2012 11:42:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51BgpZd016973; Fri, 1 Jun 2012 11:42:51 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51BgpaZ016971; Fri, 1 Jun 2012 11:42:51 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201206011142.q51BgpaZ016971@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 1 Jun 2012 11:42: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: r236394 - 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: Fri, 01 Jun 2012 11:42:51 -0000 Author: bz Date: Fri Jun 1 11:42:50 2012 New Revision: 236394 URL: http://svn.freebsd.org/changeset/base/236394 Log: Make TCP LRO work properly with VIMAGE kernels rather than just panicing. There's no VIMAGE context set there yet as this is before if_ethersubr.c. MFC after: 3 days X-MFC with: r235981 Modified: head/sys/netinet/tcp_lro.c Modified: head/sys/netinet/tcp_lro.c ============================================================================== --- head/sys/netinet/tcp_lro.c Fri Jun 1 09:32:37 2012 (r236393) +++ head/sys/netinet/tcp_lro.c Fri Jun 1 11:42:50 2012 (r236394) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -370,10 +371,14 @@ tcp_lro_rx(struct lro_ctrl *lc, struct m switch (eh_type) { #ifdef INET6 case ETHERTYPE_IPV6: + { + CURVNET_SET(lc->ifp->if_vnet); if (V_ip6_forwarding != 0) { /* XXX-BZ stats but changing lro_ctrl is a problem. */ + CURVNET_RESTORE(); return (TCP_LRO_CANNOT); } + CURVNET_RESTORE(); l3hdr = ip6 = (struct ip6_hdr *)(eh + 1); error = tcp_lro_rx_ipv6(lc, m, ip6, &th); if (error != 0) @@ -381,13 +386,18 @@ tcp_lro_rx(struct lro_ctrl *lc, struct m tcp_data_len = ntohs(ip6->ip6_plen); ip_len = sizeof(*ip6) + tcp_data_len; break; + } #endif #ifdef INET case ETHERTYPE_IP: + { + CURVNET_SET(lc->ifp->if_vnet); if (V_ipforwarding != 0) { /* XXX-BZ stats but changing lro_ctrl is a problem. */ + CURVNET_RESTORE(); return (TCP_LRO_CANNOT); } + CURVNET_RESTORE(); l3hdr = ip4 = (struct ip *)(eh + 1); error = tcp_lro_rx_ipv4(lc, m, ip4, &th); if (error != 0) @@ -395,6 +405,7 @@ tcp_lro_rx(struct lro_ctrl *lc, struct m ip_len = ntohs(ip4->ip_len); tcp_data_len = ip_len - sizeof(*ip4); break; + } #endif /* XXX-BZ what happens in case of VLAN(s)? */ default: From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 15:02:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5F21E1065673; Fri, 1 Jun 2012 15:02:24 +0000 (UTC) (envelope-from ghelmer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 402D78FC16; Fri, 1 Jun 2012 15:02:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51F2OCK025974; Fri, 1 Jun 2012 15:02:24 GMT (envelope-from ghelmer@svn.freebsd.org) Received: (from ghelmer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51F2OB2025972; Fri, 1 Jun 2012 15:02:24 GMT (envelope-from ghelmer@svn.freebsd.org) Message-Id: <201206011502.q51F2OB2025972@svn.freebsd.org> From: Guy Helmer Date: Fri, 1 Jun 2012 15:02:24 +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: r236402 - head/lib/libc/gen 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, 01 Jun 2012 15:02:24 -0000 Author: ghelmer Date: Fri Jun 1 15:02:23 2012 New Revision: 236402 URL: http://svn.freebsd.org/changeset/base/236402 Log: Style(9) improvements: remove unnecessary parenthesis, improve order of local variable declarations, remove bogus casts, and resolve long lines. Reviewed by: bde Modified: head/lib/libc/gen/getnetgrent.c Modified: head/lib/libc/gen/getnetgrent.c ============================================================================== --- head/lib/libc/gen/getnetgrent.c Fri Jun 1 14:57:55 2012 (r236401) +++ head/lib/libc/gen/getnetgrent.c Fri Jun 1 15:02:23 2012 (r236402) @@ -309,28 +309,30 @@ _revnetgr_lookup(char* lookupdom, char* for (rot = 0; ; rot++) { switch (rot) { - case(0): + case 0: snprintf(key, MAXHOSTNAMELEN, "%s.%s", str, dom ? dom : lookupdom); break; - case(1): + case 1: snprintf(key, MAXHOSTNAMELEN, "%s.*", str); break; - case(2): + case 2: snprintf(key, MAXHOSTNAMELEN, "*.%s", dom ? dom : lookupdom); break; - case(3): + case 3: snprintf(key, MAXHOSTNAMELEN, "*.*"); break; - default: return (0); + default: + return (0); } y = yp_match(lookupdom, map, key, strlen(key), &result, - &resultlen); + &resultlen); if (y == 0) { rv = _listmatch(result, group, resultlen); free(result); - if (rv) return (1); + if (rv) + return (1); } else if (y != YPERR_KEY) { /* * If we get an error other than 'no @@ -417,14 +419,14 @@ innetgr(const char *group, const char *h static int parse_netgrp(const char *group) { - char *spos, *epos; - int len, strpos; + struct netgrp *grp; + struct linelist *lp = linehead; + char **ng; + char *epos, *gpos, *pos, *spos; + int freepos, len, strpos; #ifdef DEBUG int fields; #endif - char *pos, *gpos; - struct netgrp *grp; - struct linelist *lp = linehead; /* * First, see if the line has already been read in. @@ -454,49 +456,48 @@ parse_netgrp(const char *group) /* Watch for null pointer dereferences, dammit! */ while (pos != NULL && *pos != '\0') { if (*pos == '(') { - grp = (struct netgrp *)malloc(sizeof (struct netgrp)); + grp = malloc(sizeof(*grp)); if (grp == NULL) return (1); - bzero((char *)grp, sizeof (struct netgrp)); + ng = grp->ng_str; + bzero(grp, sizeof(*grp)); pos++; gpos = strsep(&pos, ")"); #ifdef DEBUG fields = 0; #endif for (strpos = 0; strpos < 3; strpos++) { - if ((spos = strsep(&gpos, ","))) { -#ifdef DEBUG - fields++; -#endif - while (*spos == ' ' || *spos == '\t') - spos++; - if ((epos = strpbrk(spos, " \t"))) { - *epos = '\0'; - len = epos - spos; - } else - len = strlen(spos); - if (len > 0) { - grp->ng_str[strpos] = (char *) - malloc(len + 1); - if (grp->ng_str[strpos] == NULL) { - int freepos; - for (freepos = 0; freepos < strpos; freepos++) - free(grp->ng_str[freepos]); - free(grp); - return (1); - } - bcopy(spos, grp->ng_str[strpos], - len + 1); - } - } else { + if ((spos = strsep(&gpos, ",")) == NULL) { /* * All other systems I've tested * return NULL for empty netgroup * fields. It's up to user programs * to handle the NULLs appropriately. */ - grp->ng_str[strpos] = NULL; + ng[strpos] = NULL; + continue; + } +#ifdef DEBUG + fields++; +#endif + while (*spos == ' ' || *spos == '\t') + spos++; + if ((epos = strpbrk(spos, " \t"))) { + *epos = '\0'; + len = epos - spos; + } else + len = strlen(spos); + if (len <= 0) + continue; + ng[strpos] = malloc(len + 1); + if (ng[strpos] == NULL) { + for (freepos = 0; freepos < strpos; + freepos++) + free(ng[freepos]); + free(grp); + return (1); } + bcopy(spos, ng[strpos], len + 1); } grp->ng_next = grouphead.gr; grouphead.gr = grp; @@ -507,14 +508,15 @@ parse_netgrp(const char *group) * can catch bad entries and report them, we should * stay silent by default for compatibility's sake. */ - if (fields < 3) - fprintf(stderr, "Bad entry (%s%s%s%s%s) in netgroup \"%s\"\n", - grp->ng_str[NG_HOST] == NULL ? "" : grp->ng_str[NG_HOST], - grp->ng_str[NG_USER] == NULL ? "" : ",", - grp->ng_str[NG_USER] == NULL ? "" : grp->ng_str[NG_USER], - grp->ng_str[NG_DOM] == NULL ? "" : ",", - grp->ng_str[NG_DOM] == NULL ? "" : grp->ng_str[NG_DOM], - lp->l_groupname); + if (fields < 3) { + fprintf(stderr, + "Bad entry (%s%s%s%s%s) in netgroup \"%s\"\n", + ng[NG_HOST] == NULL ? "" : ng[NG_HOST], + ng[NG_USER] == NULL ? "" : ",", + ng[NG_USER] == NULL ? "" : ng[NG_USER], + ng[NG_DOM] == NULL ? "" : ",", + ng[NG_DOM] == NULL ? "" : ng[NG_DOM], + lp->l_groupname); #endif } else { spos = strsep(&pos, ", \t"); @@ -552,7 +554,7 @@ read_for_group(const char *group) if(yp_get_default_domain(&_netgr_yp_domain)) continue; if (yp_match(_netgr_yp_domain, "netgroup", group, - strlen(group), &result, &resultlen)) { + strlen(group), &result, &resultlen)) { free(result); if (_use_only_yp) return ((struct linelist *)0); @@ -613,7 +615,7 @@ read_for_group(const char *group) } else cont = 0; if (len > 0) { - linep = (char *)reallocf(linep, olen + len + 1); + linep = reallocf(linep, olen + len + 1); if (linep == NULL) { free(lp->l_groupname); free(lp); From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 15:22:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6501106564A; Fri, 1 Jun 2012 15:22:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 980B88FC0A; Fri, 1 Jun 2012 15:22:50 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1481CB94E; Fri, 1 Jun 2012 11:22:50 -0400 (EDT) From: John Baldwin To: Eitan Adler Date: Fri, 1 Jun 2012 10:24:48 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201206010423.q514NKtf083043@svn.freebsd.org> <20120601150242.V1226@besplex.bde.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201206011024.49122.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 01 Jun 2012 11:22:50 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans Subject: Re: svn commit: r236377 - head/sys/dev/vxge/vxgehal 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, 01 Jun 2012 15:22:50 -0000 On Friday, June 01, 2012 2:23:42 am Eitan Adler wrote: > On 31 May 2012 22:13, Bruce Evans wrote: > > This seems to change a style by (excessive parentheses for a normal > > equality test) into logic bug (assignment of dtrh instead of compariing > > with it). > > intentional - perhaps my commit message was poorly worded. > > The comment above says > 283 /* > 284 * restore a previously allocated dtrh at current offset and update > 285 * the available reserve length accordingly. If dtrh is null just > 286 * update the reserve length, only > 287 */ > > > and gnn confirmed that the patch as committed is correct. This is why I personally loathe assignment side effects in boolean expressions for control flow. I tend to write this sort of thing instead as: channel->dtr_arr[dtr_index].dtr = dtrh; if (dtrh != NULL) { -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 15:24:09 2012 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 53CBF1065674 for ; Fri, 1 Jun 2012 15:24:09 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0BD398FC16 for ; Fri, 1 Jun 2012 15:24:07 +0000 (UTC) Received: by obcni5 with SMTP id ni5so3894564obc.13 for ; Fri, 01 Jun 2012 08:24:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=WBGQhopJWnD0Wh+3ary980W8vOfT5L81Nix22c/EAzc=; b=ShB6l6przN9ZPfKR+RWlr72/DBr8AoStCg2asdduFL7ET4+OWgfTAbZrsf8nkPSVjD UnPI195MmeuM+PPUqEKOYdfc4bbaMvaaSv0yaxX39TGQizoc+ITcVE2pJK+aF1nDhOYq tbXnGvea+EzvKPcjOKl7Sst5U3Yku4wVg/Jnc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=WBGQhopJWnD0Wh+3ary980W8vOfT5L81Nix22c/EAzc=; b=gpdm0T6faNd379PzPbbUtWuZ78UC2or9cAU9BgmIv2gyj2uy7WqrgVBqa0TC1Tu9mp 8E+s9vGtnhPXH7IR3xpliHmENHlvd+Z0pkovl/ObfvsT5gIFsJfzH11InvSukK6lZZLY pit0rkIX7mmL7FtghG801MsKdXDQyEHkq19dkWHp0EsQAaF2seBnEUrUq3+87gGEvkRf dT27rg37KeTF/MGthGTxJFPJd+Qs/shnJhxm0snYm0YZNb5HywtB5wcAJ3xHGCRoX7ly 8JNo2h7DfcgFpRw9A+tpZv2SkJV2tuZ9PFqeBOBu7+ko3OXnyNS+9pKNr+ZTDJro/xA8 IWkw== Received: by 10.182.151.113 with SMTP id up17mr3088238obb.40.1338564247312; Fri, 01 Jun 2012 08:24:07 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.182.204.69 with HTTP; Fri, 1 Jun 2012 08:23:37 -0700 (PDT) In-Reply-To: <20120601175403.H1865@besplex.bde.org> References: <201206010442.q514gqqv084148@svn.freebsd.org> <20120601175403.H1865@besplex.bde.org> From: Eitan Adler Date: Fri, 1 Jun 2012 11:23:37 -0400 X-Google-Sender-Auth: ps0iqLIHJmYsDi6bdSjtpfhkHmo Message-ID: To: Bruce Evans Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQnSCV/fwD470uN0WDOWo07TNg13aa11/Lev5x+cT3vI+QJjMn+dLp55DiGAUH6EJ+coGUI6 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Sergey Kandaurov , src-committers@freebsd.org Subject: Re: svn commit: r236380 - head/sys/vm 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, 01 Jun 2012 15:24:09 -0000 On 1 June 2012 05:14, Bruce Evans wrote: >> On 1 June 2012 08:42, Eitan Adler wrote: ... I want to ack the replies to this commit. I'll either try to fix the bugs mentioned here, or more likely revert the commit. Note that it may take a few days for me to get to this though. -- Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 15:26:33 2012 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 78E6F1065672; Fri, 1 Jun 2012 15:26:33 +0000 (UTC) (envelope-from iwasaki@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 620AD8FC18; Fri, 1 Jun 2012 15:26:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51FQXV3027081; Fri, 1 Jun 2012 15:26:33 GMT (envelope-from iwasaki@svn.freebsd.org) Received: (from iwasaki@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51FQX8h027075; Fri, 1 Jun 2012 15:26:33 GMT (envelope-from iwasaki@svn.freebsd.org) Message-Id: <201206011526.q51FQX8h027075@svn.freebsd.org> From: Mitsuru IWASAKI Date: Fri, 1 Jun 2012 15:26: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: r236403 - in head/sys: amd64/acpica dev/acpica i386/acpica ia64/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: Fri, 01 Jun 2012 15:26:33 -0000 Author: iwasaki Date: Fri Jun 1 15:26:32 2012 New Revision: 236403 URL: http://svn.freebsd.org/changeset/base/236403 Log: Call AcpiLeaveSleepStatePrep() in interrupt disabled context (described in ACPICA source code). - Move intr_disable() and intr_restore() from acpi_wakeup.c to acpi.c and call AcpiLeaveSleepStatePrep() in interrupt disabled context. - Add acpi_wakeup_machdep() to execute wakeup MD procedures and call it twice in interrupt disabled/enabled context (ia64 version is just dummy). - Rename wakeup_cpus variable in acpi_sleep_machdep() to suspcpus in order to be shared by acpi_sleep_machdep() and acpi_wakeup_machdep(). - Move identity mapping related code to acpi_install_wakeup_handler() (i386 version) for preparation of x86/acpica/acpi_wakeup.c (MFC candidate). Reviewed by: jkim@ MFC after: 2 days Modified: head/sys/amd64/acpica/acpi_wakeup.c head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpivar.h head/sys/i386/acpica/acpi_wakeup.c head/sys/ia64/acpica/acpi_wakeup.c Modified: head/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- head/sys/amd64/acpica/acpi_wakeup.c Fri Jun 1 15:02:23 2012 (r236402) +++ head/sys/amd64/acpica/acpi_wakeup.c Fri Jun 1 15:26:32 2012 (r236403) @@ -76,6 +76,10 @@ static struct pcb **susppcbs; static void **suspfpusave; #endif +#ifdef SMP +static cpuset_t suspcpus; +#endif + int acpi_restorecpu(uint64_t, vm_offset_t); static void *acpi_alloc_wakeup_handler(void); @@ -220,21 +224,14 @@ acpi_wakeup_cpus(struct acpi_softc *sc, int acpi_sleep_machdep(struct acpi_softc *sc, int state) { -#ifdef SMP - cpuset_t wakeup_cpus; -#endif - register_t rf; ACPI_STATUS status; - int ret; - - ret = -1; if (sc->acpi_wakeaddr == 0ul) - return (ret); + return (-1); /* couldn't alloc wake memory */ #ifdef SMP - wakeup_cpus = all_cpus; - CPU_CLR(PCPU_GET(cpuid), &wakeup_cpus); + suspcpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &suspcpus); #endif if (acpi_resume_beep != 0) @@ -242,16 +239,15 @@ acpi_sleep_machdep(struct acpi_softc *sc AcpiSetFirmwareWakingVector(WAKECODE_PADDR(sc)); - rf = intr_disable(); intr_suspend(); if (savectx(susppcbs[0])) { ctx_fpusave(suspfpusave[0]); #ifdef SMP - if (!CPU_EMPTY(&wakeup_cpus) && - suspend_cpus(wakeup_cpus) == 0) { + if (!CPU_EMPTY(&suspcpus) && + suspend_cpus(suspcpus) == 0) { device_printf(sc->acpi_dev, "Failed to suspend APs\n"); - goto out; + return (0); /* couldn't sleep */ } #endif @@ -276,41 +272,54 @@ acpi_sleep_machdep(struct acpi_softc *sc device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n", AcpiFormatException(status)); - goto out; + return (0); /* couldn't sleep */ } for (;;) ia32_pause(); - } else { - pmap_init_pat(); - load_cr3(susppcbs[0]->pcb_cr3); - initializecpu(); - PCPU_SET(switchtime, 0); - PCPU_SET(switchticks, ticks); -#ifdef SMP - if (!CPU_EMPTY(&wakeup_cpus)) - acpi_wakeup_cpus(sc, &wakeup_cpus); -#endif - ret = 0; } -out: + return (1); /* wakeup successfully */ +} + +int +acpi_wakeup_machdep(struct acpi_softc *sc, int state, + int sleep_result, int intr_enabled) +{ + + if (sleep_result == -1) + return (sleep_result); + + if (intr_enabled == 0) { + /* Wakeup MD procedures in interrupt disabled context */ + if (sleep_result == 1) { + pmap_init_pat(); + load_cr3(susppcbs[0]->pcb_cr3); + initializecpu(); + PCPU_SET(switchtime, 0); + PCPU_SET(switchticks, ticks); #ifdef SMP - if (!CPU_EMPTY(&wakeup_cpus)) - restart_cpus(wakeup_cpus); + if (!CPU_EMPTY(&suspcpus)) + acpi_wakeup_cpus(sc, &suspcpus); #endif + } - mca_resume(); - intr_resume(); - intr_restore(rf); - - AcpiSetFirmwareWakingVector(0); +#ifdef SMP + if (!CPU_EMPTY(&suspcpus)) + restart_cpus(suspcpus); +#endif + mca_resume(); + intr_resume(); + } else { + /* Wakeup MD procedures in interrupt enabled context */ + AcpiSetFirmwareWakingVector(0); - if (ret == 0 && mem_range_softc.mr_op != NULL && - mem_range_softc.mr_op->reinit != NULL) - mem_range_softc.mr_op->reinit(&mem_range_softc); + if (sleep_result == 1 && mem_range_softc.mr_op != NULL && + mem_range_softc.mr_op->reinit != NULL) + mem_range_softc.mr_op->reinit(&mem_range_softc); + } - return (ret); + return (sleep_result); } static void * Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Fri Jun 1 15:02:23 2012 (r236402) +++ head/sys/dev/acpica/acpi.c Fri Jun 1 15:26:32 2012 (r236403) @@ -2666,6 +2666,7 @@ acpi_EnterSleepState(struct acpi_softc * register_t intr; ACPI_STATUS status; enum acpi_sleep_state slp_state; + int sleep_result; ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state); @@ -2746,7 +2747,16 @@ acpi_EnterSleepState(struct acpi_softc * DELAY(sc->acpi_sleep_delay * 1000000); if (state != ACPI_STATE_S1) { - if (acpi_sleep_machdep(sc, state)) + intr = intr_disable(); + sleep_result = acpi_sleep_machdep(sc, state); + acpi_wakeup_machdep(sc, state, sleep_result, 0); + AcpiLeaveSleepStatePrep(state, acpi_sleep_flags); + intr_restore(intr); + + /* call acpi_wakeup_machdep() again with interrupt enabled */ + acpi_wakeup_machdep(sc, state, sleep_result, 1); + + if (sleep_result == -1) goto backout; /* Re-enable ACPI hardware on wakeup from sleep state 4. */ @@ -2775,10 +2785,8 @@ backout: } if (slp_state >= ACPI_SS_DEV_SUSPEND) DEVICE_RESUME(root_bus); - if (slp_state >= ACPI_SS_SLP_PREP) { - AcpiLeaveSleepStatePrep(state, acpi_sleep_flags); + if (slp_state >= ACPI_SS_SLP_PREP) AcpiLeaveSleepState(state); - } if (slp_state >= ACPI_SS_SLEPT) { acpi_resync_clock(sc); acpi_enable_fixed_events(sc); Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Fri Jun 1 15:02:23 2012 (r236402) +++ head/sys/dev/acpica/acpivar.h Fri Jun 1 15:26:32 2012 (r236403) @@ -439,6 +439,8 @@ int acpi_disabled(char *subsys); int acpi_machdep_init(device_t dev); void acpi_install_wakeup_handler(struct acpi_softc *sc); int acpi_sleep_machdep(struct acpi_softc *sc, int state); +int acpi_wakeup_machdep(struct acpi_softc *sc, int state, + int sleep_result, int intr_enabled); int acpi_table_quirks(int *quirks); int acpi_machdep_quirks(int *quirks); Modified: head/sys/i386/acpica/acpi_wakeup.c ============================================================================== --- head/sys/i386/acpica/acpi_wakeup.c Fri Jun 1 15:02:23 2012 (r236402) +++ head/sys/i386/acpica/acpi_wakeup.c Fri Jun 1 15:26:32 2012 (r236403) @@ -74,6 +74,10 @@ extern struct pcb **susppcbs; static struct pcb **susppcbs; #endif +#ifdef SMP +static cpuset_t suspcpus; +#endif + static void *acpi_alloc_wakeup_handler(void); static void acpi_stop_beep(void *); @@ -212,22 +216,14 @@ acpi_wakeup_cpus(struct acpi_softc *sc, int acpi_sleep_machdep(struct acpi_softc *sc, int state) { -#ifdef SMP - cpuset_t wakeup_cpus; -#endif - register_t cr3, rf; ACPI_STATUS status; - struct pmap *pm; - int ret; - - ret = -1; if (sc->acpi_wakeaddr == 0ul) - return (ret); + return (-1); /* couldn't alloc wake memory */ #ifdef SMP - wakeup_cpus = all_cpus; - CPU_CLR(PCPU_GET(cpuid), &wakeup_cpus); + suspcpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &suspcpus); #endif if (acpi_resume_beep != 0) @@ -235,28 +231,14 @@ acpi_sleep_machdep(struct acpi_softc *sc AcpiSetFirmwareWakingVector(WAKECODE_PADDR(sc)); - rf = intr_disable(); intr_suspend(); - /* - * Temporarily switch to the kernel pmap because it provides - * an identity mapping (setup at boot) for the low physical - * memory region containing the wakeup code. - */ - pm = kernel_pmap; - cr3 = rcr3(); -#ifdef PAE - load_cr3(vtophys(pm->pm_pdpt)); -#else - load_cr3(vtophys(pm->pm_pdir)); -#endif - if (suspendctx(susppcbs[0])) { #ifdef SMP - if (!CPU_EMPTY(&wakeup_cpus) && - suspend_cpus(wakeup_cpus) == 0) { + if (!CPU_EMPTY(&suspcpus) && + suspend_cpus(suspcpus) == 0) { device_printf(sc->acpi_dev, "Failed to suspend APs\n"); - goto out; + return (0); /* couldn't sleep */ } #endif @@ -264,8 +246,6 @@ acpi_sleep_machdep(struct acpi_softc *sc WAKECODE_FIXUP(reset_video, uint8_t, (acpi_reset_video != 0)); WAKECODE_FIXUP(wakeup_cr4, register_t, susppcbs[0]->pcb_cr4); - WAKECODE_FIXUP(wakeup_cr3, register_t, susppcbs[0]->pcb_cr3); - WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[0]); /* Call ACPICA to enter the desired sleep state */ @@ -278,41 +258,54 @@ acpi_sleep_machdep(struct acpi_softc *sc device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n", AcpiFormatException(status)); - goto out; + return (0); /* couldn't sleep */ } for (;;) ia32_pause(); - } else { - pmap_init_pat(); - initializecpu(); - PCPU_SET(switchtime, 0); - PCPU_SET(switchticks, ticks); + } + + return (1); /* wakeup successfully */ +} + +int +acpi_wakeup_machdep(struct acpi_softc *sc, int state, + int sleep_result, int intr_enabled) +{ + + if (sleep_result == -1) + return (sleep_result); + + if (intr_enabled == 0) { + /* Wakeup MD procedures in interrupt disabled context */ + if (sleep_result == 1) { + pmap_init_pat(); + load_cr3(susppcbs[0]->pcb_cr3); + initializecpu(); + PCPU_SET(switchtime, 0); + PCPU_SET(switchticks, ticks); #ifdef SMP - if (!CPU_EMPTY(&wakeup_cpus)) - acpi_wakeup_cpus(sc, &wakeup_cpus); + if (!CPU_EMPTY(&suspcpus)) + acpi_wakeup_cpus(sc, &suspcpus); #endif - ret = 0; - } + } -out: #ifdef SMP - if (!CPU_EMPTY(&wakeup_cpus)) - restart_cpus(wakeup_cpus); + if (!CPU_EMPTY(&suspcpus)) + restart_cpus(suspcpus); #endif + mca_resume(); + intr_resume(); + } else { + /* Wakeup MD procedures in interrupt enabled context */ + AcpiSetFirmwareWakingVector(0); - load_cr3(cr3); - mca_resume(); - intr_resume(); - intr_restore(rf); - - AcpiSetFirmwareWakingVector(0); - - if (ret == 0 && mem_range_softc.mr_op != NULL && - mem_range_softc.mr_op->reinit != NULL) - mem_range_softc.mr_op->reinit(&mem_range_softc); + if (sleep_result == 1 && mem_range_softc.mr_op != NULL && + mem_range_softc.mr_op->reinit != NULL) + mem_range_softc.mr_op->reinit(&mem_range_softc); + } - return (ret); + return (sleep_result); } static void * @@ -373,6 +366,16 @@ acpi_install_wakeup_handler(struct acpi_ /* Save pointers to some global data. */ WAKECODE_FIXUP(wakeup_ret, void *, resumectx); + /* + * Temporarily switch to the kernel pmap because it provides + * an identity mapping (setup at boot) for the low physical + * memory region containing the wakeup code. + */ +#ifdef PAE + WAKECODE_FIXUP(wakeup_cr3, register_t, vtophys(kernel_pmap->pm_pdpt)); +#else + WAKECODE_FIXUP(wakeup_cr3, register_t, vtophys(kernel_pmap->pm_pdir)); +#endif if (bootverbose) device_printf(sc->acpi_dev, "wakeup code va %#x pa %#jx\n", Modified: head/sys/ia64/acpica/acpi_wakeup.c ============================================================================== --- head/sys/ia64/acpica/acpi_wakeup.c Fri Jun 1 15:02:23 2012 (r236402) +++ head/sys/ia64/acpica/acpi_wakeup.c Fri Jun 1 15:26:32 2012 (r236403) @@ -39,6 +39,13 @@ acpi_sleep_machdep(struct acpi_softc *sc return (0); } +int +acpi_wakeup_machdep(struct acpi_softc *sc, int state, + int sleep_result, int intr_enabled) +{ + return (0); +} + void acpi_install_wakeup_handler(struct acpi_softc *sc) { From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 15:42:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 47E4B1065672; Fri, 1 Jun 2012 15:42: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 1A7CA8FC15; Fri, 1 Jun 2012 15:42:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51Fgbp5027813; Fri, 1 Jun 2012 15:42:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51FgbQc027811; Fri, 1 Jun 2012 15:42:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201206011542.q51FgbQc027811@svn.freebsd.org> From: John Baldwin Date: Fri, 1 Jun 2012 15:42: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: r236404 - 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: Fri, 01 Jun 2012 15:42:38 -0000 Author: jhb Date: Fri Jun 1 15:42:37 2012 New Revision: 236404 URL: http://svn.freebsd.org/changeset/base/236404 Log: Extend VERBOSE_SYSINIT to also print out the name of variables passed to SYSINIT routines if they can be resolved via symbol look up in DDB. To avoid false positives, only honor a name if the symbol resolves exactly to the pointer value (no offset). MFC after: 1 week Modified: head/sys/kern/init_main.c Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Fri Jun 1 15:26:32 2012 (r236403) +++ head/sys/kern/init_main.c Fri Jun 1 15:42:37 2012 (r236404) @@ -158,6 +158,24 @@ sysinit_add(struct sysinit **set, struct newsysinit_end = newset + count; } +#if defined (DDB) && defined(VERBOSE_SYSINIT) +static const char * +symbol_name(vm_offset_t va, db_strategy_t strategy) +{ + const char *name; + c_db_sym_t sym; + db_expr_t offset; + + if (va == 0) + return (NULL); + sym = db_search_symbol(va, strategy, &offset); + if (offset != 0) + return (NULL); + db_symbol_values(sym, &name, NULL); + return (name); +} +#endif + /* * System startup; initialize the world, create process 0, mount root * filesystem, and fork to create init and pagedaemon. Most of the @@ -238,15 +256,16 @@ restart: } if (verbose) { #if defined(DDB) - const char *name; - c_db_sym_t sym; - db_expr_t offset; - - sym = db_search_symbol((vm_offset_t)(*sipp)->func, - DB_STGY_PROC, &offset); - db_symbol_values(sym, &name, NULL); - if (name != NULL) - printf(" %s(%p)... ", name, (*sipp)->udata); + const char *func, *data; + + func = symbol_name((vm_offset_t)(*sipp)->func, + DB_STGY_PROC); + data = symbol_name((vm_offset_t)(*sipp)->udata, + DB_STGY_ANY); + if (func != NULL && data != NULL) + printf(" %s(&%s)... ", func, data); + else if (func != NULL) + printf(" %s(%p)... ", func, (*sipp)->udata); else #endif printf(" %p(%p)... ", (*sipp)->func, From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 15:48:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E4EB1065763; Fri, 1 Jun 2012 15:48:25 +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 7A0C08FC08; Fri, 1 Jun 2012 15:48:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51FmP9D028110; Fri, 1 Jun 2012 15:48:25 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51FmPit028108; Fri, 1 Jun 2012 15:48:25 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201206011548.q51FmPit028108@svn.freebsd.org> From: John Baldwin Date: Fri, 1 Jun 2012 15:48: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: r236405 - head/sys/boot/i386/boot2 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, 01 Jun 2012 15:48:25 -0000 Author: jhb Date: Fri Jun 1 15:48:24 2012 New Revision: 236405 URL: http://svn.freebsd.org/changeset/base/236405 Log: Remove unnecessary initializations. The BSS of boot2 is in fact zero'd when boot2 begins execution by the _start() routine in btxcsu.S. MFC after: 1 week Modified: head/sys/boot/i386/boot2/boot2.c Modified: head/sys/boot/i386/boot2/boot2.c ============================================================================== --- head/sys/boot/i386/boot2/boot2.c Fri Jun 1 15:42:37 2012 (r236404) +++ head/sys/boot/i386/boot2/boot2.c Fri Jun 1 15:48:24 2012 (r236405) @@ -129,8 +129,8 @@ static struct dsk { int init; } dsk; static char cmd[512], cmddup[512], knamebuf[1024]; -static const char *kname = NULL; -static uint32_t opts = 0; +static const char *kname; +static uint32_t opts; static int comspeed = SIOSPD; static struct bootinfo bootinfo; static uint8_t ioctrl = IO_KEYBOARD; From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 15:52:42 2012 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 0C154106564A; Fri, 1 Jun 2012 15:52:42 +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 EB2CC8FC08; Fri, 1 Jun 2012 15:52:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51Fqf6w028325; Fri, 1 Jun 2012 15:52:41 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51FqfGx028323; Fri, 1 Jun 2012 15:52:41 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201206011552.q51FqfGx028323@svn.freebsd.org> From: John Baldwin Date: Fri, 1 Jun 2012 15:52: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: r236406 - 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: Fri, 01 Jun 2012 15:52:42 -0000 Author: jhb Date: Fri Jun 1 15:52:41 2012 New Revision: 236406 URL: http://svn.freebsd.org/changeset/base/236406 Log: Commit a portion of 233708 I missed earlier and don't include the definition of igb_start() and igb_start_locked() (nor set if_start in the ifnet) when igb(4) uses if_transmit. Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Fri Jun 1 15:48:24 2012 (r236405) +++ head/sys/dev/e1000/if_igb.c Fri Jun 1 15:52:41 2012 (r236406) @@ -846,6 +846,8 @@ igb_resume(device_t dev) } +#if __FreeBSD_version < 800000 + /********************************************************************* * Transmit entry point * @@ -922,7 +924,7 @@ igb_start(struct ifnet *ifp) return; } -#if __FreeBSD_version >= 800000 +#else /* ** Multiqueue Transmit driver ** @@ -3010,14 +3012,15 @@ igb_setup_interface(device_t dev, struct ifp->if_softc = adapter; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = igb_ioctl; - ifp->if_start = igb_start; #if __FreeBSD_version >= 800000 ifp->if_transmit = igb_mq_start; ifp->if_qflush = igb_qflush; -#endif +#else + ifp->if_start = igb_start; IFQ_SET_MAXLEN(&ifp->if_snd, adapter->num_tx_desc - 1); ifp->if_snd.ifq_drv_maxlen = adapter->num_tx_desc - 1; IFQ_SET_READY(&ifp->if_snd); +#endif ether_ifattach(ifp, adapter->hw.mac.addr); From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 16:03:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D660F1065676; Fri, 1 Jun 2012 16:03:38 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 736118FC0A; Fri, 1 Jun 2012 16:03:38 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so3393795pbb.13 for ; Fri, 01 Jun 2012 09:03:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+eDBw9uMaaaNn+bdmvx0pi4kP9L+ZZklG4RHpifqmsQ=; b=r73GWz3ccdSm2uP9tIomvMJjFe0QXNRoZ4AzazNIild1lZhsJ8bd+EQxSA+momy1jf ryP5Q1bxIr9IOXBqTSdIRaK6Osojm+qmJZ9QdYWil3jPHy+2soBefThBUDcEVPUmnYYN 6k2z6GdEtlBIUpsdvDmziplKsllKxgy9TLLYaZq+W6tEi8iEoFtBa67q2ZkgZTpDWReJ ajh4KC1NM29hVTCmryEaU+bixjotm7l7R96E2vDM7RF5be52aPt1wWrBf9m4gSFDhulo mxC6o8Mh9pQ9tkKmReWLx7lOGI7JzOdwUWjgFVH85Wx8a9lZCwh7FQUup5gemjud+1Ae 0Y5w== MIME-Version: 1.0 Received: by 10.68.233.102 with SMTP id tv6mr11227157pbc.153.1338566618302; Fri, 01 Jun 2012 09:03:38 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.68.237.226 with HTTP; Fri, 1 Jun 2012 09:03:38 -0700 (PDT) In-Reply-To: <20120601175403.H1865@besplex.bde.org> References: <201206010442.q514gqqv084148@svn.freebsd.org> <20120601175403.H1865@besplex.bde.org> Date: Fri, 1 Jun 2012 09:03:38 -0700 X-Google-Sender-Auth: pZSIdGr5fGtTZUDh66FJ439fGtM Message-ID: From: mdf@FreeBSD.org To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, Sergey Kandaurov , src-committers@freebsd.org Subject: Re: svn commit: r236380 - head/sys/vm 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, 01 Jun 2012 16:03:38 -0000 On Fri, Jun 1, 2012 at 2:14 AM, Bruce Evans wrote: >>> +SYSCTL_OID(_vm, OID_AUTO, swap_free, >>> CTLTYPE_INT|CTLFLAG_RD|CTLFLAG_MPSAFE, >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 NULL, 0, sysctl_vm_swap_free, "Q", >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 "Blocks of free swap storage."); > > > Bug 9 is a style bug. =A0I didn't even know that the raw SYSCTL_OID() cou= ld > be misused like this. =A0The normal SYSCTL_PROC() is identical with > SYSCTL_OID() except it checks that the access flags are not 0. =A0Few or = no > SYSCTL_FOO()s have no access flags, and this is not one. =A0It has rather > excessive access flags (I think CTLFLAG_MPSAFE is unnecessary. I wanted to correct this one point. CTLFLAG_MPSAFE is helpful, because its use prevents kern_sysctl from taking Giant before calling the sysctl handler. It's probably nearing the case, now, that any sysctl *without* CTLFLAG_MPSAFE is incorrect, except perhaps for a few that set/get text strings that don't want to roll their own serialization. Cheers, matthew From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 16:04:26 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 84C8B1065672; Fri, 1 Jun 2012 16:04:26 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail27.syd.optusnet.com.au (mail27.syd.optusnet.com.au [211.29.133.168]) by mx1.freebsd.org (Postfix) with ESMTP id F14148FC0A; Fri, 1 Jun 2012 16:04:25 +0000 (UTC) Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail27.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q51G4GfG021209 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Jun 2012 02:04:18 +1000 Date: Sat, 2 Jun 2012 02:04:16 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin In-Reply-To: <201206011024.49122.jhb@freebsd.org> Message-ID: <20120602015640.P3206@besplex.bde.org> References: <201206010423.q514NKtf083043@svn.freebsd.org> <20120601150242.V1226@besplex.bde.org> <201206011024.49122.jhb@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, Eitan Adler , Bruce Evans Subject: Re: svn commit: r236377 - head/sys/dev/vxge/vxgehal 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, 01 Jun 2012 16:04:26 -0000 On Fri, 1 Jun 2012, John Baldwin wrote: > On Friday, June 01, 2012 2:23:42 am Eitan Adler wrote: >> On 31 May 2012 22:13, Bruce Evans wrote: >>> This seems to change a style by (excessive parentheses for a normal >>> equality test) into logic bug (assignment of dtrh instead of compariing >>> with it). >> >> intentional - perhaps my commit message was poorly worded. >> >> The comment above says >> 283 /* >> 284 * restore a previously allocated dtrh at current offset and update >> 285 * the available reserve length accordingly. If dtrh is null just >> 286 * update the reserve length, only >> 287 */ >> >> and gnn confirmed that the patch as committed is correct. Oops. > This is why I personally loathe assignment side effects in boolean expressions > for control flow. I tend to write this sort of thing instead as: > > channel->dtr_arr[dtr_index].dtr = dtrh; > if (dtrh != NULL) { Except here you would have written: channel->dtr_arr[dtr_index].dtr = dtrh; if (dtrh == NULL) return; to avoid a large compound statement for the null case. Bruce From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 16:06:25 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DFE39106564A; Fri, 1 Jun 2012 16:06:25 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx06.syd.optusnet.com.au (fallbackmx06.syd.optusnet.com.au [211.29.132.8]) by mx1.freebsd.org (Postfix) with ESMTP id 578F38FC19; Fri, 1 Jun 2012 16:06:25 +0000 (UTC) Received: from mail17.syd.optusnet.com.au (mail17.syd.optusnet.com.au [211.29.132.198]) by fallbackmx06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q51G6III031921; Sat, 2 Jun 2012 02:06:18 +1000 Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail17.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q51G69AJ022419 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Jun 2012 02:06:10 +1000 Date: Sat, 2 Jun 2012 02:06:09 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Guy Helmer In-Reply-To: <201206011502.q51F2OB2025972@svn.freebsd.org> Message-ID: <20120602020553.O3206@besplex.bde.org> References: <201206011502.q51F2OB2025972@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: r236402 - head/lib/libc/gen 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, 01 Jun 2012 16:06:26 -0000 On Fri, 1 Jun 2012, Guy Helmer wrote: > Log: > Style(9) improvements: remove unnecessary parenthesis, improve order > of local variable declarations, remove bogus casts, and resolve long > lines. > > Reviewed by: bde Thanks. Bruce From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 16:10:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 53FA9106566C; Fri, 1 Jun 2012 16:10:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 28FAF8FC1B; Fri, 1 Jun 2012 16:10:17 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A0B11B99A; Fri, 1 Jun 2012 12:10:16 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Fri, 1 Jun 2012 11:50:37 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201206011542.q51FgbQc027811@svn.freebsd.org> In-Reply-To: <201206011542.q51FgbQc027811@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201206011150.37410.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 01 Jun 2012 12:10:16 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r236404 - 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: Fri, 01 Jun 2012 16:10:17 -0000 On Friday, June 01, 2012 11:42:37 am John Baldwin wrote: > Author: jhb > Date: Fri Jun 1 15:42:37 2012 > New Revision: 236404 > URL: http://svn.freebsd.org/changeset/base/236404 > > Log: > Extend VERBOSE_SYSINIT to also print out the name of variables passed > to SYSINIT routines if they can be resolved via symbol look up in DDB. > To avoid false positives, only honor a name if the symbol resolves > exactly to the pointer value (no offset). > > MFC after: 1 week Some sample output: subsystem e000000 kick_init(0)... done. kstack_cache_init(0)... done. subsystem e400000 kproc_start(&page_kp)... done. subsystem e800000 kproc_start(&vm_kp)... done. pagezero_start(0)... done. subsystem ea00000 kproc_start(&buf_kp)... done. subsystem ec00000 kproc_start(&up_kp)... done. kproc_start(&vnlru_kp)... done. kproc_start(&softdep_kp)... done. SDT initialization uses some really long names: sdt_argtype_register(&sdt_mac_framework_kernel_vnode_check_deleteextattr_mac_check_ok4)... done. sdt_argtype_register(&sdt_mac_framework_kernel_vnode_check_deleteextattr_mac_check_ok3)... done. sdt_argtype_register(&sdt_mac_framework_kernel_vnode_check_deleteextattr_mac_check_ok2)... done. sdt_argtype_register(&sdt_mac_framework_kernel_vnode_check_deleteextattr_mac_check_ok1)... done. sdt_argtype_register(&sdt_mac_framework_kernel_vnode_check_deleteextattr_mac_check_ok0)... done. sdt_argtype_register(&sdt_mac_framework_kernel_cred_check_setresgid_mac_check_err2)... done. sdt_argtype_register(&sdt_mac_framework_kernel_vnode_check_deleteextattr_mac_check_err4)... done. sdt_argtype_register(&sdt_mac_framework_kernel_vnode_check_deleteextattr_mac_check_err3)... done. sdt_argtype_register(&sdt_mac_framework_kernel_vnode_check_deleteextattr_mac_check_err2)... done. etc. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 16:17:39 2012 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 61D8F106566B; Fri, 1 Jun 2012 16:17:39 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3DA288FC15; Fri, 1 Jun 2012 16:17:39 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.5/8.14.5) with ESMTP id q51GHPFL055515; Fri, 1 Jun 2012 09:17:25 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.5/8.14.5/Submit) id q51GHPlW055514; Fri, 1 Jun 2012 09:17:25 -0700 (PDT) (envelope-from obrien) Date: Fri, 1 Jun 2012 09:17:24 -0700 From: "David O'Brien" To: Warner Losh Message-ID: <20120601161724.GA55463@dragon.NUXI.org> References: <201205302223.q4UMN95p083678@svn.freebsd.org> <1008BCB1-59A9-472C-9D64-1AD57B0A9F43@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1008BCB1-59A9-472C-9D64-1AD57B0A9F43@bsdimp.com> X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? 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: r236338 - head/usr.bin/make X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@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: Fri, 01 Jun 2012 16:17:39 -0000 On Thu, May 31, 2012 at 08:35:54PM -0600, Warner Losh wrote: > What are your MFC plans for 9.x and 8.x? I'd like to commit to both 8 and 9 for the next release of each. > > .It Cm :L > > Converts variable to lower-case letters. > > +(deprecated) ... > > +The use of the > > +.Cm :L > > +and > > +.Cm :U > > +modifiers are deprecated > > +in > > +.Fx 10.0 Though I am wondering if the man page language should be tweaked to not say "deprecated" given it would go into 9.1 and 8.3 -- i.e., mid-stream releases. Thoughts? -- -- David From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 16:24:28 2012 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 74AF3106564A; Fri, 1 Jun 2012 16:24:28 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail18.syd.optusnet.com.au (mail18.syd.optusnet.com.au [211.29.132.199]) by mx1.freebsd.org (Postfix) with ESMTP id 00D768FC19; Fri, 1 Jun 2012 16:24:27 +0000 (UTC) Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail18.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q51GOIWP017908 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Jun 2012 02:24:20 +1000 Date: Sat, 2 Jun 2012 02:24:18 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: mdf@FreeBSD.org In-Reply-To: Message-ID: <20120602021220.K3263@besplex.bde.org> References: <201206010442.q514gqqv084148@svn.freebsd.org> <20120601175403.H1865@besplex.bde.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-395233105-1338567858=:3263" Cc: src-committers@FreeBSD.org, Eitan Adler , svn-src-all@FreeBSD.org, Sergey Kandaurov , Bruce Evans , svn-src-head@FreeBSD.org Subject: Re: svn commit: r236380 - head/sys/vm 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, 01 Jun 2012 16:24:28 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-395233105-1338567858=:3263 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Fri, 1 Jun 2012 mdf@FreeBSD.org wrote: > On Fri, Jun 1, 2012 at 2:14 AM, Bruce Evans wrote: >>>> +SYSCTL_OID(_vm, OID_AUTO, swap_free, >>>> CTLTYPE_INT|CTLFLAG_RD|CTLFLAG_MPSAFE, >>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 NULL, 0, sysctl_vm_swap_free, "Q", >>>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 "Blocks of free swap storage."); >> >> Bug 9 is a style bug. =A0I didn't even know that the raw SYSCTL_OID() co= uld >> be misused like this. =A0The normal SYSCTL_PROC() is identical with >> SYSCTL_OID() except it checks that the access flags are not 0. =A0Few or= no >> SYSCTL_FOO()s have no access flags, and this is not one. =A0It has rathe= r >> excessive access flags (I think CTLFLAG_MPSAFE is unnecessary. > > I wanted to correct this one point. CTLFLAG_MPSAFE is helpful, > because its use prevents kern_sysctl from taking Giant before calling > the sysctl handler. It's probably nearing the case, now, that any > sysctl *without* CTLFLAG_MPSAFE is incorrect, except perhaps for a few > that set/get text strings that don't want to roll their own > serialization. The magic is that SYSCTL_FOO() adds CTFLAG_MPSAFE for most or all simple integer SYSCTL_FOO()s like SYSCTL_INT(), but it doesn't do this for any non-integer SYSCTL_FOO(). Not for SYSCTL_PROC(), and especially not for the raw SYSCTL_OID(). There must be a lot of SYSCTL_PROC()s that don't bother with this, although many return an integer after calculating it. Perhaps the calculation isn't properly locked, but Giant will rarely help and no locking helps much for read-only sysctls of dynamic data (the value may change before it is returned). In kern, there are 113 lines matching SYSCTL_PROC, and only 4 of these match CTLFLAG_MPSAFE. Bruce --0-395233105-1338567858=:3263-- From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 16:30:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C91841065670; Fri, 1 Jun 2012 16:30:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A9378FC08; Fri, 1 Jun 2012 16:30:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51GUsGQ030011; Fri, 1 Jun 2012 16:30:54 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51GUsk7030008; Fri, 1 Jun 2012 16:30:54 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201206011630.q51GUsk7030008@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 1 Jun 2012 16: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: r236407 - 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: Fri, 01 Jun 2012 16:30:54 -0000 Author: hselasky Date: Fri Jun 1 16:30:54 2012 New Revision: 236407 URL: http://svn.freebsd.org/changeset/base/236407 Log: Improve support for detaching kernel drivers on a per interface basis. MFC after: 1 week Modified: head/sys/dev/usb/usb_device.c head/sys/dev/usb/usb_generic.c Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Fri Jun 1 15:52:41 2012 (r236406) +++ head/sys/dev/usb/usb_device.c Fri Jun 1 16:30:54 2012 (r236407) @@ -750,10 +750,13 @@ usb_config_parse(struct usb_device *udev if (do_init) { /* setup the USB interface structure */ iface->idesc = id; - /* default setting */ - iface->parent_iface_index = USB_IFACE_INDEX_ANY; /* set alternate index */ iface->alt_index = alt_index; + /* set default interface parent */ + if (iface_index == USB_IFACE_INDEX_ANY) { + iface->parent_iface_index = + USB_IFACE_INDEX_ANY; + } } DPRINTFN(5, "found idesc nendpt=%d\n", id->bNumEndpoints); @@ -1229,10 +1232,13 @@ usbd_set_parent_iface(struct usb_device { struct usb_interface *iface; + if (udev == NULL) { + /* nothing to do */ + return; + } iface = usbd_get_iface(udev, iface_index); - if (iface) { + if (iface != NULL) iface->parent_iface_index = parent_index; - } } static void Modified: head/sys/dev/usb/usb_generic.c ============================================================================== --- head/sys/dev/usb/usb_generic.c Fri Jun 1 15:52:41 2012 (r236406) +++ head/sys/dev/usb/usb_generic.c Fri Jun 1 16:30:54 2012 (r236407) @@ -2166,7 +2166,16 @@ ugen_ioctl_post(struct usb_fifo *f, u_lo break; } + /* + * Detach the currently attached driver. + */ usb_detach_device(f->udev, n, 0); + + /* + * Set parent to self, this should keep attach away + * until the next set configuration event. + */ + usbd_set_parent_iface(f->udev, n, n); break; case USB_SET_POWER_MODE: From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 16:40:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3FC461065674 for ; Fri, 1 Jun 2012 16:40:20 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id E9E0E8FC1C for ; Fri, 1 Jun 2012 16:40:19 +0000 (UTC) Received: by obcni5 with SMTP id ni5so3996610obc.13 for ; Fri, 01 Jun 2012 09:40:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=1CyF+Xu5T4tst7j6hWiAYLUB/1KqlPyEoRf8aQ90+nQ=; b=qmtAMXAN9/hlVNEl5XeKSTqHGu5jnq7XYHW/u7/4tcSklZ9J5rDBcyE9r5ULdXP5l2 H+2KJw8YBzEjzdaD7UJxrEqgS83wSnW9dONRquCHdpWFx+Q6zejKFX4Et5zqzu+djfLD AxmzlSCj3UMXvnKVYfAIdoJgPu/ZFfwycWtIs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=1CyF+Xu5T4tst7j6hWiAYLUB/1KqlPyEoRf8aQ90+nQ=; b=QgF90rcGHaz4VlTZR5OBroHmWZFYhm7a7YDKKvFNHqijr5kt3O+4ukAkxmIs1xcxyG 76erpWgytGe+O+fsej7/D08P4cEEE22oU0qtSCPo6lO8bpF5Bk3++L8Iu9TyLHINXJ3G YhQYpb8ysQngU9+qlQDhpoeSVggmUfk+jEIJf9ANK/RAMhPOWLNXCMb6S0sJ9eDbCDLZ 0Z8J4XT9qPBgj7CNjjhWMADbsuVU/x1t3wcavUPIi/kSrOpZ776v8KwYBavInoA5XRE0 ToviTjUuB0e9BUiNeFrqaVmFLBU8kjPUf8WY+vkdvHD8Nrw7GS9K7r4lAGXWsMIY0POX /p0Q== Received: by 10.182.187.42 with SMTP id fp10mr3384137obc.30.1338568819232; Fri, 01 Jun 2012 09:40:19 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.182.204.69 with HTTP; Fri, 1 Jun 2012 09:39:48 -0700 (PDT) In-Reply-To: <201206011024.49122.jhb@freebsd.org> References: <201206010423.q514NKtf083043@svn.freebsd.org> <20120601150242.V1226@besplex.bde.org> <201206011024.49122.jhb@freebsd.org> From: Eitan Adler Date: Fri, 1 Jun 2012 09:39:48 -0700 X-Google-Sender-Auth: E5gQKGmPsjxQUHVQae9WAybZAQ0 Message-ID: To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQmGqyBxkAGZaKnsUh21A2Rrrh5ZjkCjS0LQFgg8eVBxk4vJU4N0mmQCNveiK86yyiapp/ov Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans Subject: Re: svn commit: r236377 - head/sys/dev/vxge/vxgehal 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, 01 Jun 2012 16:40:20 -0000 On 1 June 2012 07:24, John Baldwin wrote: > This is why I personally loathe assignment side effects in boolean expres= sions > for control flow. =C2=A0I tend to write this sort of thing instead as: > > =C2=A0 =C2=A0 =C2=A0 =C2=A0channel->dtr_arr[dtr_index].dtr =3D dtrh; > =C2=A0 =C2=A0 =C2=A0 =C2=A0if (dtrh !=3D NULL) { Same here. I was told to use the assignment is style(9) by multiple people though. If it really is, I wish it would change. --=20 Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 17:00:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E664106564A; Fri, 1 Jun 2012 17:00:34 +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 6A4D88FC22; Fri, 1 Jun 2012 17:00:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51H0YmH031388; Fri, 1 Jun 2012 17:00:34 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51H0YTU031386; Fri, 1 Jun 2012 17:00:34 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201206011700.q51H0YTU031386@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 1 Jun 2012 17:00: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: r236408 - 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: Fri, 01 Jun 2012 17:00:34 -0000 Author: jkim Date: Fri Jun 1 17:00:33 2012 New Revision: 236408 URL: http://svn.freebsd.org/changeset/base/236408 Log: Execute AcpiLeaveSleepStatePrep() for S1 and reduce code duplication. MFC after: 3 days Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Fri Jun 1 16:30:54 2012 (r236407) +++ head/sys/dev/acpica/acpi.c Fri Jun 1 17:00:33 2012 (r236408) @@ -2746,8 +2746,8 @@ acpi_EnterSleepState(struct acpi_softc * if (sc->acpi_sleep_delay > 0) DELAY(sc->acpi_sleep_delay * 1000000); + intr = intr_disable(); if (state != ACPI_STATE_S1) { - intr = intr_disable(); sleep_result = acpi_sleep_machdep(sc, state); acpi_wakeup_machdep(sc, state, sleep_result, 0); AcpiLeaveSleepStatePrep(state, acpi_sleep_flags); @@ -2763,8 +2763,8 @@ acpi_EnterSleepState(struct acpi_softc * if (state == ACPI_STATE_S4) AcpiEnable(); } else { - intr = intr_disable(); status = AcpiEnterSleepState(state, acpi_sleep_flags); + AcpiLeaveSleepStatePrep(state, acpi_sleep_flags); intr_restore(intr); if (ACPI_FAILURE(status)) { device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n", From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 17:07:53 2012 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 16FE6106566C; Fri, 1 Jun 2012 17:07:53 +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 DC8E78FC0A; Fri, 1 Jun 2012 17:07:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51H7qJQ031790; Fri, 1 Jun 2012 17:07:52 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51H7qXq031786; Fri, 1 Jun 2012 17:07:52 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201206011707.q51H7qXq031786@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 1 Jun 2012 17:07: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: r236409 - in head/sys: amd64/acpica i386/acpica ia64/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: Fri, 01 Jun 2012 17:07:53 -0000 Author: jkim Date: Fri Jun 1 17:07:52 2012 New Revision: 236409 URL: http://svn.freebsd.org/changeset/base/236409 Log: Improve style(9) in the previous commit. Modified: head/sys/amd64/acpica/acpi_wakeup.c head/sys/i386/acpica/acpi_wakeup.c head/sys/ia64/acpica/acpi_wakeup.c Modified: head/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- head/sys/amd64/acpica/acpi_wakeup.c Fri Jun 1 17:00:33 2012 (r236408) +++ head/sys/amd64/acpica/acpi_wakeup.c Fri Jun 1 17:07:52 2012 (r236409) @@ -283,14 +283,14 @@ acpi_sleep_machdep(struct acpi_softc *sc } int -acpi_wakeup_machdep(struct acpi_softc *sc, int state, - int sleep_result, int intr_enabled) +acpi_wakeup_machdep(struct acpi_softc *sc, int state, int sleep_result, + int intr_enabled) { if (sleep_result == -1) return (sleep_result); - if (intr_enabled == 0) { + if (!intr_enabled) { /* Wakeup MD procedures in interrupt disabled context */ if (sleep_result == 1) { pmap_init_pat(); Modified: head/sys/i386/acpica/acpi_wakeup.c ============================================================================== --- head/sys/i386/acpica/acpi_wakeup.c Fri Jun 1 17:00:33 2012 (r236408) +++ head/sys/i386/acpica/acpi_wakeup.c Fri Jun 1 17:07:52 2012 (r236409) @@ -269,14 +269,14 @@ acpi_sleep_machdep(struct acpi_softc *sc } int -acpi_wakeup_machdep(struct acpi_softc *sc, int state, - int sleep_result, int intr_enabled) +acpi_wakeup_machdep(struct acpi_softc *sc, int state, int sleep_result, + int intr_enabled) { if (sleep_result == -1) return (sleep_result); - if (intr_enabled == 0) { + if (!intr_enabled) { /* Wakeup MD procedures in interrupt disabled context */ if (sleep_result == 1) { pmap_init_pat(); Modified: head/sys/ia64/acpica/acpi_wakeup.c ============================================================================== --- head/sys/ia64/acpica/acpi_wakeup.c Fri Jun 1 17:00:33 2012 (r236408) +++ head/sys/ia64/acpica/acpi_wakeup.c Fri Jun 1 17:07:52 2012 (r236409) @@ -40,8 +40,8 @@ acpi_sleep_machdep(struct acpi_softc *sc } int -acpi_wakeup_machdep(struct acpi_softc *sc, int state, - int sleep_result, int intr_enabled) +acpi_wakeup_machdep(struct acpi_softc *sc, int state, int sleep_result, + int intr_enabled) { return (0); } From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 17:16:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C14681065675; Fri, 1 Jun 2012 17:16:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 92F968FC1F; Fri, 1 Jun 2012 17:16:59 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 095A9B94A; Fri, 1 Jun 2012 13:16:59 -0400 (EDT) From: John Baldwin To: Eitan Adler Date: Fri, 1 Jun 2012 13:16:58 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201206010423.q514NKtf083043@svn.freebsd.org> <201206011024.49122.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201206011316.58330.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 01 Jun 2012 13:16:59 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans Subject: Re: svn commit: r236377 - head/sys/dev/vxge/vxgehal 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, 01 Jun 2012 17:16:59 -0000 On Friday, June 01, 2012 12:39:48 pm Eitan Adler wrote: > On 1 June 2012 07:24, John Baldwin wrote: > > This is why I personally loathe assignment side effects in boolean expressions > > for control flow. I tend to write this sort of thing instead as: > > > > channel->dtr_arr[dtr_index].dtr = dtrh; > > if (dtrh != NULL) { > > Same here. I was told to use the assignment is style(9) by multiple > people though. If it really is, I wish it would change. style(9) doesn't make a clear statement either way, but it has contradicting examples. First: while ((ch = getopt(argc, argv, "abNn:")) != -1) (and this one I use all the time myself as that is the common idiom for getopt()) Second: error = function(a1, a2); if (error != 0) exit(error); Also, style(9) tends to frown on assignments that are side-effects in other places, for example: Be careful to not obfuscate the code by initializing variables in the declarations. Use this feature only thoughtfully. DO NOT use function calls in initializers. struct foo one, *two; double three; int *four, five; char *six, seven, eight, nine, ten, eleven, twelve; four = myfunction(); Some newer changes added at the end do use assignment side-effects while demonstrating other rules (the !p example and err(3) and warn(3) examples, this last I find particularly obfuscated and painful to read). Note that I do not consider this to be an assignment side effect: if (ioctl(...) < 0) err(1, "ioctl"); That is, I don't write that out as: i = ioctl(...); if (i < 0) However, I do split it out if the return value is used for more than error checking, e.g.: fd = open(...); if (fd < 0) err(1, "open"); -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 18:01:52 2012 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 00AA0106564A; Fri, 1 Jun 2012 18:01:52 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D65778FC1C; Fri, 1 Jun 2012 18:01:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51I1pHc034362; Fri, 1 Jun 2012 18:01:51 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51I1pHi034360; Fri, 1 Jun 2012 18:01:51 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201206011801.q51I1pHi034360@svn.freebsd.org> From: Sean Bruno Date: Fri, 1 Jun 2012 18:01: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: r236412 - 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: Fri, 01 Jun 2012 18:01:52 -0000 Author: sbruno Date: Fri Jun 1 18:01:51 2012 New Revision: 236412 URL: http://svn.freebsd.org/changeset/base/236412 Log: Add notes and information for exposed tuneables in bce(4). Add source of documentation for this driver. Thanks to Warren Block for the suggestions for readability. Note that strict_rx_mtu in inverted in stable/7/8/9 and is named loose_rx_mtu. Ensure that this is converted over when MFC'd hw.bce.rx_ticks hw.bce.rx_ticks_int hw.bce.rx_quick_cons_trip hw.bce.rx_quick_cons_trip_int hw.bce.tx_ticks hw.bce.tx_ticks_int hw.bce.tx_quick_cons_trip hw.bce.tx_quick_cons_trip_int hw.bce.strict_rx_mtu hw.bce.hdr_split hw.bce.tx_pages hw.bce.rx_pages hw.bce.tso_enable hw.bce.verbose Reviewed by: Warren Block MFC after: 3 days Modified: head/share/man/man4/bce.4 Modified: head/share/man/man4/bce.4 ============================================================================== --- head/share/man/man4/bce.4 Fri Jun 1 17:22:20 2012 (r236411) +++ head/share/man/man4/bce.4 Fri Jun 1 18:01:51 2012 (r236412) @@ -200,9 +200,60 @@ variables and .Xr loader 8 tunables: .Bl -tag -width indent +.It Va hw.bce.verbose +Enable/Disable verbose logging and output to the console. +Useful for debugging (default 0). .It Va hw.bce.msi_enable -Whether or not MSI support is enabled in the driver. -The default value is 1. +Enable/Disable MSI support (default 1). +.It Va hw.bce.tso_enable +Enable/Disable TSO support (default 1). +.It Va hw.bce.strict_rx_mtu +Enable/Disable strict RX frame size checking (default 0). +.It Va hw.bce.hdr_split +Enable/Disable frame header/payload splitting (default 1). +.It Va hw.bce.rx_pages +Set the number of memory pages assigned to recieve packets by the driver. +Due to alignment issues, this value can only be of the set 1, 2, 4 or 8 (default 2). +.It Va hw.bce.tx_pages +Set the number of memory pages assigned to transmit packets by the driver. +Due to alignment issues, this value can only be of the set 1, 2, 4 or 8 (default 2). +.It Va hw.bce.rx_ticks +Time in microsecond ticks to wait before generating a status block updates due to RX processing activity. +Values from 0-100 are valid. +A value of 0 disables this status block update. +Cannot be set to 0 if hw.bce.rx_quick_cons_trip is also 0 (default 18). +.It Va hw.bce.rx_ticks_int +Time in microsecond ticks to wait during RX interrupt processing before generating a status block update. +Values from 0-100 are valid. +Valid values are in the range from 0-100. +A value of 0 disables this status block update (default 18). +.It Va hw.bce.rx_quick_cons_trip +Number of RX Quick BD Chain entries that must be completed before a status block is generated. +Values from 0-256 are valid. +A value of 0 disables this status block update. +Cannot be set to 0 if hw.bce.rx_ticks is also 0 (default 6). +.It Va hw.bce.rx_quick_cons_trip_int +Number of RX quick BD entries that must be completed before a status block is generated duing interrupt processing. +Values from 0-256 are valid. +A value of 0 disables this status block update (default 6). +.It Va hw.bce.tx_ticks +Time in microsecond ticks to wait before a status block update is generated due to TX activitiy. +Values from 0-100 are valid. +A value of 0 disables this status block update. +Cannot be set to 0 if hw.bce.tx_quick_cons_trip is also 0 (default 80). +.It Va hw.bce.tx_ticks_int +Time in microsecond ticks to wait in interrupt processing before a status block update is generated due to TX activity +Values from 0-100 are valid. +A value of 0 disables this status block update (default 80). +.It Va hw.bce.tx_cons_trip +How many TX Quick BD Chain entries that must be completed before a status block is generated. +Values from 0-100 are valid. +A value of 0 disables this status block update. +Cannot be set to 0 if hw.bce.tx_ticks is also 0 (default 20). +.It Va hw.bce.tx_cons_trip_int +How many TX Quick BD Chain entries that must be completed before a status block is generated during an interrupt. +Values from 0-100 are valid. +A value of 0 disables this status block update (default 20). .El .Sh DIAGNOSTICS .Bl -diag @@ -266,7 +317,7 @@ address space. .It "bce%d: Could not allocate TX descriptor chain DMA tag!" The driver could not allocate a DMA tag for the controller's TX chain. -.It "bce%d: Could not allocate TX descriptor chain DMA memory!" +.It "bce%d: Could not allocate TX descriptor chain DMA memory! The driver could not allocate DMA addressable memory for the controller's TX chain. .It "bce%d: Could not map TX descriptor chain DMA memory!" @@ -346,6 +397,11 @@ with the cable connection, or a driver l A controller hardware failure has occurred. If the problem continues replace the controller. .El +.Sh SUPPORT +For general information and support, +go to the Broadcom NIC Open Source Developer Resource Site: +.Pa http://www.broadcom.com/support/ethernet_nic/open_source.php . +.Pp .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 18:18:49 2012 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 284FA1065670; Fri, 1 Jun 2012 18:18:49 +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 148098FC16; Fri, 1 Jun 2012 18:18:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51IImcu035318; Fri, 1 Jun 2012 18:18:48 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51IImh5035315; Fri, 1 Jun 2012 18:18:48 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201206011818.q51IImh5035315@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 1 Jun 2012 18:18: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: r236414 - in head/sys: amd64/acpica i386/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: Fri, 01 Jun 2012 18:18:49 -0000 Author: jkim Date: Fri Jun 1 18:18:48 2012 New Revision: 236414 URL: http://svn.freebsd.org/changeset/base/236414 Log: Call AcpiSetFirmwareWakingVector() with interrupt disabled for consistency. Modified: head/sys/amd64/acpica/acpi_wakeup.c head/sys/i386/acpica/acpi_wakeup.c Modified: head/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- head/sys/amd64/acpica/acpi_wakeup.c Fri Jun 1 18:16:10 2012 (r236413) +++ head/sys/amd64/acpica/acpi_wakeup.c Fri Jun 1 18:18:48 2012 (r236414) @@ -310,10 +310,10 @@ acpi_wakeup_machdep(struct acpi_softc *s #endif mca_resume(); intr_resume(); + + AcpiSetFirmwareWakingVector(0); } else { /* Wakeup MD procedures in interrupt enabled context */ - AcpiSetFirmwareWakingVector(0); - if (sleep_result == 1 && mem_range_softc.mr_op != NULL && mem_range_softc.mr_op->reinit != NULL) mem_range_softc.mr_op->reinit(&mem_range_softc); Modified: head/sys/i386/acpica/acpi_wakeup.c ============================================================================== --- head/sys/i386/acpica/acpi_wakeup.c Fri Jun 1 18:16:10 2012 (r236413) +++ head/sys/i386/acpica/acpi_wakeup.c Fri Jun 1 18:18:48 2012 (r236414) @@ -296,10 +296,10 @@ acpi_wakeup_machdep(struct acpi_softc *s #endif mca_resume(); intr_resume(); + + AcpiSetFirmwareWakingVector(0); } else { /* Wakeup MD procedures in interrupt enabled context */ - AcpiSetFirmwareWakingVector(0); - if (sleep_result == 1 && mem_range_softc.mr_op != NULL && mem_range_softc.mr_op->reinit != NULL) mem_range_softc.mr_op->reinit(&mem_range_softc); From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 18:33:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 137101065672; Fri, 1 Jun 2012 18:33:41 +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 F245C8FC1C; Fri, 1 Jun 2012 18:33:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51IXeWo036038; Fri, 1 Jun 2012 18:33:40 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51IXea0036031; Fri, 1 Jun 2012 18:33:40 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201206011833.q51IXea0036031@svn.freebsd.org> From: John Baldwin Date: Fri, 1 Jun 2012 18:33: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: r236415 - head/usr.sbin/pciconf 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, 01 Jun 2012 18:33:41 -0000 Author: jhb Date: Fri Jun 1 18:33:40 2012 New Revision: 236415 URL: http://svn.freebsd.org/changeset/base/236415 Log: Add a new -e flag to pciconf(8)'s list mode to display PCI error details. Currently this dumps the status of any error bits in the PCI status register and PCI-express device status register. It also lists any errors indicated by version 1 of PCI-express Advanced Error Reporting (AER). MFC after: 1 week Added: head/usr.sbin/pciconf/err.c (contents, props changed) Modified: head/usr.sbin/pciconf/Makefile head/usr.sbin/pciconf/cap.c head/usr.sbin/pciconf/pciconf.8 head/usr.sbin/pciconf/pciconf.c head/usr.sbin/pciconf/pciconf.h Modified: head/usr.sbin/pciconf/Makefile ============================================================================== --- head/usr.sbin/pciconf/Makefile Fri Jun 1 18:18:48 2012 (r236414) +++ head/usr.sbin/pciconf/Makefile Fri Jun 1 18:33:40 2012 (r236415) @@ -2,7 +2,7 @@ # $FreeBSD$ PROG= pciconf -SRCS= pciconf.c cap.c +SRCS= pciconf.c cap.c err.c MAN= pciconf.8 CFLAGS+= -I${.CURDIR}/../../sys Modified: head/usr.sbin/pciconf/cap.c ============================================================================== --- head/usr.sbin/pciconf/cap.c Fri Jun 1 18:18:48 2012 (r236414) +++ head/usr.sbin/pciconf/cap.c Fri Jun 1 18:33:40 2012 (r236415) @@ -630,3 +630,59 @@ list_ecaps(int fd, struct pci_conf *p) ecap = read_config(fd, &p->pc_sel, ptr, 4); } } + +/* Find offset of a specific capability. Returns 0 on failure. */ +uint8_t +pci_find_cap(int fd, struct pci_conf *p, uint8_t id) +{ + uint16_t sta; + uint8_t ptr, cap; + + /* Are capabilities present for this device? */ + sta = read_config(fd, &p->pc_sel, PCIR_STATUS, 2); + if (!(sta & PCIM_STATUS_CAPPRESENT)) + return (0); + + switch (p->pc_hdr & PCIM_HDRTYPE) { + case PCIM_HDRTYPE_NORMAL: + case PCIM_HDRTYPE_BRIDGE: + ptr = PCIR_CAP_PTR; + break; + case PCIM_HDRTYPE_CARDBUS: + ptr = PCIR_CAP_PTR_2; + break; + default: + return (0); + } + + ptr = read_config(fd, &p->pc_sel, ptr, 1); + while (ptr != 0 && ptr != 0xff) { + cap = read_config(fd, &p->pc_sel, ptr + PCICAP_ID, 1); + if (cap == id) + return (ptr); + ptr = read_config(fd, &p->pc_sel, ptr + PCICAP_NEXTPTR, 1); + } + return (0); +} + +/* Find offset of a specific extended capability. Returns 0 on failure. */ +uint16_t +pcie_find_cap(int fd, struct pci_conf *p, uint16_t id) +{ + uint32_t ecap; + uint16_t ptr; + + ptr = PCIR_EXTCAP; + ecap = read_config(fd, &p->pc_sel, ptr, 4); + if (ecap == 0xffffffff || ecap == 0) + return (0); + for (;;) { + if (PCI_EXTCAP_ID(ecap) == id) + return (ptr); + ptr = PCI_EXTCAP_NEXTPTR(ecap); + if (ptr == 0) + break; + ecap = read_config(fd, &p->pc_sel, ptr, 4); + } + return (0); +} Added: head/usr.sbin/pciconf/err.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pciconf/err.c Fri Jun 1 18:33:40 2012 (r236415) @@ -0,0 +1,167 @@ +/*- + * Copyright (c) 2012 Advanced Computing Technologies LLC + * Written by: John H. Baldwin + * 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. + */ + +#ifndef lint +static const char rcsid[] = + "$FreeBSD$"; +#endif /* not lint */ + +#include +#include + +#include +#include + +#include + +#include "pciconf.h" + +struct bit_table { + uint32_t mask; + const char *desc; +}; + +/* Error indicators in the PCI status register (PCIR_STATUS). */ +static struct bit_table pci_status[] = { + { PCIM_STATUS_MDPERR, "Master Data Parity Error" }, + { PCIM_STATUS_STABORT, "Sent Target-Abort" }, + { PCIM_STATUS_RTABORT, "Received Target-Abort" }, + { PCIM_STATUS_RMABORT, "Received Master-Abort" }, + { PCIM_STATUS_SERR, "Signalled System Error" }, + { PCIM_STATUS_PERR, "Detected Parity Error" }, + { 0, NULL }, +}; + +/* Valid error indicator bits in PCIR_STATUS. */ +#define PCI_ERRORS (PCIM_STATUS_MDPERR | PCIM_STATUS_STABORT | \ + PCIM_STATUS_RTABORT | PCIM_STATUS_RMABORT | \ + PCIM_STATUS_SERR | PCIM_STATUS_PERR) + +/* Error indicators in the PCI-Express device status register. */ +static struct bit_table pcie_device_status[] = { + { PCIM_EXP_STA_CORRECTABLE_ERROR, "Correctable Error Detected" }, + { PCIM_EXP_STA_NON_FATAL_ERROR, "Non-Fatal Error Detected" }, + { PCIM_EXP_STA_FATAL_ERROR, "Fatal Error Detected" }, + { PCIM_EXP_STA_UNSUPPORTED_REQ, "Unsupported Request Detected" }, + { 0, NULL }, +}; + +/* Valid error indicator bits in the PCI-Express device status register. */ +#define PCIE_ERRORS (PCIM_EXP_STA_CORRECTABLE_ERROR | \ + PCIM_EXP_STA_NON_FATAL_ERROR | \ + PCIM_EXP_STA_FATAL_ERROR | \ + PCIM_EXP_STA_UNSUPPORTED_REQ) + +/* AER Uncorrected errors. */ +static struct bit_table aer_uc[] = { + { PCIM_AER_UC_TRAINING_ERROR, "Link Training Error" }, + { PCIM_AER_UC_DL_PROTOCOL_ERROR, "Data Link Protocol Error" }, + { PCIM_AER_UC_SURPRISE_LINK_DOWN, "Surprise Link Down Error" }, + { PCIM_AER_UC_POISONED_TLP, "Poisoned TLP" }, + { PCIM_AER_UC_FC_PROTOCOL_ERROR, "Flow Control Protocol Error" }, + { PCIM_AER_UC_COMPLETION_TIMEOUT, "Completion Timeout" }, + { PCIM_AER_UC_COMPLETER_ABORT, "Completer Abort" }, + { PCIM_AER_UC_UNEXPECTED_COMPLETION, "Unexpected Completion" }, + { PCIM_AER_UC_RECEIVER_OVERFLOW, "Receiver Overflow Error" }, + { PCIM_AER_UC_MALFORMED_TLP, "Malformed TLP" }, + { PCIM_AER_UC_ECRC_ERROR, "ECRC Error" }, + { PCIM_AER_UC_UNSUPPORTED_REQUEST, "Unsupported Request" }, + { PCIM_AER_UC_ACS_VIOLATION, "ACS Violation" }, + { 0, NULL }, +}; + +/* AER Corrected errors. */ +static struct bit_table aer_cor[] = { + { PCIM_AER_COR_RECEIVER_ERROR, "Receiver Error" }, + { PCIM_AER_COR_BAD_TLP, "Bad TLP" }, + { PCIM_AER_COR_BAD_DLLP, "Bad DLLP" }, + { PCIM_AER_COR_REPLAY_ROLLOVER, "REPLAY_NUM Rollover" }, + { PCIM_AER_COR_REPLAY_TIMEOUT, "Replay Timer Timeout" }, + { PCIM_AER_COR_ADVISORY_NF_ERROR, "Advisory Non-Fatal Error" }, + { 0, NULL }, +}; + +static void +print_bits(const char *header, struct bit_table *table, uint32_t mask) +{ + int first; + + first = 1; + for (; table->desc != NULL; table++) + if (mask & table->mask) { + if (first) { + printf("%14s = ", header); + first = 0; + } else + printf(" "); + printf("%s\n", table->desc); + mask &= ~table->mask; + } + if (mask != 0) { + if (first) + printf("%14s = ", header); + else + printf(" "); + printf("Unknown: 0x%08x\n", mask); + } +} + +void +list_errors(int fd, struct pci_conf *p) +{ + uint32_t mask, severity; + uint16_t sta, aer; + uint8_t pcie; + + /* First check for standard PCI errors. */ + sta = read_config(fd, &p->pc_sel, PCIR_STATUS, 2); + print_bits("PCI errors", pci_status, sta & PCI_ERRORS); + + /* See if this is a PCI-express device. */ + pcie = pci_find_cap(fd, p, PCIY_EXPRESS); + if (pcie == 0) + return; + + /* Check for PCI-e errors. */ + sta = read_config(fd, &p->pc_sel, pcie + PCIR_EXPRESS_DEVICE_STA, 2); + print_bits("PCI-e errors", pcie_device_status, sta & PCIE_ERRORS); + + /* See if this device supports AER. */ + aer = pcie_find_cap(fd, p, PCIZ_AER); + if (aer == 0) + return; + + /* Check for uncorrected errors. */ + mask = read_config(fd, &p->pc_sel, aer + PCIR_AER_UC_STATUS, 4); + severity = read_config(fd, &p->pc_sel, aer + PCIR_AER_UC_SEVERITY, 4); + print_bits("Fatal", aer_uc, mask & severity); + print_bits("Non-fatal", aer_uc, mask & ~severity); + + /* Check for corrected errors. */ + mask = read_config(fd, &p->pc_sel, aer + PCIR_AER_COR_STATUS, 4); + print_bits("Corrected", aer_cor, mask); +} Modified: head/usr.sbin/pciconf/pciconf.8 ============================================================================== --- head/usr.sbin/pciconf/pciconf.8 Fri Jun 1 18:18:48 2012 (r236414) +++ head/usr.sbin/pciconf/pciconf.8 Fri Jun 1 18:33:40 2012 (r236415) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 7, 2007 +.Dd June 1, 2012 .Dt PCICONF 8 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd diagnostic utility for the PCI bus .Sh SYNOPSIS .Nm -.Fl l Op Fl bcv +.Fl l Op Fl bcev .Nm .Fl a Ar selector .Nm @@ -167,6 +167,15 @@ capability in config space in hexadecima The format of the text after the equals sign is capability-specific. .Pp If the +.Fl e +option is supplied, +.Nm +will list any errors reported for this device in standard PCI error registers. +Errors are checked for in the PCI status register, +the PCI-express device status register, +and the Advanced Error Reporting status registers. +.Pp +If the .Fl v option is supplied, .Nm Modified: head/usr.sbin/pciconf/pciconf.c ============================================================================== --- head/usr.sbin/pciconf/pciconf.c Fri Jun 1 18:18:48 2012 (r236414) +++ head/usr.sbin/pciconf/pciconf.c Fri Jun 1 18:33:40 2012 (r236415) @@ -68,7 +68,7 @@ struct pci_vendor_info TAILQ_HEAD(,pci_vendor_info) pci_vendors; static void list_bars(int fd, struct pci_conf *p); -static void list_devs(int verbose, int bars, int caps); +static void list_devs(int verbose, int bars, int caps, int errors); static void list_verbose(struct pci_conf *p); static const char *guess_class(struct pci_conf *p); static const char *guess_subclass(struct pci_conf *p); @@ -83,7 +83,7 @@ static void usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n", - "usage: pciconf -l [-bcv]", + "usage: pciconf -l [-bcev]", " pciconf -a selector", " pciconf -r [-b | -h] selector addr[:addr2]", " pciconf -w [-b | -h] selector addr value"); @@ -94,12 +94,14 @@ int main(int argc, char **argv) { int c; - int listmode, readmode, writemode, attachedmode, bars, caps, verbose; + int listmode, readmode, writemode, attachedmode; + int bars, caps, errors, verbose; int byte, isshort; - listmode = readmode = writemode = attachedmode = bars = caps = verbose = byte = isshort = 0; + listmode = readmode = writemode = attachedmode = 0; + bars = caps = errors = verbose = byte = isshort = 0; - while ((c = getopt(argc, argv, "abchlrwv")) != -1) { + while ((c = getopt(argc, argv, "abcehlrwv")) != -1) { switch(c) { case 'a': attachedmode = 1; @@ -114,6 +116,10 @@ main(int argc, char **argv) caps = 1; break; + case 'e': + errors = 1; + break; + case 'h': isshort = 1; break; @@ -146,7 +152,7 @@ main(int argc, char **argv) usage(); if (listmode) { - list_devs(verbose, bars, caps); + list_devs(verbose, bars, caps, errors); } else if (attachedmode) { chkattached(argv[optind]); } else if (readmode) { @@ -163,7 +169,7 @@ main(int argc, char **argv) } static void -list_devs(int verbose, int bars, int caps) +list_devs(int verbose, int bars, int caps, int errors) { int fd; struct pci_conf_io pc; @@ -173,7 +179,7 @@ list_devs(int verbose, int bars, int cap if (verbose) load_vendors(); - fd = open(_PATH_DEVPCI, caps ? O_RDWR : O_RDONLY, 0); + fd = open(_PATH_DEVPCI, (caps || errors) ? O_RDWR : O_RDONLY, 0); if (fd < 0) err(1, "%s", _PATH_DEVPCI); @@ -223,6 +229,8 @@ list_devs(int verbose, int bars, int cap list_bars(fd, p); if (caps) list_caps(fd, p); + if (errors) + list_errors(fd, p); } } while (pc.status == PCI_GETCONF_MORE_DEVS); Modified: head/usr.sbin/pciconf/pciconf.h ============================================================================== --- head/usr.sbin/pciconf/pciconf.h Fri Jun 1 18:18:48 2012 (r236414) +++ head/usr.sbin/pciconf/pciconf.h Fri Jun 1 18:33:40 2012 (r236415) @@ -34,6 +34,9 @@ #define __PCICONF_H__ void list_caps(int fd, struct pci_conf *p); +void list_errors(int fd, struct pci_conf *p); +uint8_t pci_find_cap(int fd, struct pci_conf *p, uint8_t id); +uint16_t pcie_find_cap(int fd, struct pci_conf *p, uint16_t id); uint32_t read_config(int fd, struct pcisel *sel, long reg, int width); #endif From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 18:43:57 2012 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 9B99C106566B; Fri, 1 Jun 2012 18:43:57 +0000 (UTC) (envelope-from iwasaki@jp.FreeBSD.org) Received: from locore.org (ns01.locore.org [218.45.21.227]) by mx1.freebsd.org (Postfix) with ESMTP id 341878FC18; Fri, 1 Jun 2012 18:43:56 +0000 (UTC) Received: from localhost (celeron.v4.locore.org [192.168.0.10]) by locore.org (8.14.5/8.14.5/iwasaki) with ESMTP/inet id q51IhnIu021661; Sat, 2 Jun 2012 03:43:49 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Date: Sat, 02 Jun 2012 03:43:49 +0900 (JST) Message-Id: <20120602.034349.112976915.iwasaki@jp.FreeBSD.org> To: jkim@FreeBSD.org From: Mitsuru IWASAKI In-Reply-To: <201206011818.q51IImh5035315@svn.freebsd.org> References: <201206011818.q51IImh5035315@svn.freebsd.org> X-Mailer: Mew version 3.3 on Emacs 20.7 / Mule 4.0 (HANANOEN) 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 Subject: Re: svn commit: r236414 - in head/sys: amd64/acpica i386/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: Fri, 01 Jun 2012 18:43:57 -0000 Hi, thanks for following up. > Log: > Call AcpiSetFirmwareWakingVector() with interrupt disabled for consistency. Are you sure about this? Original code is like this (interrupt ENABLED); ---- intr_restore(rf); AcpiSetFirmwareWakingVector(0); if (ret == 0 && mem_range_softc.mr_op != NULL && ---- Regarding to ACPICA source code, they said nothing about this so I think it's not big deal. Just FYI, AcpiSetFirmwareWakingVector(0) was called with interrupt enabled in Linux. Thanks From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 18:58:50 2012 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 ECF6F1065676; Fri, 1 Jun 2012 18:58:50 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8DAA8FC12; Fri, 1 Jun 2012 18:58:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51Iwo2C037243; Fri, 1 Jun 2012 18:58:50 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51Iwovj037241; Fri, 1 Jun 2012 18:58:50 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201206011858.q51Iwovj037241@svn.freebsd.org> From: Eitan Adler Date: Fri, 1 Jun 2012 18:58: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: r236417 - head/sys/vm 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, 01 Jun 2012 18:58:51 -0000 Author: eadler Date: Fri Jun 1 18:58:50 2012 New Revision: 236417 URL: http://svn.freebsd.org/changeset/base/236417 Log: Revert r236380 PR: kern/166780 Requested by: many Approved by: cperciva (implicit) Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Fri Jun 1 18:57:57 2012 (r236416) +++ head/sys/vm/swap_pager.c Fri Jun 1 18:58:50 2012 (r236417) @@ -2692,18 +2692,3 @@ swaponvp(struct thread *td, struct vnode NODEV); return (0); } - -static int -sysctl_vm_swap_free(SYSCTL_HANDLER_ARGS) { - int swap_free, used; - int total; - - swap_pager_status(&total, &used); - - swap_free = (total - used) * PAGE_SIZE; - return SYSCTL_OUT(req, &swap_free, sizeof(swap_free)); -} - -SYSCTL_OID(_vm, OID_AUTO, swap_free, CTLTYPE_INT|CTLFLAG_RD|CTLFLAG_MPSAFE, - NULL, 0, sysctl_vm_swap_free, "Q", - "Blocks of free swap storage."); From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 19:00:57 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 25B48106564A; Fri, 1 Jun 2012 19:00:57 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9E5B38FC0C; Fri, 1 Jun 2012 19:00:56 +0000 (UTC) Message-ID: <4FC91168.5040002@FreeBSD.org> Date: Fri, 01 Jun 2012 15:00:56 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120502 Thunderbird/12.0.1 MIME-Version: 1.0 To: Mitsuru IWASAKI References: <201206011818.q51IImh5035315@svn.freebsd.org> <20120602.034349.112976915.iwasaki@jp.FreeBSD.org> In-Reply-To: <20120602.034349.112976915.iwasaki@jp.FreeBSD.org> X-Enigmail-Version: 1.5pre 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: r236414 - in head/sys: amd64/acpica i386/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: Fri, 01 Jun 2012 19:00:57 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-06-01 14:43:49 -0400, Mitsuru IWASAKI wrote: > Hi, thanks for following up. > >> Log: Call AcpiSetFirmwareWakingVector() with interrupt disabled >> for consistency. > > Are you sure about this? Original code is like this (interrupt > ENABLED); > > ---- intr_restore(rf); > > AcpiSetFirmwareWakingVector(0); > > if (ret == 0 && mem_range_softc.mr_op != NULL && ---- > > Regarding to ACPICA source code, they said nothing about this so I > think it's not big deal. > > Just FYI, AcpiSetFirmwareWakingVector(0) was called with interrupt > enabled in Linux. This function does not care about interrupt context. However, the first AcpiSetFirmwareWakingVector() is now called with interrupt disabled after r236403. Thus, I wanted it to be consistent as well. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/JEWgACgkQmlay1b9qnVN+zwCfTn5zY6gmmAipPnsIgvjEK6vC 5k4AoMjdIUmRg5EuR0awEG4+uiqGCAWo =ZYNR -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 19:09:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C30C106566C; Fri, 1 Jun 2012 19:09:18 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E31848FC0A; Fri, 1 Jun 2012 19:09:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51J9Hwi037743; Fri, 1 Jun 2012 19:09:17 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51J9HAg037741; Fri, 1 Jun 2012 19:09:17 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201206011909.q51J9HAg037741@svn.freebsd.org> From: Sean Bruno Date: Fri, 1 Jun 2012 19:09: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: r236418 - 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: Fri, 01 Jun 2012 19:09:18 -0000 Author: sbruno Date: Fri Jun 1 19:09:17 2012 New Revision: 236418 URL: http://svn.freebsd.org/changeset/base/236418 Log: Doh! Bump the date as I touched it! Noted by: gjb@ MFC after: 3 days Modified: head/share/man/man4/bce.4 Modified: head/share/man/man4/bce.4 ============================================================================== --- head/share/man/man4/bce.4 Fri Jun 1 18:58:50 2012 (r236417) +++ head/share/man/man4/bce.4 Fri Jun 1 19:09:17 2012 (r236418) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 7, 2009 +.Dd June 1, 2012 .Dt BCE 4 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 19:13:57 2012 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 B3BC1106566B; Fri, 1 Jun 2012 19:13:57 +0000 (UTC) (envelope-from iwasaki@jp.FreeBSD.org) Received: from locore.org (ns01.locore.org [218.45.21.227]) by mx1.freebsd.org (Postfix) with ESMTP id 652468FC0C; Fri, 1 Jun 2012 19:13:56 +0000 (UTC) Received: from localhost (celeron.v4.locore.org [192.168.0.10]) by locore.org (8.14.5/8.14.5/iwasaki) with ESMTP/inet id q51JDuaY022060; Sat, 2 Jun 2012 04:13:56 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Date: Sat, 02 Jun 2012 04:13:56 +0900 (JST) Message-Id: <20120602.041356.41705200.iwasaki@jp.FreeBSD.org> To: jkim@FreeBSD.org From: Mitsuru IWASAKI In-Reply-To: <4FC91168.5040002@FreeBSD.org> References: <201206011818.q51IImh5035315@svn.freebsd.org> <20120602.034349.112976915.iwasaki@jp.FreeBSD.org> <4FC91168.5040002@FreeBSD.org> X-Mailer: Mew version 3.3 on Emacs 20.7 / Mule 4.0 (HANANOEN) 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 Subject: Re: svn commit: r236414 - in head/sys: amd64/acpica i386/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: Fri, 01 Jun 2012 19:13:57 -0000 > > Regarding to ACPICA source code, they said nothing about this so I > > think it's not big deal. > > > > Just FYI, AcpiSetFirmwareWakingVector(0) was called with interrupt > > enabled in Linux. > > This function does not care about interrupt context. However, the > first AcpiSetFirmwareWakingVector() is now called with interrupt > disabled after r236403. Thus, I wanted it to be consistent as well. OK, it's just for consistency with acpi_sleep_machdep(), understood. Thanks! From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 19:19:05 2012 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 06121106564A; Fri, 1 Jun 2012 19:19:05 +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 E540C8FC0A; Fri, 1 Jun 2012 19:19:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51JJ4ss038272; Fri, 1 Jun 2012 19:19:04 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51JJ4Gf038269; Fri, 1 Jun 2012 19:19:04 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201206011919.q51JJ4Gf038269@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 1 Jun 2012 19:19: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: r236419 - in head/sys: amd64/acpica i386/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: Fri, 01 Jun 2012 19:19:05 -0000 Author: jkim Date: Fri Jun 1 19:19:04 2012 New Revision: 236419 URL: http://svn.freebsd.org/changeset/base/236419 Log: Tidy up code clutter in SMP case a bit. No functional change. Modified: head/sys/amd64/acpica/acpi_wakeup.c head/sys/i386/acpica/acpi_wakeup.c Modified: head/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- head/sys/amd64/acpica/acpi_wakeup.c Fri Jun 1 19:09:17 2012 (r236418) +++ head/sys/amd64/acpica/acpi_wakeup.c Fri Jun 1 19:19:04 2012 (r236419) @@ -71,15 +71,12 @@ extern int acpi_reset_video; #ifdef SMP extern struct pcb **susppcbs; extern void **suspfpusave; +static cpuset_t suspcpus; #else static struct pcb **susppcbs; static void **suspfpusave; #endif -#ifdef SMP -static cpuset_t suspcpus; -#endif - int acpi_restorecpu(uint64_t, vm_offset_t); static void *acpi_alloc_wakeup_handler(void); @@ -87,7 +84,7 @@ static void acpi_stop_beep(void *); #ifdef SMP static int acpi_wakeup_ap(struct acpi_softc *, int); -static void acpi_wakeup_cpus(struct acpi_softc *, const cpuset_t *); +static void acpi_wakeup_cpus(struct acpi_softc *); #endif #define WAKECODE_VADDR(sc) ((sc)->acpi_wakeaddr + (3 * PAGE_SIZE)) @@ -184,7 +181,7 @@ acpi_wakeup_ap(struct acpi_softc *sc, in #define BIOS_WARM (0x0a) static void -acpi_wakeup_cpus(struct acpi_softc *sc, const cpuset_t *wakeup_cpus) +acpi_wakeup_cpus(struct acpi_softc *sc) { uint32_t mpbioswarmvec; int cpu; @@ -203,7 +200,7 @@ acpi_wakeup_cpus(struct acpi_softc *sc, /* Wake up each AP. */ for (cpu = 1; cpu < mp_ncpus; cpu++) { - if (!CPU_ISSET(cpu, wakeup_cpus)) + if (!CPU_ISSET(cpu, &suspcpus)) continue; if (acpi_wakeup_ap(sc, cpu) == 0) { /* restore the warmstart vector */ @@ -244,8 +241,7 @@ acpi_sleep_machdep(struct acpi_softc *sc if (savectx(susppcbs[0])) { ctx_fpusave(suspfpusave[0]); #ifdef SMP - if (!CPU_EMPTY(&suspcpus) && - suspend_cpus(suspcpus) == 0) { + if (!CPU_EMPTY(&suspcpus) && suspend_cpus(suspcpus) == 0) { device_printf(sc->acpi_dev, "Failed to suspend APs\n"); return (0); /* couldn't sleep */ } @@ -300,7 +296,7 @@ acpi_wakeup_machdep(struct acpi_softc *s PCPU_SET(switchticks, ticks); #ifdef SMP if (!CPU_EMPTY(&suspcpus)) - acpi_wakeup_cpus(sc, &suspcpus); + acpi_wakeup_cpus(sc); #endif } Modified: head/sys/i386/acpica/acpi_wakeup.c ============================================================================== --- head/sys/i386/acpica/acpi_wakeup.c Fri Jun 1 19:09:17 2012 (r236418) +++ head/sys/i386/acpica/acpi_wakeup.c Fri Jun 1 19:19:04 2012 (r236419) @@ -70,20 +70,17 @@ extern int acpi_reset_video; #ifdef SMP extern struct pcb **susppcbs; +static cpuset_t suspcpus; #else static struct pcb **susppcbs; #endif -#ifdef SMP -static cpuset_t suspcpus; -#endif - static void *acpi_alloc_wakeup_handler(void); static void acpi_stop_beep(void *); #ifdef SMP static int acpi_wakeup_ap(struct acpi_softc *, int); -static void acpi_wakeup_cpus(struct acpi_softc *, const cpuset_t *); +static void acpi_wakeup_cpus(struct acpi_softc *); #endif #define ACPI_PAGETABLES 0 @@ -176,7 +173,7 @@ acpi_wakeup_ap(struct acpi_softc *sc, in #define BIOS_WARM (0x0a) static void -acpi_wakeup_cpus(struct acpi_softc *sc, const cpuset_t *wakeup_cpus) +acpi_wakeup_cpus(struct acpi_softc *sc) { uint32_t mpbioswarmvec; int cpu; @@ -195,7 +192,7 @@ acpi_wakeup_cpus(struct acpi_softc *sc, /* Wake up each AP. */ for (cpu = 1; cpu < mp_ncpus; cpu++) { - if (!CPU_ISSET(cpu, wakeup_cpus)) + if (!CPU_ISSET(cpu, &suspcpus)) continue; if (acpi_wakeup_ap(sc, cpu) == 0) { /* restore the warmstart vector */ @@ -235,8 +232,7 @@ acpi_sleep_machdep(struct acpi_softc *sc if (suspendctx(susppcbs[0])) { #ifdef SMP - if (!CPU_EMPTY(&suspcpus) && - suspend_cpus(suspcpus) == 0) { + if (!CPU_EMPTY(&suspcpus) && suspend_cpus(suspcpus) == 0) { device_printf(sc->acpi_dev, "Failed to suspend APs\n"); return (0); /* couldn't sleep */ } @@ -286,7 +282,7 @@ acpi_wakeup_machdep(struct acpi_softc *s PCPU_SET(switchticks, ticks); #ifdef SMP if (!CPU_EMPTY(&suspcpus)) - acpi_wakeup_cpus(sc, &suspcpus); + acpi_wakeup_cpus(sc); #endif } From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 19:26:39 2012 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 3633F106564A; Fri, 1 Jun 2012 19:26:39 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 227E28FC1E; Fri, 1 Jun 2012 19:26:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51JQc5D038646; Fri, 1 Jun 2012 19:26:38 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51JQcEC038644; Fri, 1 Jun 2012 19:26:38 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201206011926.q51JQcEC038644@svn.freebsd.org> From: Joel Dahl Date: Fri, 1 Jun 2012 19: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: r236420 - 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: Fri, 01 Jun 2012 19:26:39 -0000 Author: joel (doc committer) Date: Fri Jun 1 19:26:38 2012 New Revision: 236420 URL: http://svn.freebsd.org/changeset/base/236420 Log: mdoc: terminate quoted string and remove unneeded paragraph macro. Modified: head/share/man/man4/bce.4 Modified: head/share/man/man4/bce.4 ============================================================================== --- head/share/man/man4/bce.4 Fri Jun 1 19:19:04 2012 (r236419) +++ head/share/man/man4/bce.4 Fri Jun 1 19:26:38 2012 (r236420) @@ -317,7 +317,7 @@ address space. .It "bce%d: Could not allocate TX descriptor chain DMA tag!" The driver could not allocate a DMA tag for the controller's TX chain. -.It "bce%d: Could not allocate TX descriptor chain DMA memory! +.It "bce%d: Could not allocate TX descriptor chain DMA memory!" The driver could not allocate DMA addressable memory for the controller's TX chain. .It "bce%d: Could not map TX descriptor chain DMA memory!" @@ -401,7 +401,6 @@ If the problem continues replace the con For general information and support, go to the Broadcom NIC Open Source Developer Resource Site: .Pa http://www.broadcom.com/support/ethernet_nic/open_source.php . -.Pp .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 21:26:29 2012 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 00A5C1065673; Fri, 1 Jun 2012 21:26:29 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC5AC8FC0C; Fri, 1 Jun 2012 21:26:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51LQSUY044463; Fri, 1 Jun 2012 21:26:28 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51LQSD3044448; Fri, 1 Jun 2012 21:26:28 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201206012126.q51LQSD3044448@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 1 Jun 2012 21:26: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: r236422 - in head/kerberos5: . lib/libasn1 lib/libgssapi_spnego lib/libhdb lib/libhx509 lib/libroken lib/libvers libexec/kdigest tools/slc usr.bin/hxtool usr.bin/kadmin usr.bin/kcc usr.... 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, 01 Jun 2012 21:26:29 -0000 Author: obrien Date: Fri Jun 1 21:26:28 2012 New Revision: 236422 URL: http://svn.freebsd.org/changeset/base/236422 Log: Centralize the specification of the krb5 build tools. Modified: head/kerberos5/Makefile.inc head/kerberos5/lib/libasn1/Makefile head/kerberos5/lib/libgssapi_spnego/Makefile head/kerberos5/lib/libhdb/Makefile head/kerberos5/lib/libhx509/Makefile head/kerberos5/lib/libroken/Makefile head/kerberos5/lib/libvers/Makefile head/kerberos5/libexec/kdigest/Makefile head/kerberos5/tools/slc/Makefile head/kerberos5/usr.bin/hxtool/Makefile head/kerberos5/usr.bin/kadmin/Makefile head/kerberos5/usr.bin/kcc/Makefile head/kerberos5/usr.sbin/iprop-log/Makefile head/kerberos5/usr.sbin/ktutil/Makefile Modified: head/kerberos5/Makefile.inc ============================================================================== --- head/kerberos5/Makefile.inc Fri Jun 1 21:22:46 2012 (r236421) +++ head/kerberos5/Makefile.inc Fri Jun 1 21:26:28 2012 (r236422) @@ -46,3 +46,7 @@ CLEANFILES+= ${_ET}.h ${_ET}.c .endfor .endif # defined(SRCS) + +ASN1_COMPILE= asn1_compile +MAKE_ROKEN= make-roken +SLC= slc Modified: head/kerberos5/lib/libasn1/Makefile ============================================================================== --- head/kerberos5/lib/libasn1/Makefile Fri Jun 1 21:22:46 2012 (r236421) +++ head/kerberos5/lib/libasn1/Makefile Fri Jun 1 21:26:28 2012 (r236422) @@ -56,8 +56,6 @@ INCS+= krb5_asn1.h \ digest_asn1.h \ kx509_asn1.h -ASN1_COMPILE= asn1_compile - ${GEN_CMS}: cms.asn1 cms.opt ${ASN1_COMPILE} --one-code-file \ --option-file=${.ALLSRC:M*.opt} ${.ALLSRC:M*.asn1} cms_asn1 Modified: head/kerberos5/lib/libgssapi_spnego/Makefile ============================================================================== --- head/kerberos5/lib/libgssapi_spnego/Makefile Fri Jun 1 21:22:46 2012 (r236421) +++ head/kerberos5/lib/libgssapi_spnego/Makefile Fri Jun 1 21:26:28 2012 (r236422) @@ -38,8 +38,6 @@ CFLAGS+=-I${KRB5DIR}/lib/roken -I. CLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} \ spnego_asn1_files spnego_asn1-template.c -ASN1_COMPILE= asn1_compile - ${GEN}: spnego.asn1 spnego.opt ${ASN1_COMPILE} --option-file=${.ALLSRC:M*.opt} \ ${.ALLSRC:M*.asn1} spnego_asn1 Modified: head/kerberos5/lib/libhdb/Makefile ============================================================================== --- head/kerberos5/lib/libhdb/Makefile Fri Jun 1 21:22:46 2012 (r236421) +++ head/kerberos5/lib/libhdb/Makefile Fri Jun 1 21:26:28 2012 (r236422) @@ -84,8 +84,6 @@ GEN= asn1_Salt.x \ CLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} hdb_asn1_files \ hdb_asn1-template.[ch]* -ASN1_COMPILE= asn1_compile - ${GEN}: hdb.asn1 ${ASN1_COMPILE} ${.ALLSRC:M*.asn1} hdb_asn1 Modified: head/kerberos5/lib/libhx509/Makefile ============================================================================== --- head/kerberos5/lib/libhx509/Makefile Fri Jun 1 21:22:46 2012 (r236421) +++ head/kerberos5/lib/libhx509/Makefile Fri Jun 1 21:26:28 2012 (r236422) @@ -269,8 +269,6 @@ CLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx INCS+= ocsp_asn1.h pkcs10_asn1.h crmf_asn1.h -ASN1_COMPILE= asn1_compile - ${GEN_OCSP}: ocsp.asn1 ocsp.opt ${ASN1_COMPILE} --option-file=${.ALLSRC:M*.opt} \ ${.ALLSRC:M*.asn1} ocsp_asn1 Modified: head/kerberos5/lib/libroken/Makefile ============================================================================== --- head/kerberos5/lib/libroken/Makefile Fri Jun 1 21:22:46 2012 (r236421) +++ head/kerberos5/lib/libroken/Makefile Fri Jun 1 21:26:28 2012 (r236422) @@ -82,8 +82,6 @@ CFLAGS+=-I${KRB5DIR}/lib/roken -I. CLEANFILES= roken.h -MAKE_ROKEN= make-roken - roken.h: ${MAKE_ROKEN} > ${.TARGET} Modified: head/kerberos5/lib/libvers/Makefile ============================================================================== --- head/kerberos5/lib/libvers/Makefile Fri Jun 1 21:22:46 2012 (r236421) +++ head/kerberos5/lib/libvers/Makefile Fri Jun 1 21:26:28 2012 (r236422) @@ -7,8 +7,6 @@ CFLAGS+=-I. -I${KRB5DIR}/lib/roken CLEANFILES= roken.h -MAKE_ROKEN= make-roken - roken.h: ${MAKE_ROKEN} > ${.TARGET} Modified: head/kerberos5/libexec/kdigest/Makefile ============================================================================== --- head/kerberos5/libexec/kdigest/Makefile Fri Jun 1 21:22:46 2012 (r236421) +++ head/kerberos5/libexec/kdigest/Makefile Fri Jun 1 21:26:28 2012 (r236422) @@ -14,7 +14,7 @@ SRCS= kdigest.c \ kdigest-commands.h kdigest-commands.h: kdigest-commands.in - slc ${.ALLSRC:M*.in} + ${SLC} ${.ALLSRC:M*.in} .for ext in c o kdigest-commands.${ext}: kdigest-commands.h Modified: head/kerberos5/tools/slc/Makefile ============================================================================== --- head/kerberos5/tools/slc/Makefile Fri Jun 1 21:22:46 2012 (r236421) +++ head/kerberos5/tools/slc/Makefile Fri Jun 1 21:26:28 2012 (r236422) @@ -15,7 +15,7 @@ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5D CLEANFILES= roken.h roken.h: - make-roken > ${.TARGET} + ${MAKE_ROKEN} > ${.TARGET} # ${.OBJDIR}/../make-roken/make-roken > ${.TARGET} Modified: head/kerberos5/usr.bin/hxtool/Makefile ============================================================================== --- head/kerberos5/usr.bin/hxtool/Makefile Fri Jun 1 21:22:46 2012 (r236421) +++ head/kerberos5/usr.bin/hxtool/Makefile Fri Jun 1 21:26:28 2012 (r236422) @@ -11,7 +11,7 @@ LDADD= -lhx509 -lroken -lasn1 -lcrypto - SRCS= hxtool.c hxtool-commands.c hxtool-commands.h hxtool-commands.h: hxtool-commands.in - slc ${.ALLSRC:M*.in} + ${SLC} ${.ALLSRC:M*.in} .for ext in c o hxtool-commands.${ext}: hxtool-commands.h Modified: head/kerberos5/usr.bin/kadmin/Makefile ============================================================================== --- head/kerberos5/usr.bin/kadmin/Makefile Fri Jun 1 21:22:46 2012 (r236421) +++ head/kerberos5/usr.bin/kadmin/Makefile Fri Jun 1 21:26:28 2012 (r236422) @@ -39,7 +39,7 @@ LDFLAGS=${LDAPLDFLAGS} .include kadmin-commands.h: ${KRB5DIR}/kadmin/kadmin-commands.in - slc ${.ALLSRC:M*.in} + ${SLC} ${.ALLSRC:M*.in} .for ext in o c kadmin-commands.${ext}: kadmin-commands.h Modified: head/kerberos5/usr.bin/kcc/Makefile ============================================================================== --- head/kerberos5/usr.bin/kcc/Makefile Fri Jun 1 21:22:46 2012 (r236421) +++ head/kerberos5/usr.bin/kcc/Makefile Fri Jun 1 21:26:28 2012 (r236422) @@ -20,7 +20,7 @@ SRCS= kcc.c \ copy_cred_cache.c kcc-commands.h: kcc-commands.in - slc ${.ALLSRC:M*.in} + ${SLC} ${.ALLSRC:M*.in} .for ext in c o kcc-commands.${ext}: kcc-commands.h Modified: head/kerberos5/usr.sbin/iprop-log/Makefile ============================================================================== --- head/kerberos5/usr.sbin/iprop-log/Makefile Fri Jun 1 21:22:46 2012 (r236421) +++ head/kerberos5/usr.sbin/iprop-log/Makefile Fri Jun 1 21:26:28 2012 (r236422) @@ -14,7 +14,7 @@ LDADD= -lkadm5srv -lhdb -lkrb5 -lasn1 -l ${LIBVERS} -ledit iprop-commands.h: iprop-commands.in - slc ${.ALLSRC:M*.in} + ${SLC} ${.ALLSRC:M*.in} .for ext in c o iprop-commands.${ext}: iprop-commands.h Modified: head/kerberos5/usr.sbin/ktutil/Makefile ============================================================================== --- head/kerberos5/usr.sbin/ktutil/Makefile Fri Jun 1 21:22:46 2012 (r236421) +++ head/kerberos5/usr.sbin/ktutil/Makefile Fri Jun 1 21:26:28 2012 (r236422) @@ -25,7 +25,7 @@ LDADD= -lkadm5clnt -lkrb5 ${LIBSL} -lrok .include ktutil-commands.h: ${KRB5DIR}/admin/ktutil-commands.in - slc ${.ALLSRC:M*.in} + ${SLC} ${.ALLSRC:M*.in} .for ext in c o ktutil-commands.${ext}: ktutil-commands.h From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 21:33:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 049EE106566C; Fri, 1 Jun 2012 21:33:34 +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 D8EF28FC08; Fri, 1 Jun 2012 21:33:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51LXXgr045170; Fri, 1 Jun 2012 21:33:33 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51LXXuI045164; Fri, 1 Jun 2012 21:33:33 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201206012133.q51LXXuI045164@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 1 Jun 2012 21:33: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: r236424 - in head/sys: amd64/acpica dev/acpica dev/acpica/Osd i386/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: Fri, 01 Jun 2012 21:33:34 -0000 Author: jkim Date: Fri Jun 1 21:33:33 2012 New Revision: 236424 URL: http://svn.freebsd.org/changeset/base/236424 Log: Consistently use ACPI_SUCCESS() and ACPI_FAILURE() macros wherever possible. Modified: head/sys/amd64/acpica/acpi_wakeup.c head/sys/dev/acpica/Osd/OsdSynch.c head/sys/dev/acpica/acpi_ec.c head/sys/dev/acpica/acpivar.h head/sys/i386/acpica/acpi_wakeup.c Modified: head/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- head/sys/amd64/acpica/acpi_wakeup.c Fri Jun 1 21:29:26 2012 (r236423) +++ head/sys/amd64/acpica/acpi_wakeup.c Fri Jun 1 21:33:33 2012 (r236424) @@ -263,8 +263,7 @@ acpi_sleep_machdep(struct acpi_softc *sc status = AcpiEnterSleepStateS4bios(); else status = AcpiEnterSleepState(state, acpi_sleep_flags); - - if (status != AE_OK) { + if (ACPI_FAILURE(status)) { device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n", AcpiFormatException(status)); Modified: head/sys/dev/acpica/Osd/OsdSynch.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdSynch.c Fri Jun 1 21:29:26 2012 (r236423) +++ head/sys/dev/acpica/Osd/OsdSynch.c Fri Jun 1 21:33:33 2012 (r236424) @@ -208,7 +208,7 @@ AcpiOsWaitSemaphore(ACPI_SEMAPHORE Handl tmo -= slptick; } } - if (status == AE_OK) + if (ACPI_SUCCESS(status)) as->as_units -= Units; mtx_unlock(&as->as_lock); @@ -402,7 +402,7 @@ AcpiOsAcquireMutex(ACPI_MUTEX Handle, UI tmo -= slptick; } } - if (status == AE_OK) + if (ACPI_SUCCESS(status)) am->am_owner = curthread; mtx_unlock(&am->am_lock); Modified: head/sys/dev/acpica/acpi_ec.c ============================================================================== --- head/sys/dev/acpica/acpi_ec.c Fri Jun 1 21:29:26 2012 (r236423) +++ head/sys/dev/acpica/acpi_ec.c Fri Jun 1 21:33:33 2012 (r236424) @@ -649,8 +649,8 @@ EcGpeQueryHandler(void *Context) Status = EcCommand(sc, EC_COMMAND_QUERY); if (ACPI_SUCCESS(Status)) break; - if (EcCheckStatus(sc, "retr_check", - EC_EVENT_INPUT_BUFFER_EMPTY) == AE_OK) + if (ACPI_SUCCESS(EcCheckStatus(sc, "retr_check", + EC_EVENT_INPUT_BUFFER_EMPTY))) continue; else break; @@ -845,7 +845,7 @@ EcWaitEvent(struct acpi_ec_softc *sc, EC DELAY(10); for (i = 0; i < count; i++) { Status = EcCheckStatus(sc, "poll", Event); - if (Status == AE_OK) + if (ACPI_SUCCESS(Status)) break; DELAY(EC_POLL_DELAY); } @@ -875,7 +875,7 @@ EcWaitEvent(struct acpi_ec_softc *sc, EC * event we are actually waiting for. */ Status = EcCheckStatus(sc, "sleep", Event); - if (Status == AE_OK) { + if (ACPI_SUCCESS(Status)) { if (gen_count == sc->ec_gencount) no_intr++; else @@ -890,7 +890,7 @@ EcWaitEvent(struct acpi_ec_softc *sc, EC * read the register once and trust whatever value we got. This is * the best we can do at this point. */ - if (Status != AE_OK) + if (ACPI_FAILURE(Status)) Status = EcCheckStatus(sc, "sleep_end", Event); } if (!need_poll && no_intr > 10) { @@ -898,7 +898,7 @@ EcWaitEvent(struct acpi_ec_softc *sc, EC "not getting interrupts, switched to polled mode\n"); ec_polled_mode = 1; } - if (Status != AE_OK) + if (ACPI_FAILURE(Status)) CTR0(KTR_ACPI, "error: ec wait timed out"); return (Status); } @@ -977,8 +977,8 @@ EcRead(struct acpi_ec_softc *sc, UINT8 A EC_SET_DATA(sc, Address); status = EcWaitEvent(sc, EC_EVENT_OUTPUT_BUFFER_FULL, gen_count); if (ACPI_FAILURE(status)) { - if (EcCheckStatus(sc, "retr_check", - EC_EVENT_INPUT_BUFFER_EMPTY) == AE_OK) + if (ACPI_SUCCESS(EcCheckStatus(sc, "retr_check", + EC_EVENT_INPUT_BUFFER_EMPTY))) continue; else break; Modified: head/sys/dev/acpica/acpivar.h ============================================================================== --- head/sys/dev/acpica/acpivar.h Fri Jun 1 21:29:26 2012 (r236423) +++ head/sys/dev/acpica/acpivar.h Fri Jun 1 21:33:33 2012 (r236424) @@ -273,7 +273,7 @@ acpi_get_type(device_t dev) if ((h = acpi_get_handle(dev)) == NULL) return (ACPI_TYPE_NOT_FOUND); - if (AcpiGetType(h, &t) != AE_OK) + if (ACPI_FAILURE(AcpiGetType(h, &t))) return (ACPI_TYPE_NOT_FOUND); return (t); } Modified: head/sys/i386/acpica/acpi_wakeup.c ============================================================================== --- head/sys/i386/acpica/acpi_wakeup.c Fri Jun 1 21:29:26 2012 (r236423) +++ head/sys/i386/acpica/acpi_wakeup.c Fri Jun 1 21:33:33 2012 (r236424) @@ -249,8 +249,7 @@ acpi_sleep_machdep(struct acpi_softc *sc status = AcpiEnterSleepStateS4bios(); else status = AcpiEnterSleepState(state, acpi_sleep_flags); - - if (status != AE_OK) { + if (ACPI_FAILURE(status)) { device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n", AcpiFormatException(status)); From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 23:24:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4AC351065670; Fri, 1 Jun 2012 23:24:57 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 353268FC08; Fri, 1 Jun 2012 23:24:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51NOv9n050563; Fri, 1 Jun 2012 23:24:57 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51NOvuT050561; Fri, 1 Jun 2012 23:24:57 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201206012324.q51NOvuT050561@svn.freebsd.org> From: Matt Jacob Date: Fri, 1 Jun 2012 23:24: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: r236426 - head/sys/cam/ctl 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, 01 Jun 2012 23:24:57 -0000 Author: mjacob Date: Fri Jun 1 23:24:56 2012 New Revision: 236426 URL: http://svn.freebsd.org/changeset/base/236426 Log: Print FC PortID as a hex number. This makes it easy to figure out domain, etc.. Zero ATIO and INOTify allocations. It makes for much less guesswork when looking at the structure and seeing 'deadc0de' present. Reviewed by: kdm MFC after: 2 weeks Sponsored by: Spectralogic Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Fri Jun 1 23:19:39 2012 (r236425) +++ head/sys/cam/ctl/scsi_ctl.c Fri Jun 1 23:24:56 2012 (r236426) @@ -490,7 +490,7 @@ ctlfeasync(void *callback_arg, uint32_t dev_chg = (struct ac_device_changed *)ac->contract_data; - printf("%s: WWPN %#jx port %u path %u target %u %s\n", + printf("%s: WWPN %#jx port 0x%06x path %u target %u %s\n", __func__, dev_chg->wwpn, dev_chg->port, xpt_path_path_id(path), dev_chg->target, (dev_chg->arrived == 0) ? "left" : "arrived"); @@ -582,7 +582,7 @@ ctlferegister(struct cam_periph *periph, union ccb *new_ccb; new_ccb = (union ccb *)malloc(sizeof(*new_ccb), M_CTLFE, - M_NOWAIT); + M_ZERO|M_NOWAIT); if (new_ccb == NULL) { status = CAM_RESRC_UNAVAIL; break; @@ -616,7 +616,7 @@ ctlferegister(struct cam_periph *periph, union ccb *new_ccb; new_ccb = (union ccb *)malloc(sizeof(*new_ccb), M_CTLFE, - M_NOWAIT); + M_ZERO|M_NOWAIT); if (new_ccb == NULL) { status = CAM_RESRC_UNAVAIL; break; From owner-svn-src-head@FreeBSD.ORG Fri Jun 1 23:29:49 2012 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 8CF6F106564A; Fri, 1 Jun 2012 23:29:49 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DDAC8FC12; Fri, 1 Jun 2012 23:29:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q51NTnB8050826; Fri, 1 Jun 2012 23:29:49 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q51NTnsi050820; Fri, 1 Jun 2012 23:29:49 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201206012329.q51NTnsi050820@svn.freebsd.org> From: Matt Jacob Date: Fri, 1 Jun 2012 23:29: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: r236427 - in head/sys: conf dev/isp 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, 01 Jun 2012 23:29:49 -0000 Author: mjacob Date: Fri Jun 1 23:29:48 2012 New Revision: 236427 URL: http://svn.freebsd.org/changeset/base/236427 Log: Clean up and complete the incomplete deferred enable code. Make the default role NONE if target mode is selected. This allows ctl(8) to switch to/from target mode via knob settings. If we default to role 'none', this causes a reset of the 24XX f/w which then causes initiators to wake up and notice when we come online. Reviewed by: kdm MFC after: 2 weeks Sponsored by: Spectralogic Modified: head/sys/conf/NOTES head/sys/dev/isp/isp.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/ispvar.h Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Fri Jun 1 23:24:56 2012 (r236426) +++ head/sys/conf/NOTES Fri Jun 1 23:29:48 2012 (r236427) @@ -1603,7 +1603,7 @@ options ISP_TARGET_MODE=1 # # ISP_INTERNAL_TARGET (trivial internal disk target, for testing) # -options ISP_DEFAULT_ROLES=2 +options ISP_DEFAULT_ROLES=0 # Options used in dev/sym/ (Symbios SCSI driver). #options SYM_SETUP_LP_PROBE_MAP #-Low Priority Probe Map (bits) Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Fri Jun 1 23:24:56 2012 (r236426) +++ head/sys/dev/isp/isp.c Fri Jun 1 23:29:48 2012 (r236427) @@ -2306,6 +2306,11 @@ isp_port_login(ispsoftc_t *isp, uint16_t } } +/* + * Pre-24XX fabric port logout + * + * Note that portid is not used + */ static int isp_port_logout(ispsoftc_t *isp, uint16_t handle, uint32_t portid) { @@ -2750,7 +2755,7 @@ not_on_fabric: * layer appropriately). * * We also do initiator map target id assignment here for new initiator - * devices and refresh old ones ot make sure that they point to the corret + * devices and refresh old ones ot make sure that they point to the correct * entities. */ static int Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Fri Jun 1 23:24:56 2012 (r236426) +++ head/sys/dev/isp/isp_freebsd.c Fri Jun 1 23:29:48 2012 (r236427) @@ -781,6 +781,9 @@ isp_free_pcmd(ispsoftc_t *isp, union ccb */ #ifdef ISP_TARGET_MODE +static ISP_INLINE void isp_tmlock(ispsoftc_t *, const char *); +static ISP_INLINE void isp_tmunlk(ispsoftc_t *); +static ISP_INLINE int is_any_lun_enabled(ispsoftc_t *, int); static ISP_INLINE int is_lun_enabled(ispsoftc_t *, int, lun_id_t); static ISP_INLINE tstate_t *get_lun_statep(ispsoftc_t *, int, lun_id_t); static ISP_INLINE tstate_t *get_lun_statep_from_tag(ispsoftc_t *, int, uint32_t); @@ -794,10 +797,11 @@ static ISP_INLINE void isp_put_ntpd(isps static cam_status create_lun_state(ispsoftc_t *, int, struct cam_path *, tstate_t **); static void destroy_lun_state(ispsoftc_t *, tstate_t *); static void isp_enable_lun(ispsoftc_t *, union ccb *); -static void isp_enable_deferred_luns(ispsoftc_t *, int); +static cam_status isp_enable_deferred_luns(ispsoftc_t *, int); static cam_status isp_enable_deferred(ispsoftc_t *, int, lun_id_t); static void isp_disable_lun(ispsoftc_t *, union ccb *); static int isp_enable_target_mode(ispsoftc_t *, int); +static int isp_disable_target_mode(ispsoftc_t *, int); static void isp_ledone(ispsoftc_t *, lun_entry_t *); static timeout_t isp_refire_putback_atio; static void isp_complete_ctio(union ccb *); @@ -815,6 +819,40 @@ static void isp_handle_platform_target_t static void isp_target_mark_aborted(ispsoftc_t *, union ccb *); static void isp_target_mark_aborted_early(ispsoftc_t *, tstate_t *, uint32_t); +static ISP_INLINE void +isp_tmlock(ispsoftc_t *isp, const char *msg) +{ + while (isp->isp_osinfo.tmbusy) { + isp->isp_osinfo.tmwanted = 1; + mtx_sleep(isp, &isp->isp_lock, PRIBIO, msg, 0); + } + isp->isp_osinfo.tmbusy = 1; +} + +static ISP_INLINE void +isp_tmunlk(ispsoftc_t *isp) +{ + isp->isp_osinfo.tmbusy = 0; + if (isp->isp_osinfo.tmwanted) { + isp->isp_osinfo.tmwanted = 0; + wakeup(isp); + } +} + +static ISP_INLINE int +is_any_lun_enabled(ispsoftc_t *isp, int bus) +{ + struct tslist *lhp; + int i; + + for (i = 0; i < LUN_HASH_SIZE; i++) { + ISP_GET_PC_ADDR(isp, bus, lun_hash[i], lhp); + if (SLIST_FIRST(lhp)) + return (1); + } + return (0); +} + static ISP_INLINE int is_lun_enabled(ispsoftc_t *isp, int bus, lun_id_t lun) { @@ -917,6 +955,7 @@ get_ntp_from_tagdata(ispsoftc_t *isp, ui } return (NULL); } + static ISP_INLINE void rls_lun_statep(ispsoftc_t *isp, tstate_t *tptr) { @@ -1058,7 +1097,7 @@ create_lun_state(ispsoftc_t *isp, int bu if (is_lun_enabled(isp, bus, lun)) { return (CAM_LUN_ALRDY_ENA); } - tptr = (tstate_t *) malloc(sizeof (tstate_t), M_DEVBUF, M_NOWAIT|M_ZERO); + tptr = malloc(sizeof (tstate_t), M_DEVBUF, M_NOWAIT|M_ZERO); if (tptr == NULL) { return (CAM_RESRC_UNAVAIL); } @@ -1087,10 +1126,12 @@ static ISP_INLINE void destroy_lun_state(ispsoftc_t *isp, tstate_t *tptr) { struct tslist *lhp; + KASSERT((tptr->hold != 0), ("tptr is not held")); KASSERT((tptr->hold == 1), ("tptr still held (%d)", tptr->hold)); ISP_GET_PC_ADDR(isp, cam_sim_bus(xpt_path_sim(tptr->owner)), lun_hash[LUN_HASH_FUNC(xpt_path_lun_id(tptr->owner))], lhp); SLIST_REMOVE(lhp, tptr, tstate, next); + ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, tptr->owner, "destroyed tstate\n"); xpt_free_path(tptr->owner); free(tptr, M_DEVBUF); } @@ -1106,12 +1147,14 @@ isp_enable_lun(ispsoftc_t *isp, union cc target_id_t target; lun_id_t lun; + /* * We only support either a wildcard target/lun or a target ID of zero and a non-wildcard lun */ bus = XS_CHANNEL(ccb); target = ccb->ccb_h.target_id; lun = ccb->ccb_h.target_lun; + ISP_PATH_PRT(isp, ISP_LOGTDEBUG0|ISP_LOGCONFIG, ccb->ccb_h.path, "enabling lun %u\n", lun); if (target != CAM_TARGET_WILDCARD && target != 0) { ccb->ccb_h.status = CAM_TID_INVALID; xpt_done(ccb); @@ -1135,11 +1178,7 @@ isp_enable_lun(ispsoftc_t *isp, union cc /* * Wait until we're not busy with the lun enables subsystem */ - while (isp->isp_osinfo.tmbusy) { - isp->isp_osinfo.tmwanted = 1; - mtx_sleep(isp, &isp->isp_lock, PRIBIO, "want_isp_enable_lun", 0); - } - isp->isp_osinfo.tmbusy = 1; + isp_tmlock(isp, "isp_enable_lun"); /* * This is as a good a place as any to check f/w capabilities. @@ -1208,7 +1247,7 @@ isp_enable_lun(ispsoftc_t *isp, union cc if (tm_enabled == 0) { ISP_SET_PC(isp, bus, tm_enable_defer, 1); ccb->ccb_h.status = CAM_REQ_CMP; - xpt_print(ccb->ccb_h.path, "Target Mode Not Enabled Yet- Lun Enables Deferred\n"); + xpt_print(ccb->ccb_h.path, "Target Mode not enabled yet- lun enable deferred\n"); goto done; } @@ -1218,37 +1257,78 @@ isp_enable_lun(ispsoftc_t *isp, union cc ccb->ccb_h.status = isp_enable_deferred(isp, bus, lun); done: - if (ccb->ccb_h.status != CAM_REQ_CMP && tptr) { - destroy_lun_state(isp, tptr); - tptr = NULL; + if (ccb->ccb_h.status != CAM_REQ_CMP) { + if (tptr) { + destroy_lun_state(isp, tptr); + tptr = NULL; + } + } else { + tptr->enabled = 1; } if (tptr) { rls_lun_statep(isp, tptr); } - isp->isp_osinfo.tmbusy = 0; - if (isp->isp_osinfo.tmwanted) { - isp->isp_osinfo.tmwanted = 0; - wakeup(isp); - } + + /* + * And we're outta here.... + */ + isp_tmunlk(isp); xpt_done(ccb); } -static void +static cam_status isp_enable_deferred_luns(ispsoftc_t *isp, int bus) { + tstate_t *tptr = NULL; + struct tslist *lhp; + int i, n; + + ISP_GET_PC(isp, bus, tm_enabled, i); + if (i == 1) { + return (CAM_REQ_CMP); + } + ISP_GET_PC(isp, bus, tm_enable_defer, i); + if (i == 0) { + return (CAM_REQ_CMP); + } /* - * XXX: not entirely implemented yet + * If this succeeds, it will set tm_enable */ - (void) isp_enable_deferred(isp, bus, 0); + if (isp_enable_target_mode(isp, bus)) { + return (CAM_REQ_CMP_ERR); + } + isp_tmlock(isp, "isp_enable_deferred_luns"); + for (n = i = 0; i < LUN_HASH_SIZE; i++) { + ISP_GET_PC_ADDR(isp, bus, lun_hash[i], lhp); + SLIST_FOREACH(tptr, lhp, next) { + tptr->hold++; + if (tptr->enabled == 0) { + if (isp_enable_deferred(isp, bus, xpt_path_lun_id(tptr->owner)) == 0) { + tptr->enabled = 1; + n++; + } + } else { + n++; + } + tptr->hold--; + } + } + isp_tmunlk(isp); + if (n == 0) { + return (CAM_REQ_CMP_ERR); + } + ISP_SET_PC(isp, bus, tm_enable_defer, 0); + return (CAM_REQ_CMP); } -static uint32_t +static cam_status isp_enable_deferred(ispsoftc_t *isp, int bus, lun_id_t lun) { cam_status status; + int luns_already_enabled = ISP_FC_PC(isp, bus)->tm_luns_enabled; isp_prt(isp, ISP_LOGTINFO, "%s: bus %d lun %u", __func__, bus, lun); - if (IS_24XX(isp) || (IS_FC(isp) && ISP_FC_PC(isp, bus)->tm_luns_enabled)) { + if (IS_24XX(isp) || (IS_FC(isp) && luns_already_enabled)) { status = CAM_REQ_CMP; } else { int cmd_cnt, not_cnt; @@ -1269,10 +1349,9 @@ isp_enable_deferred(ispsoftc_t *isp, int } isp->isp_osinfo.rptr = NULL; } - if (status == CAM_REQ_CMP) { ISP_SET_PC(isp, bus, tm_luns_enabled, 1); - isp_prt(isp, ISP_LOGTINFO, "bus %d lun %u now enabled for target mode", bus, lun); + isp_prt(isp, ISP_LOGCONFIG|ISP_LOGTINFO, "bus %d lun %u now enabled for target mode", bus, lun); } return (status); } @@ -1289,11 +1368,13 @@ isp_disable_lun(ispsoftc_t *isp, union c bus = XS_CHANNEL(ccb); target = ccb->ccb_h.target_id; lun = ccb->ccb_h.target_lun; + ISP_PATH_PRT(isp, ISP_LOGTDEBUG0|ISP_LOGCONFIG, ccb->ccb_h.path, "disabling lun %u\n", lun); if (target != CAM_TARGET_WILDCARD && target != 0) { ccb->ccb_h.status = CAM_TID_INVALID; xpt_done(ccb); return; } + if (target == CAM_TARGET_WILDCARD && lun != CAM_LUN_WILDCARD) { ccb->ccb_h.status = CAM_LUN_INVALID; xpt_done(ccb); @@ -1305,18 +1386,11 @@ isp_disable_lun(ispsoftc_t *isp, union c xpt_done(ccb); return; } - if (isp->isp_dblev & ISP_LOGTDEBUG0) { - xpt_print(ccb->ccb_h.path, "enabling lun 0x%x on channel %d\n", lun, bus); - } /* * See if we're busy disabling a lun now. */ - while (isp->isp_osinfo.tmbusy) { - isp->isp_osinfo.tmwanted = 1; - mtx_sleep(isp, &isp->isp_lock, PRIBIO, "want_isp_disable_lun", 0); - } - isp->isp_osinfo.tmbusy = 1; + isp_tmlock(isp, "isp_disable_lun"); status = CAM_REQ_INPROG; /* @@ -1341,85 +1415,86 @@ isp_disable_lun(ispsoftc_t *isp, union c if (IS_FC(isp)) { lun = 0; } - isp->isp_osinfo.rptr = &status; if (isp_lun_cmd(isp, RQSTYPE_ENABLE_LUN, bus, lun, 0, 0)) { status = CAM_RESRC_UNAVAIL; } else { mtx_sleep(ccb, &isp->isp_lock, PRIBIO, "isp_disable_lun", 0); } + isp->isp_osinfo.rptr = NULL; done: - ccb->ccb_h.status = status; if (status == CAM_REQ_CMP) { - xpt_print(ccb->ccb_h.path, "now disabled for target mode\n"); + tptr->enabled = 0; + /* + * If we have no more luns enabled for this bus, delete all tracked wwns for it (if we are FC) + * and disable target mode. + */ + if (is_any_lun_enabled(isp, bus) == 0) { + isp_del_all_wwn_entries(isp, bus); + if (isp_disable_target_mode(isp, bus)) { + status = CAM_REQ_CMP_ERR; + } + } } - if (tptr) { + ccb->ccb_h.status = status; + if (status == CAM_REQ_CMP) { + xpt_print(ccb->ccb_h.path, "lun now disabled for target mode\n"); destroy_lun_state(isp, tptr); + } else { + if (tptr) + rls_lun_statep(isp, tptr); } - isp->isp_osinfo.rptr = NULL; - isp->isp_osinfo.tmbusy = 0; - if (isp->isp_osinfo.tmwanted) { - isp->isp_osinfo.tmwanted = 0; - wakeup(isp); - } + isp_tmunlk(isp); xpt_done(ccb); } static int isp_enable_target_mode(ispsoftc_t *isp, int bus) { - int ct; + int tm_enabled; - ISP_GET_PC(isp, bus, tm_enabled, ct); - if (ct != 0) { + ISP_GET_PC(isp, bus, tm_enabled, tm_enabled); + if (tm_enabled != 0) { return (0); } - if (IS_SCSI(isp)) { mbreg_t mbs; - MBSINIT(&mbs, MBOX_ENABLE_TARGET_MODE, MBLOGALL, 0); mbs.param[0] = MBOX_ENABLE_TARGET_MODE; mbs.param[1] = ENABLE_TARGET_FLAG|ENABLE_TQING_FLAG; mbs.param[2] = bus << 7; if (isp_control(isp, ISPCTL_RUN_MBOXCMD, &mbs) < 0 || mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_prt(isp, ISP_LOGERR, "Unable to add Target Role to Bus %d", bus); + isp_prt(isp, ISP_LOGERR, "Unable to enable Target Role on Bus %d", bus); return (EIO); } - SDPARAM(isp, bus)->role |= ISP_ROLE_TARGET; } ISP_SET_PC(isp, bus, tm_enabled, 1); - isp_prt(isp, ISP_LOGINFO, "Target Role added to Bus %d", bus); + isp_prt(isp, ISP_LOGINFO, "Target Role enabled on Bus %d", bus); return (0); } -#ifdef NEEDED static int isp_disable_target_mode(ispsoftc_t *isp, int bus) { - int ct; + int tm_enabled; - ISP_GET_PC(isp, bus, tm_enabled, ct); - if (ct == 0) { + ISP_GET_PC(isp, bus, tm_enabled, tm_enabled); + if (tm_enabled == 0) { return (0); } - if (IS_SCSI(isp)) { mbreg_t mbs; - MBSINIT(&mbs, MBOX_ENABLE_TARGET_MODE, MBLOGALL, 0); mbs.param[2] = bus << 7; if (isp_control(isp, ISPCTL_RUN_MBOXCMD, &mbs) < 0 || mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_prt(isp, ISP_LOGERR, "Unable to subtract Target Role to Bus %d", bus); + isp_prt(isp, ISP_LOGERR, "Unable to disable Target Role on Bus %d", bus); return (EIO); } - SDPARAM(isp, bus)->role &= ~ISP_ROLE_TARGET; } ISP_SET_PC(isp, bus, tm_enabled, 0); - isp_prt(isp, ISP_LOGINFO, "Target Role subtracted from Bus %d", bus); + isp_prt(isp, ISP_LOGINFO, "Target Role disabled onon Bus %d", bus); return (0); } -#endif static void isp_ledone(ispsoftc_t *isp, lun_entry_t *lep) @@ -4439,7 +4514,7 @@ isp_action(struct cam_sim *sim, union cc tptr->atio_count++; SLIST_INSERT_HEAD(&tptr->atios, &ccb->ccb_h, sim_links.sle); ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, ccb->ccb_h.path, "Put FREE ATIO (tag id 0x%x), count now %d\n", - ((struct ccb_accept_tio *)ccb)->tag_id, tptr->atio_count); + ccb->atio.tag_id, tptr->atio_count); } else if (ccb->ccb_h.func_code == XPT_IMMEDIATE_NOTIFY) { if (ccb->cin1.tag_id) { inot_private_data_t *ntp = isp_find_ntpd(isp, tptr, ccb->cin1.tag_id, ccb->cin1.seq_id); @@ -4450,12 +4525,12 @@ isp_action(struct cam_sim *sim, union cc tptr->inot_count++; SLIST_INSERT_HEAD(&tptr->inots, &ccb->ccb_h, sim_links.sle); ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, ccb->ccb_h.path, "Put FREE INOT, (seq id 0x%x) count now %d\n", - ((struct ccb_immediate_notify *)ccb)->seq_id, tptr->inot_count); + ccb->cin1.seq_id, tptr->inot_count); } else if (ccb->ccb_h.func_code == XPT_IMMED_NOTIFY) { tptr->inot_count++; SLIST_INSERT_HEAD(&tptr->inots, &ccb->ccb_h, sim_links.sle); ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, ccb->ccb_h.path, "Put FREE INOT, (seq id 0x%x) count now %d\n", - ((struct ccb_immediate_notify *)ccb)->seq_id, tptr->inot_count); + ccb->cin1.seq_id, tptr->inot_count); } rls_lun_statep(isp, tptr); ccb->ccb_h.status = CAM_REQ_INPROG; @@ -4738,7 +4813,6 @@ isp_action(struct cam_sim *sim, union cc struct ccb_sim_knob *kp = &ccb->knob; fcparam *fcp; - if (!IS_FC(isp)) { ccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(ccb); @@ -4796,11 +4870,12 @@ isp_action(struct cam_sim *sim, union cc break; } if (rchange) { + ISP_PATH_PRT(isp, ISP_LOGCONFIG, ccb->ccb_h.path, "changing role on from %d to %d\n", fcp->role, newrole); if (isp_fc_change_role(isp, bus, newrole) != 0) { ccb->ccb_h.status = CAM_REQ_CMP_ERR; #ifdef ISP_TARGET_MODE } else if (newrole == ISP_ROLE_TARGET || newrole == ISP_ROLE_BOTH) { - isp_enable_deferred_luns(isp, bus); + ccb->ccb_h.status = isp_enable_deferred_luns(isp, bus); #endif } } @@ -4808,7 +4883,7 @@ isp_action(struct cam_sim *sim, union cc xpt_done(ccb); break; } - case XPT_GET_SIM_KNOB: /* Set SIM knobs */ + case XPT_GET_SIM_KNOB: /* Get SIM knobs */ { struct ccb_sim_knob *kp = &ccb->knob; Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Fri Jun 1 23:24:56 2012 (r236426) +++ head/sys/dev/isp/isp_freebsd.h Fri Jun 1 23:29:48 2012 (r236427) @@ -129,8 +129,10 @@ typedef struct tstate { struct ccb_hdr_slist atios; struct ccb_hdr_slist inots; uint32_t hold; - int atio_count; - int inot_count; + uint32_t + enabled : 1, + atio_count : 15, + inot_count : 15; inot_private_data_t * restart_queue; inot_private_data_t * ntfree; inot_private_data_t ntpool[ATPDPSIZE]; Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Fri Jun 1 23:24:56 2012 (r236426) +++ head/sys/dev/isp/ispvar.h Fri Jun 1 23:29:48 2012 (r236427) @@ -724,8 +724,17 @@ struct ispsoftc { #define ISP_ROLE_BOTH (ISP_ROLE_TARGET|ISP_ROLE_INITIATOR) #define ISP_ROLE_EITHER ISP_ROLE_BOTH #ifndef ISP_DEFAULT_ROLES +/* + * Counterintuitively, we prefer to default to role 'none' + * if we are enable target mode support. This gives us the + * maximum flexibility as to which port will do what. + */ +#ifdef ISP_TARGET_MODE +#define ISP_DEFAULT_ROLES ISP_ROLE_NONE +#else #define ISP_DEFAULT_ROLES ISP_ROLE_INITIATOR #endif +#endif /* From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 03:13:28 2012 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 758F71065670; Sat, 2 Jun 2012 03:13:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 612748FC08; Sat, 2 Jun 2012 03:13:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q523DSSt061718; Sat, 2 Jun 2012 03:13:28 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q523DSCh061716; Sat, 2 Jun 2012 03:13:28 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201206020313.q523DSCh061716@svn.freebsd.org> From: Eitan Adler Date: Sat, 2 Jun 2012 03:13: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: r236433 - head/usr.bin/find 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, 02 Jun 2012 03:13:28 -0000 Author: eadler Date: Sat Jun 2 03:13:27 2012 New Revision: 236433 URL: http://svn.freebsd.org/changeset/base/236433 Log: Document the limitations of the -delete primary PR: bin/166554 Submitted by: Richard Kettlewell Discussed with: jilles Approved by: bcr MFC after: 3 days Modified: head/usr.bin/find/find.1 Modified: head/usr.bin/find/find.1 ============================================================================== --- head/usr.bin/find/find.1 Sat Jun 2 02:27:01 2012 (r236432) +++ head/usr.bin/find/find.1 Sat Jun 2 03:13:27 2012 (r236433) @@ -31,7 +31,7 @@ .\" @(#)find.1 8.7 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd September 28, 2011 +.Dd May 06, 2012 .Dt FIND 1 .Os .Sh NAME @@ -319,6 +319,9 @@ character in its pathname relative to .Dq Pa \&. for security reasons. Depth-first traversal processing is implied by this option. +The +.Ic -delete +primary will fail to delete a directory if it is not empty. Following symlinks is incompatible with this option. .It Ic -depth Always true; From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 08:15:50 2012 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 F3406106564A; Sat, 2 Jun 2012 08:15:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail15.syd.optusnet.com.au (mail15.syd.optusnet.com.au [211.29.132.196]) by mx1.freebsd.org (Postfix) with ESMTP id 856D58FC1A; Sat, 2 Jun 2012 08:15:49 +0000 (UTC) Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail15.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q528Femi016283 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Jun 2012 18:15:41 +1000 Date: Sat, 2 Jun 2012 18:15:40 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin In-Reply-To: <201206011316.58330.jhb@freebsd.org> Message-ID: <20120602175006.H990@besplex.bde.org> References: <201206010423.q514NKtf083043@svn.freebsd.org> <201206011024.49122.jhb@freebsd.org> <201206011316.58330.jhb@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, Eitan Adler , Bruce Evans Subject: Re: svn commit: r236377 - head/sys/dev/vxge/vxgehal 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, 02 Jun 2012 08:15:50 -0000 On Fri, 1 Jun 2012, John Baldwin wrote: > On Friday, June 01, 2012 12:39:48 pm Eitan Adler wrote: >> On 1 June 2012 07:24, John Baldwin wrote: >>> This is why I personally loathe assignment side effects in boolean expressions >>> for control flow. I tend to write this sort of thing instead as: >>> >>> channel->dtr_arr[dtr_index].dtr = dtrh; >>> if (dtrh != NULL) { >> >> Same here. I was told to use the assignment is style(9) by multiple >> people though. If it really is, I wish it would change. > > style(9) doesn't make a clear statement either way, but it has contradicting > examples. > > First: > > while ((ch = getopt(argc, argv, "abNn:")) != -1) > > (and this one I use all the time myself as that is the common idiom for > getopt()) > > Second: > > error = function(a1, a2); > if (error != 0) > exit(error); The former is the old style and is still common. We tried to change this 10-15 years ago, but in style(9) didn't change much except the second example. In Lite2 it is: /* No spaces after function names. */ if (error = function(a1, a2)) exit(error); and we successfully changed almost everything/everyone to not have/write code like that (the compiler will now warn about the test-by-assignment), but often the fix is to just add parentheses and a test on the same line since that minimises churn and some writers prefer it. > Also, style(9) tends to frown on assignments that are side-effects in other > places, for example: > > Be careful to not obfuscate the code by initializing variables in the > declarations. Use this feature only thoughtfully. DO NOT use function > calls in initializers. This was originally not about side effects, but about writing _any_ of the function in initializers. In Lite2, it is: * DO NOT initialize variables in the declarations. This rule is even more useful for minimising bugs without really trying than it used to be, since the initializations need to be moved after a lock in many cases, but FreeBSD weakened it as above :-(. > struct foo one, *two; > double three; > int *four, five; > char *six, seven, eight, nine, ten, eleven, twelve; I recently discussed ordering of declarations with someone and noticed that style(9) mostly violates its own rules by not sorting on either size or alphabetically here. The rule should be to sort on alignment and then alphabetically, and gives something like: struct foo one; /* structs always first */ double three; /* big FP types next */ struct foo *two; /* then pointers (sort on complexity?) */ int *four; char *six; int five; /* XXX bogus names; keep their non-alphabetical sorting below. */ char seven, eight, nine, ten, eleven, twelve; but my rules put all scalars after all pointers (so the double goes after the pointers despite it being larger and having stricter alignment requirements on i386), and there are many complications for typedefed opaque and semi-opaque types (you may or may not know anything about their size and alignment). > Some newer changes added at the end do use assignment side-effects while > demonstrating other rules (the !p example and err(3) and warn(3) examples, > this last I find particularly obfuscated and painful to read). These are actually old. In Lite2 they are: * ... Also, test pointers * against NULL, i.e. use: * * (p = f()) == NULL * not: * !(p = f()) * ... * Use err/warn(3), don't roll your own! */ if ((four = malloc(sizeof(struct foo))) == NULL) err(1, NULL); if ((six = (int *)overflow()) == NULL) errx(1, "Number overflowed."); For !p, it just says not to use !p for pointers, and the test in the same expression as the assignment is as usual. > However, I do split it out if the return value is used for more than error > checking, e.g.: > > fd = open(...); > if (fd < 0) > err(1, "open"); The best way. Bruce From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 08:29:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A79B6106564A; Sat, 2 Jun 2012 08:29:07 +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 90C0A8FC19; Sat, 2 Jun 2012 08:29:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q528T7Tj075845; Sat, 2 Jun 2012 08:29:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q528T7cL075840; Sat, 2 Jun 2012 08:29:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201206020829.q528T7cL075840@svn.freebsd.org> From: Alexander Motin Date: Sat, 2 Jun 2012 08:29: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: r236437 - in head: sbin/camcontrol sys/cam sys/cam/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: Sat, 02 Jun 2012 08:29:07 -0000 Author: mav Date: Sat Jun 2 08:29:07 2012 New Revision: 236437 URL: http://svn.freebsd.org/changeset/base/236437 Log: Rewrite enabling NCQ for SATA devices in a way more alike to SCSI TCQ. This allows to control it with `camcontrol negotiate adaX -T (en|dis)able` on the fly, same as for SCSI devices. Sponsored by: iXsystems, Inc. Modified: head/sbin/camcontrol/camcontrol.c head/sys/cam/ata/ata_xpt.c head/sys/cam/cam_ccb.h head/sys/cam/cam_xpt.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Sat Jun 2 05:46:04 2012 (r236436) +++ head/sbin/camcontrol/camcontrol.c Sat Jun 2 08:29:07 2012 (r236437) @@ -1025,11 +1025,11 @@ camxferrate(struct cam_device *device) if (sas->valid & CTS_SAS_VALID_SPEED) speed = sas->bitrate; } else if (ccb->cts.transport == XPORT_ATA) { - struct ccb_trans_settings_ata *ata = + struct ccb_trans_settings_pata *pata = &ccb->cts.xport_specific.ata; - if (ata->valid & CTS_ATA_VALID_MODE) - speed = ata_mode2speed(ata->mode); + if (pata->valid & CTS_ATA_VALID_MODE) + speed = ata_mode2speed(pata->mode); } else if (ccb->cts.transport == XPORT_SATA) { struct ccb_trans_settings_sata *sata = &ccb->cts.xport_specific.sata; @@ -1072,16 +1072,16 @@ camxferrate(struct cam_device *device) fprintf(stdout, ")"); } } else if (ccb->cts.transport == XPORT_ATA) { - struct ccb_trans_settings_ata *ata = + struct ccb_trans_settings_pata *pata = &ccb->cts.xport_specific.ata; printf(" ("); - if (ata->valid & CTS_ATA_VALID_MODE) - printf("%s, ", ata_mode2string(ata->mode)); - if ((ata->valid & CTS_ATA_VALID_ATAPI) && ata->atapi != 0) - printf("ATAPI %dbytes, ", ata->atapi); - if (ata->valid & CTS_ATA_VALID_BYTECOUNT) - printf("PIO %dbytes", ata->bytecount); + if (pata->valid & CTS_ATA_VALID_MODE) + printf("%s, ", ata_mode2string(pata->mode)); + if ((pata->valid & CTS_ATA_VALID_ATAPI) && pata->atapi != 0) + printf("ATAPI %dbytes, ", pata->atapi); + if (pata->valid & CTS_ATA_VALID_BYTECOUNT) + printf("PIO %dbytes", pata->bytecount); printf(")"); } else if (ccb->cts.transport == XPORT_SATA) { struct ccb_trans_settings_sata *sata = @@ -2891,21 +2891,45 @@ cts_print(struct cam_device *device, str "enabled" : "disabled"); } } + if (cts->transport == XPORT_FC) { + struct ccb_trans_settings_fc *fc = + &cts->xport_specific.fc; + + if (fc->valid & CTS_FC_VALID_WWNN) + fprintf(stdout, "%sWWNN: 0x%llx", pathstr, + (long long) fc->wwnn); + if (fc->valid & CTS_FC_VALID_WWPN) + fprintf(stdout, "%sWWPN: 0x%llx", pathstr, + (long long) fc->wwpn); + if (fc->valid & CTS_FC_VALID_PORT) + fprintf(stdout, "%sPortID: 0x%x", pathstr, fc->port); + if (fc->valid & CTS_FC_VALID_SPEED) + fprintf(stdout, "%stransfer speed: %d.%03dMB/s\n", + pathstr, fc->bitrate / 1000, fc->bitrate % 1000); + } + if (cts->transport == XPORT_SAS) { + struct ccb_trans_settings_sas *sas = + &cts->xport_specific.sas; + + if (sas->valid & CTS_SAS_VALID_SPEED) + fprintf(stdout, "%stransfer speed: %d.%03dMB/s\n", + pathstr, sas->bitrate / 1000, sas->bitrate % 1000); + } if (cts->transport == XPORT_ATA) { - struct ccb_trans_settings_ata *ata = + struct ccb_trans_settings_pata *pata = &cts->xport_specific.ata; - if ((ata->valid & CTS_ATA_VALID_MODE) != 0) { + if ((pata->valid & CTS_ATA_VALID_MODE) != 0) { fprintf(stdout, "%sATA mode: %s\n", pathstr, - ata_mode2string(ata->mode)); + ata_mode2string(pata->mode)); } - if ((ata->valid & CTS_ATA_VALID_ATAPI) != 0) { + if ((pata->valid & CTS_ATA_VALID_ATAPI) != 0) { fprintf(stdout, "%sATAPI packet length: %d\n", pathstr, - ata->atapi); + pata->atapi); } - if ((ata->valid & CTS_ATA_VALID_BYTECOUNT) != 0) { + if ((pata->valid & CTS_ATA_VALID_BYTECOUNT) != 0) { fprintf(stdout, "%sPIO transaction length: %d\n", - pathstr, ata->bytecount); + pathstr, pata->bytecount); } } if (cts->transport == XPORT_SATA) { @@ -2941,12 +2965,22 @@ cts_print(struct cam_device *device, str sata->caps); } } + if (cts->protocol == PROTO_ATA) { + struct ccb_trans_settings_ata *ata= + &cts->proto_specific.ata; + + if (ata->valid & CTS_ATA_VALID_TQ) { + fprintf(stdout, "%stagged queueing: %s\n", pathstr, + (ata->flags & CTS_ATA_FLAGS_TAG_ENB) ? + "enabled" : "disabled"); + } + } if (cts->protocol == PROTO_SCSI) { struct ccb_trans_settings_scsi *scsi= &cts->proto_specific.scsi; if (scsi->valid & CTS_SCSI_VALID_TQ) { - fprintf(stdout, "%stagged queueing is %s\n", pathstr, + fprintf(stdout, "%stagged queueing: %s\n", pathstr, (scsi->flags & CTS_SCSI_FLAGS_TAG_ENB) ? "enabled" : "disabled"); } @@ -3384,16 +3418,19 @@ ratecontrol(struct cam_device *device, i if (change_settings) { int didsettings = 0; struct ccb_trans_settings_spi *spi = NULL; - struct ccb_trans_settings_ata *ata = NULL; + struct ccb_trans_settings_pata *pata = NULL; struct ccb_trans_settings_sata *sata = NULL; + struct ccb_trans_settings_ata *ata = NULL; struct ccb_trans_settings_scsi *scsi = NULL; if (ccb->cts.transport == XPORT_SPI) spi = &ccb->cts.xport_specific.spi; if (ccb->cts.transport == XPORT_ATA) - ata = &ccb->cts.xport_specific.ata; + pata = &ccb->cts.xport_specific.ata; if (ccb->cts.transport == XPORT_SATA) sata = &ccb->cts.xport_specific.sata; + if (ccb->cts.protocol == PROTO_ATA) + ata = &ccb->cts.proto_specific.ata; if (ccb->cts.protocol == PROTO_SCSI) scsi = &ccb->cts.proto_specific.scsi; ccb->cts.xport_specific.valid = 0; @@ -3406,19 +3443,28 @@ ratecontrol(struct cam_device *device, i spi->flags |= CTS_SPI_FLAGS_DISC_ENB; didsettings++; } - if (scsi && tag_enable != -1) { + if (tag_enable != -1) { if ((cpi.hba_inquiry & PI_TAG_ABLE) == 0) { warnx("HBA does not support tagged queueing, " "so you cannot modify tag settings"); retval = 1; goto ratecontrol_bailout; } - scsi->valid |= CTS_SCSI_VALID_TQ; - if (tag_enable == 0) - scsi->flags &= ~CTS_SCSI_FLAGS_TAG_ENB; - else - scsi->flags |= CTS_SCSI_FLAGS_TAG_ENB; - didsettings++; + if (ata) { + ata->valid |= CTS_SCSI_VALID_TQ; + if (tag_enable == 0) + ata->flags &= ~CTS_ATA_FLAGS_TAG_ENB; + else + ata->flags |= CTS_ATA_FLAGS_TAG_ENB; + didsettings++; + } else if (scsi) { + scsi->valid |= CTS_SCSI_VALID_TQ; + if (tag_enable == 0) + scsi->flags &= ~CTS_SCSI_FLAGS_TAG_ENB; + else + scsi->flags |= CTS_SCSI_FLAGS_TAG_ENB; + didsettings++; + } } if (spi && offset != -1) { if ((cpi.hba_inquiry & PI_SDTR_ABLE) == 0) { @@ -3465,6 +3511,12 @@ ratecontrol(struct cam_device *device, i retval = 1; goto ratecontrol_bailout; } + if (!user_settings) { + warnx("You can modify only user rate " + "settings for SATA"); + retval = 1; + goto ratecontrol_bailout; + } sata->revision = ata_speed2revision(syncrate * 100); if (sata->revision < 0) { warnx("Invalid rate %f", syncrate); @@ -3474,16 +3526,22 @@ ratecontrol(struct cam_device *device, i sata->valid |= CTS_SATA_VALID_REVISION; didsettings++; } - if ((ata || sata) && mode != -1) { + if ((pata || sata) && mode != -1) { if ((cpi.hba_inquiry & PI_SDTR_ABLE) == 0) { warnx("HBA is not capable of changing " "transfer rates"); retval = 1; goto ratecontrol_bailout; } - if (ata) { - ata->mode = mode; - ata->valid |= CTS_ATA_VALID_MODE; + if (!user_settings) { + warnx("You can modify only user mode " + "settings for ATA/SATA"); + retval = 1; + goto ratecontrol_bailout; + } + if (pata) { + pata->mode = mode; + pata->valid |= CTS_ATA_VALID_MODE; } else { sata->mode = mode; sata->valid |= CTS_SATA_VALID_MODE; @@ -3530,11 +3588,6 @@ ratecontrol(struct cam_device *device, i if (didsettings == 0) { goto ratecontrol_bailout; } - if (!user_settings && (ata || sata)) { - warnx("You can modify only user settings for ATA/SATA"); - retval = 1; - goto ratecontrol_bailout; - } ccb->ccb_h.func_code = XPT_SET_TRAN_SETTINGS; if (cam_send_ccb(device, ccb) < 0) { perror("error sending XPT_SET_TRAN_SETTINGS CCB"); @@ -3566,13 +3619,10 @@ ratecontrol(struct cam_device *device, i fprintf(stderr, "Test Unit Ready failed\n"); goto ratecontrol_bailout; } - /* - * If the user wants things quiet, there's no sense in - * getting the transfer settings, if we're not going - * to print them. - */ - if (quiet != 0) - goto ratecontrol_bailout; + } + if ((change_settings || send_tur) && !quiet && + (ccb->cts.transport == XPORT_ATA || + ccb->cts.transport == XPORT_SATA || send_tur)) { fprintf(stdout, "New parameters:\n"); retval = get_print_cts(device, user_settings, 0, NULL); } Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Sat Jun 2 05:46:04 2012 (r236436) +++ head/sys/cam/ata/ata_xpt.c Sat Jun 2 08:29:07 2012 (r236437) @@ -165,7 +165,7 @@ static cam_status proberegister(struct c void *arg); static void probeschedule(struct cam_periph *probe_periph); static void probestart(struct cam_periph *periph, union ccb *start_ccb); -//static void proberequestdefaultnegotiation(struct cam_periph *periph); +static void proberequestdefaultnegotiation(struct cam_periph *periph); //static int proberequestbackoff(struct cam_periph *periph, // struct cam_ed *device); static void probedone(struct cam_periph *periph, union ccb *done_ccb); @@ -180,6 +180,7 @@ static struct cam_ed * ata_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id); static void ata_device_transport(struct cam_path *path); +static void ata_get_transfer_settings(struct ccb_trans_settings *cts); static void ata_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_ed *device, int async_update); @@ -662,7 +663,7 @@ negotiate: } xpt_action(start_ccb); } -#if 0 + static void proberequestdefaultnegotiation(struct cam_periph *periph) { @@ -672,14 +673,15 @@ proberequestdefaultnegotiation(struct ca cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; cts.type = CTS_TYPE_USER_SETTINGS; xpt_action((union ccb *)&cts); - if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) return; - } + cts.xport_specific.valid = 0; cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; xpt_action((union ccb *)&cts); } +#if 0 /* * Backoff Negotiation Code- only pertinent for SPI devices. */ @@ -1044,10 +1046,10 @@ noerror: cts.xport_specific.sata.tags = path->device->maxtags; cts.xport_specific.sata.valid = CTS_SATA_VALID_TAGS; xpt_action((union ccb *)&cts); - /* Reconfigure queues for tagged queueing. */ - xpt_start_tags(path); } } + if (changed) + proberequestdefaultnegotiation(periph); ata_device_transport(path); PROBE_SET_ACTION(softc, PROBE_SETMODE); xpt_release_ccb(done_ccb); @@ -1829,10 +1831,7 @@ ata_action(union ccb *start_ccb) break; case XPT_GET_TRAN_SETTINGS: { - struct cam_sim *sim; - - sim = start_ccb->ccb_h.path->bus->sim; - (*(sim->sim_action))(sim, start_ccb); + ata_get_transfer_settings(&start_ccb->cts); break; } case XPT_SCSI_IO: @@ -1871,14 +1870,48 @@ ata_action(union ccb *start_ccb) } static void +ata_get_transfer_settings(struct ccb_trans_settings *cts) +{ + struct ccb_trans_settings_ata *ata; + struct ccb_trans_settings_scsi *scsi; + struct cam_ed *device; + struct cam_sim *sim; + + device = cts->ccb_h.path->device; + sim = cts->ccb_h.path->bus->sim; + (*(sim->sim_action))(sim, (union ccb *)cts); + + if (cts->protocol == PROTO_ATA) { + ata = &cts->proto_specific.ata; + if ((ata->valid & CTS_ATA_VALID_TQ) == 0) { + ata->valid |= CTS_ATA_VALID_TQ; + if (cts->type == CTS_TYPE_USER_SETTINGS || + (device->flags & CAM_DEV_TAG_AFTER_COUNT) != 0 || + (device->inq_flags & SID_CmdQue) != 0) + ata->flags |= CTS_ATA_FLAGS_TAG_ENB; + } + } + if (cts->protocol == PROTO_SCSI) { + scsi = &cts->proto_specific.scsi; + if ((scsi->valid & CTS_SCSI_VALID_TQ) == 0) { + scsi->valid |= CTS_SCSI_VALID_TQ; + if (cts->type == CTS_TYPE_USER_SETTINGS || + (device->flags & CAM_DEV_TAG_AFTER_COUNT) != 0 || + (device->inq_flags & SID_CmdQue) != 0) + scsi->flags |= CTS_SCSI_FLAGS_TAG_ENB; + } + } +} + +static void ata_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_ed *device, int async_update) { struct ccb_pathinq cpi; - struct ccb_trans_settings cur_cts; + struct ccb_trans_settings_ata *ata; struct ccb_trans_settings_scsi *scsi; - struct ccb_trans_settings_scsi *cur_scsi; struct cam_sim *sim; + struct ata_params *ident_data; struct scsi_inquiry_data *inq_data; if (device == NULL) { @@ -1938,95 +1971,63 @@ ata_set_transfer_settings(struct ccb_tra } sim = cts->ccb_h.path->bus->sim; - - /* - * Nothing more of interest to do unless - * this is a device connected via the - * SCSI protocol. - */ - if (cts->protocol != PROTO_SCSI) { - if (async_update == FALSE) - (*(sim->sim_action))(sim, (union ccb *)cts); - return; - } - + ident_data = &device->ident_data; inq_data = &device->inq_data; - scsi = &cts->proto_specific.scsi; + if (cts->protocol == PROTO_ATA) + ata = &cts->proto_specific.ata; + else + ata = NULL; + if (cts->protocol == PROTO_SCSI) + scsi = &cts->proto_specific.scsi; + else + scsi = NULL; xpt_setup_ccb(&cpi.ccb_h, cts->ccb_h.path, CAM_PRIORITY_NONE); cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); - /* SCSI specific sanity checking */ + /* Sanity checking */ if ((cpi.hba_inquiry & PI_TAG_ABLE) == 0 - || (INQ_DATA_TQ_ENABLED(inq_data)) == 0 + || (ata && (ident_data->satacapabilities & ATA_SUPPORT_NCQ) == 0) + || (scsi && (INQ_DATA_TQ_ENABLED(inq_data)) == 0) || (device->queue_flags & SCP_QUEUE_DQUE) != 0 || (device->mintags == 0)) { /* * Can't tag on hardware that doesn't support tags, * doesn't have it enabled, or has broken tag support. */ - scsi->flags &= ~CTS_SCSI_FLAGS_TAG_ENB; - } - - if (async_update == FALSE) { - /* - * Perform sanity checking against what the - * controller and device can do. - */ - xpt_setup_ccb(&cur_cts.ccb_h, cts->ccb_h.path, CAM_PRIORITY_NONE); - cur_cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; - cur_cts.type = cts->type; - xpt_action((union ccb *)&cur_cts); - if ((cur_cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - return; - } - cur_scsi = &cur_cts.proto_specific.scsi; - if ((scsi->valid & CTS_SCSI_VALID_TQ) == 0) { - scsi->flags &= ~CTS_SCSI_FLAGS_TAG_ENB; - scsi->flags |= cur_scsi->flags & CTS_SCSI_FLAGS_TAG_ENB; - } - if ((cur_scsi->valid & CTS_SCSI_VALID_TQ) == 0) + if (ata) + ata->flags &= ~CTS_ATA_FLAGS_TAG_ENB; + if (scsi) scsi->flags &= ~CTS_SCSI_FLAGS_TAG_ENB; } - if (cts->type == CTS_TYPE_CURRENT_SETTINGS - && (scsi->valid & CTS_SCSI_VALID_TQ) != 0) { - int device_tagenb; - - /* - * If we are transitioning from tags to no-tags or - * vice-versa, we need to carefully freeze and restart - * the queue so that we don't overlap tagged and non-tagged - * commands. We also temporarily stop tags if there is - * a change in transfer negotiation settings to allow - * "tag-less" negotiation. - */ - if ((device->flags & CAM_DEV_TAG_AFTER_COUNT) != 0 - || (device->inq_flags & SID_CmdQue) != 0) - device_tagenb = TRUE; - else - device_tagenb = FALSE; + /* Start/stop tags use. */ + if (cts->type == CTS_TYPE_CURRENT_SETTINGS && + ((ata && (ata->valid & CTS_ATA_VALID_TQ) != 0) || + (scsi && (scsi->valid & CTS_SCSI_VALID_TQ) != 0))) { + int nowt, newt = 0; + + nowt = ((device->flags & CAM_DEV_TAG_AFTER_COUNT) != 0 || + (device->inq_flags & SID_CmdQue) != 0); + if (ata) + newt = (ata->flags & CTS_ATA_FLAGS_TAG_ENB) != 0; + if (scsi) + newt = (scsi->flags & CTS_SCSI_FLAGS_TAG_ENB) != 0; - if (((scsi->flags & CTS_SCSI_FLAGS_TAG_ENB) != 0 - && device_tagenb == FALSE) - || ((scsi->flags & CTS_SCSI_FLAGS_TAG_ENB) == 0 - && device_tagenb == TRUE)) { - - if ((scsi->flags & CTS_SCSI_FLAGS_TAG_ENB) != 0) { - /* - * Delay change to use tags until after a - * few commands have gone to this device so - * the controller has time to perform transfer - * negotiations without tagged messages getting - * in the way. - */ - device->tag_delay_count = CAM_TAG_DELAY_COUNT; - device->flags |= CAM_DEV_TAG_AFTER_COUNT; - } else { - xpt_stop_tags(cts->ccb_h.path); - } - } + if (newt && !nowt) { + /* + * Delay change to use tags until after a + * few commands have gone to this device so + * the controller has time to perform transfer + * negotiations without tagged messages getting + * in the way. + */ + device->tag_delay_count = CAM_TAG_DELAY_COUNT; + device->flags |= CAM_DEV_TAG_AFTER_COUNT; + } else if (nowt && !newt) + xpt_stop_tags(cts->ccb_h.path); } + if (async_update == FALSE) (*(sim->sim_action))(sim, (union ccb *)cts); } @@ -2116,11 +2117,11 @@ ata_announce_periph(struct cam_periph *p /* Report connection speed */ speed = cpi.base_transfer_speed; if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_ATA) { - struct ccb_trans_settings_ata *ata = + struct ccb_trans_settings_pata *pata = &cts.xport_specific.ata; - if (ata->valid & CTS_ATA_VALID_MODE) - speed = ata_mode2speed(ata->mode); + if (pata->valid & CTS_ATA_VALID_MODE) + speed = ata_mode2speed(pata->mode); } if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_SATA) { struct ccb_trans_settings_sata *sata = @@ -2139,16 +2140,16 @@ ata_announce_periph(struct cam_periph *p periph->unit_number, speed); /* Report additional information about connection */ if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_ATA) { - struct ccb_trans_settings_ata *ata = + struct ccb_trans_settings_pata *pata = &cts.xport_specific.ata; printf(" ("); - if (ata->valid & CTS_ATA_VALID_MODE) - printf("%s, ", ata_mode2string(ata->mode)); - if ((ata->valid & CTS_ATA_VALID_ATAPI) && ata->atapi != 0) - printf("ATAPI %dbytes, ", ata->atapi); - if (ata->valid & CTS_ATA_VALID_BYTECOUNT) - printf("PIO %dbytes", ata->bytecount); + if (pata->valid & CTS_ATA_VALID_MODE) + printf("%s, ", ata_mode2string(pata->mode)); + if ((pata->valid & CTS_ATA_VALID_ATAPI) && pata->atapi != 0) + printf("ATAPI %dbytes, ", pata->atapi); + if (pata->valid & CTS_ATA_VALID_BYTECOUNT) + printf("PIO %dbytes", pata->bytecount); printf(")"); } if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_SATA) { Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Sat Jun 2 05:46:04 2012 (r236436) +++ head/sys/cam/cam_ccb.h Sat Jun 2 08:29:07 2012 (r236437) @@ -844,6 +844,14 @@ struct ccb_trans_settings_scsi #define CTS_SCSI_FLAGS_TAG_ENB 0x01 }; +struct ccb_trans_settings_ata +{ + u_int valid; /* Which fields to honor */ +#define CTS_ATA_VALID_TQ 0x01 + u_int flags; +#define CTS_ATA_FLAGS_TAG_ENB 0x01 +}; + struct ccb_trans_settings_spi { u_int valid; /* Which fields to honor */ @@ -878,7 +886,7 @@ struct ccb_trans_settings_sas { u_int32_t bitrate; /* Mbps */ }; -struct ccb_trans_settings_ata { +struct ccb_trans_settings_pata { u_int valid; /* Which fields to honor */ #define CTS_ATA_VALID_MODE 0x01 #define CTS_ATA_VALID_BYTECOUNT 0x02 @@ -924,6 +932,7 @@ struct ccb_trans_settings { u_int transport_version; union { u_int valid; /* Which fields to honor */ + struct ccb_trans_settings_ata ata; struct ccb_trans_settings_scsi scsi; } proto_specific; union { @@ -931,7 +940,7 @@ struct ccb_trans_settings { struct ccb_trans_settings_spi spi; struct ccb_trans_settings_fc fc; struct ccb_trans_settings_sas sas; - struct ccb_trans_settings_ata ata; + struct ccb_trans_settings_pata ata; struct ccb_trans_settings_sata sata; } xport_specific; }; Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sat Jun 2 05:46:04 2012 (r236436) +++ head/sys/cam/cam_xpt.c Sat Jun 2 08:29:07 2012 (r236437) @@ -5064,10 +5064,16 @@ camisr_runqueue(void *V_queue) ccb_h->path->bus->sim->devq->send_openings++; runq = TRUE; - if (((dev->flags & CAM_DEV_REL_ON_COMPLETE) != 0 - && (ccb_h->status&CAM_STATUS_MASK) != CAM_REQUEUE_REQ) - || ((dev->flags & CAM_DEV_REL_ON_QUEUE_EMPTY) != 0 + if (((dev->flags & CAM_DEV_REL_ON_QUEUE_EMPTY) != 0 && (dev->ccbq.dev_active == 0))) { + dev->flags &= ~CAM_DEV_REL_ON_QUEUE_EMPTY; + xpt_release_devq(ccb_h->path, /*count*/1, + /*run_queue*/FALSE); + } + + if (((dev->flags & CAM_DEV_REL_ON_COMPLETE) != 0 + && (ccb_h->status&CAM_STATUS_MASK) != CAM_REQUEUE_REQ)) { + dev->flags &= ~CAM_DEV_REL_ON_COMPLETE; xpt_release_devq(ccb_h->path, /*count*/1, /*run_queue*/FALSE); } From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 08:47:27 2012 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 6D481106566C; Sat, 2 Jun 2012 08:47:27 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57F568FC17; Sat, 2 Jun 2012 08:47:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q528lRXM076674; Sat, 2 Jun 2012 08:47:27 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q528lREJ076666; Sat, 2 Jun 2012 08:47:27 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201206020847.q528lREJ076666@svn.freebsd.org> From: Joel Dahl Date: Sat, 2 Jun 2012 08:47: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: r236438 - in head/lib: libc/gen libcrypt libelf libgpib libpmc libusb 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, 02 Jun 2012 08:47:27 -0000 Author: joel (doc committer) Date: Sat Jun 2 08:47:26 2012 New Revision: 236438 URL: http://svn.freebsd.org/changeset/base/236438 Log: mdoc: minor Bl improvements. Modified: head/lib/libc/gen/posix_spawnattr_getflags.3 head/lib/libcrypt/crypt.3 head/lib/libelf/elf.3 head/lib/libelf/gelf.3 head/lib/libgpib/gpib.3 head/lib/libpmc/pmc.3 head/lib/libusb/libusb20.3 Modified: head/lib/libc/gen/posix_spawnattr_getflags.3 ============================================================================== --- head/lib/libc/gen/posix_spawnattr_getflags.3 Sat Jun 2 08:29:07 2012 (r236437) +++ head/lib/libc/gen/posix_spawnattr_getflags.3 Sat Jun 2 08:47:26 2012 (r236438) @@ -70,7 +70,7 @@ or It is the bitwise-inclusive OR of zero or more of the following flags (see .Fn posix_spawn ) : -.Bl -tag -offset indent +.Bl -tag -width "POSIX_SPAWN_SETSCHEDPARAM" -offset indent .It Dv POSIX_SPAWN_RESETIDS .It Dv POSIX_SPAWN_SETPGROUP .It Dv POSIX_SPAWN_SETSIGDEF Modified: head/lib/libcrypt/crypt.3 ============================================================================== --- head/lib/libcrypt/crypt.3 Sat Jun 2 08:29:07 2012 (r236437) +++ head/lib/libcrypt/crypt.3 Sat Jun 2 08:47:26 2012 (r236438) @@ -196,7 +196,7 @@ SHA-512 .Pp Other crypt formats may be easily added. An example salt would be: -.Bl -tag -offset indent +.Bl -tag -width 6n -offset indent .It Cm "$4$thesalt$rest" .El .Ss "Traditional" crypt: Modified: head/lib/libelf/elf.3 ============================================================================== --- head/lib/libelf/elf.3 Sat Jun 2 08:29:07 2012 (r236437) +++ head/lib/libelf/elf.3 Sat Jun 2 08:47:26 2012 (r236438) @@ -385,9 +385,9 @@ See This section contains a brief overview of the available functionality in the ELF library. Each function listed here is described further in its own manual page. -.Bl -tag -width indent +.Bl -tag -width 2n .It "Archive Access" -.Bl -tag -compact +.Bl -tag -width 17n -compact .It Fn elf_getarsym Retrieve the archive symbol table. .It Fn elf_getarhdr @@ -404,7 +404,7 @@ Random access inside an archive. .El .It "Data Structures" -.Bl -tag -compact +.Bl -tag -width 17n -compact .It Fn elf_getdata Retrieve translated data for an ELF section. .It Fn elf_getscn @@ -437,7 +437,7 @@ Allocate an Executable Header in an ELF Allocate or resize the Program Header Table in an ELF object. .El .It "Data Translation" -.Bl -tag -compact +.Bl -tag -width 17n -compact .It Fn elf32_xlatetof , Fn elf64_xlatetof Translate an ELF data structure from its native representation to its file representation. @@ -446,14 +446,14 @@ Translate an ELF data structure from its native representation. .El .It "Error Reporting" -.Bl -tag -compact +.Bl -tag -width 17n -compact .It Fn elf_errno Retrieve the current error. .It Fn elf_errmsg Retrieve a human readable description of the current error. .El .It "Initialization" -.Bl -tag -compact +.Bl -tag -width 17n -compact .It Fn elf_begin Opens an .Xr ar 1 @@ -468,7 +468,7 @@ archive or ELF object present in a memor Sets the operating version. .El .It "IO Control" -.Bl -tag -width ".Fn elf_setshstrndx" -compact +.Bl -tag -width 17n -compact .It Fn elf_cntl Manage the association between and ELF descriptor and its underlying file. .It Fn elf_flagdata @@ -492,7 +492,7 @@ Recompute ELF object layout and optional back to the underlying file. .El .It "Queries" -.Bl -tag -width ".Fn elf_getshstrndx" -compact +.Bl -tag -width 17n -compact .It Fn elf32_checksum , Fn elf64_checkum Compute checksum of an ELF object. .It Fn elf_getident Modified: head/lib/libelf/gelf.3 ============================================================================== --- head/lib/libelf/gelf.3 Sat Jun 2 08:29:07 2012 (r236437) +++ head/lib/libelf/gelf.3 Sat Jun 2 08:47:26 2012 (r236438) @@ -115,7 +115,7 @@ routines will signal an error if a GElf for the underlying ELF data type. .Ss Namespace use The GElf interface uses the following symbols: -.Bl -tag +.Bl -tag -width 8n .It GElf_* Class-independent data types. .It gelf_* @@ -125,16 +125,16 @@ For functions defined in the API set. This section provides an overview of the GElf programming APIs. Further information is provided in the manual page of each function listed here. -.Bl -tag +.Bl -tag -width 2n .It "Allocating ELF Data Structures" -.Bl -tag -compact +.Bl -tag -width 19n -compact .It Fn gelf_newehdr Allocate a new ELF Executable Header. .It Fn gelf_newphdr Allocate a new ELF Program Header Table. .El .It "Data Translation" -.Bl -tag -compact +.Bl -tag -width 19n -compact .It Fn gelf_xlatetof Translate the native representation of an ELF data structure to its file representation. @@ -143,7 +143,7 @@ Translate from the file representation o native representation. .El .It "Retrieving ELF Data" -.Bl -tag -compact +.Bl -tag -width 19n -compact .It Fn gelf_getdyn Retrieve an ELF .Sy .dynamic @@ -162,7 +162,7 @@ Retrieve an ELF Section Header Table ent Retrieve an ELF symbol table entry. .El .It Queries -.Bl -tag -compact +.Bl -tag -width 19n -compact .It Fn gelf_checksum Retrieves the ELF checksum for an ELF descriptor. .It Fn gelf_fsize @@ -171,7 +171,7 @@ Retrieves the size of the file represent Retrieves the ELF class of an ELF descriptor. .El .It "Updating ELF Data" -.Bl -tag -compact -width ".Fn gelf_update_shdr" +.Bl -tag -width 19n -compact .It Fn gelf_update_dyn Copy back an ELF .Sy .dynamic Modified: head/lib/libgpib/gpib.3 ============================================================================== --- head/lib/libgpib/gpib.3 Sat Jun 2 08:29:07 2012 (r236437) +++ head/lib/libgpib/gpib.3 Sat Jun 2 08:47:26 2012 (r236438) @@ -207,7 +207,8 @@ The variable .Dv iberr provides an error code for the most recent library call. The possible error codes are: -.Bl -tag -offset indent -compact +.Pp +.Bl -tag -width 6n -offset indent -compact .It EDVR System error .It ECIC @@ -244,7 +245,8 @@ The variable .Dv ibsta contains the controller status. This is an ORed status value, with the following individual bit names: -.Bl -tag -offset indent -compact +.Pp +.Bl -tag -width 6n -offset indent -compact .It ERR Error .It TIMO @@ -329,7 +331,8 @@ The lower 8 bits of are interpreted as an end-of-string character, .Li EOS . This character can be ORed with the following values: -.Bl -tag -compact -offset indent +.Pp +.Bl -tag -width 6n -compact -offset indent .It Dv REOS When receiving a message byte on the bus that matches the .Li EOS @@ -348,6 +351,7 @@ If set, include all 8 bits of the character in the comparison; if unset, compare only 7 bit ASCII values. .El +.Pp Passing 0 as .Fa eos will turn off any special character treatment, allowing for a fully Modified: head/lib/libpmc/pmc.3 ============================================================================== --- head/lib/libpmc/pmc.3 Sat Jun 2 08:29:07 2012 (r236437) +++ head/lib/libpmc/pmc.3 Sat Jun 2 08:47:26 2012 (r236438) @@ -111,7 +111,7 @@ processor. Certain kinds of PMCs require that a log file be configured before they may be started. These include: -.Bl -bullet -compact +.Bl -bullet .It System scope sampling PMCs. .It @@ -120,6 +120,7 @@ Process scope sampling PMCs. Process scope counting PMCs that have been configured to report PMC readings on process context switches or process exits. .El +.Pp Up to one log file may be configured per owner process. Events logged to a log file may be subsequently analyzed using the .Xr pmclog 3 @@ -129,6 +130,7 @@ The CPUs known to the PMC library are na .Vt "enum pmc_cputype" enumeration. Supported CPUs include: +.Pp .Bl -tag -width "Li PMC_CPU_INTEL_CORE2" -compact .It Li PMC_CPU_AMD_K7 .Tn "AMD Athlon" @@ -185,6 +187,7 @@ PMC supported by this library are named .Vt enum pmc_class enumeration. Supported PMC kinds include: +.Pp .Bl -tag -width "Li PMC_CLASS_IAF" -compact .It Li PMC_CLASS_IAF Fixed function hardware counters presents in CPUs conforming to the @@ -232,6 +235,7 @@ the .Vt "enum pmc_caps" enumeration. Supported capabilities include: +.Pp .Bl -tag -width "Li PMC_CAP_INTERRUPT" -compact .It Li PMC_CAP_CASCADE The ability to cascade counters. @@ -273,9 +277,9 @@ Operations on non-existent CPUs will ret This section contains a brief overview of the available functionality in the PMC library. Each function listed here is described further in its own manual page. -.Bl -tag -width indent +.Bl -tag -width 2n .It Administration -.Bl -tag -compact +.Bl -tag -width 6n -compact .It Fn pmc_disable , Fn pmc_enable Administratively disable (enable) specific performance monitoring counter hardware. @@ -283,7 +287,7 @@ Counters that are disabled will not be a use. .El .It "Convenience Functions" -.Bl -tag -compact +.Bl -tag -width 6n -compact .It Fn pmc_event_names_of_class Returns a list of event names supported by a given PMC type. .It Fn pmc_name_of_capability @@ -308,13 +312,13 @@ constant to a human-readable name. Return a human-readable string describing a PMC's current state. .El .It "Library Initialization" -.Bl -tag -compact +.Bl -tag -width 6n -compact .It Fn pmc_init Initialize the library. This function must be called before any other library function. .El .It "Log File Handling" -.Bl -tag -compact +.Bl -tag -width 6n -compact .It Fn pmc_configure_logfile Configure a log file for .Xr hwpmc 4 @@ -331,7 +335,7 @@ side of the stream. Append arbitrary user data to the current log file. .El .It "PMC Management" -.Bl -tag -compact +.Bl -tag -width 6n -compact .It Fn pmc_allocate , Fn pmc_release Allocate (free) a PMC. .It Fn pmc_attach , Fn pmc_detach @@ -344,7 +348,7 @@ Start (stop) a software PMC. Set the reload value for a sampling PMC. .El .It "Queries" -.Bl -tag -compact +.Bl -tag -width 6n -compact .It Fn pmc_capabilities Retrieve the capabilities for a given PMC. .It Fn pmc_cpuinfo @@ -363,7 +367,7 @@ Return information about the state of a Determine the width of a hardware counter in bits. .El .It "x86 Architecture Specific API" -.Bl -tag -compact +.Bl -tag -width 6n -compact .It Fn pmc_get_msr Returns the processor model specific register number associated with Modified: head/lib/libusb/libusb20.3 ============================================================================== --- head/lib/libusb/libusb20.3 Sat Jun 2 08:29:07 2012 (r236437) +++ head/lib/libusb/libusb20.3 Sat Jun 2 08:47:26 2012 (r236438) @@ -401,7 +401,7 @@ The callback type is defined by libusb20 . .Fn libusb20_tr_set_flags is used to set various USB flags for the given USB transfer. -.Bl -tag +.Bl -tag -width "LIBUSB20_TRANSFER_SINGLE_SHORT_NOT_OK" .It LIBUSB20_TRANSFER_SINGLE_SHORT_NOT_OK Report a short frame as error. .It LIBUSB20_TRANSFER_MULTI_SHORT_NOT_OK @@ -709,13 +709,14 @@ This function returns zero if the device sets the power mode of the USB device. . Valid power modes: -.Bl -tag +.Bl -tag -width "LIBUSB20_POWER_OFF" .It LIBUSB20_POWER_OFF .It LIBUSB20_POWER_ON .It LIBUSB20_POWER_SAVE .It LIBUSB20_POWER_SUSPEND .It LIBUSB20_POWER_RESUME .El +.Pp . This function returns zero on success else a LIBUSB20_ERROR value is returned. @@ -793,7 +794,7 @@ Valid bus numbers start at zero. returns the current operation mode of the USB entity. . Valid return values are: -.Bl -tag +.Bl -tag -width "LIBUSB20_MODE_DEVICE" .It LIBUSB20_MODE_HOST .It LIBUSB20_MODE_DEVICE .El @@ -803,7 +804,7 @@ Valid return values are: .Fn libusb20_dev_get_speed returns the current speed of the given USB device. . -.Bl -tag +.Bl -tag -width "LIBUSB20_SPEED_VARIABLE" .It LIBUSB20_SPEED_UNKNOWN .It LIBUSB20_SPEED_LOW .It LIBUSB20_SPEED_FULL From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 09:10:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 000D4106564A; Sat, 2 Jun 2012 09:10:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DED9A8FC08; Sat, 2 Jun 2012 09:10:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q529ApqR077720; Sat, 2 Jun 2012 09:10:51 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q529Aptt077716; Sat, 2 Jun 2012 09:10:51 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201206020910.q529Aptt077716@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 2 Jun 2012 09:10: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: r236439 - 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: Sat, 02 Jun 2012 09:10:52 -0000 Author: hselasky Date: Sat Jun 2 09:10:51 2012 New Revision: 236439 URL: http://svn.freebsd.org/changeset/base/236439 Log: Add appropriate checks for ic_bsschan being set to IEEE80211_CHAN_ANYC in some of the USB WLAN drivers. This fixes a panic when using monitor mode. MFC after: 1 week Submitted by: PseudoCylon Modified: head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_ural.c Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Sat Jun 2 08:47:26 2012 (r236438) +++ head/sys/dev/usb/wlan/if_rum.c Sat Jun 2 09:10:51 2012 (r236439) @@ -726,6 +726,12 @@ rum_newstate(struct ieee80211vap *vap, e ni = ieee80211_ref_node(vap->iv_bss); if (vap->iv_opmode != IEEE80211_M_MONITOR) { + if (ic->ic_bsschan == IEEE80211_CHAN_ANYC) { + RUM_UNLOCK(sc); + IEEE80211_LOCK(ic); + ieee80211_free_node(ni); + return (-1); + } rum_update_slot(ic->ic_ifp); rum_enable_mrr(sc); rum_set_txpreamble(sc); @@ -2135,11 +2141,12 @@ rum_prepare_beacon(struct rum_softc *sc, if (vap->iv_bss->ni_chan == IEEE80211_CHAN_ANYC) return; + if (ic->ic_bsschan == IEEE80211_CHAN_ANYC) + return; m0 = ieee80211_beacon_alloc(vap->iv_bss, &RUM_VAP(vap)->bo); - if (m0 == NULL) { + if (m0 == NULL) return; - } tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_bsschan)]; rum_setup_tx_desc(sc, &desc, RT2573_TX_TIMESTAMP, RT2573_TX_HWSEQ, Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Sat Jun 2 08:47:26 2012 (r236438) +++ head/sys/dev/usb/wlan/if_run.c Sat Jun 2 09:10:51 2012 (r236439) @@ -1830,6 +1830,11 @@ run_newstate(struct ieee80211vap *vap, e if (vap->iv_opmode != IEEE80211_M_MONITOR) { struct ieee80211_node *ni; + if (ic->ic_bsschan == IEEE80211_CHAN_ANYC) { + RUN_UNLOCK(sc); + IEEE80211_LOCK(ic); + return (-1); + } run_updateslot(ic->ic_ifp); run_enable_mrr(sc); run_set_txpreamble(sc); @@ -2523,8 +2528,8 @@ run_rx_frame(struct run_softc *sc, struc struct run_rx_radiotap_header *tap = &sc->sc_rxtap; tap->wr_flags = 0; - tap->wr_chan_freq = htole16(ic->ic_bsschan->ic_freq); - tap->wr_chan_flags = htole16(ic->ic_bsschan->ic_flags); + tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); + tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wr_antsignal = rssi; tap->wr_antenna = ant; tap->wr_dbm_antsignal = run_rssi2dbm(sc, rssi, ant); @@ -2778,8 +2783,8 @@ tr_setup: tap->wt_flags = 0; tap->wt_rate = rt2860_rates[data->ridx].rate; - tap->wt_chan_freq = htole16(vap->iv_bss->ni_chan->ic_freq); - tap->wt_chan_flags = htole16(vap->iv_bss->ni_chan->ic_flags); + tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); + tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wt_hwqueue = index; if (le16toh(txwi->phy) & RT2860_PHY_SHPRE) tap->wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; @@ -3967,6 +3972,8 @@ run_update_beacon_cb(void *arg) if (vap->iv_bss->ni_chan == IEEE80211_CHAN_ANYC) return; + if (ic->ic_bsschan == IEEE80211_CHAN_ANYC) + return; /* * No need to call ieee80211_beacon_update(), run_update_beacon() Modified: head/sys/dev/usb/wlan/if_ural.c ============================================================================== --- head/sys/dev/usb/wlan/if_ural.c Sat Jun 2 08:47:26 2012 (r236438) +++ head/sys/dev/usb/wlan/if_ural.c Sat Jun 2 09:10:51 2012 (r236439) @@ -713,6 +713,12 @@ ural_newstate(struct ieee80211vap *vap, ni = ieee80211_ref_node(vap->iv_bss); if (vap->iv_opmode != IEEE80211_M_MONITOR) { + if (ic->ic_bsschan == IEEE80211_CHAN_ANYC) { + RAL_UNLOCK(sc); + IEEE80211_LOCK(ic); + ieee80211_free_node(ni); + return (-1); + } ural_update_slot(ic->ic_ifp); ural_set_txpreamble(sc); ural_set_basicrates(sc, ic->ic_bsschan); @@ -1054,7 +1060,12 @@ ural_tx_bcn(struct ural_softc *sc, struc ifp->if_drv_flags |= IFF_DRV_OACTIVE; m_freem(m0); ieee80211_free_node(ni); - return EIO; + return (EIO); + } + if (ic->ic_bsschan == IEEE80211_CHAN_ANYC) { + m_freem(m0); + ieee80211_free_node(ni); + return (ENXIO); } data = STAILQ_FIRST(&sc->tx_free); STAILQ_REMOVE_HEAD(&sc->tx_free, next); From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 10:50:26 2012 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 52ADC1065675; Sat, 2 Jun 2012 10:50:26 +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 3DDBE8FC1B; Sat, 2 Jun 2012 10:50:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q52AoQB9084300; Sat, 2 Jun 2012 10:50:26 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q52AoQBQ084298; Sat, 2 Jun 2012 10:50:26 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201206021050.q52AoQBQ084298@svn.freebsd.org> From: Ed Schouten Date: Sat, 2 Jun 2012 10:50: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: r236441 - head/lib/libc/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, 02 Jun 2012 10:50:26 -0000 Author: ed Date: Sat Jun 2 10:50:25 2012 New Revision: 236441 URL: http://svn.freebsd.org/changeset/base/236441 Log: Remove invalid remark about pipes. The stat structures returned on pipes seems to contain all the information required by POSIX. Especially the wording "and thus to a pipe" makes little sense, because it seems to imply a certain relationship between sockets and pipes that simply isn't there. MFC after: 2 weeks Modified: head/lib/libc/sys/stat.2 Modified: head/lib/libc/sys/stat.2 ============================================================================== --- head/lib/libc/sys/stat.2 Sat Jun 2 10:14:55 2012 (r236440) +++ head/lib/libc/sys/stat.2 Sat Jun 2 10:50:25 2012 (r236441) @@ -28,7 +28,7 @@ .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd November 17, 2011 +.Dd June 2, 2012 .Dt STAT 2 .Os .Sh NAME @@ -431,7 +431,7 @@ system call appeared in .Sh BUGS Applying .Fn fstat -to a socket (and thus to a pipe) +to a socket returns a zeroed buffer, except for the blocksize field, and a unique device and inode number. From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 11:00:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 64F4C1065696; Sat, 2 Jun 2012 11:00:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FC958FC08; Sat, 2 Jun 2012 11:00:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q52B0ngI084797; Sat, 2 Jun 2012 11:00:49 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q52B0nR8084795; Sat, 2 Jun 2012 11:00:49 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201206021100.q52B0nR8084795@svn.freebsd.org> From: Dimitry Andric Date: Sat, 2 Jun 2012 11:00: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: r236442 - in head/lib: libc++ libcxxrt 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, 02 Jun 2012 11:00:49 -0000 Author: dim Date: Sat Jun 2 11:00:48 2012 New Revision: 236442 URL: http://svn.freebsd.org/changeset/base/236442 Log: Tabify libcxxrt and libc++'s Makefiles. MFC after: 3 days Modified: head/lib/libc++/Makefile head/lib/libcxxrt/Makefile Modified: head/lib/libc++/Makefile ============================================================================== --- head/lib/libc++/Makefile Sat Jun 2 10:50:25 2012 (r236441) +++ head/lib/libc++/Makefile Sat Jun 2 11:00:48 2012 (r236442) @@ -1,156 +1,156 @@ # $FreeBSD$ -LIBCXXRTDIR= ${.CURDIR}/../../contrib/libcxxrt -HDRDIR= ${.CURDIR}/../../contrib/libc++/include -SRCDIR= ${.CURDIR}/../../contrib/libc++/src -CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLIB_MAJOR} +LIBCXXRTDIR= ${.CURDIR}/../../contrib/libcxxrt +HDRDIR= ${.CURDIR}/../../contrib/libc++/include +SRCDIR= ${.CURDIR}/../../contrib/libc++/src +CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLIB_MAJOR} .PATH: ${SRCDIR} -LIB= c++ -SHLIB_MAJOR= 1 +LIB= c++ +SHLIB_MAJOR= 1 -SRCS+= algorithm.cpp\ - bind.cpp\ - chrono.cpp\ - condition_variable.cpp\ - debug.cpp\ - exception.cpp\ - future.cpp\ - hash.cpp\ - ios.cpp\ - iostream.cpp\ - locale.cpp\ - memory.cpp\ - mutex.cpp\ - new.cpp\ - random.cpp\ - regex.cpp\ - stdexcept.cpp\ - string.cpp\ - strstream.cpp\ - system_error.cpp\ - thread.cpp\ - typeinfo.cpp\ - utility.cpp\ - valarray.cpp - -WARNS= 0 -CXXFLAGS+= -I${HDRDIR} -I${LIBCXXRTDIR} -std=c++0x -nostdlib -DLIBCXXRT - -DPADD= ${LIBCXXRT} -LDADD= -lcxxrt -LDFLAGS+= --verbose -INCSGROUPS= STD EXT - -STD_HEADERS= __bit_reference\ - __config\ - __debug\ - __functional_03\ - __functional_base\ - __functional_base_03\ - __hash_table\ - __locale\ - __mutex_base\ - __split_buffer\ - __sso_allocator\ - __std_stream\ - __tree\ - __tuple\ - __tuple_03\ - __undef_min_max\ - algorithm\ - array\ - atomic\ - bitset\ - cassert\ - ccomplex\ - cctype\ - cerrno\ - cfenv\ - cfloat\ - chrono\ - cinttypes\ - ciso646\ - climits\ - clocale\ - cmath\ - codecvt\ - complex\ - complex.h\ - condition_variable\ - csetjmp\ - csignal\ - cstdarg\ - cstdbool\ - cstddef\ - cstdint\ - cstdio\ - cstdlib\ - cstring\ - ctgmath\ - ctime\ - cwchar\ - cwctype\ - deque\ - exception\ - forward_list\ - fstream\ - functional\ - future\ - initializer_list\ - iomanip\ - ios\ - iosfwd\ - iostream\ - istream\ - iterator\ - limits\ - list\ - locale\ - map\ - memory\ - mutex\ - new\ - numeric\ - ostream\ - queue\ - random\ - ratio\ - regex\ - scoped_allocator\ - set\ - sstream\ - stack\ - stdexcept\ - streambuf\ - string\ - strstream\ - system_error\ - tgmath.h\ - thread\ - tuple\ - type_traits\ - typeindex\ - typeinfo\ - unordered_map\ - unordered_set\ - utility\ - valarray\ - vector +SRCS+= algorithm.cpp\ + bind.cpp\ + chrono.cpp\ + condition_variable.cpp\ + debug.cpp\ + exception.cpp\ + future.cpp\ + hash.cpp\ + ios.cpp\ + iostream.cpp\ + locale.cpp\ + memory.cpp\ + mutex.cpp\ + new.cpp\ + random.cpp\ + regex.cpp\ + stdexcept.cpp\ + string.cpp\ + strstream.cpp\ + system_error.cpp\ + thread.cpp\ + typeinfo.cpp\ + utility.cpp\ + valarray.cpp + +WARNS= 0 +CXXFLAGS+= -I${HDRDIR} -I${LIBCXXRTDIR} -std=c++0x -nostdlib -DLIBCXXRT + +DPADD= ${LIBCXXRT} +LDADD= -lcxxrt +LDFLAGS+= --verbose +INCSGROUPS= STD EXT + +STD_HEADERS= __bit_reference\ + __config\ + __debug\ + __functional_03\ + __functional_base\ + __functional_base_03\ + __hash_table\ + __locale\ + __mutex_base\ + __split_buffer\ + __sso_allocator\ + __std_stream\ + __tree\ + __tuple\ + __tuple_03\ + __undef_min_max\ + algorithm\ + array\ + atomic\ + bitset\ + cassert\ + ccomplex\ + cctype\ + cerrno\ + cfenv\ + cfloat\ + chrono\ + cinttypes\ + ciso646\ + climits\ + clocale\ + cmath\ + codecvt\ + complex\ + complex.h\ + condition_variable\ + csetjmp\ + csignal\ + cstdarg\ + cstdbool\ + cstddef\ + cstdint\ + cstdio\ + cstdlib\ + cstring\ + ctgmath\ + ctime\ + cwchar\ + cwctype\ + deque\ + exception\ + forward_list\ + fstream\ + functional\ + future\ + initializer_list\ + iomanip\ + ios\ + iosfwd\ + iostream\ + istream\ + iterator\ + limits\ + list\ + locale\ + map\ + memory\ + mutex\ + new\ + numeric\ + ostream\ + queue\ + random\ + ratio\ + regex\ + scoped_allocator\ + set\ + sstream\ + stack\ + stdexcept\ + streambuf\ + string\ + strstream\ + system_error\ + tgmath.h\ + thread\ + tuple\ + type_traits\ + typeindex\ + typeinfo\ + unordered_map\ + unordered_set\ + utility\ + valarray\ + vector .for hdr in ${STD_HEADERS} -STD+= ${HDRDIR}/${hdr} +STD+= ${HDRDIR}/${hdr} .endfor -STDDIR= ${CXXINCLUDEDIR} +STDDIR= ${CXXINCLUDEDIR} -EXT_HEADERS= __hash\ - hash_map\ - hash_set +EXT_HEADERS= __hash\ + hash_map\ + hash_set .for hdr in ${EXT_HEADERS} -EXT+= ${HDRDIR}/ext/${hdr} +EXT+= ${HDRDIR}/ext/${hdr} .endfor -EXTDIR= ${CXXINCLUDEDIR}/ext +EXTDIR= ${CXXINCLUDEDIR}/ext .include Modified: head/lib/libcxxrt/Makefile ============================================================================== --- head/lib/libcxxrt/Makefile Sat Jun 2 10:50:25 2012 (r236441) +++ head/lib/libcxxrt/Makefile Sat Jun 2 11:00:48 2012 (r236442) @@ -1,26 +1,26 @@ # $FreeBSD$ -SRCDIR= ${.CURDIR}/../../contrib/libcxxrt +SRCDIR= ${.CURDIR}/../../contrib/libcxxrt -SHLIB_MAJOR= 1 -SHLIBDIR?= /lib +SHLIB_MAJOR= 1 +SHLIBDIR?= /lib .PATH: ${SRCDIR} -LIB= cxxrt +LIB= cxxrt -SRCS+= libelftc_dem_gnu3.c\ - terminate.cc\ - dynamic_cast.cc\ - memory.cc\ - auxhelper.cc\ - exception.cc\ - stdexcept.cc\ - typeinfo.cc\ - guard.cc - -WARNS= 0 -CFLAGS+= -I${SRCDIR} -VERSION_MAP= ${.CURDIR}/Version.map +SRCS+= libelftc_dem_gnu3.c\ + terminate.cc\ + dynamic_cast.cc\ + memory.cc\ + auxhelper.cc\ + exception.cc\ + stdexcept.cc\ + typeinfo.cc\ + guard.cc + +WARNS= 0 +CFLAGS+= -I${SRCDIR} +VERSION_MAP= ${.CURDIR}/Version.map .include From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 11:03:15 2012 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 B1DDB1065670; Sat, 2 Jun 2012 11:03:15 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C2248FC19; Sat, 2 Jun 2012 11:03:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q52B3FkE084952; Sat, 2 Jun 2012 11:03:15 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q52B3F1d084941; Sat, 2 Jun 2012 11:03:15 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201206021103.q52B3F1d084941@svn.freebsd.org> From: Joel Dahl Date: Sat, 2 Jun 2012 11:03: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: r236443 - in head/share/man/man4: . man4.i386 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, 02 Jun 2012 11:03:15 -0000 Author: joel (doc committer) Date: Sat Jun 2 11:03:14 2012 New Revision: 236443 URL: http://svn.freebsd.org/changeset/base/236443 Log: mdoc: minor Bl improvements. Modified: head/share/man/man4/acpi_panasonic.4 head/share/man/man4/ahci.4 head/share/man/man4/ata.4 head/share/man/man4/firewire.4 head/share/man/man4/man4.i386/sbni.4 head/share/man/man4/mps.4 head/share/man/man4/mvs.4 head/share/man/man4/siis.4 head/share/man/man4/snd_hda.4 head/share/man/man4/usb.4 Modified: head/share/man/man4/acpi_panasonic.4 ============================================================================== --- head/share/man/man4/acpi_panasonic.4 Sat Jun 2 11:00:48 2012 (r236442) +++ head/share/man/man4/acpi_panasonic.4 Sat Jun 2 11:03:14 2012 (r236443) @@ -68,7 +68,7 @@ sound mute state via .Ss Hotkeys There are 9 hotkeys available on the supported hardware: .Pp -.Bl -tag -compact -offset indent +.Bl -tag -width 10n -compact -offset indent .It Sy Fn+F1 Make LCD backlight darker. .It Sy Fn+F2 @@ -105,7 +105,7 @@ When notified to .Xr devd 8 , the hotkey event provides the following information: .Pp -.Bl -tag -compact -offset indent +.Bl -tag -width 10n -compact -offset indent .It system .Qq Li ACPI .It subsystem @@ -119,7 +119,7 @@ Event code (see below). .El .Pp Event codes to be generated are assigned as follows: -.Bl -tag -offset indent +.Bl -tag -width 10n -offset indent .It 0x81-0x86, 0x89 .Sy Fn+F pressed. Modified: head/share/man/man4/ahci.4 ============================================================================== --- head/share/man/man4/ahci.4 Sat Jun 2 11:00:48 2012 (r236442) +++ head/share/man/man4/ahci.4 Sat Jun 2 11:03:14 2012 (r236443) @@ -52,7 +52,8 @@ The following tunables are settable from .Bl -ohang .It Va hint.ahci. Ns Ar X Ns Va .msi controls Message Signaled Interrupts (MSI) usage by the specified controller. -.Bl -tag -compact +.Pp +.Bl -tag -width 4n -offset indent -compact .It 0 MSI disabled; .It 1 @@ -72,7 +73,8 @@ controls SATA interface Power Management allowing some power to be saved at the cost of additional command latency. Possible values: -.Bl -tag -compact +.Pp +.Bl -tag -width 4n -offset indent -compact .It 0 interface Power Management is disabled (default); .It 1 @@ -86,6 +88,7 @@ driver initiates PARTIAL PM state transi .It 5 driver initiates SLUMBER PM state transition 125ms after port becomes idle. .El +.Pp Some controllers, such as ICH8, do not implement modes 2 and 3 with NCQ used. Because of artificial entering latency, performance degradation in modes 4 and 5 is much smaller then in modes 2 and 3. Modified: head/share/man/man4/ata.4 ============================================================================== --- head/share/man/man4/ata.4 Sat Jun 2 11:00:48 2012 (r236442) +++ head/share/man/man4/ata.4 Sat Jun 2 11:03:14 2012 (r236443) @@ -102,7 +102,8 @@ limits the initial ATA mode for every de controls SATA interface Power Management for the specified channel, allowing some power savings at the cost of additional command latency. Possible values: -.Bl -tag -compact +.Pp +.Bl -tag -width 4n -offset indent -compact .It 0 Interface Power Management is disabled. This is the default value. @@ -113,6 +114,7 @@ The host initiates a PARTIAL PM state tr .It 3 host initiates SLUMBER PM state transition every time port becomes idle. .El +.Pp Modes 2 and 3 are only supported for AHCI. .El .Sh DESCRIPTION Modified: head/share/man/man4/firewire.4 ============================================================================== --- head/share/man/man4/firewire.4 Sat Jun 2 11:00:48 2012 (r236442) +++ head/share/man/man4/firewire.4 Sat Jun 2 11:03:14 2012 (r236443) @@ -90,7 +90,7 @@ Please see .Pa http://wiki.freebsd.org/DebugWithDcons for details on how to setup debugging with firewire. .Sh FILES -.Bl -tag -compact +.Bl -tag -width "Pa /dev/fwmem0.0" -compact .It Pa /dev/fw0.0 .It Pa /dev/fwmem0.0 .El Modified: head/share/man/man4/man4.i386/sbni.4 ============================================================================== --- head/share/man/man4/man4.i386/sbni.4 Sat Jun 2 11:00:48 2012 (r236442) +++ head/share/man/man4/man4.i386/sbni.4 Sat Jun 2 11:03:14 2012 (r236443) @@ -97,7 +97,7 @@ bits 4-5 value, otherwise baud rate is s .Sh FILES The sources for the driver reside in: .Pp -.Bl -tag -compact +.Bl -tag -width ".Pa /sys/dev/sbni/if_sbni.c" -compact .It Pa /sys/dev/sbni/if_sbni.c .It Pa /sys/dev/sbni/if_sbnireg.h .It Pa /sys/dev/sbni/if_sbnivar.h Modified: head/share/man/man4/mps.4 ============================================================================== --- head/share/man/man4/mps.4 Sat Jun 2 11:00:48 2012 (r236442) +++ head/share/man/man4/mps.4 Sat Jun 2 11:03:14 2012 (r236443) @@ -166,7 +166,7 @@ variable, where X is the adapter number, or via .Xr sysctl 8 . The following bits have the described effects: -.Bl -tag -offset indent +.Bl -tag -width 6n -offset indent .It 0x01 Enable informational prints. .It 0x02 Modified: head/share/man/man4/mvs.4 ============================================================================== --- head/share/man/man4/mvs.4 Sat Jun 2 11:00:48 2012 (r236442) +++ head/share/man/man4/mvs.4 Sat Jun 2 11:03:14 2012 (r236443) @@ -67,7 +67,8 @@ controls SATA interface Power Management allowing some power to be saved at the cost of additional command latency. Possible values: -.Bl -tag -compact +.Pp +.Bl -tag -width 4n -offset indent -compact .It 0 interface Power Management is disabled (default); .It 1 Modified: head/share/man/man4/siis.4 ============================================================================== --- head/share/man/man4/siis.4 Sat Jun 2 11:00:48 2012 (r236442) +++ head/share/man/man4/siis.4 Sat Jun 2 11:03:14 2012 (r236443) @@ -57,12 +57,13 @@ controls SATA interface Power Management allowing some power to be saved at the cost of additional command latency. Possible values: -.Bl -tag -compact +.Bl -tag -width 2n -offset indent .It 0 interface Power Management is disabled (default); .It 1 device is allowed to initiate PM state change, host is passive. .El +.Pp Note that interface Power Management is not compatible with device presence detection. A manual bus reset is needed on device hot-plug. @@ -107,6 +108,7 @@ given precedence as the more functional The .Nm driver supports the following controller chips: +.Pp .Bl -bullet -compact .It SiI3124 (PCI-X 133MHz/64bit, 4 ports) Modified: head/share/man/man4/snd_hda.4 ============================================================================== --- head/share/man/man4/snd_hda.4 Sat Jun 2 11:00:48 2012 (r236442) +++ head/share/man/man4/snd_hda.4 Sat Jun 2 11:03:14 2012 (r236443) @@ -184,7 +184,7 @@ or as a set of space-separated pairs. .It Va hint.pcm.%d.rec.autosrc Controls automatic recording source feature: -.Bl -tag -compact +.Bl -tag -width 2n -compact .It 0 disabled, .It 1 Modified: head/share/man/man4/usb.4 ============================================================================== --- head/share/man/man4/usb.4 Sat Jun 2 11:00:48 2012 (r236442) +++ head/share/man/man4/usb.4 Sat Jun 2 11:03:14 2012 (r236443) @@ -58,7 +58,7 @@ devices in host and device side mode. The .Nm driver has three layers: -.Bl -tag +.Bl -tag -width 6n -offset indent .It USB Controller (Bus) .It USB Device .It USB Driver @@ -85,7 +85,7 @@ The .Tn USB is a system where external devices can be connected to a PC. The most common USB speeds are: -.Bl -tag +.Bl -tag -width 6n -offset indent .It Low Speed (1.5MBit/sec) .It Full Speed (12MBit/sec) .It High Speed (480MBit/sec) From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 11:07:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F3CCE106567B; Sat, 2 Jun 2012 11:07:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF7358FC12; Sat, 2 Jun 2012 11:07:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q52B7J9s085174; Sat, 2 Jun 2012 11:07:19 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q52B7JYY085172; Sat, 2 Jun 2012 11:07:19 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201206021107.q52B7JYY085172@svn.freebsd.org> From: Dimitry Andric Date: Sat, 2 Jun 2012 11:07: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: r236444 - head/lib/libc++ 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, 02 Jun 2012 11:07:20 -0000 Author: dim Date: Sat Jun 2 11:07:19 2012 New Revision: 236444 URL: http://svn.freebsd.org/changeset/base/236444 Log: Install libcxxrt's C++ ABI and unwind headers. This is done in libc++'s Makefile, so these headers go into the same destination directory as libc++'s own headers, currently /usr/include/c++/v1. MFC after: 3 days Modified: head/lib/libc++/Makefile Modified: head/lib/libc++/Makefile ============================================================================== --- head/lib/libc++/Makefile Sat Jun 2 11:03:14 2012 (r236443) +++ head/lib/libc++/Makefile Sat Jun 2 11:07:19 2012 (r236444) @@ -138,10 +138,17 @@ STD_HEADERS= __bit_reference\ utility\ valarray\ vector +RT_HEADERS= cxxabi.h\ + unwind.h\ + unwind-arm.h\ + unwind-itanium.h .for hdr in ${STD_HEADERS} STD+= ${HDRDIR}/${hdr} .endfor +.for hdr in ${RT_HEADERS} +STD+= ${LIBCXXRTDIR}/${hdr} +.endfor STDDIR= ${CXXINCLUDEDIR} EXT_HEADERS= __hash\ From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 13:05:12 2012 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 5238B106566B; Sat, 2 Jun 2012 13:05:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id DB44A8FC16; Sat, 2 Jun 2012 13:05:11 +0000 (UTC) Received: from c122-106-171-232.carlnfd1.nsw.optusnet.com.au (c122-106-171-232.carlnfd1.nsw.optusnet.com.au [122.106.171.232]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q52D526f030690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Jun 2012 23:05:04 +1000 Date: Sat, 2 Jun 2012 23:05:02 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ed Schouten In-Reply-To: <201206021050.q52AoQBQ084298@svn.freebsd.org> Message-ID: <20120602220632.Y1668@besplex.bde.org> References: <201206021050.q52AoQBQ084298@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: r236441 - head/lib/libc/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, 02 Jun 2012 13:05:12 -0000 On Sat, 2 Jun 2012, Ed Schouten wrote: > Log: > Remove invalid remark about pipes. > > The stat structures returned on pipes seems to contain all the > information required by POSIX. Especially the wording "and thus to a > pipe" makes little sense, because it seems to imply a certain > relationship between sockets and pipes that simply isn't there. It is because pipes are implemented in sockets in BSD. FreeBSD changed this in 1996, but fstat(1) still claims it, and I got fstat(1) instead of fstat(2) when I first tried to look this up: % FSTAT(1) FreeBSD General Commands Manual FSTAT(1) % ... % For example, the addresses mentioned above are the addresses which the % ``netstat -A'' command would print for tcp, udp, and unixdomain. Note % that since pipes are implemented using sockets, a pipe appears as a con- % nected unix domain stream socket. A unidirectional unix domain socket % indicates the direction of flow with an arrow (``<-'' or ``->''), and a % full duplex socket shows a double arrow (``<->''). > Modified: head/lib/libc/sys/stat.2 > ============================================================================== > --- head/lib/libc/sys/stat.2 Sat Jun 2 10:14:55 2012 (r236440) > +++ head/lib/libc/sys/stat.2 Sat Jun 2 10:50:25 2012 (r236441) > ... > @@ -431,7 +431,7 @@ system call appeared in > .Sh BUGS > Applying > .Fn fstat > -to a socket (and thus to a pipe) > +to a socket > returns a zeroed buffer, > except for the blocksize field, > and a unique device and inode number. This is still hard to parse. I think it says that fstat(2) returns a zeroed buffer except for a nonzero blocksize field in it, and it returns a unique device and inode number in addition to the buffer, but this makes no sense since fstat(1) only returns one thing. This thing isn't a generic buffer either -- other parts of the man page never use "buffer", and mostly refer to the returned thing formally as "the struct pointed to by sb". The normal informal description is more like "the stat buffer". stat.2 seems to be wrong about the unique device number too. uipc_usrreq.c sets st_blksize and st_ino as documented for the "blocksize" and "inode number" (except st_ino can be non-unique after wraparound at 2**32), but it always sets st_dev to the non-unique value NODEV. Other subsystems are more careful about inventing unique (st_dev, st_ino) ids. Pipes (ab)use devfs_alloc_cdp_inode() for st_dev and alloc_unr() for st_ino. Sockets still use the primitive ++unp_ino except when this wraps to 0, it is incremented again. I prefer the primitive version. 2**32 inode numbers should be enough for anyone :-), and there is no problem letting them grow very large and sparse, unlike for pids and device numbers, so hashing them to give uniqueness is just a waste of time and space. It probably takes a day or two to create 4G of sockets even if you try, and then the chance of a collision is about 1 in 2**32 unless you try. POSIX requires most fields in struct stat including st_dev to be "meaninful" for all POSIX file types including sockets, so the non-unique st_dev is just another thing for this BUGS section. This bug suite was only recently fixed for pipes. It seems to be very easy to fix for st_dev of sockets -- just use a single id reserved for all sockets. NODEV might already work, but only if no other subsystem abuses it and it can't happen in normal use. Or reserve a range of say 2**16 device ids for sockets, and use this to make (st_dev, st_ino) pairs unique for sockets. Nothing requires st_dev to be the same for all sockets, and 2**48 numbers should really be enough for anyone. Bruce From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 13:13:40 2012 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 4C33D1065670; Sat, 2 Jun 2012 13:13:39 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36E978FC1B; Sat, 2 Jun 2012 13:13:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q52DDdZV090953; Sat, 2 Jun 2012 13:13:39 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q52DDcXg090949; Sat, 2 Jun 2012 13:13:38 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201206021313.q52DDcXg090949@svn.freebsd.org> From: Michael Tuexen Date: Sat, 2 Jun 2012 13: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: r236450 - 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: Sat, 02 Jun 2012 13:13:40 -0000 Author: tuexen Date: Sat Jun 2 13:13:38 2012 New Revision: 236450 URL: http://svn.freebsd.org/changeset/base/236450 Log: Remove an unused parameter. MFC after: 3 days Modified: head/sys/netinet/sctp_input.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sat Jun 2 13:04:50 2012 (r236449) +++ head/sys/netinet/sctp_input.c Sat Jun 2 13:13:38 2012 (r236450) @@ -4516,7 +4516,7 @@ __attribute__((noinline)) } if (stcb == NULL) { /* no association, so it's out of the blue... */ - sctp_handle_ootb(m, iphlen, *offset, sh, inp, NULL, + sctp_handle_ootb(m, iphlen, *offset, sh, inp, vrf_id, port); *offset = length; if (locked_tcb) { @@ -4554,7 +4554,7 @@ __attribute__((noinline)) SCTP_TCB_UNLOCK(locked_tcb); } sctp_handle_ootb(m, iphlen, *offset, sh, inp, - NULL, vrf_id, port); + vrf_id, port); return (NULL); } } else { @@ -5586,7 +5586,7 @@ sctp_common_input_processing(struct mbuf * NOT respond to any packet.. its OOTB. */ SCTP_TCB_UNLOCK(stcb); - sctp_handle_ootb(m, iphlen, offset, sh, inp, NULL, + sctp_handle_ootb(m, iphlen, offset, sh, inp, vrf_id, port); goto out_now; } @@ -5630,7 +5630,7 @@ sctp_common_input_processing(struct mbuf } if (stcb == NULL) { /* out of the blue DATA chunk */ - sctp_handle_ootb(m, iphlen, offset, sh, inp, NULL, + sctp_handle_ootb(m, iphlen, offset, sh, inp, vrf_id, port); goto out_now; } @@ -5699,7 +5699,7 @@ sctp_common_input_processing(struct mbuf /* * We consider OOTB any data sent during asoc setup. */ - sctp_handle_ootb(m, iphlen, offset, sh, inp, NULL, + sctp_handle_ootb(m, iphlen, offset, sh, inp, vrf_id, port); SCTP_TCB_UNLOCK(stcb); goto out_now; Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sat Jun 2 13:04:50 2012 (r236449) +++ head/sys/netinet/sctputil.c Sat Jun 2 13:13:38 2012 (r236450) @@ -3994,7 +3994,7 @@ sctp_abort_an_association(struct sctp_in void sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh, - struct sctp_inpcb *inp, struct mbuf *op_err, uint32_t vrf_id, uint16_t port) + struct sctp_inpcb *inp, uint32_t vrf_id, uint16_t port) { struct sctp_chunkhdr *ch, chunk_buf; unsigned int chk_length; @@ -4049,7 +4049,7 @@ sctp_handle_ootb(struct mbuf *m, int iph if ((SCTP_BASE_SYSCTL(sctp_blackhole) == 0) || ((SCTP_BASE_SYSCTL(sctp_blackhole) == 1) && (contains_init_chunk == 0))) { - sctp_send_abort(m, iphlen, sh, 0, op_err, vrf_id, port); + sctp_send_abort(m, iphlen, sh, 0, NULL, vrf_id, port); } } Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Sat Jun 2 13:04:50 2012 (r236449) +++ head/sys/netinet/sctputil.h Sat Jun 2 13:13:38 2012 (r236450) @@ -200,7 +200,7 @@ sctp_abort_an_association(struct sctp_in void sctp_handle_ootb(struct mbuf *, int, int, struct sctphdr *, - struct sctp_inpcb *, struct mbuf *, uint32_t, uint16_t); + struct sctp_inpcb *, uint32_t, uint16_t); int sctp_connectx_helper_add(struct sctp_tcb *stcb, struct sockaddr *addr, From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 18:10:17 2012 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 4AD22106566C; Sat, 2 Jun 2012 18:10:17 +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 34B718FC0A; Sat, 2 Jun 2012 18:10:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q52IAHTv004241; Sat, 2 Jun 2012 18:10:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q52IAGZA004238; Sat, 2 Jun 2012 18:10:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201206021810.q52IAGZA004238@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 2 Jun 2012 18:10: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: r236456 - 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: Sat, 02 Jun 2012 18:10:17 -0000 Author: kib Date: Sat Jun 2 18:10:16 2012 New Revision: 236456 URL: http://svn.freebsd.org/changeset/base/236456 Log: Use plain store for atomic_store_rel on x86, instead of implicitly locked xchg instruction. IA32 memory model guarantees that store has release semantic, since stores cannot pass loads or stores. Reviewed by: bde, jhb Tested by: pho MFC after: 2 weeks Modified: head/sys/amd64/include/atomic.h head/sys/i386/include/atomic.h Modified: head/sys/amd64/include/atomic.h ============================================================================== --- head/sys/amd64/include/atomic.h Sat Jun 2 16:17:25 2012 (r236455) +++ head/sys/amd64/include/atomic.h Sat Jun 2 18:10:16 2012 (r236456) @@ -81,8 +81,9 @@ int atomic_cmpset_long(volatile u_long * u_int atomic_fetchadd_int(volatile u_int *p, u_int v); u_long atomic_fetchadd_long(volatile u_long *p, u_long v); -#define ATOMIC_STORE_LOAD(TYPE, LOP, SOP) \ -u_##TYPE atomic_load_acq_##TYPE(volatile u_##TYPE *p); \ +#define ATOMIC_LOAD(TYPE, LOP) \ +u_##TYPE atomic_load_acq_##TYPE(volatile u_##TYPE *p) +#define ATOMIC_STORE(TYPE) \ void atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v) #else /* !KLD_MODULE && __GNUCLIKE_ASM */ @@ -210,37 +211,43 @@ atomic_fetchadd_long(volatile u_long *p, return (v); } -#if defined(_KERNEL) && !defined(SMP) - /* - * We assume that a = b will do atomic loads and stores. However, on a - * PentiumPro or higher, reads may pass writes, so for that case we have - * to use a serializing instruction (i.e. with LOCK) to do the load in - * SMP kernels. For UP kernels, however, the cache of the single processor - * is always consistent, so we only need to take care of compiler. + * We assume that a = b will do atomic loads and stores. Due to the + * IA32 memory model, a simple store guarantees release semantics. + * + * However, loads may pass stores, so for atomic_load_acq we have to + * ensure a Store/Load barrier to do the load in SMP kernels. We use + * "lock cmpxchg" as recommended by the AMD Software Optimization + * Guide, and not mfence. For UP kernels, however, the cache of the + * single processor is always consistent, so we only need to take care + * of the compiler. */ -#define ATOMIC_STORE_LOAD(TYPE, LOP, SOP) \ +#define ATOMIC_STORE(TYPE) \ +static __inline void \ +atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\ +{ \ + __asm __volatile("" : : : "memory"); \ + *p = v; \ +} \ +struct __hack + +#if defined(_KERNEL) && !defined(SMP) + +#define ATOMIC_LOAD(TYPE, LOP) \ static __inline u_##TYPE \ atomic_load_acq_##TYPE(volatile u_##TYPE *p) \ { \ u_##TYPE tmp; \ \ tmp = *p; \ - __asm __volatile ("" : : : "memory"); \ + __asm __volatile("" : : : "memory"); \ return (tmp); \ } \ - \ -static __inline void \ -atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\ -{ \ - __asm __volatile ("" : : : "memory"); \ - *p = v; \ -} \ struct __hack #else /* !(_KERNEL && !SMP) */ -#define ATOMIC_STORE_LOAD(TYPE, LOP, SOP) \ +#define ATOMIC_LOAD(TYPE, LOP) \ static __inline u_##TYPE \ atomic_load_acq_##TYPE(volatile u_##TYPE *p) \ { \ @@ -254,19 +261,6 @@ atomic_load_acq_##TYPE(volatile u_##TYPE \ return (res); \ } \ - \ -/* \ - * The XCHG instruction asserts LOCK automagically. \ - */ \ -static __inline void \ -atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\ -{ \ - __asm __volatile(SOP \ - : "=m" (*p), /* 0 */ \ - "+r" (v) /* 1 */ \ - : "m" (*p) /* 2 */ \ - : "memory"); \ -} \ struct __hack #endif /* _KERNEL && !SMP */ @@ -293,13 +287,19 @@ ATOMIC_ASM(clear, long, "andq %1,%0" ATOMIC_ASM(add, long, "addq %1,%0", "ir", v); ATOMIC_ASM(subtract, long, "subq %1,%0", "ir", v); -ATOMIC_STORE_LOAD(char, "cmpxchgb %b0,%1", "xchgb %b1,%0"); -ATOMIC_STORE_LOAD(short,"cmpxchgw %w0,%1", "xchgw %w1,%0"); -ATOMIC_STORE_LOAD(int, "cmpxchgl %0,%1", "xchgl %1,%0"); -ATOMIC_STORE_LOAD(long, "cmpxchgq %0,%1", "xchgq %1,%0"); +ATOMIC_LOAD(char, "cmpxchgb %b0,%1"); +ATOMIC_LOAD(short, "cmpxchgw %w0,%1"); +ATOMIC_LOAD(int, "cmpxchgl %0,%1"); +ATOMIC_LOAD(long, "cmpxchgq %0,%1"); + +ATOMIC_STORE(char); +ATOMIC_STORE(short); +ATOMIC_STORE(int); +ATOMIC_STORE(long); #undef ATOMIC_ASM -#undef ATOMIC_STORE_LOAD +#undef ATOMIC_LOAD +#undef ATOMIC_STORE #ifndef WANT_FUNCTIONS Modified: head/sys/i386/include/atomic.h ============================================================================== --- head/sys/i386/include/atomic.h Sat Jun 2 16:17:25 2012 (r236455) +++ head/sys/i386/include/atomic.h Sat Jun 2 18:10:16 2012 (r236456) @@ -32,9 +32,9 @@ #error this file needs sys/cdefs.h as a prerequisite #endif -#define mb() __asm __volatile("lock; addl $0,(%%esp)" : : : "memory") -#define wmb() __asm __volatile("lock; addl $0,(%%esp)" : : : "memory") -#define rmb() __asm __volatile("lock; addl $0,(%%esp)" : : : "memory") +#define mb() __asm __volatile("lock; addl $0,(%%esp)" : : : "memory", "cc") +#define wmb() __asm __volatile("lock; addl $0,(%%esp)" : : : "memory", "cc") +#define rmb() __asm __volatile("lock; addl $0,(%%esp)" : : : "memory", "cc") /* * Various simple operations on memory, each of which is atomic in the @@ -79,8 +79,9 @@ void atomic_##NAME##_barr_##TYPE(volatil int atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src); u_int atomic_fetchadd_int(volatile u_int *p, u_int v); -#define ATOMIC_STORE_LOAD(TYPE, LOP, SOP) \ -u_##TYPE atomic_load_acq_##TYPE(volatile u_##TYPE *p); \ +#define ATOMIC_LOAD(TYPE, LOP) \ +u_##TYPE atomic_load_acq_##TYPE(volatile u_##TYPE *p) +#define ATOMIC_STORE(TYPE) \ void atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v) #else /* !KLD_MODULE && __GNUCLIKE_ASM */ @@ -280,16 +281,29 @@ atomic_fetchadd_int(volatile u_int *p, u return (v); } -#if defined(_KERNEL) && !defined(SMP) - /* - * We assume that a = b will do atomic loads and stores. However, on a - * PentiumPro or higher, reads may pass writes, so for that case we have - * to use a serializing instruction (i.e. with LOCK) to do the load in - * SMP kernels. For UP kernels, however, the cache of the single processor - * is always consistent, so we only need to take care of compiler. + * We assume that a = b will do atomic loads and stores. Due to the + * IA32 memory model, a simple store guarantees release semantics. + * + * However, loads may pass stores, so for atomic_load_acq we have to + * ensure a Store/Load barrier to do the load in SMP kernels. We use + * "lock cmpxchg" as recommended by the AMD Software Optimization + * Guide, and not mfence. For UP kernels, however, the cache of the + * single processor is always consistent, so we only need to take care + * of the compiler. */ -#define ATOMIC_STORE_LOAD(TYPE, LOP, SOP) \ +#define ATOMIC_STORE(TYPE) \ +static __inline void \ +atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\ +{ \ + __asm __volatile("" : : : "memory"); \ + *p = v; \ +} \ +struct __hack + +#if defined(_KERNEL) && !defined(SMP) + +#define ATOMIC_LOAD(TYPE, LOP) \ static __inline u_##TYPE \ atomic_load_acq_##TYPE(volatile u_##TYPE *p) \ { \ @@ -299,18 +313,11 @@ atomic_load_acq_##TYPE(volatile u_##TYPE __asm __volatile("" : : : "memory"); \ return (tmp); \ } \ - \ -static __inline void \ -atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\ -{ \ - __asm __volatile("" : : : "memory"); \ - *p = v; \ -} \ struct __hack #else /* !(_KERNEL && !SMP) */ -#define ATOMIC_STORE_LOAD(TYPE, LOP, SOP) \ +#define ATOMIC_LOAD(TYPE, LOP) \ static __inline u_##TYPE \ atomic_load_acq_##TYPE(volatile u_##TYPE *p) \ { \ @@ -324,19 +331,6 @@ atomic_load_acq_##TYPE(volatile u_##TYPE \ return (res); \ } \ - \ -/* \ - * The XCHG instruction asserts LOCK automagically. \ - */ \ -static __inline void \ -atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\ -{ \ - __asm __volatile(SOP \ - : "=m" (*p), /* 0 */ \ - "+r" (v) /* 1 */ \ - : "m" (*p) /* 2 */ \ - : "memory"); \ -} \ struct __hack #endif /* _KERNEL && !SMP */ @@ -363,13 +357,19 @@ ATOMIC_ASM(clear, long, "andl %1,%0" ATOMIC_ASM(add, long, "addl %1,%0", "ir", v); ATOMIC_ASM(subtract, long, "subl %1,%0", "ir", v); -ATOMIC_STORE_LOAD(char, "cmpxchgb %b0,%1", "xchgb %b1,%0"); -ATOMIC_STORE_LOAD(short,"cmpxchgw %w0,%1", "xchgw %w1,%0"); -ATOMIC_STORE_LOAD(int, "cmpxchgl %0,%1", "xchgl %1,%0"); -ATOMIC_STORE_LOAD(long, "cmpxchgl %0,%1", "xchgl %1,%0"); +ATOMIC_LOAD(char, "cmpxchgb %b0,%1"); +ATOMIC_LOAD(short, "cmpxchgw %w0,%1"); +ATOMIC_LOAD(int, "cmpxchgl %0,%1"); +ATOMIC_LOAD(long, "cmpxchgl %0,%1"); + +ATOMIC_STORE(char); +ATOMIC_STORE(short); +ATOMIC_STORE(int); +ATOMIC_STORE(long); #undef ATOMIC_ASM -#undef ATOMIC_STORE_LOAD +#undef ATOMIC_LOAD +#undef ATOMIC_STORE #ifndef WANT_FUNCTIONS From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 18:43:16 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1648F1065670; Sat, 2 Jun 2012 18:43:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B74058FC12; Sat, 2 Jun 2012 18:43:14 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id VAA25250; Sat, 02 Jun 2012 21:43:13 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SatI8-000IoY-QY; Sat, 02 Jun 2012 21:43:12 +0300 Message-ID: <4FCA5EBE.50109@FreeBSD.org> Date: Sat, 02 Jun 2012 21:43:10 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: Grzegorz Bernacki References: <201205171011.q4HABIJY090234@svn.freebsd.org> In-Reply-To: <201205171011.q4HABIJY090234@svn.freebsd.org> X-Enigmail-Version: 1.5pre 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: r235537 - in head: etc/mtree include lib lib/libnandfs lib/libstand sbin sbin/nandfs sbin/newfs_nandfs share/man/man4 share/man/man5 share/mk sys/boot/arm/uboot sys/boot/i386/loader 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, 02 Jun 2012 18:43:16 -0000 on 17/05/2012 13:11 Grzegorz Bernacki said the following: > Author: gber > Date: Thu May 17 10:11:18 2012 > New Revision: 235537 > URL: http://svn.freebsd.org/changeset/base/235537 > > Log: > Import work done under project/nand (@235533) into head. > > The NAND Flash environment consists of several distinct components: > - NAND framework (drivers harness for NAND controllers and NAND chips) > - NAND simulator (NANDsim) > - NAND file system (NAND FS) > - Companion tools and utilities > - Documentation (manual pages) > > This work is still experimental. Please use with caution. > > Obtained from: Semihalf > Supported by: FreeBSD Foundation, Juniper Networks [snip] > head/sys/modules/Makefile Looks like this commit has unintentionally [?] removed wbwd-related lines from sys/modules/Makefile. Please fix. > head/usr.sbin/Makefile [snip] > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** The diff that I see: @@ -217,6 +217,8 @@ SUBDIR= ${_3dfx} \ ${_mwlfw} \ mxge \ my \ + ${_nandfs} \ + ${_nandsim} \ ${_ncp} \ ${_ncv} \ ${_ndis} \ @@ -335,7 +337,6 @@ SUBDIR= ${_3dfx} \ vx \ ${_vxge} \ wb \ - ${_wbwd} \ ${_wi} \ wlan \ wlan_acl \ @@ -398,6 +399,11 @@ _ipdivert= ipdivert _ipfw= ipfw .endif +.if ${MK_NAND} != "no" || defined(ALL_MODULES) +_nandfs= nandfs +_nandsim= nandsim +.endif + .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES) _netgraph= netgraph .endif @@ -513,7 +519,6 @@ _stg= stg _streams= streams _svr4= svr4 _vxge= vxge -_wbwd= wbwd _wi= wi _xe= xe .if ${MK_ZFS} != "no" || defined(ALL_MODULES) @@ -708,7 +713,6 @@ _viawd= viawd _virtio= virtio _vxge= vxge _x86bios= x86bios -_wbwd= wbwd _wi= wi _wpi= wpi .if ${MK_SOURCELESS_UCODE} != "no" -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 18:44:41 2012 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 0BF0C1065672; Sat, 2 Jun 2012 18:44:41 +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 D20FF8FC16; Sat, 2 Jun 2012 18:44:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q52IieLB006249; Sat, 2 Jun 2012 18:44:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q52IieLv006246; Sat, 2 Jun 2012 18:44:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201206021844.q52IieLv006246@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 2 Jun 2012 18:44: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: r236465 - 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: Sat, 02 Jun 2012 18:44:41 -0000 Author: kib Date: Sat Jun 2 18:44:40 2012 New Revision: 236465 URL: http://svn.freebsd.org/changeset/base/236465 Log: Update the print mask for decoding b_flags. Add print masks for b_vflags and b_xflags_t and print them as well. MFC after: 1 week Modified: head/sys/kern/vfs_bio.c head/sys/sys/buf.h Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sat Jun 2 18:36:29 2012 (r236464) +++ head/sys/kern/vfs_bio.c Sat Jun 2 18:44:40 2012 (r236465) @@ -3995,7 +3995,9 @@ DB_SHOW_COMMAND(buffer, db_show_buffer) } db_printf("buf at %p\n", bp); - db_printf("b_flags = 0x%b\n", (u_int)bp->b_flags, PRINT_BUF_FLAGS); + db_printf("b_flags = 0x%b b_xflags=0x%b b_vflags=0x%b\n", + (u_int)bp->b_flags, PRINT_BUF_FLAGS, (u_int)bp->b_xflags, + PRINT_BUF_XFLAGS, (u_int)bp->b_vflags, PRINT_BUF_VFLAGS); db_printf( "b_error = %d, b_bufsize = %ld, b_bcount = %ld, b_resid = %ld\n" "b_bufobj = (%p), b_data = %p, b_blkno = %jd, b_lblkno = %jd, " Modified: head/sys/sys/buf.h ============================================================================== --- head/sys/sys/buf.h Sat Jun 2 18:36:29 2012 (r236464) +++ head/sys/sys/buf.h Sat Jun 2 18:44:40 2012 (r236465) @@ -224,8 +224,8 @@ struct buf { #define B_CLUSTER 0x40000000 /* pagein op, so swap() can count it */ #define B_REMFREE 0x80000000 /* Delayed bremfree */ -#define PRINT_BUF_FLAGS "\20\40remfree\37cluster\36vmio\35ram\34b27" \ - "\33paging\32b25\31b24\30b23\27relbuf\26dirty\25b20" \ +#define PRINT_BUF_FLAGS "\20\40remfree\37cluster\36vmio\35ram\34managed" \ + "\33paging\32needsgiant\31nocopy\30b23\27relbuf\26dirty\25b20" \ "\24b19\23b18\22clusterok\21malloc\20nocache\17b14\16inval" \ "\15b12\14b11\13eintr\12done\11persist\10delwri\7validsuspwrt" \ "\6cache\5deferred\4direct\3async\2needcommit\1age" @@ -239,6 +239,8 @@ struct buf { #define BX_BKGRDMARKER 0x00000020 /* Mark buffer for splay tree */ #define BX_ALTDATA 0x00000040 /* Holds extended data */ +#define PRINT_BUF_XFLAGS "\20\7altdata\6bkgrdmarker\5bkgrdwrite\2clean\1dirty" + #define NOOFFSET (-1LL) /* No buffer offset calculated yet */ /* @@ -249,6 +251,8 @@ struct buf { #define BV_BKGRDWAIT 0x00000004 /* Background write waiting */ #define BV_INFREECNT 0x80000000 /* buf is counted in numfreebufs */ +#define PRINT_BUF_VFLAGS "\20\40infreecnt\3bkrgwait\2bkgrdinprog\1scanned" + #ifdef _KERNEL /* * Buffer locking From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 19:30:50 2012 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 22EAF106564A; Sat, 2 Jun 2012 19:30:50 +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 0EE228FC08; Sat, 2 Jun 2012 19:30:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q52JUnV2009542; Sat, 2 Jun 2012 19:30:49 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q52JUnOY009540; Sat, 2 Jun 2012 19:30:49 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201206021930.q52JUnOY009540@svn.freebsd.org> From: Marius Strobl Date: Sat, 2 Jun 2012 19:30: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: r236486 - 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, 02 Jun 2012 19:30:50 -0000 Author: marius Date: Sat Jun 2 19:30:49 2012 New Revision: 236486 URL: http://svn.freebsd.org/changeset/base/236486 Log: Add nitems(), a macro for determining the number of elements in a statically-allocated array. Obtained from: OpenBSD (in principle) MFC after: 3 days Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat Jun 2 19:21:34 2012 (r236485) +++ head/sys/sys/param.h Sat Jun 2 19:30:49 2012 (r236486) @@ -273,6 +273,7 @@ #ifndef howmany #define howmany(x, y) (((x)+((y)-1))/(y)) #endif +#define nitems(x) (sizeof((x)) / sizeof((x)[0])) #define rounddown(x, y) (((x)/(y))*(y)) #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */ #define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 19:39:13 2012 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 79504106566C; Sat, 2 Jun 2012 19:39:13 +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 641948FC0A; Sat, 2 Jun 2012 19:39:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q52JdDsY009947; Sat, 2 Jun 2012 19:39:13 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q52JdDMu009944; Sat, 2 Jun 2012 19:39:13 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201206021939.q52JdDMu009944@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 2 Jun 2012 19:39: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: r236487 - 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: Sat, 02 Jun 2012 19:39:13 -0000 Author: kib Date: Sat Jun 2 19:39:12 2012 New Revision: 236487 URL: http://svn.freebsd.org/changeset/base/236487 Log: Fix typo [1]. Use commas to separate flag printouts, in style with other parts of function. Submitted by: bf [1] MFC after: 1 week Modified: head/sys/kern/vfs_bio.c head/sys/sys/buf.h Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sat Jun 2 19:30:49 2012 (r236486) +++ head/sys/kern/vfs_bio.c Sat Jun 2 19:39:12 2012 (r236487) @@ -3995,7 +3995,7 @@ DB_SHOW_COMMAND(buffer, db_show_buffer) } db_printf("buf at %p\n", bp); - db_printf("b_flags = 0x%b b_xflags=0x%b b_vflags=0x%b\n", + db_printf("b_flags = 0x%b, b_xflags=0x%b, b_vflags=0x%b\n", (u_int)bp->b_flags, PRINT_BUF_FLAGS, (u_int)bp->b_xflags, PRINT_BUF_XFLAGS, (u_int)bp->b_vflags, PRINT_BUF_VFLAGS); db_printf( Modified: head/sys/sys/buf.h ============================================================================== --- head/sys/sys/buf.h Sat Jun 2 19:30:49 2012 (r236486) +++ head/sys/sys/buf.h Sat Jun 2 19:39:12 2012 (r236487) @@ -251,7 +251,7 @@ struct buf { #define BV_BKGRDWAIT 0x00000004 /* Background write waiting */ #define BV_INFREECNT 0x80000000 /* buf is counted in numfreebufs */ -#define PRINT_BUF_VFLAGS "\20\40infreecnt\3bkrgwait\2bkgrdinprog\1scanned" +#define PRINT_BUF_VFLAGS "\20\40infreecnt\3bkgrdwait\2bkgrdinprog\1scanned" #ifdef _KERNEL /* From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 19:41:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 14838106564A; Sat, 2 Jun 2012 19:41:29 +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 F37E18FC0C; Sat, 2 Jun 2012 19:41:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q52JfSMm010091; Sat, 2 Jun 2012 19:41:28 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q52JfSR4010088; Sat, 2 Jun 2012 19:41:28 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201206021941.q52JfSR4010088@svn.freebsd.org> From: Marius Strobl Date: Sat, 2 Jun 2012 19:41: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: r236488 - in head/sys/dev: bge sym 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, 02 Jun 2012 19:41:29 -0000 Author: marius Date: Sat Jun 2 19:41:28 2012 New Revision: 236488 URL: http://svn.freebsd.org/changeset/base/236488 Log: Take advantage of nitems(). MFC after: 3 days Modified: head/sys/dev/bge/if_bge.c head/sys/dev/sym/sym_hipd.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sat Jun 2 19:39:12 2012 (r236487) +++ head/sys/dev/bge/if_bge.c Sat Jun 2 19:41:28 2012 (r236488) @@ -2766,9 +2766,8 @@ bge_mbox_reorder(struct bge_softc *sc) }; devclass_t pci, pcib; device_t bus, dev; - int count, i; + int i; - count = sizeof(mbox_reorder_lists) / sizeof(mbox_reorder_lists[0]); pci = devclass_find("pci"); pcib = devclass_find("pcib"); dev = sc->bge_dev; @@ -2778,7 +2777,7 @@ bge_mbox_reorder(struct bge_softc *sc) bus = device_get_parent(dev); if (device_get_devclass(dev) != pcib) break; - for (i = 0; i < count; i++) { + for (i = 0; i < nitems(mbox_reorder_lists); i++) { if (pci_get_vendor(dev) == mbox_reorder_lists[i].vendor && pci_get_device(dev) == Modified: head/sys/dev/sym/sym_hipd.c ============================================================================== --- head/sys/dev/sym/sym_hipd.c Sat Jun 2 19:39:12 2012 (r236487) +++ head/sys/dev/sym/sym_hipd.c Sat Jun 2 19:41:28 2012 (r236488) @@ -8411,9 +8411,6 @@ static const struct sym_pci_chip sym_pci FE_RAM|FE_IO256|FE_LEDC} }; -#define sym_pci_num_devs \ - (sizeof(sym_pci_dev_table) / sizeof(sym_pci_dev_table[0])) - /* * Look up the chip table. * @@ -8434,7 +8431,7 @@ sym_find_pci_chip(device_t dev) device_id = pci_get_device(dev); revision = pci_get_revid(dev); - for (i = 0; i < sym_pci_num_devs; i++) { + for (i = 0; i < nitems(sym_pci_dev_table); i++) { chip = &sym_pci_dev_table[i]; if (device_id != chip->device_id) continue; From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 20:00:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 179EA1065670; Sat, 2 Jun 2012 20:00:53 +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 02A9C8FC0A; Sat, 2 Jun 2012 20:00:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q52K0qFl010981; Sat, 2 Jun 2012 20:00:52 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q52K0qRY010979; Sat, 2 Jun 2012 20:00:52 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201206022000.q52K0qRY010979@svn.freebsd.org> From: Marius Strobl Date: Sat, 2 Jun 2012 20:00: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: r236489 - 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: Sat, 02 Jun 2012 20:00:53 -0000 Author: marius Date: Sat Jun 2 20:00:52 2012 New Revision: 236489 URL: http://svn.freebsd.org/changeset/base/236489 Log: Remove nitems() now that it lives in since r236486. Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sat Jun 2 19:41:28 2012 (r236488) +++ head/sys/dev/iwn/if_iwn.c Sat Jun 2 20:00:52 2012 (r236489) @@ -2005,8 +2005,6 @@ iwn_setregdomain(struct ieee80211com *ic return 0; } -#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0])) - static void iwn_read_eeprom_enhinfo(struct iwn_softc *sc) { From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 20:47:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 90907106564A; Sat, 2 Jun 2012 20:47:01 +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 7A3B18FC08; Sat, 2 Jun 2012 20:47:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q52Kl1aR013071; Sat, 2 Jun 2012 20:47:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q52Kl1HF013068; Sat, 2 Jun 2012 20:47:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201206022047.q52Kl1HF013068@svn.freebsd.org> From: Marius Strobl Date: Sat, 2 Jun 2012 20:47: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: r236491 - head/sys/dev/mmc 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, 02 Jun 2012 20:47:01 -0000 Author: marius Date: Sat Jun 2 20:47:00 2012 New Revision: 236491 URL: http://svn.freebsd.org/changeset/base/236491 Log: Add missing prototypes. While at it, sort them alphabetically. MFC after: 3 days Modified: head/sys/dev/mmc/mmc.c head/sys/dev/mmc/mmcsd.c Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Sat Jun 2 20:18:34 2012 (r236490) +++ head/sys/dev/mmc/mmc.c Sat Jun 2 20:47:00 2012 (r236491) @@ -112,11 +112,21 @@ static int mmc_debug; SYSCTL_INT(_hw_mmc, OID_AUTO, debug, CTLFLAG_RW, &mmc_debug, 0, "Debug level"); /* bus entry points */ -static int mmc_probe(device_t dev); +static int mmc_acquire_bus(device_t busdev, device_t dev); static int mmc_attach(device_t dev); +static int mmc_child_location_str(device_t dev, device_t child, char *buf, + size_t buflen); static int mmc_detach(device_t dev); -static int mmc_suspend(device_t dev); +static int mmc_probe(device_t dev); +static int mmc_read_ivar(device_t bus, device_t child, int which, + uintptr_t *result); +static int mmc_release_bus(device_t busdev, device_t dev); static int mmc_resume(device_t dev); +static int mmc_suspend(device_t dev); +static int mmc_wait_for_request(device_t brdev, device_t reqdev, + struct mmc_request *req); +static int mmc_write_ivar(device_t bus, device_t child, int which, + uintptr_t value); #define MMC_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define MMC_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) @@ -127,25 +137,69 @@ static int mmc_resume(device_t dev); #define MMC_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); #define MMC_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); +static int mmc_all_send_cid(struct mmc_softc *sc, uint32_t *rawcid); +static void mmc_app_decode_scr(uint32_t *raw_scr, struct mmc_scr *scr); +static void mmc_app_decode_sd_status(uint32_t *raw_sd_status, + struct mmc_sd_status *sd_status); +static int mmc_app_sd_status(struct mmc_softc *sc, uint16_t rca, + uint32_t *rawsdstatus); +static int mmc_app_send_scr(struct mmc_softc *sc, uint16_t rca, + uint32_t *rawscr); static int mmc_calculate_clock(struct mmc_softc *sc); -static void mmc_delayed_attach(void *); +static void mmc_decode_cid_mmc(uint32_t *raw_cid, struct mmc_cid *cid); +static void mmc_decode_cid_sd(uint32_t *raw_cid, struct mmc_cid *cid); +static void mmc_decode_csd_mmc(uint32_t *raw_csd, struct mmc_csd *csd); +static void mmc_decode_csd_sd(uint32_t *raw_csd, struct mmc_csd *csd); +static void mmc_delayed_attach(void *xsc); +static int mmc_delete_cards(struct mmc_softc *sc); +static void mmc_discover_cards(struct mmc_softc *sc); +static void mmc_format_card_id_string(struct mmc_ivars *ivar); +static void mmc_go_discovery(struct mmc_softc *sc); +static uint32_t mmc_get_bits(uint32_t *bits, int bit_len, int start, + int size); +static int mmc_highest_voltage(uint32_t ocr); +static void mmc_idle_cards(struct mmc_softc *sc); +static void mmc_ms_delay(int ms); +static void mmc_log_card(device_t dev, struct mmc_ivars *ivar, int newcard); static void mmc_power_down(struct mmc_softc *sc); +static void mmc_power_up(struct mmc_softc *sc); +static void mmc_rescan_cards(struct mmc_softc *sc); +static void mmc_scan(struct mmc_softc *sc); +static int mmc_sd_switch(struct mmc_softc *sc, uint8_t mode, uint8_t grp, + uint8_t value, uint8_t *res); +static int mmc_select_card(struct mmc_softc *sc, uint16_t rca); +static uint32_t mmc_select_vdd(struct mmc_softc *sc, uint32_t ocr); +static int mmc_send_app_op_cond(struct mmc_softc *sc, uint32_t ocr, + uint32_t *rocr); +static int mmc_send_csd(struct mmc_softc *sc, uint16_t rca, uint32_t *rawcsd); +static int mmc_send_ext_csd(struct mmc_softc *sc, uint8_t *rawextcsd); +static int mmc_send_if_cond(struct mmc_softc *sc, uint8_t vhs); +static int mmc_send_op_cond(struct mmc_softc *sc, uint32_t ocr, + uint32_t *rocr); +static int mmc_send_relative_addr(struct mmc_softc *sc, uint32_t *resp); +static int mmc_send_status(struct mmc_softc *sc, uint16_t rca, + uint32_t *status); +static int mmc_set_blocklen(struct mmc_softc *sc, uint32_t len); +static int mmc_set_card_bus_width(struct mmc_softc *sc, uint16_t rca, + int width); +static int mmc_set_relative_addr(struct mmc_softc *sc, uint16_t resp); +static int mmc_set_timing(struct mmc_softc *sc, int timing); +static int mmc_switch(struct mmc_softc *sc, uint8_t set, uint8_t index, + uint8_t value); +static int mmc_test_bus_width(struct mmc_softc *sc); +static int mmc_wait_for_app_cmd(struct mmc_softc *sc, uint32_t rca, + struct mmc_command *cmd, int retries); static int mmc_wait_for_cmd(struct mmc_softc *sc, struct mmc_command *cmd, int retries); static int mmc_wait_for_command(struct mmc_softc *sc, uint32_t opcode, uint32_t arg, uint32_t flags, uint32_t *resp, int retries); -static int mmc_select_card(struct mmc_softc *sc, uint16_t rca); -static int mmc_set_card_bus_width(struct mmc_softc *sc, uint16_t rca, int width); -static int mmc_app_send_scr(struct mmc_softc *sc, uint16_t rca, uint32_t *rawscr); -static void mmc_app_decode_scr(uint32_t *raw_scr, struct mmc_scr *scr); -static int mmc_send_ext_csd(struct mmc_softc *sc, uint8_t *rawextcsd); -static void mmc_scan(struct mmc_softc *sc); -static int mmc_delete_cards(struct mmc_softc *sc); -static void mmc_format_card_id_string(struct mmc_ivars *ivar); +static int mmc_wait_for_req(struct mmc_softc *sc, struct mmc_request *req); +static void mmc_wakeup(struct mmc_request *req); static void mmc_ms_delay(int ms) { + DELAY(1000 * ms); /* XXX BAD */ } Modified: head/sys/dev/mmc/mmcsd.c ============================================================================== --- head/sys/dev/mmc/mmcsd.c Sat Jun 2 20:18:34 2012 (r236490) +++ head/sys/dev/mmc/mmcsd.c Sat Jun 2 20:47:00 2012 (r236491) @@ -89,19 +89,21 @@ struct mmcsd_softc { }; /* bus entry points */ -static int mmcsd_probe(device_t dev); static int mmcsd_attach(device_t dev); static int mmcsd_detach(device_t dev); +static int mmcsd_probe(device_t dev); /* disk routines */ -static int mmcsd_open(struct disk *dp); static int mmcsd_close(struct disk *dp); -static void mmcsd_strategy(struct bio *bp); static int mmcsd_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t length); +static int mmcsd_open(struct disk *dp); +static void mmcsd_strategy(struct bio *bp); static void mmcsd_task(void *arg); static int mmcsd_bus_bit_width(device_t dev); +static daddr_t mmcsd_delete(struct mmcsd_softc *sc, struct bio *bp); +static daddr_t mmcsd_rw(struct mmcsd_softc *sc, struct bio *bp); #define MMCSD_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define MMCSD_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) @@ -256,12 +258,14 @@ mmcsd_resume(device_t dev) static int mmcsd_open(struct disk *dp) { + return (0); } static int mmcsd_close(struct disk *dp) { + return (0); } @@ -521,6 +525,7 @@ out: static int mmcsd_bus_bit_width(device_t dev) { + if (mmc_get_bus_width(dev) == bus_width_1) return (1); if (mmc_get_bus_width(dev) == bus_width_4) From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 20:53:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 462611065691; Sat, 2 Jun 2012 20:53:24 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 199808FC0C; Sat, 2 Jun 2012 20:53:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q52KrN3a013367; Sat, 2 Jun 2012 20:53:23 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q52KrNX0013365; Sat, 2 Jun 2012 20:53:23 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201206022053.q52KrNX0013365@svn.freebsd.org> From: Michael Tuexen Date: Sat, 2 Jun 2012 20:53: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: r236492 - 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: Sat, 02 Jun 2012 20:53:24 -0000 Author: tuexen Date: Sat Jun 2 20:53:23 2012 New Revision: 236492 URL: http://svn.freebsd.org/changeset/base/236492 Log: Don't request data from the IPv6 layer, which is not used. MFC after: 3 days Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sat Jun 2 20:47:00 2012 (r236491) +++ head/sys/netinet/sctp_output.c Sat Jun 2 20:53:23 2012 (r236492) @@ -11047,11 +11047,8 @@ sctp_send_shutdown_complete2(struct mbuf #endif #ifdef INET6 if (ip6_out != NULL) { - struct route_in6 ro; int ret; - struct ifnet *ifp = NULL; - bzero(&ro, sizeof(ro)); mlen = SCTP_BUF_LEN(mout); #ifdef SCTP_PACKET_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LAST_PACKET_TRACING) @@ -11077,11 +11074,7 @@ sctp_send_shutdown_complete2(struct mbuf SCTP_STAT_INCR(sctps_sendhwcrc); #endif } - SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, NULL, vrf_id); - - /* Free the route if we got one back */ - if (ro.ro_rt) - RTFREE(ro.ro_rt); + SCTP_IP6_OUTPUT(ret, o_pak, NULL, NULL, NULL, vrf_id); } #endif SCTP_STAT_INCR(sctps_sendpackets); @@ -12148,12 +12141,8 @@ sctp_send_abort(struct mbuf *m, int iphl #endif #ifdef INET6 if (ip6_out != NULL) { - struct route_in6 ro; int ret; - struct ifnet *ifp = NULL; - /* zap the stack pointer to the route */ - bzero(&ro, sizeof(ro)); if (port) { udp->uh_ulen = htons(len - sizeof(struct ip6_hdr)); } @@ -12184,11 +12173,7 @@ sctp_send_abort(struct mbuf *m, int iphl SCTP_STAT_INCR(sctps_sendhwcrc); #endif } - SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, NULL, vrf_id); - - /* Free the route if we got one back */ - if (ro.ro_rt) - RTFREE(ro.ro_rt); + SCTP_IP6_OUTPUT(ret, o_pak, NULL, NULL, NULL, vrf_id); } #endif SCTP_STAT_INCR(sctps_sendpackets); @@ -12414,12 +12399,8 @@ sctp_send_operr_to(struct mbuf *m, int i #endif #ifdef INET6 if (ip6_out != NULL) { - struct route_in6 ro; int ret; - struct ifnet *ifp = NULL; - /* zap the stack pointer to the route */ - bzero(&ro, sizeof(ro)); if (port) { udp->uh_ulen = htons(len - sizeof(struct ip6_hdr)); } @@ -12448,11 +12429,7 @@ sctp_send_operr_to(struct mbuf *m, int i SCTP_STAT_INCR(sctps_sendhwcrc); #endif } - SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, NULL, vrf_id); - - /* Free the route if we got one back */ - if (ro.ro_rt) - RTFREE(ro.ro_rt); + SCTP_IP6_OUTPUT(ret, o_pak, NULL, NULL, NULL, vrf_id); } #endif SCTP_STAT_INCR(sctps_sendpackets); From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 21:22:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E7221065672; Sat, 2 Jun 2012 21:22:27 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE8138FC08; Sat, 2 Jun 2012 21:22:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q52LMQph014691; Sat, 2 Jun 2012 21:22:26 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q52LMQOD014689; Sat, 2 Jun 2012 21:22:26 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201206022122.q52LMQOD014689@svn.freebsd.org> From: Michael Tuexen Date: Sat, 2 Jun 2012 21:22: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: r236493 - 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: Sat, 02 Jun 2012 21:22:27 -0000 Author: tuexen Date: Sat Jun 2 21:22:26 2012 New Revision: 236493 URL: http://svn.freebsd.org/changeset/base/236493 Log: Honor sysctl for TTL. MFC after: 3 days Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sat Jun 2 20:53:23 2012 (r236492) +++ head/sys/netinet/sctp_output.c Sat Jun 2 21:22:26 2012 (r236493) @@ -10923,7 +10923,7 @@ sctp_send_shutdown_complete2(struct mbuf iph_out->ip_tos = (u_char)0; iph_out->ip_id = 0; iph_out->ip_off = 0; - iph_out->ip_ttl = MAXTTL; + iph_out->ip_ttl = MODULE_GLOBAL(ip_defttl); if (port) { iph_out->ip_p = IPPROTO_UDP; } else { @@ -11992,7 +11992,7 @@ sctp_send_abort(struct mbuf *m, int iphl iph_out->ip_tos = (u_char)0; iph_out->ip_id = 0; iph_out->ip_off = 0; - iph_out->ip_ttl = MAXTTL; + iph_out->ip_ttl = MODULE_GLOBAL(ip_defttl); if (port) { iph_out->ip_p = IPPROTO_UDP; } else { @@ -12255,7 +12255,7 @@ sctp_send_operr_to(struct mbuf *m, int i iph_out->ip_tos = (u_char)0; iph_out->ip_id = 0; iph_out->ip_off = 0; - iph_out->ip_ttl = MAXTTL; + iph_out->ip_ttl = MODULE_GLOBAL(ip_defttl); if (port) { iph_out->ip_p = IPPROTO_UDP; } else { From owner-svn-src-head@FreeBSD.ORG Sat Jun 2 22:14:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80101106566C; Sat, 2 Jun 2012 22:14:11 +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 50D918FC0A; Sat, 2 Jun 2012 22:14:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q52MEBAe017001; Sat, 2 Jun 2012 22:14:11 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q52MEBmd016997; Sat, 2 Jun 2012 22:14:11 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201206022214.q52MEBmd016997@svn.freebsd.org> From: Alan Cox Date: Sat, 2 Jun 2012 22:14: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: r236494 - in head/sys: amd64/amd64 i386/i386 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, 02 Jun 2012 22:14:11 -0000 Author: alc Date: Sat Jun 2 22:14:10 2012 New Revision: 236494 URL: http://svn.freebsd.org/changeset/base/236494 Log: Isolate the global pv list lock from data and other locks to prevent false sharing within the cache. Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Jun 2 21:22:26 2012 (r236493) +++ head/sys/amd64/amd64/pmap.c Sat Jun 2 22:14:10 2012 (r236494) @@ -200,12 +200,22 @@ static u_int64_t DMPDphys; /* phys addr static u_int64_t DMPDPphys; /* phys addr of direct mapped level 3 */ /* + * Isolate the global pv list lock from data and other locks to prevent false + * sharing within the cache. + */ +static struct { + struct rwlock lock; + char padding[CACHE_LINE_SIZE - sizeof(struct rwlock)]; +} pvh_global __aligned(CACHE_LINE_SIZE); + +#define pvh_global_lock pvh_global.lock + +/* * Data for the pv entry allocation mechanism */ static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); static long pv_entry_count; static struct md_page *pv_table; -static struct rwlock pvh_global_lock; /* * All those kernel PT submaps that BSD is so fond of Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sat Jun 2 21:22:26 2012 (r236493) +++ head/sys/i386/i386/pmap.c Sat Jun 2 22:14:10 2012 (r236494) @@ -232,12 +232,22 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_ena static int pat_index[PAT_INDEX_SIZE]; /* cache mode to PAT index conversion */ /* + * Isolate the global pv list lock from data and other locks to prevent false + * sharing within the cache. + */ +static struct { + struct rwlock lock; + char padding[CACHE_LINE_SIZE - sizeof(struct rwlock)]; +} pvh_global __aligned(CACHE_LINE_SIZE); + +#define pvh_global_lock pvh_global.lock + +/* * Data for the pv entry allocation mechanism */ static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; static struct md_page *pv_table; -static struct rwlock pvh_global_lock; static int shpgperproc = PMAP_SHPGPERPROC; struct pv_chunk *pv_chunkbase; /* KVA block for pv_chunks */