2008-02-27 03:12:24

by Dave Young

[permalink] [raw]
Subject: [PATCH 1/2] preset_lpj and loops_per_jiffy initialize adjust

Make preset_lpj static.
Give preset lpj value to loops_per_jiffy in lpj_setup.

Signed-off-by: Dave Young <[email protected]>

---
init/calibrate.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff -upr linux/init/calibrate.c linux.new/init/calibrate.c
--- linux/init/calibrate.c 2008-02-27 10:54:15.000000000 +0800
+++ linux.new/init/calibrate.c 2008-02-27 10:54:26.000000000 +0800
@@ -9,10 +9,11 @@
#include <linux/init.h>
#include <linux/timex.h>

-unsigned long preset_lpj;
+static unsigned long preset_lpj;
static int __init lpj_setup(char *str)
{
- preset_lpj = simple_strtoul(str,NULL,0);
+ loops_per_jiffy = simple_strtoul(str, NULL, 0);
+ preset_lpj = 1;
return 1;
}

@@ -117,7 +118,6 @@ void __cpuinit calibrate_delay(void)
int lps_precision = LPS_PREC;

if (preset_lpj) {
- loops_per_jiffy = preset_lpj;
printk("Calibrating delay loop (skipped)... "
"%lu.%02lu BogoMIPS preset\n",
loops_per_jiffy/(500000/HZ),


2008-02-27 04:32:23

by Dave Young

[permalink] [raw]
Subject: Re: [PATCH 1/2] preset_lpj and loops_per_jiffy initialize adjust

On Wed, Feb 27, 2008 at 11:18:18AM +0800, Dave Young wrote:
> Make preset_lpj static.

This will make the boot_delay build fail, these two patches should
become one patch indeed, please ignore.

I will send the new patch again after a while.

> Give preset lpj value to loops_per_jiffy in lpj_setup.
>
> Signed-off-by: Dave Young <[email protected]>
>
> ---
> init/calibrate.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff -upr linux/init/calibrate.c linux.new/init/calibrate.c
> --- linux/init/calibrate.c 2008-02-27 10:54:15.000000000 +0800
> +++ linux.new/init/calibrate.c 2008-02-27 10:54:26.000000000 +0800
> @@ -9,10 +9,11 @@
> #include <linux/init.h>
> #include <linux/timex.h>
>
> -unsigned long preset_lpj;
> +static unsigned long preset_lpj;
> static int __init lpj_setup(char *str)
> {
> - preset_lpj = simple_strtoul(str,NULL,0);
> + loops_per_jiffy = simple_strtoul(str, NULL, 0);
> + preset_lpj = 1;
> return 1;
> }
>
> @@ -117,7 +118,6 @@ void __cpuinit calibrate_delay(void)
> int lps_precision = LPS_PREC;
>
> if (preset_lpj) {
> - loops_per_jiffy = preset_lpj;
> printk("Calibrating delay loop (skipped)... "
> "%lu.%02lu BogoMIPS preset\n",
> loops_per_jiffy/(500000/HZ),