From owner-cvs-all Tue Apr 30 9:43:13 2002 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 3F94237B420; Tue, 30 Apr 2002 09:43:03 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id CAA16731; Wed, 1 May 2002 02:43:00 +1000 Date: Wed, 1 May 2002 02:44:23 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Warner Losh Cc: cvs-committers@FreeBSD.org, Subject: Re: cvs commit: src/sys/dev/wi wi_hostap.c In-Reply-To: <200204291904.g3TJ4TD65196@freefall.freebsd.org> Message-ID: <20020501020252.W11154-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 29 Apr 2002, Warner Losh wrote: > imp 2002/04/29 12:04:29 PDT > > Modified files: > sys/dev/wi wi_hostap.c > Log: > splsoftnet is spelled splimp in FreeBSD rather than splnet. splimp is > used to protect the rest of the driver. This is a no-op commit to current, > but is needed for the MFC. Er, this is perfectly backwards in at least the log message. splsoftnet in NetBSD is spelled splnet in FreeBSD. splnet in NetBSD is spelled splimp in FreeBSD. Changing splnet to splimp just increases interrupt latency. This file also misuses splsoftclock. splsoftclock has different semantics in FreeBSD. Using it is at best a hack except in the one place where it has the correct semantics (in hardclock() in RELENG_4), and even in that place its use is dubious -- it only works right on some machines, not including i386's (so it is not used on i386's). Drivers should use a device-specific spl to mask softclock interrupts (splnet for network drivers). More details: splsoftclock in NetBSD raises the priority to that of softclock (timeouts), but in FreeBSD it _sets_ the priority that of softclock. Since softclock (at lease in FreeBSD) is lower than all other priorities except 0, splsoftclock in only raises the priority if the priority is 0; it has no effect if the priority is already softclock and _lowers_ the priority otherwise. Lowering the priority is usually wrong. splsoftclock is misused in about 10 other files in RELENG_4. Only its use in apm is obviously wrong (it is just the wong spl there -- splclock should be used, and splsoftclock defeats any splclock in callers). > MFC after: 1 day Doesn't seem to be long enough for finding bugs, especially when the bugs are no-ops in -current. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message