From owner-freebsd-bugs Tue May 7 8: 0:18 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2F36C37B404 for ; Tue, 7 May 2002 08:00:06 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g47F06l91114; Tue, 7 May 2002 08:00:06 -0700 (PDT) (envelope-from gnats) Date: Tue, 7 May 2002 08:00:06 -0700 (PDT) Message-Id: <200205071500.g47F06l91114@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Boris Popov Subject: Re: misc/37775: netsmb/smb_subr.c needs opt_global.h in SMP environment Reply-To: Boris Popov Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR misc/37775; it has been noted by GNATS. From: Boris Popov To: Piet Honkoop Cc: Peter Pentchev , dwmalone@FreeBSD.org, bug-followup@FreeBSD.org Subject: Re: misc/37775: netsmb/smb_subr.c needs opt_global.h in SMP environment Date: Tue, 7 May 2002 21:52:19 +0700 (ALMST) On Tue, 7 May 2002, Piet Honkoop wrote: > I agree a module should be built independently. But if the module code > depends on a *choice* the sysop makes in his/her kernel config file then > the module should also access the generated .h files from that config > file. Or the dependency should be removed. This is an ongoing work in -current carried by Peter Wemm. New mechanism will use single configuration files for kernel and modules. > Agreed. But as it is now, there is a significant difference in building > the module as > > options smbfs > > or as a separate module. And the way I understand the module system, they > should be equivalent. Right? In the ideal world - yes :) But for now locking things have conditional compilation for SMP and UP case. Makefile for smbfs addresses this problem at some extent: > > # cd /usr/src/sys/modules/netsmb > > # make cleandir && make cleandir > > # make CFLAGS=-DSMP depend > > # make CFLAGS=-DSMP all install Mostly correct, but I'm abuse this feature even in the more dangerous way by defining SMPKERNEL=yes in the make.conf file and modifying kmod.mk like this: .if defined(SMPKERNEL) CFLAGS += -DSMP -DAPIC_IO .endif :) -- Boris Popov http://rbp.euro.ru To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message