Module Name:    src
Committed By:   martin
Date:           Wed Oct 18 15:14:24 UTC 2023

Modified Files:
        src/sys/arch/x86/acpi [netbsd-10]: acpi_machdep.c acpi_wakeup.c
        src/sys/arch/x86/include [netbsd-10]: genfb_machdep.h
        src/sys/arch/x86/pci [netbsd-10]: pci_machdep.c
        src/sys/arch/x86/x86 [netbsd-10]: genfb_machdep.c hyperv.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #425):

        sys/arch/x86/pci/pci_machdep.c: revision 1.96
        sys/arch/x86/acpi/acpi_machdep.c: revision 1.36
        sys/arch/x86/x86/hyperv.c: revision 1.16
        sys/arch/x86/x86/genfb_machdep.c: revision 1.21
        sys/arch/x86/acpi/acpi_wakeup.c: revision 1.56
        sys/arch/x86/include/genfb_machdep.h: revision 1.6

Declare
int acpi_md_vesa_modenum;
int acpi_md_vbios_reset;
struct vcons_screen x86_genfb_console_screen;

in genfb_machdep.h instead of locally as extern in various .c files.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.34.2.1 src/sys/arch/x86/acpi/acpi_machdep.c
cvs rdiff -u -r1.54 -r1.54.12.1 src/sys/arch/x86/acpi/acpi_wakeup.c
cvs rdiff -u -r1.5 -r1.5.18.1 src/sys/arch/x86/include/genfb_machdep.h
cvs rdiff -u -r1.93.4.1 -r1.93.4.2 src/sys/arch/x86/pci/pci_machdep.c
cvs rdiff -u -r1.19 -r1.19.4.1 src/sys/arch/x86/x86/genfb_machdep.c
cvs rdiff -u -r1.15 -r1.15.4.1 src/sys/arch/x86/x86/hyperv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/acpi/acpi_machdep.c
diff -u src/sys/arch/x86/acpi/acpi_machdep.c:1.34 src/sys/arch/x86/acpi/acpi_machdep.c:1.34.2.1
--- src/sys/arch/x86/acpi/acpi_machdep.c:1.34	Fri Oct 28 21:58:27 2022
+++ src/sys/arch/x86/acpi/acpi_machdep.c	Wed Oct 18 15:14:24 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_machdep.c,v 1.34 2022/10/28 21:58:27 riastradh Exp $ */
+/* $NetBSD: acpi_machdep.c,v 1.34.2.1 2023/10/18 15:14:24 martin Exp $ */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.34 2022/10/28 21:58:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.34.2.1 2023/10/18 15:14:24 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -72,6 +72,7 @@ __KERNEL_RCSID(0, "$NetBSD: acpi_machdep
 
 #include <dev/isa/isareg.h>
 #include <dev/isa/isavar.h>
+#include <arch/x86/include/genfb_machdep.h>
 
 #include "ioapic.h"
 
@@ -594,6 +595,8 @@ acpi_md_callback(struct acpi_softc *sc)
 }
 
 #ifndef XENPV
