summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2006-06-12 21:07:13 +0000
committermarius <marius@FreeBSD.org>2006-06-12 21:07:13 +0000
commit9e60ac43b5ce3518ef71ac90c67969eec3282762 (patch)
treeda4439ea5709e5618e109faeee8993d3a0aa0ad5 /sys
parentec7a44920791ea14b9eb51468503285eaf116c8a (diff)
downloadFreeBSD-src-9e60ac43b5ce3518ef71ac90c67969eec3282762.zip
FreeBSD-src-9e60ac43b5ce3518ef71ac90c67969eec3282762.tar.gz
Make the ISAPNP code optional and only enable it on i386 and pc98 (used
for CBUS-PNP cards there) by default, as there are no amd64 and sparc64 machines with ISA slots and which therefore could make use of this code known to exist. For sparc64 this additionally allows to get rid of the compat shims for in{b,w,l}()/out{b,w,l}() etc and the associated hacks. OK'ed by: imp, peter
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/files4
-rw-r--r--sys/conf/options5
-rw-r--r--sys/i386/conf/DEFAULTS1
-rw-r--r--sys/isa/isa_common.c6
-rw-r--r--sys/pc98/conf/DEFAULTS1
5 files changed, 14 insertions, 3 deletions
diff --git a/sys/conf/files b/sys/conf/files
index 21502b0..8455bc8 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1245,8 +1245,8 @@ isa/isa_if.m standard
isa/isa_common.c optional isa
isa/isahint.c optional isa
isa/orm.c optional isa
-isa/pnp.c optional isa
-isa/pnpparse.c optional isa
+isa/pnp.c optional isa isapnp
+isa/pnpparse.c optional isa isapnp
isofs/cd9660/cd9660_bmap.c optional cd9660
isofs/cd9660/cd9660_lookup.c optional cd9660
isofs/cd9660/cd9660_node.c optional cd9660
diff --git a/sys/conf/options b/sys/conf/options
index 531b07b..e55fc8f 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -615,13 +615,16 @@ ACPI_MAX_THREADS opt_acpi.h
ACPI_NO_SEMAPHORES opt_acpi.h
ACPICA_PEDANTIC opt_acpi.h
+# ISA support
+DEV_ISA opt_isa.h
+ISAPNP opt_isa.h
+
# options for DEVFS, see sys/fs/devfs/devfs.h
NDEVFSINO opt_devfs.h
NDEVFSOVERFLOW opt_devfs.h
# various 'device presence' options.
DEV_BPF opt_bpf.h
-DEV_ISA opt_isa.h
DEV_MCA opt_mca.h
DEV_CARP opt_carp.h
DEV_SPLASH opt_splash.h
diff --git a/sys/i386/conf/DEFAULTS b/sys/i386/conf/DEFAULTS
index a98e370..f0c64c1 100644
--- a/sys/i386/conf/DEFAULTS
+++ b/sys/i386/conf/DEFAULTS
@@ -7,6 +7,7 @@ machine i386
# Bus support.
device isa
+options ISAPNP
# Floating point support.
device npx
diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c
index f824c4d..72de76c 100644
--- a/sys/isa/isa_common.c
+++ b/sys/isa/isa_common.c
@@ -60,6 +60,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_isa.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -652,8 +654,10 @@ isa_print_all_resources(device_t dev)
retval += resource_list_print_type(rl, "drq", SYS_RES_DRQ, "%ld");
if (device_get_flags(dev))
retval += printf(" flags %#x", device_get_flags(dev));
+#ifdef ISAPNP
if (idev->id_vendorid)
retval += printf(" pnpid %s", pnp_eisaformat(idev->id_vendorid));
+#endif
return (retval);
}
@@ -1062,11 +1066,13 @@ static int
isa_child_pnpinfo_str(device_t bus, device_t child, char *buf,
size_t buflen)
{
+#ifdef ISAPNP
struct isa_device *idev = DEVTOISA(child);
if (idev->id_vendorid)
snprintf(buf, buflen, "pnpid=%s",
pnp_eisaformat(idev->id_vendorid));
+#endif
return (0);
}
diff --git a/sys/pc98/conf/DEFAULTS b/sys/pc98/conf/DEFAULTS
index bb6a00b..4a26c68 100644
--- a/sys/pc98/conf/DEFAULTS
+++ b/sys/pc98/conf/DEFAULTS
@@ -8,6 +8,7 @@ options PC98
# Bus support.
device isa
+options ISAPNP
# Floating point support.
device npx
OpenPOWER on IntegriCloud