28 Jul, 2008

1 commit

  • Rabin Vincent noticed that there's a stray in BogoMIPS printk:

    > Remove the extra KERN_INFO which causes this:
    > Calibrating delay loop... 179.40 BogoMIPS (lpj=897024)
    > - printk(KERN_INFO "%lu.%02lu BogoMIPS (lpj=%lu)\n",
    > - loops_per_jiffy/(500000/HZ),
    > - (loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy);
    > + printk("%lu.%02lu BogoMIPS (lpj=%lu)\n",
    > + loops_per_jiffy/(500000/HZ),
    > + (loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy);
    > }

    How about just using KERN_CONT and leaving the whitespace
    for a patch that does the entire file?

    Reported-by: Rabin Vincent

    Joe Perches
     

24 Jun, 2008

2 commits

  • As suggested by Ingo, remove all references to tsc from init/calibrate.c

    TSC is x86 specific, and using tsc in variable names in a generic file should
    be avoided. lpj_tsc is now called lpj_fine, since it is related to fine tuning
    of lpj value. Also tsc_rate_* is called timer_rate_*

    Signed-off-by: Alok N Kataria
    Cc: Arjan van de Ven
    Cc: Daniel Hecht
    Cc: Tim Mann
    Cc: Zach Amsden
    Cc: Sahil Rihan
    Signed-off-by: Ingo Molnar

    Alok Kataria
     
  • On the x86 platform we can use the value of tsc_khz computed during tsc
    calibration to calculate the loops_per_jiffy value. Its very important
    to keep the error in lpj values to minimum as any error in that may
    result in kernel panic in check_timer. In virtualization environment, On
    a highly overloaded host the guest delay calibration may sometimes
    result in errors beyond the ~50% that timer_irq_works can handle,
    resulting in the guest panicking.

    Does some formating changes to lpj_setup code to now have a single
    printk to print the bogomips value.

    We do this only for the boot processor because the AP's can have
    different base frequencies or the BIOS might boot a AP at a different
    frequency.

    Signed-off-by: Alok N Kataria
    Cc: Arjan van de Ven
    Cc: Daniel Hecht
    Cc: Tim Mann
    Cc: Zach Amsden
    Cc: Sahil Rihan
    Signed-off-by: Ingo Molnar

    Alok Kataria
     

07 Feb, 2008

2 commits

  • calibrate_delay() must be __cpuinit, not __{dev,}init.

    I've verified that this is correct for all users.

    While doing the latter, I also did the following cleanups:
    - remove pointless additional prototypes in C files
    - ensure all users #include

    This fixes the following section mismatches with CONFIG_HOTPLUG=n,
    CONFIG_HOTPLUG_CPU=y:

    WARNING: vmlinux.o(.text+0x1128d): Section mismatch: reference to .init.text.1:calibrate_delay (between 'check_cx686_slop' and 'set_cx86_reorder')
    WARNING: vmlinux.o(.text+0x25102): Section mismatch: reference to .init.text.1:calibrate_delay (between 'smp_callin' and 'cpu_coregroup_map')

    Signed-off-by: Adrian Bunk
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Cc: "Luck, Tony"
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: "David S. Miller"
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Christian Zankel
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • - All implementations can be __devinit

    - The function prototypes were in asm/timex.h but they all must be the same,
    so create a single declaration in linux/timex.h.

    - uninline the sparc64 version to match the other architectures

    - Don't bother #defining ARCH_HAS_READ_CURRENT_TIMER to a particular value.

    [ezk@cs.sunysb.edu: fix build]
    Cc: "David S. Miller"
    Cc: Haavard Skinnemoen
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

17 Oct, 2007

1 commit

  • Optionally add a boot delay after each kernel printk() call, crudely
    measured in milliseconds, with a maximum delay of 10 seconds per printk.

    Enable CONFIG_BOOT_PRINTK_DELAY=y and then add (e.g.):
    "lpj=loops_per_jiffy boot_delay=100"
    to the kernel command line.

    It has been useful in cases like "during boot, my machine just reboots or the
    screen goes black" by slowing down printk, (and adding initcall_debug), we can
    usually see the last thing that happened before the lights went out which is
    usually a valuable clue.

    [akpm@linux-foundation.org: not all architectures implement CONFIG_HZ]
    [akpm@linux-foundation.org: fix lots of stuff]
    [bunk@stusta.de: kernel/printk.c: make 2 variables static]
    [heiko.carstens@de.ibm.com: fix slow down printk on boot compile error]
    Signed-off-by: Randy Dunlap
    Signed-off-by: Dave Jones
    Signed-off-by: Adrian Bunk
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

15 Feb, 2007

1 commit

  • After Al Viro (finally) succeeded in removing the sched.h #include in module.h
    recently, it makes sense again to remove other superfluous sched.h includes.
    There are quite a lot of files which include it but don't actually need
    anything defined in there. Presumably these includes were once needed for
    macros that used to live in sched.h, but moved to other header files in the
    course of cleaning it up.

    To ease the pain, this time I did not fiddle with any header files and only
    removed #includes from .c-files, which tend to cause less trouble.

    Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
    arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
    allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
    configs in arch/arm/configs on arm. I also checked that no new warnings were
    introduced by the patch (actually, some warnings are removed that were emitted
    by unnecessarily included header files).

    Signed-off-by: Tim Schmielau
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

24 Jun, 2005

1 commit

  • Issue:
    Current tsc based delay_calibration can result in significant errors in
    loops_per_jiffy count when the platform events like SMIs
    (System Management Interrupts that are non-maskable) are present. This could
    lead to potential kernel panic(). This issue is becoming more visible with 2.6
    kernel (as default HZ is 1000) and on platforms with higher SMI handling
    latencies. During the boot time, SMIs are mostly used by BIOS (for things
    like legacy keyboard emulation).

    Description:
    The psuedocode for current delay calibration with tsc based delay looks like
    (0) Estimate a value for loops_per_jiffy
    (1) While (loops_per_jiffy estimate is accurate enough)
    (2) wait for jiffy transition (jiffy1)
    (3) Note down current tsc (tsc1)
    (4) loop until tsc becomes tsc1 + loops_per_jiffy
    (5) check whether jiffy changed since jiffy1 or not and refine
    loops_per_jiffy estimate

    Consider the following cases
    Case 1:
    If SMIs happen between (2) and (3) above, we can end up with a
    loops_per_jiffy value that is too low. This results in shorted delays and
    kernel can panic () during boot (Mostly at IOAPIC timer initialization
    timer_irq_works() as we don't have enough timer interrupts in a specified
    interval).

    Case 2:
    If SMIs happen between (3) and (4) above, then we can end up with a
    loops_per_jiffy value that is too high. And with current i386 code, too
    high lpj value (greater than 17M) can result in a overflow in
    delay.c:__const_udelay() again resulting in shorter delay and panic().

    Solution:
    The patch below makes the calibration routine aware of asynchronous events
    like SMIs. We increase the delay calibration time and also identify any
    significant errors (greater than 12.5%) in the calibration and notify it to
    user.

    Patch below changes both i386 and x86-64 architectures to use this
    new and improved calibrate_delay_direct() routine.

    Signed-off-by: Venkatesh Pallipadi
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Venkatesh Pallipadi
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds