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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 27 Feb 2008 11:20:58 +0800
From:	Dave Young <hidave.darkstar@...il.com>
To:	akpm@...ux-foundation.org
Cc:	randy.dunlap@...cle.com, davej@...emonkey.org.uk,
	tglx@...utronix.de, linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] make boot_delay use loops_per_jiffy directly

Make boot_delay use loops_per_jiffy directly, this does not change the
original behaviour if apply the first patch before it.

Signed-off-by: Dave Young <hidave.darkstar@...il.com>

---
kernel/printk.c |   15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)

diff -upr linux/kernel/printk.c linux.new/kernel/printk.c
--- linux/kernel/printk.c	2008-02-26 16:54:23.000000000 +0800
+++ linux.new/kernel/printk.c	2008-02-26 16:59:02.000000000 +0800
@@ -173,24 +173,14 @@ __setup("log_buf_len=", log_buf_len_setu
 #ifdef CONFIG_BOOT_PRINTK_DELAY
 
 static unsigned int boot_delay; /* msecs delay after each printk during bootup */
-static unsigned long long printk_delay_msec; /* per msec, based on boot_delay */
 
 static int __init boot_delay_setup(char *str)
 {
-	unsigned long lpj;
-	unsigned long long loops_per_msec;
-
-	lpj = preset_lpj ? preset_lpj : 1000000;	/* some guess */
-	loops_per_msec = (unsigned long long)lpj / 1000 * HZ;
-
 	get_option(&str, &boot_delay);
 	if (boot_delay > 10 * 1000)
 		boot_delay = 0;
 
-	printk_delay_msec = loops_per_msec;
-	printk(KERN_DEBUG "boot_delay: %u, preset_lpj: %ld, lpj: %lu, "
-		"HZ: %d, printk_delay_msec: %llu\n",
-		boot_delay, preset_lpj, lpj, HZ, printk_delay_msec);
+	printk(KERN_DEBUG "boot_delay: %u\n", boot_delay);
 	return 1;
 }
 __setup("boot_delay=", boot_delay_setup);
@@ -199,6 +189,9 @@ static void boot_delay_msec(void)
 {
 	unsigned long long k;
 	unsigned long timeout;
+	unsigned long long printk_delay_msec;
+
+	printk_delay_msec = (unsigned long long)loops_per_jiffy / 1000 * HZ;
 
 	if (boot_delay == 0 || system_state != SYSTEM_BOOTING)
 		return;
--
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