From e943400c8034557aaab4e928bd6d90b59a595347 Mon Sep 17 00:00:00 2001 From: soren Date: Wed, 17 Jul 2013 21:26:28 +0000 Subject: [PATCH] A few "isa" files are so tightly integrated into the x86 platform code as to not really be part of the optional isa bus autoconf machinery. Allows configuring a kernel like so: include "arch/amd64/conf/GENERIC" no isa --- sys/arch/amd64/conf/files.amd64 | 9 +-------- sys/arch/i386/conf/files.i386 | 9 +-------- sys/arch/x86/conf/files.x86 | 9 +++++++-- sys/dev/pci/eso.c | 7 ++----- sys/dev/pci/sv.c | 11 ++++------- 5 files changed, 15 insertions(+), 30 deletions(-) diff --git a/sys/arch/amd64/conf/files.amd64 b/sys/arch/amd64/conf/files.amd64 index de647af741cf..25335d61f56c 100644 --- a/sys/arch/amd64/conf/files.amd64 +++ b/sys/arch/amd64/conf/files.amd64 @@ -1,4 +1,4 @@ -# $NetBSD: files.amd64,v 1.79 2012/10/13 19:42:02 alnsn Exp $ +# $NetBSD: files.amd64,v 1.80 2013/07/17 21:26:28 soren Exp $ # # new style config file for amd64 architecture # @@ -107,13 +107,6 @@ include "arch/x86/pci/files.pci" include "dev/isa/files.isa" -# PC clock -file arch/x86/isa/clock.c isa -file arch/x86/isa/rtc.c isa - -# TSC timecounter support -file arch/x86/x86/tsc.c - # attribute used to represent the "keyboard controller" # XXX should be a real device define pckbcport { [irq = -1], [port = -1] } diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386 index 3d8354a206e3..c548e46d717b 100644 --- a/sys/arch/i386/conf/files.i386 +++ b/sys/arch/i386/conf/files.i386 @@ -1,4 +1,4 @@ -# $NetBSD: files.i386,v 1.370 2012/12/25 10:51:03 mbalmer Exp $ +# $NetBSD: files.i386,v 1.371 2013/07/17 21:26:28 soren Exp $ # # new style config file for i386 architecture # @@ -245,18 +245,11 @@ file arch/i386/pci/p64h2apic.c p64h2apic include "dev/isa/files.isa" -# PC clock -file arch/x86/isa/clock.c isa -file arch/x86/isa/rtc.c isa - # Protech PS3100 cash drawer device ptcd: gpiobus attach ptcd at isa file dev/isa/ptcd.c ptcd -# TSC support -file arch/x86/x86/tsc.c - # Numeric Processing Extension; Math Co-processor device npx file arch/i386/isa/npx.c npx needs-flag diff --git a/sys/arch/x86/conf/files.x86 b/sys/arch/x86/conf/files.x86 index 143e34c004c5..a7d22dd8db80 100644 --- a/sys/arch/x86/conf/files.x86 +++ b/sys/arch/x86/conf/files.x86 @@ -1,4 +1,4 @@ -# $NetBSD: files.x86,v 1.79 2012/08/29 17:13:21 drochner Exp $ +# $NetBSD: files.x86,v 1.80 2013/07/17 21:26:29 soren Exp $ # options for MP configuration through the MP spec defflag opt_mpbios.h MPBIOS MPVERBOSE MPDEBUG MPBIOS_SCANPCI @@ -89,6 +89,7 @@ file arch/x86/x86/pmap_tlb.c file arch/x86/x86/procfs_machdep.c procfs file arch/x86/x86/sys_machdep.c file arch/x86/x86/syscall.c +file arch/x86/x86/tsc.c file arch/x86/x86/vm_machdep.c file arch/x86/x86/x86_autoconf.c file arch/x86/x86/x86_userconf.c userconf @@ -118,7 +119,11 @@ file arch/x86/acpi/acpi_pdc.c acpi file arch/x86/acpi/acpi_wakeup.c acpi file arch/x86/acpi/acpi_machdep.c acpi -file arch/x86/isa/isa_machdep.c isa +file arch/x86/isa/isa_machdep.c + +# PC clock +file arch/x86/isa/clock.c +file arch/x86/isa/rtc.c # Stubs for x86 routines not included in the system file arch/x86/x86/x86_stub.c diff --git a/sys/dev/pci/eso.c b/sys/dev/pci/eso.c index 4d5b11c39a65..0d3468e6f038 100644 --- a/sys/dev/pci/eso.c +++ b/sys/dev/pci/eso.c @@ -1,4 +1,4 @@ -/* $NetBSD: eso.c,v 1.62 2012/10/27 17:18:31 chs Exp $ */ +/* $NetBSD: eso.c,v 1.63 2013/07/17 21:26:29 soren Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: eso.c,v 1.62 2012/10/27 17:18:31 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: eso.c,v 1.63 2013/07/17 21:26:29 soren Exp $"); #include "mpu.h" @@ -96,11 +96,8 @@ __KERNEL_RCSID(0, "$NetBSD: eso.c,v 1.62 2012/10/27 17:18:31 chs Exp $"); * XXX engine by allocating through the ISA DMA tag. */ #if defined(amd64) || defined(i386) -#include "isa.h" -#if NISA > 0 #include #endif -#endif #if defined(AUDIO_DEBUG) || defined(DEBUG) #define DPRINTF(x) printf x diff --git a/sys/dev/pci/sv.c b/sys/dev/pci/sv.c index 24d698d9fbe1..8cbfef57fabd 100644 --- a/sys/dev/pci/sv.c +++ b/sys/dev/pci/sv.c @@ -1,4 +1,4 @@ -/* $NetBSD: sv.c,v 1.47 2012/10/27 17:18:35 chs Exp $ */ +/* $NetBSD: sv.c,v 1.48 2013/07/17 21:26:29 soren Exp $ */ /* $OpenBSD: sv.c,v 1.2 1998/07/13 01:50:15 csapuntz Exp $ */ /* @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.47 2012/10/27 17:18:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.48 2013/07/17 21:26:29 soren Exp $"); #include #include @@ -95,12 +95,9 @@ __KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.47 2012/10/27 17:18:35 chs Exp $"); * As long as bus_dmamem_alloc_range() is missing we use the ISA * DMA tag on i386. */ -#if defined(i386) -#include "isa.h" -#if NISA > 0 +#if defined(amd64) || defined(i386) #include #endif -#endif #ifdef AUDIO_DEBUG #define DPRINTF(x) if (svdebug) printf x @@ -379,7 +376,7 @@ sv_attach(device_t parent, device_t self, void *aux) #if defined(alpha) /* XXX Force allocation through the SGMAP. */ sc->sc_dmatag = alphabus_dma_get_tag(pa->pa_dmat, ALPHA_BUS_ISA); -#elif defined(i386) && NISA > 0 +#elif defined(amd64) || defined(i386) /* XXX * The SonicVibes DMA is broken and only works on 24-bit addresses. * As long as bus_dmamem_alloc_range() is missing we use the ISA