Commit efec3b9a authored by Andi Kleen's avatar Andi Kleen Committed by Andi Kleen

[PATCH] Fix up some non linuxy style in ACPI functions in mpparse.c

No functional changes.

Cc: len.brown@intel.com
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent 276ec1a7
...@@ -614,23 +614,17 @@ void __init find_smp_config(void) ...@@ -614,23 +614,17 @@ void __init find_smp_config(void)
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
void __init mp_register_lapic_address ( void __init mp_register_lapic_address(u64 address)
u64 address)
{ {
mp_lapic_addr = (unsigned long) address; mp_lapic_addr = (unsigned long) address;
set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr); set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr);
if (boot_cpu_id == -1U) if (boot_cpu_id == -1U)
boot_cpu_id = GET_APIC_ID(apic_read(APIC_ID)); boot_cpu_id = GET_APIC_ID(apic_read(APIC_ID));
Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid); Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid);
} }
void __cpuinit mp_register_lapic (u8 id, u8 enabled)
void __cpuinit mp_register_lapic (
u8 id,
u8 enabled)
{ {
struct mpc_config_processor processor; struct mpc_config_processor processor;
int boot_cpu = 0; int boot_cpu = 0;
...@@ -668,11 +662,9 @@ static struct mp_ioapic_routing { ...@@ -668,11 +662,9 @@ static struct mp_ioapic_routing {
u32 pin_programmed[4]; u32 pin_programmed[4];
} mp_ioapic_routing[MAX_IO_APICS]; } mp_ioapic_routing[MAX_IO_APICS];
static int mp_find_ioapic(int gsi)
static int mp_find_ioapic (
int gsi)
{ {
int i = 0; int i = 0;
/* Find the IOAPIC that manages this GSI. */ /* Find the IOAPIC that manages this GSI. */
for (i = 0; i < nr_ioapics; i++) { for (i = 0; i < nr_ioapics; i++) {
...@@ -682,17 +674,12 @@ static int mp_find_ioapic ( ...@@ -682,17 +674,12 @@ static int mp_find_ioapic (
} }
printk(KERN_ERR "ERROR: Unable to locate IOAPIC for GSI %d\n", gsi); printk(KERN_ERR "ERROR: Unable to locate IOAPIC for GSI %d\n", gsi);
return -1; return -1;
} }
void __init mp_register_ioapic ( void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base)
u8 id,
u32 address,
u32 gsi_base)
{ {
int idx = 0; int idx = 0;
if (nr_ioapics >= MAX_IO_APICS) { if (nr_ioapics >= MAX_IO_APICS) {
printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded "
...@@ -729,16 +716,10 @@ void __init mp_register_ioapic ( ...@@ -729,16 +716,10 @@ void __init mp_register_ioapic (
mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr, mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr,
mp_ioapic_routing[idx].gsi_start, mp_ioapic_routing[idx].gsi_start,
mp_ioapic_routing[idx].gsi_end); mp_ioapic_routing[idx].gsi_end);
return;
} }
void __init
void __init mp_override_legacy_irq ( mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi)
u8 bus_irq,
u8 polarity,
u8 trigger,
u32 gsi)
{ {
struct mpc_config_intsrc intsrc; struct mpc_config_intsrc intsrc;
int ioapic = -1; int ioapic = -1;
...@@ -776,16 +757,13 @@ void __init mp_override_legacy_irq ( ...@@ -776,16 +757,13 @@ void __init mp_override_legacy_irq (
mp_irqs[mp_irq_entries] = intsrc; mp_irqs[mp_irq_entries] = intsrc;
if (++mp_irq_entries == MAX_IRQ_SOURCES) if (++mp_irq_entries == MAX_IRQ_SOURCES)
panic("Max # of irq sources exceeded!\n"); panic("Max # of irq sources exceeded!\n");
return;
} }
void __init mp_config_acpi_legacy_irqs(void)
void __init mp_config_acpi_legacy_irqs (void)
{ {
struct mpc_config_intsrc intsrc; struct mpc_config_intsrc intsrc;
int i = 0; int i = 0;
int ioapic = -1; int ioapic = -1;
/* /*
* Fabricate the legacy ISA bus (bus #31). * Fabricate the legacy ISA bus (bus #31).
...@@ -843,24 +821,22 @@ void __init mp_config_acpi_legacy_irqs (void) ...@@ -843,24 +821,22 @@ void __init mp_config_acpi_legacy_irqs (void)
if (++mp_irq_entries == MAX_IRQ_SOURCES) if (++mp_irq_entries == MAX_IRQ_SOURCES)
panic("Max # of irq sources exceeded!\n"); panic("Max # of irq sources exceeded!\n");
} }
return;
} }
#define MAX_GSI_NUM 4096 #define MAX_GSI_NUM 4096
int mp_register_gsi(u32 gsi, int triggering, int polarity) int mp_register_gsi(u32 gsi, int triggering, int polarity)
{ {
int ioapic = -1; int ioapic = -1;
int ioapic_pin = 0; int ioapic_pin = 0;
int idx, bit = 0; int idx, bit = 0;
static int pci_irq = 16; static int pci_irq = 16;
/* /*
* Mapping between Global System Interrupts, which * Mapping between Global System Interrupts, which
* represent all possible interrupts, to the IRQs * represent all possible interrupts, to the IRQs
* assigned to actual devices. * assigned to actual devices.
*/ */
static int gsi_to_irq[MAX_GSI_NUM]; static int gsi_to_irq[MAX_GSI_NUM];
if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC) if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC)
return gsi; return gsi;
...@@ -934,5 +910,4 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity) ...@@ -934,5 +910,4 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
polarity == ACPI_ACTIVE_HIGH ? 0 : 1); polarity == ACPI_ACTIVE_HIGH ? 0 : 1);
return gsi; return gsi;
} }
#endif /*CONFIG_ACPI*/ #endif /*CONFIG_ACPI*/
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment