]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Revert "x86: add io_apic_ops to allow interception"
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 17 Apr 2012 04:06:17 +0000 (00:06 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 17 Apr 2012 04:06:17 +0000 (00:06 -0400)
This reverts commit 2944022f31139ae9650177e2667aa84448823388.

arch/x86/include/asm/io_apic.h
arch/x86/kernel/apic/io_apic.c

index 190d8c26b56d90d7c59482900bfb0234435ae377..690d1cc9a8772c2e3aa457c99503debedbaa3c08 100644 (file)
 #define IO_APIC_REDIR_LEVEL_TRIGGER    (1 << 15)
 #define IO_APIC_REDIR_MASKED           (1 << 16)
 
-struct io_apic_ops {
-       void (*init)(void);
-       unsigned int (*read)(unsigned int apic, unsigned int reg);
-       void (*write)(unsigned int apic, unsigned int reg, unsigned int value);
-       void (*modify)(unsigned int apic, unsigned int reg, unsigned int value);
-};
-
-void __init set_io_apic_ops(const struct io_apic_ops *);
-
 /*
  * The structure of the IO-APIC:
  */
index bf120234a180d58a25f98168ff202da4452f36ae..fb072754bc1d7a30c0eb2e0249a267182dda22aa 100644 (file)
 #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,24 +294,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;
        unsigned int unused[3];
@@ -351,15 +314,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)
+static inline unsigned int 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)
+static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
 {
        struct io_apic __iomem *io_apic = io_apic_base(apic);
        writel(reg, &io_apic->index);
@@ -372,8 +334,7 @@ static void __io_apic_write(unsigned int apic, unsigned int reg,
  *
  * Older SiS APIC requires we rewrite the index register
  */
-static void __io_apic_modify(unsigned int apic, unsigned int reg,
-                            unsigned int value)
+static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned int value)
 {
        struct io_apic __iomem *io_apic = io_apic_base(apic);
 
@@ -3911,11 +3872,6 @@ static struct resource * __init ioapic_setup_resources(int nr_ioapics)
 }
 
 void __init ioapic_and_gsi_init(void)
-{
-       io_apic_ops.init();
-}
-
-static void __init __ioapic_init_mappings(void)
 {
        unsigned long ioapic_phys, idx = FIX_IO_APIC_BASE_0;
        struct resource *ioapic_res;