diff options
author | Andi Kleen <ak@suse.de> | 2006-09-26 04:52:30 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 04:52:30 -0400 |
commit | efec3b9a3282714c8441b9bf476f8358bed9ecaa (patch) | |
tree | f6e063e344f1d6d43d150834bd588dc0e37bc84a /arch | |
parent | 276ec1a76ad204d47947894a914e10e798400ffb (diff) |
[PATCH] Fix up some non linuxy style in ACPI functions in mpparse.c
No functional changes.
Cc: len.brown@intel.com
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86_64/kernel/mpparse.c | 57 |
1 files changed, 16 insertions, 41 deletions
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c index 0cc88f7f288b..d63f849aea2c 100644 --- a/arch/x86_64/kernel/mpparse.c +++ b/arch/x86_64/kernel/mpparse.c | |||
@@ -614,23 +614,17 @@ void __init find_smp_config(void) | |||
614 | 614 | ||
615 | #ifdef CONFIG_ACPI | 615 | #ifdef CONFIG_ACPI |
616 | 616 | ||
617 | void __init mp_register_lapic_address ( | 617 | void __init mp_register_lapic_address(u64 address) |
618 | u64 address) | ||
619 | { | 618 | { |
620 | mp_lapic_addr = (unsigned long) address; | 619 | mp_lapic_addr = (unsigned long) address; |
621 | |||
622 | set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr); | 620 | set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr); |
623 | |||
624 | if (boot_cpu_id == -1U) | 621 | if (boot_cpu_id == -1U) |
625 | boot_cpu_id = GET_APIC_ID(apic_read(APIC_ID)); | 622 | boot_cpu_id = GET_APIC_ID(apic_read(APIC_ID)); |
626 | 623 | ||
627 | Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid); | 624 | Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid); |
628 | } | 625 | } |
629 | 626 | ||
630 | 627 | void __cpuinit mp_register_lapic (u8 id, u8 enabled) | |
631 | void __cpuinit mp_register_lapic ( | ||
632 | u8 id, | ||
633 | u8 enabled) | ||
634 | { | 628 | { |
635 | struct mpc_config_processor processor; | 629 | struct mpc_config_processor processor; |
636 | int boot_cpu = 0; | 630 | int boot_cpu = 0; |
@@ -668,11 +662,9 @@ static struct mp_ioapic_routing { | |||
668 | u32 pin_programmed[4]; | 662 | u32 pin_programmed[4]; |
669 | } mp_ioapic_routing[MAX_IO_APICS]; | 663 | } mp_ioapic_routing[MAX_IO_APICS]; |
670 | 664 | ||
671 | 665 | static int mp_find_ioapic(int gsi) | |
672 | static int mp_find_ioapic ( | ||
673 | int gsi) | ||
674 | { | 666 | { |
675 | int i = 0; | 667 | int i = 0; |
676 | 668 | ||
677 | /* Find the IOAPIC that manages this GSI. */ | 669 | /* Find the IOAPIC that manages this GSI. */ |
678 | for (i = 0; i < nr_ioapics; i++) { | 670 | for (i = 0; i < nr_ioapics; i++) { |
@@ -682,17 +674,12 @@ static int mp_find_ioapic ( | |||
682 | } | 674 | } |
683 | 675 | ||
684 | printk(KERN_ERR "ERROR: Unable to locate IOAPIC for GSI %d\n", gsi); | 676 | printk(KERN_ERR "ERROR: Unable to locate IOAPIC for GSI %d\n", gsi); |
685 | |||
686 | return -1; | 677 | return -1; |
687 | } | 678 | } |
688 | |||
689 | 679 | ||
690 | void __init mp_register_ioapic ( | 680 | void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base) |
691 | u8 id, | ||
692 | u32 address, | ||
693 | u32 gsi_base) | ||
694 | { | 681 | { |
695 | int idx = 0; | 682 | int idx = 0; |
696 | 683 | ||
697 | if (nr_ioapics >= MAX_IO_APICS) { | 684 | if (nr_ioapics >= MAX_IO_APICS) { |
698 | printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " | 685 | printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " |
@@ -729,16 +716,10 @@ void __init mp_register_ioapic ( | |||
729 | mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr, | 716 | mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr, |
730 | mp_ioapic_routing[idx].gsi_start, | 717 | mp_ioapic_routing[idx].gsi_start, |
731 | mp_ioapic_routing[idx].gsi_end); | 718 | mp_ioapic_routing[idx].gsi_end); |
732 | |||
733 | return; | ||
734 | } | 719 | } |
735 | 720 | ||
736 | 721 | void __init | |
737 | void __init mp_override_legacy_irq ( | 722 | mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) |
738 | u8 bus_irq, | ||
739 | u8 polarity, | ||
740 | u8 trigger, | ||
741 | u32 gsi) | ||
742 | { | 723 | { |
743 | struct mpc_config_intsrc intsrc; | 724 | struct mpc_config_intsrc intsrc; |
744 | int ioapic = -1; | 725 | int ioapic = -1; |
@@ -776,16 +757,13 @@ void __init mp_override_legacy_irq ( | |||
776 | mp_irqs[mp_irq_entries] = intsrc; | 757 | mp_irqs[mp_irq_entries] = intsrc; |
777 | if (++mp_irq_entries == MAX_IRQ_SOURCES) | 758 | if (++mp_irq_entries == MAX_IRQ_SOURCES) |
778 | panic("Max # of irq sources exceeded!\n"); | 759 | panic("Max # of irq sources exceeded!\n"); |
779 | |||
780 | return; | ||
781 | } | 760 | } |
782 | 761 | ||
783 | 762 | void __init mp_config_acpi_legacy_irqs(void) | |
784 | void __init mp_config_acpi_legacy_irqs (void) | ||
785 | { | 763 | { |
786 | struct mpc_config_intsrc intsrc; | 764 | struct mpc_config_intsrc intsrc; |
787 | int i = 0; | 765 | int i = 0; |
788 | int ioapic = -1; | 766 | int ioapic = -1; |
789 | 767 | ||
790 | /* | 768 | /* |
791 | * Fabricate the legacy ISA bus (bus #31). | 769 | * Fabricate the legacy ISA bus (bus #31). |
@@ -843,24 +821,22 @@ void __init mp_config_acpi_legacy_irqs (void) | |||
843 | if (++mp_irq_entries == MAX_IRQ_SOURCES) | 821 | if (++mp_irq_entries == MAX_IRQ_SOURCES) |
844 | panic("Max # of irq sources exceeded!\n"); | 822 | panic("Max # of irq sources exceeded!\n"); |
845 | } | 823 | } |
846 | |||
847 | return; | ||
848 | } | 824 | } |
849 | 825 | ||
850 | #define MAX_GSI_NUM 4096 | 826 | #define MAX_GSI_NUM 4096 |
851 | 827 | ||
852 | int mp_register_gsi(u32 gsi, int triggering, int polarity) | 828 | int mp_register_gsi(u32 gsi, int triggering, int polarity) |
853 | { | 829 | { |
854 | int ioapic = -1; | 830 | int ioapic = -1; |
855 | int ioapic_pin = 0; | 831 | int ioapic_pin = 0; |
856 | int idx, bit = 0; | 832 | int idx, bit = 0; |
857 | static int pci_irq = 16; | 833 | static int pci_irq = 16; |
858 | /* | 834 | /* |
859 | * Mapping between Global System Interrupts, which | 835 | * Mapping between Global System Interrupts, which |
860 | * represent all possible interrupts, to the IRQs | 836 | * represent all possible interrupts, to the IRQs |
861 | * assigned to actual devices. | 837 | * assigned to actual devices. |
862 | */ | 838 | */ |
863 | static int gsi_to_irq[MAX_GSI_NUM]; | 839 | static int gsi_to_irq[MAX_GSI_NUM]; |
864 | 840 | ||
865 | if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC) | 841 | if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC) |
866 | return gsi; | 842 | return gsi; |
@@ -934,5 +910,4 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity) | |||
934 | polarity == ACPI_ACTIVE_HIGH ? 0 : 1); | 910 | polarity == ACPI_ACTIVE_HIGH ? 0 : 1); |
935 | return gsi; | 911 | return gsi; |
936 | } | 912 | } |
937 | |||
938 | #endif /*CONFIG_ACPI*/ | 913 | #endif /*CONFIG_ACPI*/ |