x86/apic: Replace io_apic_ops with x86_io_apic_ops.
Which makes the code fit within the rest of the x86_ops functions. Acked-by: Suresh Siddha <suresh.b.siddha@intel.com> [v1: Changed x86_apic -> x86_ioapic per Yinghai Lu <yinghai@kernel.org> suggestion] [v2: Rebased on tip/x86/urgent and redid to match Ingo's syntax style] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
@@ -68,24 +68,6 @@
|
||||
#define for_each_irq_pin(entry, head) \
|
||||
for (entry = head; entry; entry = entry->next)
|
||||
|
||||
static void __init __ioapic_init_mappings(void);
|
||||
|
||||
static unsigned int __io_apic_read (unsigned int apic, unsigned int reg);
|
||||
static void __io_apic_write (unsigned int apic, unsigned int reg, unsigned int val);
|
||||
static void __io_apic_modify(unsigned int apic, unsigned int reg, unsigned int val);
|
||||
|
||||
static struct io_apic_ops io_apic_ops = {
|
||||
.init = __ioapic_init_mappings,
|
||||
.read = __io_apic_read,
|
||||
.write = __io_apic_write,
|
||||
.modify = __io_apic_modify,
|
||||
};
|
||||
|
||||
void __init set_io_apic_ops(const struct io_apic_ops *ops)
|
||||
{
|
||||
io_apic_ops = *ops;
|
||||
}
|
||||
|
||||
/*
|
||||
* Is the SiS APIC rmw bug present ?
|
||||
* -1 = don't know, 0 = no, 1 = yes
|
||||
@@ -313,21 +295,6 @@ static void free_irq_at(unsigned int at, struct irq_cfg *cfg)
|
||||
irq_free_desc(at);
|
||||
}
|
||||
|
||||
static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
|
||||
{
|
||||
return io_apic_ops.read(apic, reg);
|
||||
}
|
||||
|
||||
static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
|
||||
{
|
||||
io_apic_ops.write(apic, reg, value);
|
||||
}
|
||||
|
||||
static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned int value)
|
||||
{
|
||||
io_apic_ops.modify(apic, reg, value);
|
||||
}
|
||||
|
||||
|
||||
struct io_apic {
|
||||
unsigned int index;
|
||||
@@ -349,14 +316,14 @@ static inline void io_apic_eoi(unsigned int apic, unsigned int vector)
|
||||
writel(vector, &io_apic->eoi);
|
||||
}
|
||||
|
||||
static unsigned int __io_apic_read(unsigned int apic, unsigned int reg)
|
||||
unsigned int native_io_apic_read(unsigned int apic, unsigned int reg)
|
||||
{
|
||||
struct io_apic __iomem *io_apic = io_apic_base(apic);
|
||||
writel(reg, &io_apic->index);
|
||||
return readl(&io_apic->data);
|
||||
}
|
||||
|
||||
static void __io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
|
||||
void native_io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
|
||||
{
|
||||
struct io_apic __iomem *io_apic = io_apic_base(apic);
|
||||
|
||||
@@ -370,7 +337,7 @@ static void __io_apic_write(unsigned int apic, unsigned int reg, unsigned int va
|
||||
*
|
||||
* Older SiS APIC requires we rewrite the index register
|
||||
*/
|
||||
static void __io_apic_modify(unsigned int apic, unsigned int reg, unsigned int value)
|
||||
void native_io_apic_modify(unsigned int apic, unsigned int reg, unsigned int value)
|
||||
{
|
||||
struct io_apic __iomem *io_apic = io_apic_base(apic);
|
||||
|
||||
@@ -3931,12 +3898,7 @@ static struct resource * __init ioapic_setup_resources(int nr_ioapics)
|
||||
return res;
|
||||
}
|
||||
|
||||
void __init ioapic_and_gsi_init(void)
|
||||
{
|
||||
io_apic_ops.init();
|
||||
}
|
||||
|
||||
static void __init __ioapic_init_mappings(void)
|
||||
void __init native_io_apic_init_mappings(void)
|
||||
{
|
||||
unsigned long ioapic_phys, idx = FIX_IO_APIC_BASE_0;
|
||||
struct resource *ioapic_res;
|
||||
|
Reference in New Issue
Block a user