diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-23 10:08:03 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-23 11:26:51 -0500 |
commit | 41098ffe050c4befe5fc21a5cedd42ebbd6f7469 (patch) | |
tree | 5e92882b96c7a705209dd778a314010bd4c4ef7d | |
parent | da1ad9d7b2477594e8ff43706644ba8a375ad62a (diff) |
x86: ioapic: Make a few functions static
No users outside of io_apic.c. Mark bad_ioapic() __init while at it.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/include/asm/io_apic.h | 5 | ||||
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 55 |
2 files changed, 28 insertions, 32 deletions
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index 37dbb3fae395..be61e22dd9ea 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
@@ -139,11 +139,6 @@ extern int timer_through_8259; | |||
139 | #define io_apic_assign_pci_irqs \ | 139 | #define io_apic_assign_pci_irqs \ |
140 | (mp_irq_entries && !skip_ioapic_setup && io_apic_irqs) | 140 | (mp_irq_entries && !skip_ioapic_setup && io_apic_irqs) |
141 | 141 | ||
142 | extern u8 io_apic_unique_id(u8 id); | ||
143 | extern int io_apic_get_unique_id(int ioapic, int apic_id); | ||
144 | extern int io_apic_get_version(int ioapic); | ||
145 | extern int io_apic_get_redir_entries(int ioapic); | ||
146 | |||
147 | struct io_apic_irq_attr; | 142 | struct io_apic_irq_attr; |
148 | extern int io_apic_set_pci_routing(struct device *dev, int irq, | 143 | extern int io_apic_set_pci_routing(struct device *dev, int irq, |
149 | struct io_apic_irq_attr *irq_attr); | 144 | struct io_apic_irq_attr *irq_attr); |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index cfd9611036cc..7344b428e08d 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -3611,7 +3611,7 @@ io_apic_setup_irq_pin(unsigned int irq, int node, struct io_apic_irq_attr *attr) | |||
3611 | return ret; | 3611 | return ret; |
3612 | } | 3612 | } |
3613 | 3613 | ||
3614 | int __init io_apic_get_redir_entries (int ioapic) | 3614 | static int __init io_apic_get_redir_entries(int ioapic) |
3615 | { | 3615 | { |
3616 | union IO_APIC_reg_01 reg_01; | 3616 | union IO_APIC_reg_01 reg_01; |
3617 | unsigned long flags; | 3617 | unsigned long flags; |
@@ -3702,31 +3702,8 @@ int io_apic_set_pci_routing(struct device *dev, int irq, | |||
3702 | return __io_apic_set_pci_routing(dev, irq, irq_attr); | 3702 | return __io_apic_set_pci_routing(dev, irq, irq_attr); |
3703 | } | 3703 | } |
3704 | 3704 | ||
3705 | u8 __init io_apic_unique_id(u8 id) | ||
3706 | { | ||
3707 | #ifdef CONFIG_X86_32 | ||
3708 | if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && | ||
3709 | !APIC_XAPIC(apic_version[boot_cpu_physical_apicid])) | ||
3710 | return io_apic_get_unique_id(nr_ioapics, id); | ||
3711 | else | ||
3712 | return id; | ||
3713 | #else | ||
3714 | int i; | ||
3715 | DECLARE_BITMAP(used, 256); | ||
3716 | |||
3717 | bitmap_zero(used, 256); | ||
3718 | for (i = 0; i < nr_ioapics; i++) { | ||
3719 | struct mpc_ioapic *ia = &mp_ioapics[i]; | ||
3720 | __set_bit(ia->apicid, used); | ||
3721 | } | ||
3722 | if (!test_bit(id, used)) | ||
3723 | return id; | ||
3724 | return find_first_zero_bit(used, 256); | ||
3725 | #endif | ||
3726 | } | ||
3727 | |||
3728 | #ifdef CONFIG_X86_32 | 3705 | #ifdef CONFIG_X86_32 |
3729 | int __init io_apic_get_unique_id(int ioapic, int apic_id) | 3706 | static int __init io_apic_get_unique_id(int ioapic, int apic_id) |
3730 | { | 3707 | { |
3731 | union IO_APIC_reg_00 reg_00; | 3708 | union IO_APIC_reg_00 reg_00; |
3732 | static physid_mask_t apic_id_map = PHYSID_MASK_NONE; | 3709 | static physid_mask_t apic_id_map = PHYSID_MASK_NONE; |
@@ -3799,9 +3776,33 @@ int __init io_apic_get_unique_id(int ioapic, int apic_id) | |||
3799 | 3776 | ||
3800 | return apic_id; | 3777 | return apic_id; |
3801 | } | 3778 | } |
3779 | |||
3780 | static u8 __init io_apic_unique_id(u8 id) | ||
3781 | { | ||
3782 | if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && | ||
3783 | !APIC_XAPIC(apic_version[boot_cpu_physical_apicid])) | ||
3784 | return io_apic_get_unique_id(nr_ioapics, id); | ||
3785 | else | ||
3786 | return id; | ||
3787 | } | ||
3788 | #else | ||
3789 | static u8 __init io_apic_unique_id(u8 id) | ||
3790 | { | ||
3791 | int i; | ||
3792 | DECLARE_BITMAP(used, 256); | ||
3793 | |||
3794 | bitmap_zero(used, 256); | ||
3795 | for (i = 0; i < nr_ioapics; i++) { | ||
3796 | struct mpc_ioapic *ia = &mp_ioapics[i]; | ||
3797 | __set_bit(ia->apicid, used); | ||
3798 | } | ||
3799 | if (!test_bit(id, used)) | ||
3800 | return id; | ||
3801 | return find_first_zero_bit(used, 256); | ||
3802 | } | ||
3802 | #endif | 3803 | #endif |
3803 | 3804 | ||
3804 | int __init io_apic_get_version(int ioapic) | 3805 | static int __init io_apic_get_version(int ioapic) |
3805 | { | 3806 | { |
3806 | union IO_APIC_reg_01 reg_01; | 3807 | union IO_APIC_reg_01 reg_01; |
3807 | unsigned long flags; | 3808 | unsigned long flags; |
@@ -4004,7 +4005,7 @@ int mp_find_ioapic_pin(int ioapic, u32 gsi) | |||
4004 | return gsi - mp_gsi_routing[ioapic].gsi_base; | 4005 | return gsi - mp_gsi_routing[ioapic].gsi_base; |
4005 | } | 4006 | } |
4006 | 4007 | ||
4007 | static int bad_ioapic(unsigned long address) | 4008 | static __init int bad_ioapic(unsigned long address) |
4008 | { | 4009 | { |
4009 | if (nr_ioapics >= MAX_IO_APICS) { | 4010 | if (nr_ioapics >= MAX_IO_APICS) { |
4010 | printk(KERN_WARNING "WARING: Max # of I/O APICs (%d) exceeded " | 4011 | printk(KERN_WARNING "WARING: Max # of I/O APICs (%d) exceeded " |