From owner-svn-src-head@freebsd.org Sun Jun 10 14:49:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9378B1012F50; Sun, 10 Jun 2018 14:49:14 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4247386739; Sun, 10 Jun 2018 14:49:14 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E15563EA; Sun, 10 Jun 2018 14:49:14 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5AEnDhj065158; Sun, 10 Jun 2018 14:49:13 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5AEnDLJ065156; Sun, 10 Jun 2018 14:49:13 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201806101449.w5AEnDLJ065156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sun, 10 Jun 2018 14:49:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334925 - in head/sys: amd64/amd64 x86/x86 X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: in head/sys: amd64/amd64 x86/x86 X-SVN-Commit-Revision: 334925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jun 2018 14:49:14 -0000 Author: bde Date: Sun Jun 10 14:49:13 2018 New Revision: 334925 URL: https://svnweb.freebsd.org/changeset/base/334925 Log: Untangle configuration ifdefs a little. On x86, msi is optional on pci, and also on apic in common and i386 files (except for xen it is optional only on xenhvm), but it was not ifdefed except on apic in common and i386 files. This is all that is left from an attempt to build a (sub-)minimal kernel without any devices. The isa "option" is still used without ifdefs in many standard files even on amd64. ISAPNP is not optional on at least i386. ATPIC is not optional on i386 (it is used mainly for Xspuriousint). But pci is now supposed to be optional on x86. Modified: head/sys/amd64/amd64/machdep.c head/sys/x86/x86/nexus.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sun Jun 10 14:21:01 2018 (r334924) +++ head/sys/amd64/amd64/machdep.c Sun Jun 10 14:49:13 2018 (r334925) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include "opt_kstack_pages.h" #include "opt_maxmem.h" #include "opt_mp_watchdog.h" +#include "opt_pci.h" #include "opt_platform.h" #include "opt_sched.h" @@ -184,7 +185,9 @@ struct init_ops init_ops = { .mp_bootaddress = mp_bootaddress, .start_all_aps = native_start_all_aps, #endif +#ifdef DEV_PCI .msi_init = msi_init, +#endif }; /* Modified: head/sys/x86/x86/nexus.c ============================================================================== --- head/sys/x86/x86/nexus.c Sun Jun 10 14:21:01 2018 (r334924) +++ head/sys/x86/x86/nexus.c Sun Jun 10 14:49:13 2018 (r334925) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include "opt_apic.h" #endif #include "opt_isa.h" +#include "opt_pci.h" #include #include @@ -131,7 +132,7 @@ static int nexus_get_resource(device_t, device_t, int, static void nexus_delete_resource(device_t, device_t, int, int); static int nexus_get_cpus(device_t, device_t, enum cpu_sets, size_t, cpuset_t *); -#ifdef DEV_APIC +#if defined(DEV_APIC) && defined(DEV_PCI) static int nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs); static int nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs); static int nexus_alloc_msix(device_t pcib, device_t dev, int *irq); @@ -172,7 +173,7 @@ static device_method_t nexus_methods[] = { DEVMETHOD(bus_get_cpus, nexus_get_cpus), /* pcib interface */ -#ifdef DEV_APIC +#if defined(DEV_APIC) && defined(DEV_PCI) DEVMETHOD(pcib_alloc_msi, nexus_alloc_msi), DEVMETHOD(pcib_release_msi, nexus_release_msi), DEVMETHOD(pcib_alloc_msix, nexus_alloc_msix), @@ -701,7 +702,7 @@ nexus_add_irq(u_long irq) panic("%s: failed", __func__); } -#ifdef DEV_APIC +#if defined(DEV_APIC) && defined(DEV_PCI) static int nexus_alloc_msix(device_t pcib, device_t dev, int *irq) { @@ -736,7 +737,7 @@ nexus_map_msi(device_t pcib, device_t dev, int irq, ui return (msi_map(irq, addr, data)); } -#endif +#endif /* DEV_APIC && DEV_PCI */ /* Placeholder for system RAM. */ static void