[PATCH 11/15] ppc64: Don't count number of events processed for caller

Michael Ellerman michael at ellerman.id.au
Tue Jun 28 09:18:03 EST 2005


Hi,

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 at ellerman.id.au>
--

Index: work/arch/ppc64/kernel/irq.c
===================================================================
--- work.orig/arch/ppc64/kernel/irq.c
+++ work/arch/ppc64/kernel/irq.c
@@ -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_queue_event_pending())
-		lpevent_count += hvlpevent_queue_process(regs);
+		hvlpevent_queue_process(regs);
 
 	irq_exit();
 
Index: work/arch/ppc64/kernel/time.c
===================================================================
--- work.orig/arch/ppc64/kernel/time.c
+++ work/arch/ppc64/kernel/time.c
@@ -98,7 +98,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 * reg
 #ifdef CONFIG_PPC_ISERIES
 	{
 		if (hvlpevent_queue_event_pending())
-			lpevent_count += hvlpevent_queue_process(regs);
+			hvlpevent_queue_process(regs);
 	}
 #endif
 
Index: work/arch/ppc64/kernel/mf.c
===================================================================
--- work.orig/arch/ppc64/kernel/mf.c
+++ work/arch/ppc64/kernel/mf.c
@@ -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_queue_event_pending())
-			lpevent_count += hvlpevent_queue_process(NULL);
+			hvlpevent_queue_process(NULL);
 	}
 	return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm);
 }
Index: work/include/asm-ppc64/iSeries/ItLpQueue.h
===================================================================
--- work.orig/include/asm-ppc64/iSeries/ItLpQueue.h
+++ work/include/asm-ppc64/iSeries/ItLpQueue.h
@@ -76,7 +76,7 @@ struct hvlpevent_queue {
 
 
 extern int hvlpevent_queue_event_pending(void);
-extern unsigned hvlpevent_queue_process(struct pt_regs *);
+extern void hvlpevent_queue_process(struct pt_regs *);
 extern void hvlpevent_queue_setup(void);
 
 #endif /* _ITLPQUEUE_H */
Index: work/arch/ppc64/kernel/ItLpQueue.c
===================================================================
--- work.orig/arch/ppc64/kernel/ItLpQueue.c
+++ work/arch/ppc64/kernel/ItLpQueue.c
@@ -127,14 +127,14 @@ static void hvlpevent_clear_valid( struc
 	event->xFlags.xValid = 0;
 }
 
-unsigned hvlpevent_queue_process(struct pt_regs *regs)
+void hvlpevent_queue_process(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 hvlpevent_queue_process(struct 
 	for (;;) {
 		nextLpEvent = hvlpevent_queue_next_event();
 		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 hvlpevent_queue_process(struct 
 	clear_inUse();
 
 	get_paca()->lpevent_count += numIntsProcessed;
-
-	return numIntsProcessed;
 }
 
 void hvlpevent_queue_setup(void)



More information about the Linuxppc64-dev mailing list