08 Nov, 2014

1 commit

  • The 32 bit addition "(hangcheck_margin + hangcheck_tick)" could
    potentially overflow. It triggers a static checker warning to have an
    overflowed addition followed by a no-op cast. I have moved the cast so
    that the addition can't overflow.

    Also I removed the unneeded cast on the following line since both
    "hangcheck_tsc_margin" and "TIMER_FREQ" are already 64 bit types.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     

24 Jul, 2014

1 commit

  • There is no point in having a S390 private implementation and there is
    no point in using the raw monotonic time. The NTP freqeuency
    adjustment of CLOCK_MONOTONIC is really not doing any harm for the
    hang check timer.

    Use ktime_get_ns() for everything and get rid of the timespec
    conversions.

    V2: Drop the raw monotonic and the S390 special case

    Signed-off-by: Thomas Gleixner
    Cc: Arnd Bergmann
    Cc: Greg Kroah-Hartman
    Cc: Heiko Carstens
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: John Stultz

    Thomas Gleixner
     

21 Aug, 2010

1 commit

  • Sysrq operations do not accept tty argument anymore so no need to pass
    it to us.

    [Stephen Rothwell : fix build breakage in drm code
    caused by sysrq using bool but not including linux/types.h]

    [Sachin Sant : fix build breakage in s390 keyboadr
    driver]

    Acked-by: Alan Cox
    Acked-by: Jason Wessel
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

25 May, 2010

1 commit

  • drivers/char/hangcheck-timer.c is doubly broken. When the overflown value
    of TIMER_FREQ is abnormally low, it spams the syslog with KERN_CRIT
    messages "Hangcheck: hangcheck value past margin!" But whether it happens
    or not depends on HZ and lpj in a complex way. People have hit it
    occasionally as far as google search can tell.

    First, the following line overflows unsigned long:

    # define TIMER_FREQ (HZ*loops_per_jiffy)

    Second, and more importantly, loops_per_jiffy has little to do with the
    con= version from the the time scale of get_cycles() (aka rdtsc) to the
    time scale of jiffies.

    The attached patch resolves both of the problems.

    Acked-by: Joel Becker
    Cc: john stultz
    Cc: Jan Glauber
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yury Polyanskiy
     

03 Feb, 2008

1 commit


22 May, 2007

1 commit

  • First thing mm.h does is including sched.h solely for can_do_mlock() inline
    function which has "current" dereference inside. By dealing with can_do_mlock()
    mm.h can be detached from sched.h which is good. See below, why.

    This patch
    a) removes unconditional inclusion of sched.h from mm.h
    b) makes can_do_mlock() normal function in mm/mlock.c
    c) exports can_do_mlock() to not break compilation
    d) adds sched.h inclusions back to files that were getting it indirectly.
    e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
    getting them indirectly

    Net result is:
    a) mm.h users would get less code to open, read, preprocess, parse, ... if
    they don't need sched.h
    b) sched.h stops being dependency for significant number of files:
    on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
    after patch it's only 3744 (-8.3%).

    Cross-compile tested on

    all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
    alpha alpha-up
    arm
    i386 i386-up i386-defconfig i386-allnoconfig
    ia64 ia64-up
    m68k
    mips
    parisc parisc-up
    powerpc powerpc-up
    s390 s390-up
    sparc sparc-up
    sparc64 sparc64-up
    um-x86_64
    x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig

    as well as my two usual configs.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

09 May, 2007

1 commit


17 Feb, 2007

1 commit

  • This patch converts x86_64 to use the GENERIC_TIME infrastructure and adds
    clocksource structures for both TSC and HPET (ACPI PM is shared w/ i386).

    [akpm@osdl.org: fix printk timestamps]
    [akpm@osdl.org: fix printk ckeanups]
    [akpm@osdl.org: hpet build fix]
    Signed-off-by: John Stultz
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Andi Kleen
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     

05 Oct, 2006

