[PATCH] ppc64: Don't count number of events processed for caller
authorMichael Ellerman <michael@ellerman.id.au>
Thu, 30 Jun 2005 05:15:53 +0000 (15:15 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 30 Jun 2005 05:15:53 +0000 (15:15 +1000)
Currently we count the number of lpevents processed in 3 seperate places.

One of these counters is never read, so just remove it. This means
hvlpevent_queue_process() no longer needs to return the number of events
processed.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/ppc64/kernel/ItLpQueue.c
arch/ppc64/kernel/irq.c
arch/ppc64/kernel/mf.c
arch/ppc64/kernel/time.c
include/asm-ppc64/iSeries/ItLpQueue.h

index a81e49b91af0cbc0459854de4c77a49d7447aff1..a849f6775ad6068685fcf6afbbfe8e0a84ce32cc 100644 (file)
@@ -127,14 +127,14 @@ static void hvlpevent_clear_valid( struct HvLpEvent * event )
        event->xFlags.xValid = 0;
 }
 
-unsigned process_hvlpevents(struct pt_regs *regs)
+void process_hvlpevents(struct pt_regs *regs)
 {
        unsigned numIntsProcessed = 0;
        struct HvLpEvent * nextLpEvent;
 
        /* If we have recursed, just return */
        if ( !set_inUse() )
-               return 0;
+               return;
        
        if (ItLpQueueInProcess == 0)
                ItLpQueueInProcess = 1;
@@ -144,9 +144,6 @@ unsigned process_hvlpevents(struct pt_regs *regs)
        for (;;) {
                nextLpEvent = get_next_hvlpevent();
                if ( nextLpEvent ) {
-                       /* Count events to return to caller
-                        * and count processed events in hvlpevent_queue
-                        */
                        ++numIntsProcessed;
                        hvlpevent_queue.xLpIntCount++;
                        /* Call appropriate handler here, passing 
@@ -186,8 +183,6 @@ unsigned process_hvlpevents(struct pt_regs *regs)
        clear_inUse();
 
        get_paca()->lpevent_count += numIntsProcessed;
-
-       return numIntsProcessed;
 }
 
 static int set_spread_lpevents(char *str)
index bd4b035af6222d4b64eb02fa24458a00f58ec668..e79420bb72a56aca36592cbbd9a575aa71458fac 100644 (file)
@@ -66,7 +66,6 @@ EXPORT_SYMBOL(irq_desc);
 int distribute_irqs = 1;
 int __irq_offset_value;
 int ppc_spurious_interrupts;
-unsigned long lpevent_count;
 u64 ppc64_interrupt_controller;
 
 int show_interrupts(struct seq_file *p, void *v)
@@ -295,7 +294,7 @@ void do_IRQ(struct pt_regs *regs)
        }
 #endif /* CONFIG_SMP */
        if (hvlpevent_is_pending())
-               lpevent_count += process_hvlpevents(regs);
+               process_hvlpevents(regs);
 
        irq_exit();
 
index 609bf1bda7b81cfe8ee962d282c7c27ea6407cd5..ef4a338ebd01540ded3d27515de87e94c68dee81 100644 (file)
@@ -801,9 +801,8 @@ int mf_get_boot_rtc(struct rtc_time *tm)
                return rc;
        /* We need to poll here as we are not yet taking interrupts */
        while (rtc_data.busy) {
-               extern unsigned long lpevent_count;
                if (hvlpevent_is_pending())
-                       lpevent_count += process_hvlpevents(NULL);
+                       process_hvlpevents(NULL);
        }
        return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm);
 }
index f9c18400ebf582f43fb644865c97a10a12d348a7..909462e1adeaf7cc1bab5ec9b766315d2ee63ec8 100644 (file)
@@ -99,7 +99,6 @@ unsigned long tb_to_ns_shift;
 struct gettimeofday_struct do_gtod;
 
 extern unsigned long wall_jiffies;
-extern unsigned long lpevent_count;
 extern int smp_tb_synchronized;
 
 extern struct timezone sys_tz;
@@ -368,7 +367,7 @@ int timer_interrupt(struct pt_regs * regs)
 
 #ifdef CONFIG_PPC_ISERIES
        if (hvlpevent_is_pending())
-               lpevent_count += process_hvlpevents(regs);
+               process_hvlpevents(regs);
 #endif
 
 /* collect purr register values often, for accurate calculations */
index f0f24a39ff6db656984a302ee9b9e5525d7ed822..6ba74c0d910b40b2ad78cbad4f37fdac150ea283 100644 (file)
@@ -77,7 +77,7 @@ struct hvlpevent_queue {
 extern struct hvlpevent_queue hvlpevent_queue;
 
 extern int hvlpevent_is_pending(void);
-extern unsigned process_hvlpevents(struct pt_regs *);
+extern void process_hvlpevents(struct pt_regs *);
 extern void setup_hvlpevent_queue(void);
 
 #endif /* _ITLPQUEUE_H */