Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Do not assume that all uses of efi are pci ...



details:   https://anonhg.NetBSD.org/src/rev/2757be1535f4
branches:  trunk
changeset: 995037:2757be1535f4
user:      cherry <cherry%NetBSD.org@localhost>
date:      Mon Dec 03 19:46:43 2018 +0000

description:
Do not assume that all uses of efi are pci aware.

Allow efi.c to compile in the case where pci is not enabled.

diffstat:

 sys/arch/x86/x86/efi.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (38 lines):

diff -r 135d8b664af9 -r 2757be1535f4 sys/arch/x86/x86/efi.c
--- a/sys/arch/x86/x86/efi.c    Mon Dec 03 19:15:35 2018 +0000
+++ b/sys/arch/x86/x86/efi.c    Mon Dec 03 19:46:43 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efi.c,v 1.18 2018/11/15 16:58:56 riastradh Exp $       */
+/*     $NetBSD: efi.c,v 1.19 2018/12/03 19:46:43 cherry Exp $  */
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: efi.c,v 1.18 2018/11/15 16:58:56 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efi.c,v 1.19 2018/12/03 19:46:43 cherry Exp $");
 
 #include <sys/kmem.h>
 #include <sys/param.h>
@@ -40,7 +40,9 @@
 #include <x86/efi.h>
 
 #include <dev/mm.h>
+#if NPCI > 0
 #include <dev/pci/pcivar.h> /* for pci_mapreg_map_enable_decode */
+#endif
 
 const struct uuid EFI_UUID_ACPI20 = EFI_TABLE_ACPI20;
 const struct uuid EFI_UUID_ACPI10 = EFI_TABLE_ACPI10;
@@ -419,7 +421,9 @@
                return;
        }
        bootmethod_efi = true;
+#if NPCI > 0   
        pci_mapreg_map_enable_decode = true; /* PR port-amd64/53286 */
+#endif
 }
 
 bool



Home | Main Index | Thread Index | Old Index