From owner-cvs-all@FreeBSD.ORG Fri Nov 14 14:54:38 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B100416A4CE; Fri, 14 Nov 2003 14:54:38 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8D7E43FAF; Fri, 14 Nov 2003 14:54:35 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id JAA12934; Sat, 15 Nov 2003 09:54:32 +1100 Date: Sat, 15 Nov 2003 09:54:31 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Robert Watson In-Reply-To: Message-ID: <20031115094529.H10567@gamplex.bde.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Brian Feldman cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: John Baldwin cc: cvs-src@FreeBSD.org Subject: RE: cvs commit: src/sys/conf kern.post.mk kmod.mk X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2003 22:54:38 -0000 On Fri, 14 Nov 2003, Robert Watson wrote: > On Fri, 14 Nov 2003, John Baldwin wrote: > > > On 14-Nov-2003 Brian Feldman wrote: > > > green 2003/11/14 08:04:11 PST > > > > > > FreeBSD src repository > > > > > > Modified files: > > > sys/conf kern.post.mk kmod.mk > > > Log: > > > Include opt_global.h in the modules build, when building from a normal > > > kernel build. This makes it possible for me not to get pissed off that > > > random.ko crashes the system trying to rdtsc() when the i386/cpu.h > > > support code decides it's okay to call that op when neither I386_CPU or > > > I486_CPU is defined. I guess it also makes WITNESS/INVARIANTS defines > > > get picked up by the modules. Ugh. > > WITNESS doesn't matter as all calls to it are done in the actual locking > > code itself which does not lives in modules. Modules always call the > > locking functions and don't inline locking operations. WITNESS actually has non-broken support for modules. Modules cannot depend on options, since they must work for all kernels. Here is a fix to unbreak the rdtsc() call similarly. %%% Index: cpu.h =================================================================== RCS file: /home/ncvs/src/sys/i386/include/cpu.h,v retrieving revision 1.68 diff -u -2 -r1.68 cpu.h --- cpu.h 16 Aug 2003 16:57:56 -0000 1.68 +++ cpu.h 14 Nov 2003 18:06:08 -0000 @@ -103,5 +104,5 @@ get_cyclecount(void) { -#if defined(I386_CPU) || defined(I486_CPU) +#if defined(I386_CPU) || defined(I486_CPU) || defined(KLD_MODULE) struct bintime bt; %%% All header files except the one with this bug seem to have had all the necessary ifdefs on Ix86_CPU. > I'd have picked up the syntax error in mac_test.c if this had been in > place then :-). And it makes mac_test and other regression test modules > far more functional... Is mac_test another broken module that depends on options? :-) Bruce