From owner-freebsd-current@FreeBSD.ORG Tue Jul 10 16:56:12 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52EC116A46D for ; Tue, 10 Jul 2007 16:56:12 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [83.98.131.211]) by mx1.freebsd.org (Postfix) with ESMTP id 1D1DD13C46A for ; Tue, 10 Jul 2007 16:56:12 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 26D4C1CD03; Tue, 10 Jul 2007 18:56:06 +0200 (CEST) Date: Tue, 10 Jul 2007 18:56:06 +0200 From: Ed Schouten To: FreeBSD Current Message-ID: <20070710165606.GE55449@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8JPrznbw0YAQ/KXy" Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) Subject: D_NEEDGIANT usage in {amd64,i386}/isa/clock.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2007 16:56:12 -0000 --8JPrznbw0YAQ/KXy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I was just taking a look at the /dev/nvram code in the isa/clock.c files of the amd64 and i386 architectures. For some reason, the "nvram" device needs D_NEEDGIANT. If I take a look at the nvram_open(), nvram_read() and nvram_write() routines, I see no reason why it should be marked D_NEEDGIANT. Both the nvram_read() and nvram_write() routines both perform some simple bounds checking and then call rtcin() and writertc(). Both of those routines are already protected from concurrent access through the RTC_LOCK and RTC_UNLOCK macro's. Yours, --=20 Ed Schouten WWW: http://g-rave.nl/ --8JPrznbw0YAQ/KXy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGk7om52SDGA2eCwURAneSAJ4mSLmFkGeG7p+CI/L2nB0Z3iN+WACfbFmQ qMlOePLlwpnjE1977k5SKPY= =c9MT -----END PGP SIGNATURE----- --8JPrznbw0YAQ/KXy--