23 Mar, 2006

40 commits

  • Attempt to fix the problem wherein people's oops reports scroll off the screen
    due to repeated oopsing or to oopses on other CPUs.

    If this happens the user can reboot with the `pause_on_oops=' option.
    It will allow the first oopsing CPU to print an oops record just a single
    time. Second oopsing attempts, or oopses on other CPUs will cause those CPUs
    to enter a tight loop until the specified number of seconds have elapsed.

    The patch implements the infrastructure generically in the expectation that
    architectures other than x86 will find it useful.

    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • This patch removes all occurances of _INLINE_ in the kernel.

    With the exception of tty_flip.h, I've simply removed the inline's since
    gcc should know best which functions to be inlined.

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

    Adrian Bunk
     
  • Consolidate all kernel bug printouts to begin with the "BUG: " string.
    Makes it easier to find them in large bootup logs.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Semaphore to mutex conversion.

    The conversion was generated via scripts, and the result was validated
    automatically via a script as well.

    Signed-off-by: Ingo Molnar
    Acked-by: Anil S Keshavamurthy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Use the standard BCD macros instead of redefining them.

    Signed-off-by: Jean Delvare
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     
  • This patch from Pavel moves userland freeze signals handling into more logical
    place. It now hits even with mysqld running.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Don't create "online" control file for BSP (i386/x86_64) since its
    not removable.

    We originally added this to support ppc64 if the kernel has support but
    BIOS indicated no offline support, we just didnt create online files for
    them.

    We used the same method in ia64 as well, if we have a cpu taking platform
    interrupts but cannot be removed if those interrupts cannot be re-targeted
    to another cpu.

    Signed-off-by: Ashok Raj
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ashok Raj
     
  • You must always ensure to fulfill the dependencies of what you are
    select'ing.

    Signed-off-by: Adrian Bunk
    Cc: Martin Bligh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Checking APIC version instead of CPU family to determine XAPIC. Family 6
    CPU could have xapic as well.

    Signed-off-by: Shaohua Li
    Cc: Dave Jones
    Cc: "Seth, Rohit"
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shaohua Li
     
  • Detecting cache line using cpuid.4, cpuid level 4 is enough.

    Signed-off-by: Shaohua Li
    Cc: Dave Jones
    Cc: "Seth, Rohit"
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shaohua Li
     
  • i386 has a small bug in the stack dump code where it prints an extra log
    level code. Remove that and fix the alignment of normal stack dump
    printout. Also remove some unnecessary printk() calls.

    Signed-off-by: Chuck Ebbert
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Ebbert
     
  • With cpu_gdt_descr having been converted to per-CPU data, the old object
    (in head.S) no longer needs to reserve space for each CPU's instance. With
    cpu_gdt_table not being used for CPU 0 anymore, it doesn't seem to need
    page alignment (or if in fact there is a need for it to retain that
    alignment, the whole object should go into .data.page_align).

    Signed-off-by: Jan Beulich
    Acked-by: Zachary Amsden
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • arch/i386/kernel/cpu/centaur.c: In function `centaur_mcr_insert':
    arch/i386/kernel/cpu/centaur.c:33: warning: implicit declaration of function `mtrr_centaur_report_mcr'

    Signed-off-by: Jesper Juhl
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • arch/i386/kernel/apic.c:840: warning: implicit declaration of function `GET_APIC_ID'

    Signed-off-by: Jesper Juhl
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • Document a limitation of vsyscall-sysenter, since patches to fix it have
    been rejected.

    Signed-off-by: Chuck Ebbert
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Ebbert
     
  • Using PTRACE_SINGLESTEP on a child that does an int80 syscall misses the
    SIGTRAP that should be delivered upon syscall exit. Fix that by setting
    TIF_SINGLESTEP when entering the kernel via int80 with TF set.

    /* Test whether singlestep through an int80 syscall works.
    */
    #define _GNU_SOURCE
    #include
    #include
    #include
    #include
    #include
    #include
    #include

    static int child, status;
    static struct user_regs_struct regs;

    static void do_child()
    {
    ptrace(PTRACE_TRACEME, 0, 0, 0);
    kill(getpid(), SIGUSR1);
    asm ("int $0x80" : : "a" (20)); /* getpid */
    }

    static void do_parent()
    {
    unsigned long eip, expected = 0;
    again:
    waitpid(child, &status, 0);
    if (WIFEXITED(status) || WIFSIGNALED(status))
    return;

    if (WIFSTOPPED(status)) {
    ptrace(PTRACE_GETREGS, child, 0, ®s);
    eip = regs.eip;
    if (expected)
    fprintf(stderr, "child stop @ %08x, expected %08x %s\n",
    eip, expected,
    eip == expected ? "" : "
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Ebbert
     
  • >commit 76381fee7e8feb4c22be636aa5d4765dbe4fbf9e
    >Author: Vincent Hanquez
    >Date: Thu Jun 23 00:08:46 2005 -0700
    >
    > [PATCH] xen: x86_64: use more usermode macro
    >
    > Make use of the user_mode macro where it's possible. This is useful for Xen
    > because it will need only to redefine only the macro to a hypervisor call.

    I am of the opinion that the above changeset is incomplete, i.e. it missed
    converting some previous uses of user_mode to user_mode_vm. While most of
    them could be considered just cosmetical, at least the one in die_nmi
    doesn't appear to be.

    Signed-off-by: Jan Beulich
    Cc: Vincent Hanquez
    Cc: Zachary Amsden
    Cc: James Bottomley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • Registering a callback handler through register_die_notifier() is obviously
    primarily intended for use by modules. However, the way these currently
    get called it is basically impossible for them to actually be used by
    modules, as there is, on non-PAE configurationes, a good chance (the larger
    the module, the better) for the system to crash as a result.

    This is because the callback gets invoked

    (a) in the page fault path before the top level page table propagation
    gets carried out (hence a fault to propagate the top level page table
    entry/entries mapping to module's code/data would nest infinitly) and

    (b) in the NMI path, where nested faults must absolutely not happen,
    since otherwise the IRET from the nested fault re-enables NMIs,
    potentially resulting in nested NMI occurences.

    Besides the modular aspect, similar problems would even arise for in-
    kernel consumers of the API if they touched ioremap()ed or vmalloc()ed
    memory inside their handlers.

    Signed-off-by: Jan Beulich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • Expand out these fairly pointless macros.

    Cc: Chuck Ebbert
    Cc: Stas Sergeev
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Use boot info to start early_printk() at the current row on VGA console, as
    left by the boot loader.

    Signed-off-by: Chuck Ebbert
    Cc: Stas Sergeev
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Ebbert
     
  • The history is that -mm kernels do not work for me for a few months
    already. The things started from crashing somewhere after starting init,
    and for the last month - no boot at all, just "Uncompressing... OK,
    booting kernel", and silence. Early console didn't work too. With the
    latest releases this degraded into an infinite stream of the "Unknown
    interrupt or fault" messages. So today my patience ran out and I started
    to think how can I collect at least some info for the bug-report. Attached
    is the patch that allows to gather some valueable debug info on the problem
    by making an early console more useable. I can't properly test the patch,
    as the kernel still doesn't boot, so I'll explain it in details in a hope
    someone else can justify the intrusive changes.

    arch_hooks.h: added prototypes for setup_early_printk() and early_printk().

    setup.c: killed wrong setup_early_printk() prototype. Moved
    setup_early_printk() a bit earlier, as it was not "early enough" to cover
    the bug I was fighting with.

    early_printk.c: made it to start printing from the bottom of the screen,
    otherwise the messages interfere with the ones of the boot-loader, so you
    can't read them.

    Signed-off-by: Stas Sergeev
    Cc: Andi Kleen
    Cc: Zwane Mwaikambo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stas Sergeev
     
  • Allow signal handlers to set the RF bit in EFLAGS. This lets a simple
    debugger using SIGTRAP skip one instruction after returning from a signal.

    Signed-off-by: Chuck Ebbert
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Ebbert
     
  • There's no good reason for allowing ptrace to set the NT bit in EFLAGS, so
    mask it off.

    Signed-off-by: Chuck Ebbert
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Ebbert
     
  • Merge a few printk calls in i386 traps.

    Signed-off-by: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     
  • ES7000 platform code clean up for compilation errors and a warning.
    Ifdef'd the ACPI related parts in the ES7000 platform code. They were
    causing compile errors in certain configuration (without ACPI defined). I
    think this approach would be best (as opposed to Kconfig changes) since it
    only touches the subarch...

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

    Natalie.Protasevich@unisys.com
     
  • When vendor-specific i386 initialization code is unavailable the kernel
    falls back to a default CPU model name. Make that model name reflect the
    CPU family instead of an internal vendor index.

    Tested on Pentium II (family 6 model 5).

    /proc/cpuinfo before:
    model name : ff/05

    after:
    model name : 06/05

    Signed-off-by: Chuck Ebbert
    Acked-by: "Seth, Rohit"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Ebbert
     
  • Allow the x86 "sep" feature to be disabled at bootup. This forces use of the
    int80 vsyscall. Mainly for testing or benchmarking the int80 vsyscall code.

    Signed-off-by: Chuck Ebbert
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Ebbert
     
  • Several places in arch/i386/kernel/cpu and kernel/cpu were using __devinit
    when they should have been __cpuinit. Fixing that saves ~4K when
    CONFIG_HOTPLUG && !CONFIG_HOTPLUG_CPU.

    Noticed by Andrew Morton.

    Signed-off-by: Chuck Ebbert
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Ebbert
     
  • Implement SMP alternatives, i.e. switching at runtime between different
    code versions for UP and SMP. The code can patch both SMP->UP and UP->SMP.
    The UP->SMP case is useful for CPU hotplug.

    With CONFIG_CPU_HOTPLUG enabled the code switches to UP at boot time and
    when the number of CPUs goes down to 1, and switches to SMP when the number
    of CPUs goes up to 2.

    Without CONFIG_CPU_HOTPLUG or on non-SMP-capable systems the code is
    patched once at boot time (if needed) and the tables are released
    afterwards.

    The changes in detail:

    * The current alternatives bits are moved to a separate file,
    the SMP alternatives code is added there.

    * The patch adds some new elf sections to the kernel:
    .smp_altinstructions
    like .altinstructions, also contains a list
    of alt_instr structs.
    .smp_altinstr_replacement
    like .altinstr_replacement, but also has some space to
    save original instruction before replaving it.
    .smp_locks
    list of pointers to lock prefixes which can be nop'ed
    out on UP.
    The first two are used to replace more complex instruction
    sequences such as spinlocks and semaphores. It would be possible
    to deal with the lock prefixes with that as well, but by handling
    them as special case the table sizes become much smaller.

    * The sections are page-aligned and padded up to page size, so they
    can be free if they are not needed.

    * Splitted the code to release init pages to a separate function and
    use it to release the elf sections if they are unused.

    Signed-off-by: Gerd Hoffmann
    Signed-off-by: Chuck Ebbert
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gerd Hoffmann
     
  • Print stack backtraces in multiple columns, saving screen space. Number of
    columns is configurable and defaults to one so behavior is
    backwards-compatible.

    Also removes the brackets around addresses when printing more
    that one entry per line so they print as:


    instead of:
    [
    ]
    This helps multiple entries fit better on one line.

    Original idea by Dave Jones, taken from x86_64.

    Signed-off-by: Chuck Ebbert
    Signed-off-by: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Ebbert
     
  • Make CONFIG_REGPARM enabled by default. It's a noticable win both for size
    and for performance, and gcc[34] handles it correctly.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • REGPARM has already gotten much testing, what about removing the
    dependency on EXPERIMENTAL?

    Additionally, this patch does:
    - remove the useless "default n"
    - remove note regarding binary only modules (nowadays, there are even
    some binary only modules compiled with REGPARM=y available)

    Signed-off-by: Adrian Bunk
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Merge clash will have broken sparc64. Synch up its online_page
    implementation with powerpc, which was identical until the
    set_page_count removal.

    Signed-off-by: Nick Piggin
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (78 commits)
    [PATCH] powerpc: Add FSL SEC node to documentation
    [PATCH] macintosh: tidy-up driver_register() return values
    [PATCH] powerpc: tidy-up of_register_driver()/driver_register() return values
    [PATCH] powerpc: via-pmu warning fix
    [PATCH] macintosh: cleanup the use of i2c headers
    [PATCH] powerpc: dont allow old RTC to be selected
    [PATCH] powerpc: make powerbook_sleep_grackle static
    [PATCH] powerpc: Fix warning in add_memory
    [PATCH] powerpc: update mailing list addresses
    [PATCH] powerpc: Remove calculation of io hole
    [PATCH] powerpc: iseries: Add bootargs to /chosen
    [PATCH] powerpc: iseries: Add /system-id, /model and /compatible
    [PATCH] powerpc: Add strne2a() to convert a string from EBCDIC to ASCII
    [PATCH] powerpc: iseries: Make more stuff static in platforms/iseries/mf.c
    [PATCH] powerpc: iseries: Remove pointless iSeries_(restart|power_off|halt)
    [PATCH] powerpc: iseries: mf related cleanups
    [PATCH] powerpc: Replace platform_is_lpar() with a firmware feature
    [PATCH] powerpc: trivial: Cleanup whitespace in cputable.h
    [PATCH] powerpc: Remove unused iommu_off logic from pSeries_init_early()
    [PATCH] powerpc: Unconfuse htab_bolt_mapping() callers
    ...

    Linus Torvalds
     
  • Remove the assumption that driver_register() returns the number of devices
    bound to the driver. In fact, it returns zero for success or a negative
    error value.

    Nobody uses the return value of of_register_driver() anyway.

    Signed-off-by: Bjorn Helgaas
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Paul Mackerras

    Bjorn Helgaas
     
  • arch/powerpc/mm/mem.c: In function `add_memory':
    arch/powerpc/mm/mem.c:128: warning: assignment makes integer from pointer without a cast

    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Paul Mackerras

    Andrew Morton
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm: (45 commits)
    [ARM] 3389/1: typo and grammar fix
    [ARM] 3386/1: AT91RM9200 Clock update
    [ARM] 3384/1: AT91RM9200: Timer
    [ARM] 3382/1: ixp2000: unify defconfigs
    [ARM] 3381/1: ixp2000: fix slowport write timing control register fields
    [ARM] 3380/1: ixp2000: simplify ixdp2x00_master_npu() check
    [ARM] 3379/1: ixp2000: use generic 8250 debug macros
    [ARM] 3378/1: ixp2000: fix gpio interrupt handling
    [ARM] Quieten spurious IRQ detection
    [ARM] Use kcalloc to allocate counter_config array rather than kmalloc
    [ARM] Oprofile: dynamically allocate counter_config
    [ARM] Oprofile: Convert semaphore to mutex
    [ARM] 3376/2: S3C2410 - update defconfig
    [ARM] 3375/1: S3C2440 - fix osiris machine build
    [ARM] 3374/1: ep93xx: gpio interrupt support
    [ARM] 3361/1: S3C24XX - add USB bus clock source
    [ARM] 3360/1: S3C2440 - add set rate methods and camera clock
    [ARM] 3359/1: S3C24XX - add support for clk_set_rate
    [ARM] Convert kmalloc+memset to kzalloc
    [ARM] 3373/1: move uengine loader to arch/arm/common
    ...

    Linus Torvalds
     
  • Patch from Erik Hovland

    I found a typo and what seems to be a run-on sentence in
    arch/arm/common/dmabounce.c

    This patch corrects both.

    Signed-off-by: Erik Hovland
    Signed-off-by: Russell King

    Erik Hovland
     
  • Patch from Andrew Victor

    This patch includes a few changes to the clock support on the
    AT91RM9200.

    1. Added definitions for Ethernet, MMC, TWI, USARTs, and SPI peripheral
    clocks.

    2. Replaced some hard-coded hex values with the text definitions in
    at91rm9200_sys.h.

    3. If the USB96M bit is set for PLLB, then the rate of PLLB is not
    affected but only the USB Host/Device clocks which are derived from it.
    Issue reported by Sergei Sharonov.

    Signed-off-by: Andrew Victor
    Signed-off-by: Russell King

    Andrew Victor
     
  • Patch from Andrew Victor

    If the timer interrupt is ever significantly delayed (or after the
    system was suspended), the system could spin incrementing the time for
    too long.
    The fix is to replace the "do {} while" with a "while {}".

    Orignal patch by Savin Zlobec and Peter Menzebach.

    Signed-off-by: Andrew Victor
    Signed-off-by: Russell King

    Andrew Victor