Bug 62595 - npx.c do not compiles without ISA bus configured
Summary: npx.c do not compiles without ISA bus configured
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: i386 (show other bugs)
Version: 5.2-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-i386 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-09 17:30 UTC by Radim Kolar
Modified: 2004-02-10 02:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Radim Kolar 2004-02-09 17:30:21 UTC
If you don't have 'device isa' entry in kernel configuration, kernel
build will fail in npx driver. I want to build a smallest possible kernel,
so i have commeted isa bus out.

How-To-Repeat: asura# make NO_MODULES=yes
cc -c -O -pipe -mcpu=pentiumpro -Wall -Wredundant-decls -Wnested-externs -Wstric
t-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fforma
t-extensions -std=c99 -g -nostdinc -I-  -I. -I../../.. -I../../../contrib/dev/ac
pica -I../../../contrib/ipfilter -I../../../contrib/dev/ath -I../../../contrib/d
ev/ath/freebsd -I../../../contrib/ngatm -D_KERNEL -include opt_global.h -fno-com
mon -finline-limit=15000 -fno-strict-aliasing  -mno-align-long-strings -mpreferr
ed-stack-boundary=2 -ffreestanding -Werror  ../../../i386/isa/npx.c
../../../i386/isa/npx.c:1032: warning: `npx_driver' defined but not used
../../../i386/isa/npx.c:1038: warning: `npx_devclass' defined but not used
*** Error code 1

Stop in /usr/src/sys/i386/compile/DEBUG.
Comment 1 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2004-02-09 20:27:41 UTC
State Changed
From-To: open->closed

isa is not optional on i386.
Comment 2 Bruce Evans 2004-02-10 02:20:17 UTC
On Sun, 8 Feb 2004, Radim Kolar wrote:

> >Description:
> If you don't have 'device isa' entry in kernel configuration, kernel
> build will fail in npx driver. I want to build a smallest possible kernel,
> so i have commeted isa bus out.

Try this patch.  i386 require isa so leaving it out will give a kernel
hat won't actually work, however.  The NPX_ISA ifdefs in npx.c basically
leave out isa-pnp, not isa, and some i386 kernels configured without isa
can only be linked because not configuring it doesn't actually leave out
all the isa bits.

%%%
Index: npx.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/isa/npx.c,v
retrieving revision 1.144
diff -u -2 -r1.144 npx.c
--- npx.c	3 Nov 2003 21:53:38 -0000	1.144
+++ npx.c	10 Feb 2004 01:30:35 -0000
@@ -1038,5 +1038,4 @@
 static devclass_t npx_devclass;

-#ifdef DEV_ISA
 /*
  * We prefer to attach to the root nexus so that the usual case (exception 16)
@@ -1045,4 +1044,5 @@
 DRIVER_MODULE(npx, nexus, npx_driver, npx_devclass, 0, 0);

+#ifdef DEV_ISA
 /*
  * This sucks up the legacy ISA support assignments from PNPBIOS/ACPI.
%%%

Bruce