mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
da1ad9d7b2
commit
41098ffe05
|
@ -139,11 +139,6 @@ extern int timer_through_8259;
|
||||||
#define io_apic_assign_pci_irqs \
|
#define io_apic_assign_pci_irqs \
|
||||||
(mp_irq_entries && !skip_ioapic_setup && io_apic_irqs)
|
(mp_irq_entries && !skip_ioapic_setup && io_apic_irqs)
|
||||||
|
|
||||||
extern u8 io_apic_unique_id(u8 id);
|
|
||||||
extern int io_apic_get_unique_id(int ioapic, int apic_id);
|
|
||||||
extern int io_apic_get_version(int ioapic);
|
|
||||||
extern int io_apic_get_redir_entries(int ioapic);
|
|
||||||
|
|
||||||
struct io_apic_irq_attr;
|
struct io_apic_irq_attr;
|
||||||
extern int io_apic_set_pci_routing(struct device *dev, int irq,
|
extern int io_apic_set_pci_routing(struct device *dev, int irq,
|
||||||
struct io_apic_irq_attr *irq_attr);
|
struct io_apic_irq_attr *irq_attr);
|
||||||
|
|
|
@ -3611,7 +3611,7 @@ io_apic_setup_irq_pin(unsigned int irq, int node, struct io_apic_irq_attr *attr)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int __init io_apic_get_redir_entries (int ioapic)
|
static int __init io_apic_get_redir_entries(int ioapic)
|
||||||
{
|
{
|
||||||
union IO_APIC_reg_01 reg_01;
|
union IO_APIC_reg_01 reg_01;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -3702,31 +3702,8 @@ int io_apic_set_pci_routing(struct device *dev, int irq,
|
||||||
return __io_apic_set_pci_routing(dev, irq, irq_attr);
|
return __io_apic_set_pci_routing(dev, irq, irq_attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 __init io_apic_unique_id(u8 id)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) &&
|
static int __init io_apic_get_unique_id(int ioapic, int apic_id)
|
||||||
!APIC_XAPIC(apic_version[boot_cpu_physical_apicid]))
|
|
||||||
return io_apic_get_unique_id(nr_ioapics, id);
|
|
||||||
else
|
|
||||||
return id;
|
|
||||||
#else
|
|
||||||
int i;
|
|
||||||
DECLARE_BITMAP(used, 256);
|
|
||||||
|
|
||||||
bitmap_zero(used, 256);
|
|
||||||
for (i = 0; i < nr_ioapics; i++) {
|
|
||||||
struct mpc_ioapic *ia = &mp_ioapics[i];
|
|
||||||
__set_bit(ia->apicid, used);
|
|
||||||
}
|
|
||||||
if (!test_bit(id, used))
|
|
||||||
return id;
|
|
||||||
return find_first_zero_bit(used, 256);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_X86_32
|
|
||||||
int __init io_apic_get_unique_id(int ioapic, int apic_id)
|
|
||||||
{
|
{
|
||||||
union IO_APIC_reg_00 reg_00;
|
union IO_APIC_reg_00 reg_00;
|
||||||
static physid_mask_t apic_id_map = PHYSID_MASK_NONE;
|
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)
|
||||||
|
|
||||||
return apic_id;
|
return apic_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static u8 __init io_apic_unique_id(u8 id)
|
||||||
|
{
|
||||||
|
if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) &&
|
||||||
|
!APIC_XAPIC(apic_version[boot_cpu_physical_apicid]))
|
||||||
|
return io_apic_get_unique_id(nr_ioapics, id);
|
||||||
|
else
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static u8 __init io_apic_unique_id(u8 id)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
DECLARE_BITMAP(used, 256);
|
||||||
|
|
||||||
|
bitmap_zero(used, 256);
|
||||||
|
for (i = 0; i < nr_ioapics; i++) {
|
||||||
|
struct mpc_ioapic *ia = &mp_ioapics[i];
|
||||||
|
__set_bit(ia->apicid, used);
|
||||||
|
}
|
||||||
|
if (!test_bit(id, used))
|
||||||
|
return id;
|
||||||
|
return find_first_zero_bit(used, 256);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int __init io_apic_get_version(int ioapic)
|
static int __init io_apic_get_version(int ioapic)
|
||||||
{
|
{
|
||||||
union IO_APIC_reg_01 reg_01;
|
union IO_APIC_reg_01 reg_01;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -4004,7 +4005,7 @@ int mp_find_ioapic_pin(int ioapic, u32 gsi)
|
||||||
return gsi - mp_gsi_routing[ioapic].gsi_base;
|
return gsi - mp_gsi_routing[ioapic].gsi_base;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int bad_ioapic(unsigned long address)
|
static __init int bad_ioapic(unsigned long address)
|
||||||
{
|
{
|
||||||
if (nr_ioapics >= MAX_IO_APICS) {
|
if (nr_ioapics >= MAX_IO_APICS) {
|
||||||
printk(KERN_WARNING "WARING: Max # of I/O APICs (%d) exceeded "
|
printk(KERN_WARNING "WARING: Max # of I/O APICs (%d) exceeded "
|
||||||
|
|
Loading…
Reference in New Issue