1 commit

  • Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
    of passing regs around manually through all ~1800 interrupt handlers in the
    Linux kernel.

    The regs pointer is used in few places, but it potentially costs both stack
    space and code to pass it around. On the FRV arch, removing the regs parameter
    from all the genirq function results in a 20% speed up of the IRQ exit path
    (ie: from leaving timer_interrupt() to leaving do_IRQ()).

    Where appropriate, an arch may override the generic storage facility and do
    something different with the variable. On FRV, for instance, the address is
    maintained in GR28 at all times inside the kernel as part of general exception
    handling.

    Having looked over the code, it appears that the parameter may be handed down
    through up to twenty or so layers of functions. Consider a USB character
    device attached to a USB hub, attached to a USB controller that posts its
    interrupts through a cascaded auxiliary interrupt controller. A character
    device driver may want to pass regs to the sysrq handler through the input
    layer which adds another few layers of parameter passing.

    I've build this code with allyesconfig for x86_64 and i386. I've runtested the
    main part of the code on FRV and i386, though I can't test most of the drivers.
    I've also done partial conversion for powerpc and MIPS - these at least compile
    with minimal configurations.

    This will affect all archs. Mostly the changes should be relatively easy.
    Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

    struct pt_regs *old_regs = set_irq_regs(regs);

    And put the old one back at the end:

    set_irq_regs(old_regs);

    Don't pass regs through to generic_handle_irq() or __do_IRQ().

    In timer_interrupt(), this sort of change will be necessary:

    - update_process_times(user_mode(regs));
    - profile_tick(CPU_PROFILING, regs);
    + update_process_times(user_mode(get_irq_regs()));
    + profile_tick(CPU_PROFILING);

    I'd like to move update_process_times()'s use of get_irq_regs() into itself,
    except that i386, alone of the archs, uses something other than user_mode().

    Some notes on the interrupt handling in the drivers:

    (*) input_dev() is now gone entirely. The regs pointer is no longer stored in
    the input_dev struct.

    (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
    something different depending on whether it's been supplied with a regs
    pointer or not.

    (*) Various IRQ handler function pointers have been moved to type
    irq_handler_t.

    Signed-Off-By: David Howells
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     

27 Jun, 2006

1 commit

  • John's about to nuke x86's monotonic clock without grepping for it first. The
    patch lamely borrows the ppc64 code for x86.

    hangcheck-timer shouldn't be doing it this way

    a) HAVE_MONOTONIC should be CONFIG_MONOTONIC_CLOCK and it should be defined
    in arch/xxx/Kconfig.

    b) That ifdef tangle shouldn't be in hangcheck-timer.c. It should be using
    arch-provided helper functions, which CONFIG_MONOTONIC_CLOCK-enabling
    architectures implement in arch/something.c

    Cc: john stultz
    Acked-by: Joel Becker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

02 Feb, 2006

1 commit

  • Remove useless s390 define from hangcheck-timer, remove wrong definition of a
    TOD second and other s390 ifdefs. Use monotonic_clock instead.

    Add hangcheck-timer option, copied from drivers/char/Kconfig. This is ugly
    but unless we have a big Kconfig cleanup we cannot include
    drivers/char/Kconfig...

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Glauber
     

07 Jan, 2006

1 commit

  • Sanitize some s390 Kconfig options. We have ARCH_S390, ARCH_S390X,
    ARCH_S390_31, 64BIT, S390_SUPPORT and COMPAT. Replace these 6 options by
    S390, 64BIT and COMPAT.

    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Martin Schwidefsky
     

31 Oct, 2005

1 commit

  • Add CONFIG_X86_32 for i386. This allows selecting options that only apply
    to 32-bit systems.

    (X86 && !X86_64) becomes X86_32
    (X86 || X86_64) becomes X86

    Signed-off-by: Brian Gerst
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Brian Gerst
     

10 Sep, 2005

1 commit


27 Jul, 2005

1 commit


01 May, 2005

1 commit


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