Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Style, once again.
details: https://anonhg.NetBSD.org/src/rev/5216b063305c
branches: trunk
changeset: 995423:5216b063305c
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Dec 22 08:35:04 2018 +0000
description:
Style, once again.
diffstat:
sys/arch/amd64/amd64/amd64_mainbus.c | 13 +++---
sys/arch/i386/i386/i386_mainbus.c | 14 +++---
sys/arch/x86/x86/mainbus.c | 64 ++++++++++++++++++------------------
sys/arch/xen/x86/xen_mainbus.c | 19 +++++-----
4 files changed, 54 insertions(+), 56 deletions(-)
diffs (truncated from 309 to 300 lines):
diff -r 1e44c653819c -r 5216b063305c sys/arch/amd64/amd64/amd64_mainbus.c
--- a/sys/arch/amd64/amd64/amd64_mainbus.c Sat Dec 22 07:45:58 2018 +0000
+++ b/sys/arch/amd64/amd64/amd64_mainbus.c Sat Dec 22 08:35:04 2018 +0000
@@ -1,5 +1,6 @@
-/* $NetBSD: amd64_mainbus.c,v 1.3 2018/12/22 07:45:58 cherry Exp $ */
+/* $NetBSD: amd64_mainbus.c,v 1.4 2018/12/22 08:35:04 maxv Exp $ */
/* NetBSD: mainbus.c,v 1.39 2018/12/02 08:19:44 cherry Exp */
+
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
*
@@ -31,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amd64_mainbus.c,v 1.3 2018/12/22 07:45:58 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amd64_mainbus.c,v 1.4 2018/12/22 08:35:04 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -105,7 +106,7 @@
* This is set when the ISA bus is attached. If it's not set by the
* time it's checked below, then mainbus attempts to attach an ISA.
*/
-int isa_has_been_seen;
+int isa_has_been_seen;
struct x86_isa_chipset x86_isa_chipset;
#if NISA > 0
static const struct isabus_attach_args mba_iba = {
@@ -120,7 +121,7 @@
int mp_nbus;
struct mp_intr_map *mp_intrs;
int mp_nintr;
-
+
int mp_isa_bus = -1;
int mp_eisa_bus = -1;
@@ -138,7 +139,6 @@
# endif
#endif
-
/*
* Probe for the mainbus; always succeeds.
*/
@@ -222,7 +222,6 @@
if (mp_verbose)
acpi_pci_link_state();
#endif
-
}
#endif
@@ -246,5 +245,5 @@
if (pnp)
aprint_normal("%s at %s", mba->mba_busname, pnp);
- return (UNCONF);
+ return UNCONF;
}
diff -r 1e44c653819c -r 5216b063305c sys/arch/i386/i386/i386_mainbus.c
--- a/sys/arch/i386/i386/i386_mainbus.c Sat Dec 22 07:45:58 2018 +0000
+++ b/sys/arch/i386/i386/i386_mainbus.c Sat Dec 22 08:35:04 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i386_mainbus.c,v 1.3 2018/12/22 07:45:58 cherry Exp $ */
+/* $NetBSD: i386_mainbus.c,v 1.4 2018/12/22 08:35:04 maxv Exp $ */
/* NetBSD: mainbus.c,v 1.104 2018/12/02 08:19:44 cherry Exp */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i386_mainbus.c,v 1.3 2018/12/22 07:45:58 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i386_mainbus.c,v 1.4 2018/12/22 08:35:04 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -124,7 +124,7 @@
* This is set when the ISA bus is attached. If it's not set by the
* time it's checked below, then mainbus attempts to attach an ISA.
*/
-int isa_has_been_seen;
+int isa_has_been_seen;
struct x86_isa_chipset x86_isa_chipset;
#if NISA > 0
static const struct isabus_attach_args mba_iba = {
@@ -137,16 +137,16 @@
/*
* Same as above, but for EISA.
*/
-int eisa_has_been_seen;
+int eisa_has_been_seen;
#if defined(MPBIOS) || NACPICA > 0
struct mp_bus *mp_busses;
int mp_nbus;
struct mp_intr_map *mp_intrs;
int mp_nintr;
-
-int mp_isa_bus = -1; /* XXX */
-int mp_eisa_bus = -1; /* XXX */
+
+int mp_isa_bus = -1; /* XXX */
+int mp_eisa_bus = -1; /* XXX */
extern bool acpi_present;
extern bool mpacpi_active;
diff -r 1e44c653819c -r 5216b063305c sys/arch/x86/x86/mainbus.c
--- a/sys/arch/x86/x86/mainbus.c Sat Dec 22 07:45:58 2018 +0000
+++ b/sys/arch/x86/x86/mainbus.c Sat Dec 22 08:35:04 2018 +0000
@@ -1,6 +1,6 @@
-/* $NetBSD: mainbus.c,v 1.1 2018/12/22 07:45:59 cherry Exp $ */
+/* $NetBSD: mainbus.c,v 1.2 2018/12/22 08:35:04 maxv Exp $ */
-/*-
+/*
* Copyright (c) 2018 The NetBSD Foundation, Inc.
* All rights reserved.
*
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.1 2018/12/22 07:45:59 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.2 2018/12/22 08:35:04 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -93,8 +93,7 @@
#endif
#if defined(__x86_64__) && !defined(XEN)
-void
-amd64_mainbus_attach(device_t, device_t, void *);
+void amd64_mainbus_attach(device_t, device_t, void *);
#endif
#if defined(XEN)
@@ -108,39 +107,39 @@
if (busname)
aprint_normal("%s at %s", cpuname, busname);
- return (UNCONF);
+ return UNCONF;
}
/*
- * On x86, cpus can be enumerated and attached to mainbus in mainly
- * two ways depending on the platform (configuration):
- * via MP BIOS tables, and via ACPI tables.
+ * On x86, CPUs can be enumerated and attached to mainbus in mainly two ways
+ * depending on the platform (configuration): via MP BIOS tables, and via
+ * ACPI tables.
*
- * Since cpus are not an optional part of computers, this attachment
- * is made common across all x86 architectures and modes, and thus
- * hard coded into the boot path, with the exception of XEN PV domU.
+ * Since CPUs are not an optional part of computers, this attachment is made
+ * common across all x86 architectures and modes, and thus hard-coded into
+ * the boot path, with the exception of XEN PV domU.
*
- * Along with cpus, apics come in various shapes and forms, and to
- * accommodate for the configurable ioapic topology, the "ioapicbus"
- * is also enumerated here as part of the mpbios/mpacpi probe path.
+ * Along with CPUs, APICs come in various shapes and forms, and to accommodate
+ * for the configurable ioapic topology, the "ioapicbus" is also enumerated
+ * here as part of the mpbios/mpacpi probe path.
*
- * All other busses are attached variously depending on the
- * platform architecture and config(5)
+ * All other busses are attached variously depending on the platform
+ * architecture and config(5).
*
* These configurations and attach orderings for various platforms are
* currently respectively driven in the functions:
*
- * i386_mainbus_attach();
- * amd64_mainbus_attach();
- * xen_mainbus_attach();
+ * i386_mainbus_attach();
+ * amd64_mainbus_attach();
+ * xen_mainbus_attach();
*
- * This arrangement gives us the flexibility to do things such as
- * dynamic attach path traversal at boot time, depending on the
- * "mode" of operation, ie; virtualition aware or native.
+ * This arrangement gives us the flexibility to do things such as dynamic
+ * attach path traversal at boot time, depending on the "mode" of operation,
+ * ie: virtualition aware or native.
*
- * For (a contrived) eg: XEN PVHVM would allow us to attach pci(9)
- * either via hypervisorbus or mainbus depending on if the kernel is
- * running under the hypervisor or not.
+ * For (a contrived) eg: XEN PVHVM would allow us to attach pci(9) either via
+ * hypervisorbus or mainbus depending on if the kernel is running under the
+ * hypervisor or not.
*/
static void
@@ -194,18 +193,17 @@
#endif
if (numcpus == 0) {
struct cpu_attach_args caa;
-
+
memset(&caa, 0, sizeof(caa));
caa.cpu_number = 0;
caa.cpu_role = CPU_ROLE_SP;
caa.cpu_func = 0;
-
+
config_found_ia(self, "cpubus", &caa, mainbus_cpu_print);
}
-#if NACPICA > 0
+#if NACPICA > 0
}
#endif
-
}
int
@@ -238,7 +236,8 @@
#endif
}
-int mainbus_rescan(device_t self, const char *ifattr, const int *locators)
+int
+mainbus_rescan(device_t self, const char *ifattr, const int *locators)
{
#if defined(__i386__) && !defined(XEN)
return i386_mainbus_rescan(self, ifattr, locators);
@@ -246,7 +245,8 @@
return ENOTTY; /* Inappropriate ioctl for this device */
}
-void mainbus_childdetached(device_t self, device_t child)
+void
+mainbus_childdetached(device_t self, device_t child)
{
#if defined(__i386__) && !defined(XEN)
i386_mainbus_childdetached(self, child);
diff -r 1e44c653819c -r 5216b063305c sys/arch/xen/x86/xen_mainbus.c
--- a/sys/arch/xen/x86/xen_mainbus.c Sat Dec 22 07:45:58 2018 +0000
+++ b/sys/arch/xen/x86/xen_mainbus.c Sat Dec 22 08:35:04 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xen_mainbus.c,v 1.3 2018/12/22 07:45:58 cherry Exp $ */
+/* $NetBSD: xen_mainbus.c,v 1.4 2018/12/22 08:35:04 maxv Exp $ */
/* NetBSD: mainbus.c,v 1.19 2017/05/23 08:54:39 nonaka Exp */
/* NetBSD: mainbus.c,v 1.53 2003/10/27 14:11:47 junyoung Exp */
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xen_mainbus.c,v 1.3 2018/12/22 07:45:58 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_mainbus.c,v 1.4 2018/12/22 08:35:04 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -67,16 +67,16 @@
#include <dev/pci/pcivar.h>
#if NACPICA > 0
#include <dev/acpi/acpivar.h>
-#include <xen/mpacpi.h>
+#include <xen/mpacpi.h>
#endif /* NACPICA > 0 */
#ifdef MPBIOS
-#include <machine/mpbiosvar.h>
+#include <machine/mpbiosvar.h>
#endif /* MPBIOS */
#ifdef PCI_BUS_FIXUP
#include <arch/x86/pci/pci_bus_fixup.h>
#ifdef PCI_ADDR_FIXUP
#include <arch/x86/pci/pci_addr_fixup.h>
-#endif
+#endif
#endif
#if defined(MPBIOS) || NACPICA > 0
@@ -84,9 +84,9 @@
int mp_nbus;
struct mp_intr_map *mp_intrs;
int mp_nintr;
-
-int mp_isa_bus = -1; /* XXX */
-int mp_eisa_bus = -1; /* XXX */
+
+int mp_isa_bus = -1; /* XXX */
+int mp_eisa_bus = -1; /* XXX */
#ifdef MPVERBOSE
int mp_verbose = 1;
@@ -148,7 +148,6 @@
/* save/restore for Xen */
if (!pmf_device_register(self, NULL, NULL))
aprint_error_dev(self, "couldn't establish power handler\n");
-
}
Home |
Main Index |
Thread Index |
Old Index