Module Name: src
Committed By: msaitoh
Date: Fri Jul 17 06:41:18 UTC 2015
Modified Files:
src/sys/arch/x86/x86: ioapic.c lapic.c mpacpi.c mpbios.c
Log Message:
KNF. No functional change.
To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/x86/x86/ioapic.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/x86/x86/lapic.c
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/x86/x86/mpacpi.c
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/x86/x86/mpbios.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/x86/ioapic.c
diff -u src/sys/arch/x86/x86/ioapic.c:1.50 src/sys/arch/x86/x86/ioapic.c:1.51
--- src/sys/arch/x86/x86/ioapic.c:1.50 Mon Apr 27 07:03:58 2015
+++ src/sys/arch/x86/x86/ioapic.c Fri Jul 17 06:41:18 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: ioapic.c,v 1.50 2015/04/27 07:03:58 knakahara Exp $ */
+/* $NetBSD: ioapic.c,v 1.51 2015/07/17 06:41:18 msaitoh Exp $ */
/*-
* Copyright (c) 2000, 2009 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.50 2015/04/27 07:03:58 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.51 2015/07/17 06:41:18 msaitoh Exp $");
#include "opt_ddb.h"
@@ -305,7 +305,8 @@ ioapic_attach(device_t parent, device_t
sc->sc_pic.pic_edge_stubs = ioapic_edge_stubs;
sc->sc_pic.pic_level_stubs = ioapic_level_stubs;
- apic_id = (ioapic_read(sc,IOAPIC_ID)&IOAPIC_ID_MASK)>>IOAPIC_ID_SHIFT;
+ apic_id = (ioapic_read(sc, IOAPIC_ID) & IOAPIC_ID_MASK)
+ >> IOAPIC_ID_SHIFT;
ver_sz = ioapic_read(sc, IOAPIC_VER);
if (ver_sz == 0xffffffff) {
@@ -376,19 +377,19 @@ ioapic_attach(device_t parent, device_t
aprint_debug_dev(sc->sc_dev, "misconfigured as apic %d\n",
apic_id);
- ioapic_write(sc,IOAPIC_ID,
- (ioapic_read(sc,IOAPIC_ID)&~IOAPIC_ID_MASK)
- |(sc->sc_pic.pic_apicid<<IOAPIC_ID_SHIFT));
+ ioapic_write(sc, IOAPIC_ID,
+ (ioapic_read(sc, IOAPIC_ID) & ~IOAPIC_ID_MASK)
+ | (sc->sc_pic.pic_apicid << IOAPIC_ID_SHIFT));
- apic_id = (ioapic_read(sc,IOAPIC_ID)&IOAPIC_ID_MASK)>>IOAPIC_ID_SHIFT;
+ apic_id = (ioapic_read(sc, IOAPIC_ID) & IOAPIC_ID_MASK)
+ >> IOAPIC_ID_SHIFT;
- if (apic_id != sc->sc_pic.pic_apicid) {
- aprint_error_dev(sc->sc_dev, "can't remap to apid %d\n",
- sc->sc_pic.pic_apicid);
- } else {
+ if (apic_id != sc->sc_pic.pic_apicid)
+ aprint_error_dev(sc->sc_dev,
+ "can't remap to apid %d\n", sc->sc_pic.pic_apicid);
+ else
aprint_debug_dev(sc->sc_dev, "remapped to apic %d\n",
sc->sc_pic.pic_apicid);
- }
}
out:
@@ -426,7 +427,8 @@ apic_set_redir(struct ioapic_softc *sc,
} else {
redhi = (ci->ci_cpuid << IOAPIC_REDHI_DEST_SHIFT);
redlo |= (idt_vec & 0xff);
- redlo |= (IOAPIC_REDLO_DEL_FIXED<<IOAPIC_REDLO_DEL_SHIFT);
+ redlo |= IOAPIC_REDLO_DEL_FIXED
+ << IOAPIC_REDLO_DEL_SHIFT;
redlo &= ~IOAPIC_REDLO_DSTMOD;
/* XXX derive this bit from BIOS info */
@@ -434,7 +436,8 @@ apic_set_redir(struct ioapic_softc *sc,
redlo |= IOAPIC_REDLO_LEVEL;
else
redlo &= ~IOAPIC_REDLO_LEVEL;
- if (map != NULL && ((map->flags & 3) == MPS_INTPO_DEF)) {
+ if ((map != NULL)
+ && ((map->flags & 3) == MPS_INTPO_DEF)) {
if (pp->ip_type == IST_LEVEL)
redlo |= IOAPIC_REDLO_ACTLO;
else
@@ -480,17 +483,17 @@ ioapic_reenable(void)
aprint_normal("%s reenabling\n", device_xname(ioapics->sc_dev));
for (sc = ioapics; sc != NULL; sc = sc->sc_next) {
- apic_id = (ioapic_read(sc,IOAPIC_ID)&IOAPIC_ID_MASK)>>IOAPIC_ID_SHIFT;
+ apic_id = (ioapic_read(sc, IOAPIC_ID) & IOAPIC_ID_MASK)
+ >> IOAPIC_ID_SHIFT;
if (apic_id != sc->sc_pic.pic_apicid) {
- ioapic_write(sc,IOAPIC_ID,
- (ioapic_read(sc,IOAPIC_ID)&~IOAPIC_ID_MASK)
- |(sc->sc_pic.pic_apicid<<IOAPIC_ID_SHIFT));
+ ioapic_write(sc, IOAPIC_ID,
+ (ioapic_read(sc, IOAPIC_ID) & ~IOAPIC_ID_MASK)
+ | (sc->sc_pic.pic_apicid << IOAPIC_ID_SHIFT));
}
- for (p = 0; p < sc->sc_apic_sz; p++) {
+ for (p = 0; p < sc->sc_apic_sz; p++)
apic_set_redir(sc, p, sc->sc_pins[p].ip_vector,
sc->sc_pins[p].ip_cpu);
- }
}
ioapic_enable();
@@ -554,7 +557,6 @@ ioapic_hwunmask(struct pic *pic, int pin
static void
ioapic_addroute(struct pic *pic, struct cpu_info *ci, int pin,
int idtvec, int type)
-
{
struct ioapic_softc *sc = pic->pic_ioapic;
struct ioapic_pin *pp;
@@ -570,6 +572,7 @@ static void
ioapic_delroute(struct pic *pic, struct cpu_info *ci, int pin,
int idtvec, int type)
{
+
ioapic_hwmask(pic, pin);
}
Index: src/sys/arch/x86/x86/lapic.c
diff -u src/sys/arch/x86/x86/lapic.c:1.49 src/sys/arch/x86/x86/lapic.c:1.50
--- src/sys/arch/x86/x86/lapic.c:1.49 Wed Jul 15 04:49:02 2015
+++ src/sys/arch/x86/x86/lapic.c Fri Jul 17 06:41:18 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: lapic.c,v 1.49 2015/07/15 04:49:02 msaitoh Exp $ */
+/* $NetBSD: lapic.c,v 1.50 2015/07/17 06:41:18 msaitoh Exp $ */
/*-
* Copyright (c) 2000, 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.49 2015/07/15 04:49:02 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.50 2015/07/17 06:41:18 msaitoh Exp $");
#include "opt_ddb.h"
#include "opt_mpbios.h" /* for MPDEBUG */
@@ -155,9 +155,9 @@ lapic_set_lvt(void)
#ifdef MULTIPROCESSOR
if (mp_verbose) {
- apic_format_redir (device_xname(ci->ci_dev), "prelint", 0, 0,
+ apic_format_redir(device_xname(ci->ci_dev), "prelint", 0, 0,
i82489_readreg(LAPIC_LVINT0));
- apic_format_redir (device_xname(ci->ci_dev), "prelint", 1, 0,
+ apic_format_redir(device_xname(ci->ci_dev), "prelint", 1, 0,
i82489_readreg(LAPIC_LVINT1));
}
#endif
@@ -317,11 +317,11 @@ lapic_initclocks(void)
* then set divisor,
* then unmask and set the vector.
*/
- i82489_writereg (LAPIC_LVTT, LAPIC_LVTT_TM|LAPIC_LVTT_M);
- i82489_writereg (LAPIC_DCR_TIMER, LAPIC_DCRT_DIV1);
- i82489_writereg (LAPIC_ICR_TIMER, lapic_tval);
- i82489_writereg (LAPIC_LVTT, LAPIC_LVTT_TM|LAPIC_TIMER_VECTOR);
- i82489_writereg (LAPIC_EOI, 0);
+ i82489_writereg(LAPIC_LVTT, LAPIC_LVTT_TM | LAPIC_LVTT_M);
+ i82489_writereg(LAPIC_DCR_TIMER, LAPIC_DCRT_DIV1);
+ i82489_writereg(LAPIC_ICR_TIMER, lapic_tval);
+ i82489_writereg(LAPIC_LVTT, LAPIC_LVTT_TM | LAPIC_TIMER_VECTOR);
+ i82489_writereg(LAPIC_EOI, 0);
}
extern unsigned int gettick(void); /* XXX put in header file */
@@ -354,9 +354,9 @@ lapic_calibrate_timer(struct cpu_info *c
* Configure timer to one-shot, interrupt masked,
* large positive number.
*/
- i82489_writereg (LAPIC_LVTT, LAPIC_LVTT_M);
- i82489_writereg (LAPIC_DCR_TIMER, LAPIC_DCRT_DIV1);
- i82489_writereg (LAPIC_ICR_TIMER, 0x80000000);
+ i82489_writereg(LAPIC_LVTT, LAPIC_LVTT_M);
+ i82489_writereg(LAPIC_DCR_TIMER, LAPIC_DCRT_DIV1);
+ i82489_writereg(LAPIC_ICR_TIMER, 0x80000000);
x86_disable_intr();
@@ -390,10 +390,10 @@ lapic_calibrate_timer(struct cpu_info *c
lapic_tval = (lapic_per_second * 2) / hz;
lapic_tval = (lapic_tval / 2) + (lapic_tval & 0x1);
- i82489_writereg (LAPIC_LVTT, LAPIC_LVTT_TM|LAPIC_LVTT_M
- |LAPIC_TIMER_VECTOR);
- i82489_writereg (LAPIC_DCR_TIMER, LAPIC_DCRT_DIV1);
- i82489_writereg (LAPIC_ICR_TIMER, lapic_tval);
+ i82489_writereg(LAPIC_LVTT, LAPIC_LVTT_TM | LAPIC_LVTT_M
+ | LAPIC_TIMER_VECTOR);
+ i82489_writereg(LAPIC_DCR_TIMER, LAPIC_DCRT_DIV1);
+ i82489_writereg(LAPIC_ICR_TIMER, lapic_tval);
/*
* Compute fixed-point ratios between cycles and
@@ -401,10 +401,10 @@ lapic_calibrate_timer(struct cpu_info *c
* in lapic_delay.
*/
- tmp = (1000000 * (uint64_t)1<<32) / lapic_per_second;
+ tmp = (1000000 * (uint64_t)1 << 32) / lapic_per_second;
lapic_frac_usec_per_cycle = tmp;
- tmp = (lapic_per_second * (uint64_t)1<<32) / 1000000;
+ tmp = (lapic_per_second * (uint64_t)1 << 32) / 1000000;
lapic_frac_cycle_per_usec = tmp;
@@ -494,9 +494,9 @@ x86_ipi_init(int target)
i82489_writereg(LAPIC_ESR, 0);
(void)i82489_readreg(LAPIC_ESR);
- if ((target&LAPIC_DEST_MASK)==0) {
+ if ((target&LAPIC_DEST_MASK)==0)
i82489_writereg(LAPIC_ICRHI, target<<LAPIC_ID_SHIFT);
- }
+
i82489_writereg(LAPIC_ICRLO, (target & LAPIC_DEST_MASK) |
LAPIC_DLMODE_INIT | LAPIC_LEVEL_ASSERT );
i82489_icr_wait();
@@ -505,13 +505,12 @@ x86_ipi_init(int target)
LAPIC_DLMODE_INIT | LAPIC_TRIGGER_LEVEL | LAPIC_LEVEL_DEASSERT);
i82489_icr_wait();
- if ((i82489_readreg(LAPIC_ICRLO) & LAPIC_DLSTAT_BUSY) != 0) {
+ if ((i82489_readreg(LAPIC_ICRLO) & LAPIC_DLSTAT_BUSY) != 0)
return EBUSY;
- }
+
esr = i82489_readreg(LAPIC_ESR);
- if (esr != 0) {
+ if (esr != 0)
aprint_debug("x86_ipi_init: ESR %08x\n", esr);
- }
return 0;
}
@@ -530,13 +529,12 @@ x86_ipi_startup(int target, int vec)
LAPIC_LEVEL_ASSERT);
i82489_icr_wait();
- if ((i82489_readreg(LAPIC_ICRLO) & LAPIC_DLSTAT_BUSY) != 0) {
+ if ((i82489_readreg(LAPIC_ICRLO) & LAPIC_DLSTAT_BUSY) != 0)
return EBUSY;
- }
+
esr = i82489_readreg(LAPIC_ESR);
- if (esr != 0) {
+ if (esr != 0)
aprint_debug("x86_ipi_startup: ESR %08x\n", esr);
- }
return 0;
}
@@ -614,14 +612,14 @@ lapic_dump(void)
{
struct cpu_info *ci = curcpu();
- apic_format_redir (device_xname(ci->ci_dev), "timer", 0, 0,
+ apic_format_redir(device_xname(ci->ci_dev), "timer", 0, 0,
i82489_readreg(LAPIC_LVTT));
- apic_format_redir (device_xname(ci->ci_dev), "pcint", 0, 0,
+ apic_format_redir(device_xname(ci->ci_dev), "pcint", 0, 0,
i82489_readreg(LAPIC_PCINT));
- apic_format_redir (device_xname(ci->ci_dev), "lint", 0, 0,
+ apic_format_redir(device_xname(ci->ci_dev), "lint", 0, 0,
i82489_readreg(LAPIC_LVINT0));
- apic_format_redir (device_xname(ci->ci_dev), "lint", 1, 0,
+ apic_format_redir(device_xname(ci->ci_dev), "lint", 1, 0,
i82489_readreg(LAPIC_LVINT1));
- apic_format_redir (device_xname(ci->ci_dev), "err", 0, 0,
+ apic_format_redir(device_xname(ci->ci_dev), "err", 0, 0,
i82489_readreg(LAPIC_LVERR));
}
Index: src/sys/arch/x86/x86/mpacpi.c
diff -u src/sys/arch/x86/x86/mpacpi.c:1.100 src/sys/arch/x86/x86/mpacpi.c:1.101
--- src/sys/arch/x86/x86/mpacpi.c:1.100 Wed Jul 15 07:29:13 2015
+++ src/sys/arch/x86/x86/mpacpi.c Fri Jul 17 06:41:18 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: mpacpi.c,v 1.100 2015/07/15 07:29:13 msaitoh Exp $ */
+/* $NetBSD: mpacpi.c,v 1.101 2015/07/17 06:41:18 msaitoh Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.100 2015/07/15 07:29:13 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.101 2015/07/17 06:41:18 msaitoh Exp $");
#include "acpica.h"
#include "opt_acpi.h"
@@ -201,7 +201,7 @@ mpacpi_nonpci_intr(ACPI_SUBTABLE_HEADER
pin = ioapic_nmi->GlobalIrq - pic->pic_vecbase;
mpi->ioapic_pin = pin;
mpi->bus_pin = -1;
- mpi->redir = (IOAPIC_REDLO_DEL_NMI<<IOAPIC_REDLO_DEL_SHIFT);
+ mpi->redir = (IOAPIC_REDLO_DEL_NMI << IOAPIC_REDLO_DEL_SHIFT);
#if NIOAPIC > 0
if (pic->pic_type == PIC_IOAPIC) {
pic->pic_ioapic->sc_pins[pin].ip_map = mpi;
@@ -224,7 +224,7 @@ mpacpi_nonpci_intr(ACPI_SUBTABLE_HEADER
mpi->type = MPS_INTTYPE_NMI;
mpi->ioapic_pin = lapic_nmi->Lint;
mpi->cpu_id = lapic_nmi->ProcessorId;
- mpi->redir = (IOAPIC_REDLO_DEL_NMI<<IOAPIC_REDLO_DEL_SHIFT);
+ mpi->redir = (IOAPIC_REDLO_DEL_NMI << IOAPIC_REDLO_DEL_SHIFT);
mpi->global_int = -1;
break;
case ACPI_MADT_TYPE_INTERRUPT_OVERRIDE:
@@ -233,7 +233,7 @@ mpacpi_nonpci_intr(ACPI_SUBTABLE_HEADER
printf("mpacpi: ISA interrupt override %d -> %d (%d/%d)\n",
isa_ovr->SourceIrq, isa_ovr->GlobalIrq,
isa_ovr->IntiFlags & ACPI_MADT_POLARITY_MASK,
- (isa_ovr->IntiFlags & ACPI_MADT_TRIGGER_MASK) >> 2);
+ (isa_ovr->IntiFlags & ACPI_MADT_TRIGGER_MASK) >>2);
}
if (isa_ovr->SourceIrq > 15 || isa_ovr->SourceIrq == 2 ||
(isa_ovr->SourceIrq == 0 && isa_ovr->GlobalIrq == 2 &&
@@ -315,7 +315,7 @@ mpacpi_nonpci_intr(ACPI_SUBTABLE_HEADER
mpi->type = MPS_INTTYPE_NMI;
mpi->ioapic_pin = x2apic_nmi->Lint;
mpi->cpu_id = x2apic_nmi->Uid;
- mpi->redir = (IOAPIC_REDLO_DEL_NMI<<IOAPIC_REDLO_DEL_SHIFT);
+ mpi->redir = (IOAPIC_REDLO_DEL_NMI << IOAPIC_REDLO_DEL_SHIFT);
mpi->global_int = -1;
break;
@@ -651,7 +651,7 @@ mpacpi_pciroute(struct mpacpi_pcibus *mp
continue;
/* Defaults for PCI (active low, level triggered) */
mpi->redir =
- (IOAPIC_REDLO_DEL_FIXED<<IOAPIC_REDLO_DEL_SHIFT) |
+ (IOAPIC_REDLO_DEL_FIXED <<IOAPIC_REDLO_DEL_SHIFT) |
IOAPIC_REDLO_LEVEL | IOAPIC_REDLO_ACTLO;
mpi->ioapic = pic;
pin = ptrp->SourceIndex - pic->pic_vecbase;
@@ -790,7 +790,7 @@ mpacpi_config_irouting(struct acpi_softc
(pic->pic_apicid << APIC_INT_APIC_SHIFT) |
(i << APIC_INT_PIN_SHIFT);
mpi->redir =
- (IOAPIC_REDLO_DEL_FIXED<<IOAPIC_REDLO_DEL_SHIFT);
+ (IOAPIC_REDLO_DEL_FIXED << IOAPIC_REDLO_DEL_SHIFT);
pic->pic_ioapic->sc_pins[i].ip_map = mpi;
} else
#endif
@@ -829,7 +829,7 @@ mpacpi_config_irouting(struct acpi_softc
static void
mpacpi_print_pci_intr(int intr)
{
- printf(" device %d INT_%c", (intr>>2)&0x1f, 'A' + (intr & 0x3));
+ printf(" device %d INT_%c", (intr >> 2) & 0x1f, 'A' + (intr & 0x3));
}
#endif
@@ -1052,7 +1052,7 @@ mpacpi_findintr_linkdev(struct mp_intr_m
if (pic->pic_type == PIC_IOAPIC) {
#if NIOAPIC > 0
- mip->redir = (IOAPIC_REDLO_DEL_FIXED<<IOAPIC_REDLO_DEL_SHIFT);
+ mip->redir = (IOAPIC_REDLO_DEL_FIXED <<IOAPIC_REDLO_DEL_SHIFT);
if (pol == MPS_INTPO_ACTLO)
mip->redir |= IOAPIC_REDLO_ACTLO;
if (trig == MPS_INTTR_LEVEL)
Index: src/sys/arch/x86/x86/mpbios.c
diff -u src/sys/arch/x86/x86/mpbios.c:1.64 src/sys/arch/x86/x86/mpbios.c:1.65
--- src/sys/arch/x86/x86/mpbios.c:1.64 Fri Jul 10 03:01:21 2015
+++ src/sys/arch/x86/x86/mpbios.c Fri Jul 17 06:41:18 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: mpbios.c,v 1.64 2015/07/10 03:01:21 msaitoh Exp $ */
+/* $NetBSD: mpbios.c,v 1.65 2015/07/17 06:41:18 msaitoh Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpbios.c,v 1.64 2015/07/10 03:01:21 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpbios.c,v 1.65 2015/07/17 06:41:18 msaitoh Exp $");
#include "acpica.h"
#include "lapic.h"
@@ -338,7 +338,8 @@ mpbios_probe(device_t self)
found:
if (mp_verbose)
- aprint_verbose_dev(self, "MP floating pointer found in %s at 0x%jx\n",
+ aprint_verbose_dev(self,
+ "MP floating pointer found in %s at 0x%jx\n",
loc_where[scan_loc], (uintmax_t)mp_fp_map.pa);
if (mp_fps->pap == 0) {
@@ -360,7 +361,8 @@ mpbios_probe(device_t self)
mp_cth = mpbios_map (cthpa, cthlen, &mp_cfg_table_map);
if (mp_verbose)
- aprint_verbose_dev(self, "MP config table at 0x%jx, %d bytes long\n",
+ aprint_verbose_dev(self,
+ "MP config table at 0x%jx, %d bytes long\n",
(uintmax_t)cthpa, cthlen);
if (mp_cth->signature != MP_CT_SIG) {
@@ -370,7 +372,8 @@ mpbios_probe(device_t self)
}
if (mpbios_cksum(mp_cth, cthlen)) {
- aprint_error_dev(self, "MP Configuration Table checksum mismatch\n");
+ aprint_error_dev(self,
+ "MP Configuration Table checksum mismatch\n");
goto err;
}
return 10;
@@ -425,7 +428,8 @@ mpbios_search(device_t self, paddr_t sta
const uint8_t *base = mpbios_map (start, count, &t);
if (mp_verbose)
- aprint_verbose_dev(self, "scanning 0x%jx to 0x%jx for MP signature\n",
+ aprint_verbose_dev(self,
+ "scanning 0x%jx to 0x%jx for MP signature\n",
(uintmax_t)start, (uintmax_t)(start+count-sizeof(*m)));
for (i = 0; i <= end; i += 4) {
@@ -679,8 +683,7 @@ mpbios_scan(device_t self, int *ncpup)
type = *position;
if (type >= MPS_MCT_NTYPES) {
aprint_error_dev(self, "unknown entry type %x"
- " in MP config table\n",
- type);
+ " in MP config table\n", type);
break;
}
mp_conf[type].count++;
@@ -765,8 +768,8 @@ mpbios_scan(device_t self, int *ncpup)
cur_intr++;
break;
default:
- aprint_error_dev(self, "unknown entry type %x in MP config table\n",
- type);
+ aprint_error_dev(self, "unknown entry type %x"
+ " in MP config table\n", type);
/* NOTREACHED */
return;
}
@@ -774,7 +777,8 @@ mpbios_scan(device_t self, int *ncpup)
position += mp_conf[type].length;
}
if (mp_verbose && mp_cth->ext_len)
- aprint_verbose_dev(self, "MP WARNING: %d bytes of extended entries not examined\n",
+ aprint_verbose_dev(self, "MP WARNING: %d bytes of"
+ " extended entries not examined\n",
mp_cth->ext_len);
}
/* Clean up. */
@@ -910,9 +914,9 @@ mpbios_dflt_conf_int(device_t self, cons
mpi.src_bus_id = 0;
mpi.dst_apic_id = DFLT_IOAPIC_ID;
/*
- * Compliant systems must convert active-low, level-triggered interrupts
- * to active-high by external inverters before INTINx (table 5-1;
- * sec. 5.3.2).
+ * Compliant systems must convert active-low, level-triggered
+ * interrupts to active-high by external inverters before INTINx
+ *(table 5-1; sec. 5.3.2).
*/
if (dflt_conf->flags & ELCR_INV) {
#ifdef X86_MPBIOS_SUPPORT_EISA
@@ -924,9 +928,9 @@ mpbios_dflt_conf_int(device_t self, cons
} else if (dflt_conf->flags & MCA_INV) {
/* MCA systems have fixed inverters. */
level_inv = 0xffffU;
- } else {
+ } else
level_inv = 0;
- }
+
for (i = 0; i < __arraycount(dflt_bus_irq_tab[0]); i++) {
if (dflt_bus_irq[i] >= 0) {
mpi.src_bus_irq = (uint8_t)dflt_bus_irq[i];
@@ -1061,7 +1065,7 @@ mp_cfg_eisa_intr(const struct mpbios_int
mp_cfg_special_intr(entry, redir);
return;
}
- *redir |= (IOAPIC_REDLO_DEL_FIXED<<IOAPIC_REDLO_DEL_SHIFT);
+ *redir |= (IOAPIC_REDLO_DEL_FIXED << IOAPIC_REDLO_DEL_SHIFT);
switch (mpstrig) {
case MPS_INTTR_LEVEL:
@@ -1076,7 +1080,7 @@ mp_cfg_eisa_intr(const struct mpbios_int
* earlier.
*/
if (mp_busses[entry->src_bus_id].mb_data &
- (1<<entry->src_bus_irq)) {
+ (1 << entry->src_bus_irq)) {
*redir |= IOAPIC_REDLO_LEVEL;
} else {
*redir &= ~IOAPIC_REDLO_LEVEL;
@@ -1112,7 +1116,7 @@ mp_cfg_isa_intr(const struct mpbios_int
mp_cfg_special_intr(entry, redir);
return;
}
- *redir |= (IOAPIC_REDLO_DEL_FIXED<<IOAPIC_REDLO_DEL_SHIFT);
+ *redir |= (IOAPIC_REDLO_DEL_FIXED << IOAPIC_REDLO_DEL_SHIFT);
switch (mpstrig) {
case MPS_INTTR_LEVEL:
@@ -1212,10 +1216,9 @@ mpbios_bus(const uint8_t *ent, device_t
printf("oops: multiple isa busses?\n");
else
mp_isa_bus = bus_id;
- } else {
+ } else
aprint_error_dev(self, "unsupported bus type %6.6s\n",
entry->bus_type);
- }
}
@@ -1335,9 +1338,8 @@ mpbios_int(const uint8_t *ent, int entty
}
/*
- * XXX workaround for broken BIOSs that put the ACPI
- * global interrupt number in the entry, not the pin
- * number.
+ * XXX workaround for broken BIOSs that put the ACPI global
+ * interrupt number in the entry, not the pin number.
*/
if (pin >= sc->sc_apic_sz) {
sc2 = intr_findpic(pin);
@@ -1362,9 +1364,8 @@ mpbios_int(const uint8_t *ent, int entty
printf("%s: conflicting map entries for pin %d\n",
device_xname(sc->sc_dev), pin);
}
- } else {
+ } else
sc->sc_pins[pin].ip_map = mpi;
- }
} else {
if (pin >= 2)
printf("pin %d of local apic doesn't exist!\n", pin);
@@ -1376,7 +1377,7 @@ mpbios_int(const uint8_t *ent, int entty
}
mpi->ioapic_ih = APIC_INT_VIA_APIC |
- ((id<<APIC_INT_APIC_SHIFT) | ((pin<<APIC_INT_PIN_SHIFT)));
+ ((id << APIC_INT_APIC_SHIFT) | (pin << APIC_INT_PIN_SHIFT));
if (mp_verbose) {
char buf[256];
@@ -1429,5 +1430,4 @@ mpbios_pci_attach_hook(device_t parent,
mpb->mb_pci_chipset_tag = pba->pba_pc;
return 0;
}
-
#endif