printk boot_delay: use loops_per_msec instead of printk_delay_msec
PATCH 1/1 printk boot_delay: use loops_per_msec instead of printk_delay_msec
Sorry, should post this firstly because the previous printk_delay patch depends on this,
please review, thanks.
--
Use loops_per_msec instead of printk_delay_msec for boot printk delay.
---kernel/printk.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
kernel/printk.c +0 -0
@@ -198,12 +198,11 @@ __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 unsigned long long loops_per_msec;
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;
@@ -212,10 +211,9 @@ static int __init boot_delay_setup(char
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);
+ "HZ: %d, loops_per_msec: %llu\n",
+ boot_delay, preset_lpj, lpj, HZ, loops_per_msec);
return 1;
}
__setup("boot_delay=", boot_delay_setup);
@@ -228,7 +226,7 @@ static void boot_delay_msec(void)
if (boot_delay == 0 || system_state != SYSTEM_BOOTING)
return;
- k = (unsigned long long)printk_delay_msec * boot_delay;
+ k = (unsigned long long)loops_per_msec * boot_delay;
timeout = jiffies + msecs_to_jiffies(boot_delay); while (k) {
Quoted 7 lines · On Tue, 16 Jun 2009 17:02:24 +0800 Dave Young <[email protected]> wrote:
Sorry, should post this firstly because the previous
printk_delaypatch depends on this,
please review, thanks.
--Use
loops_per_msecinstead ofprintk_delay_msecfor boot printk delay.
The changelog is poor, because it fails to describe _why_ this change is being made. I rewrote it to
Rename printk_delay_msec' to loops_per_msec', because the patch "printk: add printk_delay to make messages readable for some scenarios" wishes to more appropriately use the `printk_delay_msec' identifier.
Quoted 10 lines
kernel/printk.c +0
-0@@ -198,12 +198,11 @@ __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 longprintk_delay_msec; /* per msec, based onboot_delay*/
Your email client is wordwrapping the patches.
Quoted 10 lines · Andrew Morton
Quoted 7 lines · On Tue, 16 Jun 2009 17:02:24 +0800 Dave Young <[email protected]> wrote:
Sorry, should post this firstly because the previous
printk_delaypatch depends on this,
please review, thanks.
--Use
loops_per_msecinstead ofprintk_delay_msecfor boot printk delay.
Quoted 7 lines
The changelog is poor, because it fails to describe _why_ this change is being made. I rewrote it to
Rename
printk_delay_msec' toloops_per_msec', because the patch "printk: addprintk_delayto make messages readable for some scenarios" wishes to more appropriately use the `printk_delay_msec' identifier.
Thanks for your improval.
Quoted 7 lines
Quoted 7 lines
kernel/printk.c +0
-0@@ -198,12 +198,11 @@ __setup("log_buf_len=", log_buf_len_setu#ifdef CONFIG_BOOT_PRINTK_DELAY
Quoted 6 lines
Quoted 4 lines
kernel/printk.c +0
-0static unsigned int boot_delay;/* msecs delay after each printk during bootup */
-static unsigned long longprintk_delay_msec; /* per msec, based onboot_delay*/Your email client is wordwrapping the patches.
Thanks, I moved from mutt to web gmail + firefox 'view source with' addon, looks like I should think about using mutt again.