summaryrefslogtreecommitdiff
path: root/arch/x86/machine/lapic.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2016-12-09 01:41:06 +0100
committerRichard Braun <rbraun@sceen.net>2016-12-09 01:41:06 +0100
commit39c13b3b84b34e0938220126c8f147d2b0b6ac89 (patch)
tree92accef33f04f49a01765e00ec026b092ae0c8ca /arch/x86/machine/lapic.c
parent84c92cd2be8bc4aea6c14a186f79c2277f0fd4aa (diff)
Force brackets around one-line conditional statements
This change was done using astyle, with a few manual editing here and there.
Diffstat (limited to 'arch/x86/machine/lapic.c')
-rw-r--r--arch/x86/machine/lapic.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/machine/lapic.c b/arch/x86/machine/lapic.c
index 994aef6..26b0dd5 100644
--- a/arch/x86/machine/lapic.c
+++ b/arch/x86/machine/lapic.c
@@ -247,13 +247,15 @@ lapic_setup(uint32_t map_addr)
lapic_map = vm_kmem_map_pa(map_addr, sizeof(*lapic_map), NULL, NULL);
- if (lapic_map == NULL)
+ if (lapic_map == NULL) {
panic("lapic: unable to map registers in kernel map");
+ }
value = lapic_read(&lapic_map->version);
- if ((value & LAPIC_VERSION_MASK) != LAPIC_VERSION_MASK)
+ if ((value & LAPIC_VERSION_MASK) != LAPIC_VERSION_MASK) {
panic("lapic: external local APIC not supported");
+ }
lapic_setup_registers();
lapic_setup_timer();
@@ -268,8 +270,9 @@ lapic_ap_setup(void)
static void
lapic_ipi(uint32_t apic_id, uint32_t icr)
{
- if ((icr & LAPIC_ICR_DEST_MASK) == 0)
+ if ((icr & LAPIC_ICR_DEST_MASK) == 0) {
lapic_write(&lapic_map->icr_high, apic_id << LAPIC_DEST_SHIFT);
+ }
lapic_write(&lapic_map->icr_low, icr & ~LAPIC_ICR_RESERVED);
}