+int acpi_md_vbios_reset = 0;
+
 void
 device_acpi_register(device_t dev, void *aux)
 {
@@ -609,8 +612,6 @@ device_acpi_register(device_t dev, void 
 	device_is_isa = device_is_a(parent, "isa");
 
 	if (device_is_vga && (device_is_pci || device_is_isa)) {
-		extern int acpi_md_vbios_reset;
-
 		acpi_md_vbios_reset = VBIOS_RESET_DEFAULT;
 	}
 }

Index: src/sys/arch/x86/acpi/acpi_wakeup.c
diff -u src/sys/arch/x86/acpi/acpi_wakeup.c:1.54 src/sys/arch/x86/acpi/acpi_wakeup.c:1.54.12.1
--- src/sys/arch/x86/acpi/acpi_wakeup.c:1.54	Tue Jun  1 21:29:24 2021
+++ src/sys/arch/x86/acpi/acpi_wakeup.c	Wed Oct 18 15:14:24 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_wakeup.c,v 1.54 2021/06/01 21:29:24 riastradh Exp $	*/
+/*	$NetBSD: acpi_wakeup.c,v 1.54.12.1 2023/10/18 15:14:24 martin Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2011 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.54 2021/06/01 21:29:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.54.12.1 2023/10/18 15:14:24 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -98,6 +98,7 @@ __KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.
 #include <x86/cpuvar.h>
 #include <x86/x86/tsc.h>
 #include <x86/fpu.h>
+#include <arch/x86/include/genfb_machdep.h>
 
 #include "opt_vga.h"
 
@@ -107,8 +108,6 @@ __KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.
 static paddr_t acpi_wakeup_paddr = 3 * PAGE_SIZE;
 static vaddr_t acpi_wakeup_vaddr;
 
-int acpi_md_vbios_reset = 0; /* Referenced by dev/pci/vga_pci.c */
-int acpi_md_vesa_modenum = 0; /* Referenced by arch/x86/x86/genfb_machdep.c */
 static int acpi_md_beep_on_reset = 0;
 
 static int	acpi_md_s4bios(void);

Index: src/sys/arch/x86/include/genfb_machdep.h
diff -u src/sys/arch/x86/include/genfb_machdep.h:1.5 src/sys/arch/x86/include/genfb_machdep.h:1.5.18.1
--- src/sys/arch/x86/include/genfb_machdep.h:1.5	Thu Jan 28 01:57:31 2021
+++ src/sys/arch/x86/include/genfb_machdep.h	Wed Oct 18 15:14:24 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: genfb_machdep.h,v 1.5 2021/01/28 01:57:31 jmcneill Exp $ */
+/* $NetBSD: genfb_machdep.h,v 1.5.18.1 2023/10/18 15:14:24 martin Exp $ */
 
 /*-
  * Copyright (c) 2009 Jared D. McNeill <jmcne...@invisible.ca>
@@ -34,4 +34,8 @@ int	x86_genfb_cnattach(void);
 void	x86_genfb_set_console_dev(device_t);
 void	x86_genfb_ddb_trap_callback(int);
 
+extern int acpi_md_vesa_modenum;
+extern int acpi_md_vbios_reset;
+extern struct vcons_screen x86_genfb_console_screen;
+
 #endif /* !_X86_GENFB_MACHDEP_H */

Index: src/sys/arch/x86/pci/pci_machdep.c
diff -u src/sys/arch/x86/pci/pci_machdep.c:1.93.4.1 src/sys/arch/x86/pci/pci_machdep.c:1.93.4.2
--- src/sys/arch/x86/pci/pci_machdep.c:1.93.4.1	Wed Aug 23 17:05:39 2023
+++ src/sys/arch/x86/pci/pci_machdep.c	Wed Oct 18 15:14:24 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep.c,v 1.93.4.1 2023/08/23 17:05:39 martin Exp $	*/
+/*	$NetBSD: pci_machdep.c,v 1.93.4.2 2023/10/18 15:14:24 martin Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.93.4.1 2023/08/23 17:05:39 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.93.4.2 2023/10/18 15:14:24 martin Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -310,11 +310,6 @@ static struct pci_conf_lock cl0 = {
 
 static struct pci_conf_lock * const cl = &cl0;
 
-#if NGENFB > 0 && NACPICA > 0 && defined(VGA_POST)
-extern int acpi_md_vbios_reset;
-extern int acpi_md_vesa_modenum;
-#endif
-
 static struct genfb_colormap_callback gfb_cb;
 static struct genfb_pmf_callback pmf_cb;
 static struct genfb_mode_callback mode_cb;
@@ -1113,7 +1108,6 @@ static void
 populate_fbinfo(device_t dev, prop_dictionary_t dict)
 {
 #if NWSDISPLAY > 0 && NGENFB > 0
-	extern struct vcons_screen x86_genfb_console_screen;
 	struct rasops_info *ri = &x86_genfb_console_screen.scr_ri;
 #endif
 	const void *fbptr = lookup_bootinfo(BTINFO_FRAMEBUFFER);
@@ -1267,7 +1261,6 @@ device_pci_register(device_t dev, void *
 
 			prop_dictionary_set_bool(dict, "clear-screen", false);
 #if NWSDISPLAY > 0 && NGENFB > 0
-			extern struct vcons_screen x86_genfb_console_screen;
 			prop_dictionary_set_uint16(dict, "cursor-row",
 			    x86_genfb_console_screen.scr_ri.ri_crow);
 #endif

Index: src/sys/arch/x86/x86/genfb_machdep.c
diff -u src/sys/arch/x86/x86/genfb_machdep.c:1.19 src/sys/arch/x86/x86/genfb_machdep.c:1.19.4.1
--- src/sys/arch/x86/x86/genfb_machdep.c:1.19	Tue Sep 13 09:45:36 2022
+++ src/sys/arch/x86/x86/genfb_machdep.c	Wed Oct 18 15:14:24 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: genfb_machdep.c,v 1.19 2022/09/13 09:45:36 riastradh Exp $ */
+/* $NetBSD: genfb_machdep.c,v 1.19.4.1 2023/10/18 15:14:24 martin Exp $ */
 
 /*-
  * Copyright (c) 2009 Jared D. McNeill <jmcne...@invisible.ca>
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.19 2022/09/13 09:45:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.19.4.1 2023/10/18 15:14:24 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -62,7 +62,7 @@ struct vcons_screen x86_genfb_console_sc
 bool x86_genfb_use_shadowfb = true;
 
 #if NACPICA > 0
-extern int acpi_md_vesa_modenum;
+int acpi_md_vesa_modenum = 0;
 #endif
 
 static device_t x86_genfb_console_dev = NULL;

Index: src/sys/arch/x86/x86/hyperv.c
diff -u src/sys/arch/x86/x86/hyperv.c:1.15 src/sys/arch/x86/x86/hyperv.c:1.15.4.1
--- src/sys/arch/x86/x86/hyperv.c:1.15	Fri May 20 13:55:16 2022
+++ src/sys/arch/x86/x86/hyperv.c	Wed Oct 18 15:14:24 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: hyperv.c,v 1.15 2022/05/20 13:55:16 nonaka Exp $	*/
+/*	$NetBSD: hyperv.c,v 1.15.4.1 2023/10/18 15:14:24 martin Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012,2016-2017 Microsoft Corp.
@@ -33,7 +33,7 @@
  */
 #include <sys/cdefs.h>
 #ifdef __KERNEL_RCSID
-__KERNEL_RCSID(0, "$NetBSD: hyperv.c,v 1.15 2022/05/20 13:55:16 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hyperv.c,v 1.15.4.1 2023/10/18 15:14:24 martin Exp $");
 #endif
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: head/sys/dev/hyperv/vmbus/hyperv.c 331757 2018-03-30 02:25:12Z emaste $");
@@ -1048,7 +1048,6 @@ static void
 populate_fbinfo(device_t dev, prop_dictionary_t dict)
 {
 #if NWSDISPLAY > 0 && NGENFB > 0
-	extern struct vcons_screen x86_genfb_console_screen;
 	struct rasops_info *ri = &x86_genfb_console_screen.scr_ri;
 #endif
 	const void *fbptr = lookup_bootinfo(BTINFO_FRAMEBUFFER);
@@ -1140,7 +1139,6 @@ device_hyperv_register(device_t dev, voi
 
 			prop_dictionary_set_bool(dict, "clear-screen", false);
 #if NWSDISPLAY > 0 && NGENFB > 0
-			extern struct vcons_screen x86_genfb_console_screen;
 			prop_dictionary_set_uint16(dict, "cursor-row",
 			    x86_genfb_console_screen.scr_ri.ri_crow);
 #endif

Reply via email to