Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[powerpc.git] / arch / sparc64 / kernel / irq.c
index 74a2e08..233526b 100644 (file)
@@ -27,6 +27,7 @@
 #include <asm/atomic.h>
 #include <asm/system.h>
 #include <asm/irq.h>
+#include <asm/io.h>
 #include <asm/sbus.h>
 #include <asm/iommu.h>
 #include <asm/upa.h>
@@ -782,8 +783,14 @@ static void distribute_irqs(void)
 }
 #endif
 
+struct sun5_timer {
+       u64     count0;
+       u64     limit0;
+       u64     count1;
+       u64     limit1;
+};
 
-struct sun5_timer *prom_timers;
+static struct sun5_timer *prom_timers;
 static u64 prom_limit0, prom_limit1;
 
 static void map_prom_timers(void)
@@ -839,18 +846,6 @@ static void kill_prom_timer(void)
        : "g1", "g2");
 }
 
-void enable_prom_timer(void)
-{
-       if (!prom_timers)
-               return;
-
-       /* Set it to whatever was there before. */
-       prom_timers->limit1 = prom_limit1;
-       prom_timers->count1 = 0;
-       prom_timers->limit0 = prom_limit0;
-       prom_timers->count0 = 0;
-}
-
 void init_irqwork_curcpu(void)
 {
        register struct irq_work_struct *workp asm("o2");
@@ -917,7 +912,8 @@ static int irq_affinity_read_proc (char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
        struct ino_bucket *bp = ivector_table + (long)data;
-       struct irqaction *ap = bp->irq_info;
+       struct irq_desc *desc = bp->irq_info;
+       struct irqaction *ap = desc->action;
        cpumask_t mask;
        int len;
 
@@ -935,11 +931,13 @@ static int irq_affinity_read_proc (char *page, char **start, off_t off,
 static inline void set_intr_affinity(int irq, cpumask_t hw_aff)
 {
        struct ino_bucket *bp = ivector_table + irq;
+       struct irq_desc *desc = bp->irq_info;
+       struct irqaction *ap = desc->action;
 
        /* Users specify affinity in terms of hw cpu ids.
         * As soon as we do this, handler_irq() might see and take action.
         */
-       put_smpaff_in_irqaction((struct irqaction *)bp->irq_info, hw_aff);
+       put_smpaff_in_irqaction(ap, hw_aff);
 
        /* Migration is simply done by the next cpu to service this
         * interrupt.