lkml.org 
[lkml]   [2011]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] x86: set percpu cpu0 lpj to default

    We need to use udelay() in early stage.

    For x86, normally udelay need to use percpu.loops_per_jiffy
    will need to wait per_cpu(cpu_info) is allocated and copied
    from boot_cpu_data, after it is in smp_prepare_cpus()
    boot_cpu_data.loops_per_jiffy get set in identify_boot_cpu from check_bugs.

    But cpu_data(0) can be referred early, that is in per cpu load data.

    Try to set it with default vaule instead leave it as zero.

    BTW: it it is some small...only 4096

    Now: only user for udelay is ehci dgp early console.

    Signed-off-by: Yinghai Lu <yinghai@kernel.org>

    ---
    arch/x86/kernel/setup.c | 1 +
    1 file changed, 1 insertion(+)

    Index: linux-2.6/arch/x86/kernel/setup.c
    ===================================================================
    --- linux-2.6.orig/arch/x86/kernel/setup.c
    +++ linux-2.6/arch/x86/kernel/setup.c
    @@ -734,6 +734,7 @@ void __init setup_arch(char **cmdline_p)

    early_trap_init();
    early_cpu_init();
    + cpu_data(0).loops_per_jiffy = loops_per_jiffy;
    early_ioremap_init();

    setup_olpc_ofw_pgd();

    \
     
     \ /
      Last update: 2011-01-14 22:25    [W:0.020 / U:34.020 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site