+ uml-timer-handler-tidying.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     uml: timer handler tidying

has been added to the -mm tree.  Its filename is

     uml-timer-handler-tidying.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: uml: timer handler tidying
From: Jeff Dike <jdike@xxxxxxxxxxx>

Get rid of a user of timer_irq_inited (and first_tick) by observing that
prev_ticks can be used to decide if this is the first call.

Signed-off-by: Jeff Dike <jdike@xxxxxxxxxxx>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@xxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/um/kernel/time_kern.c |   20 ++++----------------
 1 files changed, 4 insertions(+), 16 deletions(-)

diff -puN arch/um/kernel/time_kern.c~uml-timer-handler-tidying arch/um/kernel/time_kern.c
--- a/arch/um/kernel/time_kern.c~uml-timer-handler-tidying
+++ a/arch/um/kernel/time_kern.c
@@ -38,7 +38,6 @@ unsigned long long sched_clock(void)
 /* Changed at early boot */
 int timer_irq_inited = 0;
 
-static int first_tick;
 static unsigned long long prev_nsecs;
 #ifdef CONFIG_UML_REAL_TIME_CLOCK
 static long long delta;   		/* Deviation per interval */
@@ -48,15 +47,8 @@ void timer_irq(union uml_pt_regs *regs)
 {
 	unsigned long long ticks = 0;
 
-	if(!timer_irq_inited){
-		/* This is to ensure that ticks don't pile up when
-		 * the timer handler is suspended */
-		first_tick = 0;
-		return;
-	}
-
-	if(first_tick){
 #ifdef CONFIG_UML_REAL_TIME_CLOCK
+	if(prev_nsecs){
 		/* We've had 1 tick */
 		unsigned long long nsecs = os_nsecs();
 
@@ -69,15 +61,11 @@ void timer_irq(union uml_pt_regs *regs)
 
 		ticks += (delta * HZ) / BILLION;
 		delta -= (ticks * BILLION) / HZ;
+	}
+	else prev_nsecs = os_nsecs();
 #else
-		ticks = 1;
+	ticks = 1;
 #endif
-	}
-	else {
-		prev_nsecs = os_nsecs();
-		first_tick = 1;
-	}
-
 	while(ticks > 0){
 		do_IRQ(TIMER_IRQ, regs);
 		ticks--;
_

Patches currently in -mm which might be from jdike@xxxxxxxxxxx are

uml-clean-up-address-space-limits-code.patch
uml-timer-initialization-cleanup.patch
uml-remove-some-useless-exports.patch
uml-fix-static-binary-segfault.patch
uml-remove-useless-declaration.patch
uml-signal-initialization-cleanup.patch
uml-timer-handler-tidying.patch
uml-ifdef-a-mode-specific-function.patch
uml-mark-forward_interrupts-as-being-mode-specific.patch
uml-remove-spinlock-wrapper-functions.patch
uml-remove-os_isatty.patch
uml-fix-exitcall-ordering-bug.patch
uml-make-some-symbols-static.patch
uml-remove-syscall-debugging.patch
uml-move-_kernc-files.patch
uml-formatting-fixes.patch
uml-add-some-eintr-protection.patch
uml-remove-unused-variable.patch
uml-make-mconsole-version-requests-happen-in-a-process.patch
uml-remove-pte_mkexec.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux