From nobody  Sun Jan 12 08:43:03 1997
Received: (from nobody@localhost)
          by freefall.freebsd.org (8.8.4/8.8.4) id IAA04706;
          Sun, 12 Jan 1997 08:43:03 -0800 (PST)
Message-Id: <199701121643.IAA04706@freefall.freebsd.org>
Date: Sun, 12 Jan 1997 08:43:03 -0800 (PST)
From: andrew@ugh.net.au
To: freebsd-gnats-submit@freebsd.org
Subject: pci gets included without being asked for
X-Send-Pr-Version: www-1.0

>Number:         2463
>Category:       kern
>Synopsis:       pci gets included without being asked for
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    se
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 12 08:50:00 PST 1997
>Closed-Date:    Fri Jan 24 13:33:20 PST 1997
>Last-Modified:  Fri Jan 24 13:38:17 PST 1997
>Originator:     Andrew Stevenson
>Release:        2.2-BETA_A
>Organization:
>Environment:
FreeBSD sally.ugh.net.au 2.2-BETA_A FreeBSD 2.2-BETA_A #0: Sat Jan 11 22:19:46
EST 1997	andrew@sally.ugh.net.au:/usr/src/sys/compile/SALLY	i386
>Description:
Despite not having pci mentioned in my kernel config file at all the
makefile produced by config still contains $S/pci/wd82371.c. Is this a
bug? The file seems to be something about pci ide controllers but I'm not
sure...I definitley dont have pci :-(
>How-To-Repeat:
My kernel config file:

#
# SALLY -- 4 Serial, 1 Parallel, 1 420MB bad IDE fixed, built for speed no
#	longer :-(. FAILSAFE is on.
#

machine		"i386"
cpu		"I386_CPU"
ident		SALLY
maxusers	4

options		GPL_MATH_EMULATE	#Support for x87 emulation
options		INET			#InterNETworking
options		FFS			#Berkeley Fast Filesystem
options		PROCFS			#Process filesystem
options		"COMPAT_43"		#Compatible with BSD 4.3 [KEEP THIS!]
options		FAILSAFE		#Be Cautious
#options	USERCONFIG		#boot -c editor
#options	VISUAL_USERCONFIG	#visual boot -c editor

config		kernel	root on wd0

# Buses
controller	isa0

# Floppy
controller	fdc0	at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
disk		fd0	at fdc0 drive 0

# Hard Disk
controller	wdc0	at isa? port "IO_WD1" bio irq 14 vector wdintr
disk		wd0	at wdc0 drive 0

# Console
# syscons is the default console driver, resembling an SCO console
device		sc0	at isa? port "IO_KBD" tty irq 1 vector scintr
# Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver
#device		vt0	at isa? port "IO_KBD" tty irq 1 vector pcrint
#options		PCVT_FREEBSD=210	# pcvt running on FreeBSD >= 2.0.5

# Maths Co-Processor
# Mandatory, don't remove
device		npx0	at isa? port "IO_NPX" irq 13 vector npxintr

# Serial Ports
device		sio0	at isa? port "IO_COM1" tty irq 4 vector siointr
device		sio1	at isa? port "IO_COM2" tty irq 3 vector siointr
device		sio2	at isa? port "IO_COM3" tty irq 5 vector siointr
device		sio3	at isa? port "IO_COM4" tty irq 7 vector siointr

# Parallel Port
# irq 9 but seems faster in polled mode
device		lpt0	at isa? port? tty vector lptintr

# Sound
#device pca0 at isa? port "IO_TIMER1" tty
#pseudo-device speaker

# Loopback
pseudo-device	loop

# Kernel Error Messages
pseudo-device	log

# ijppp
pseudo-device	tun	2

# Snoop
pseudo-device snp 1

pseudo-device	bpfilter 1
pseudo-device	pty	16
pseudo-device	gzip		# Exec gzipped a.out's

>Fix:

>Release-Note:
>Audit-Trail:

From: se@freebsd.org (Stefan Esser)
To: andrew@ugh.net.au
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/2463: pci gets included without being asked for
Date: Fri, 24 Jan 1997 22:25:11 +0100

 On Jan 12, andrew@ugh.net.au wrote:
 > >Synopsis:       pci gets included without being asked for
 
 > >Description:
 > Despite not having pci mentioned in my kernel config file at all the
 > makefile produced by config still contains $S/pci/wd82371.c. Is this a
 > bug? The file seems to be something about pci ide controllers but I'm not
 > sure...I definitley dont have pci :-(
 
 Well, and then you definitely don't care, whether wd82371.c will
 be compiled, since it is pre-processed into an empty file, if you
 don't have pci0 configured ...
 
 (I.e. the whole body of wd82371.c is included in "#if NPCI > 0".)
 
 It is debatable, whether wd82371.c should be included into the 
 Makefile, if "wd0" is defined, or whether it should depend on pci0,
 but would then contain an "#if NWD > 0" ...
 (And I would in fact prefer the latter method.)
 
 This is not a real problem: The /sys/conf/files format just does not
 allow to include a file only if there are TWO devices configured in
 the kernel configuration file. This is dealt with by checking for the
 second condition from within the source file.
 
 I will therefor close the PR.
State-Changed-From-To: open->closed 
State-Changed-By: se 
State-Changed-When: Fri Jan 24 13:33:20 PST 1997 
State-Changed-Why:  
This is not a bug, but a restriction of the kernel config tool. 
No code is actually compiled into the kernel. 


Responsible-Changed-From-To: freebsd-bugs->se 
Responsible-Changed-By: se 
Responsible-Changed-When: Fri Jan 24 13:33:20 PST 1997 
Responsible-Changed-Why:  
I'm maintaining PCI bus related stuff. 
>Unformatted:
