lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 11 May 2009 22:57:03 +0000
From:	Arnd Bergmann <arnd@...db.de>
To:	linux-kernel@...r.kernel.org, Ralf Baechle <ralf@...ux-mips.org>
Subject: [PATCH] mips: use PIT_TICK_RATE in i8253

Using PIT_TICK_RATE instead of CLOCK_TICK_RATE allows
us to later change CLOCK_TICK_RATE to a more sensible
time base value for platforms that do not base their
system timer off an i8253.

Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 arch/mips/kernel/i8253.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/i8253.c
index ed20e7f..3545419 100644
--- a/arch/mips/kernel/i8253.c
+++ b/arch/mips/kernel/i8253.c
@@ -8,6 +8,7 @@
 #include <linux/jiffies.h>
 #include <linux/module.h>
 #include <linux/spinlock.h>
+#include <linux/timex.h>
 
 #include <asm/delay.h>
 #include <asm/i8253.h>
@@ -115,7 +116,7 @@ void __init setup_pit_timer(void)
 	 * IO_APIC has been initialized.
 	 */
 	cd->cpumask = cpumask_of(cpu);
-	clockevent_set_clock(cd, CLOCK_TICK_RATE);
+	clockevent_set_clock(cd, PIT_TICK_RATE);
 	cd->max_delta_ns = clockevent_delta2ns(0x7FFF, cd);
 	cd->min_delta_ns = clockevent_delta2ns(0xF, cd);
 	clockevents_register_device(cd);
@@ -203,7 +204,7 @@ static int __init init_pit_clocksource(void)
 	if (num_possible_cpus() > 1) /* PIT does not scale! */
 		return 0;
 
-	clocksource_pit.mult = clocksource_hz2mult(CLOCK_TICK_RATE, 20);
+	clocksource_pit.mult = clocksource_hz2mult(PIT_TICK_RATE, 20);
 	return clocksource_register(&clocksource_pit);
 }
 arch_initcall(init_pit_clocksource);
-- 
1.6.0.4

-- 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