21 Dec, 2006

1 commit

  • This patch is designed to fix:
    - Disk eating corruptor on KT7 after resume from RAM
    - VIA IRQ handling
    - VIA fixups for bus lockups after resume from RAM

    The core of this is to add a table of resume fixups run at resume time.
    We need to do this for a variety of boards and features, but particularly
    we need to do this to get various critical VIA fixups done on resume.

    The second part of the problem is to handle VIA IRQ number rules which
    are a bit odd and need special handling for PIC interrupts. Various
    patches broke various boxes and while this one may not be perfect
    (hopefully it is) it ensures the workaround is applied to the right
    devices only.

    From: Jean Delvare

    Now that PCI quirks are replayed on software resume, we can safely
    re-enable the Asus SMBus unhiding quirk even when software suspend support
    is enabled.

    [akpm@osdl.org: fix const warning]
    Signed-off-by: Alan Cox
    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     

18 Dec, 2006

4 commits


16 Dec, 2006

1 commit

  • It has caused more problems than it ever really solved, and is
    apparently not getting cleaned up and fixed. We can put it back when
    it's stable and isn't likely to make warning or bug events worse.

    In the meantime, enable frame pointers for more readable stack traces.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

14 Dec, 2006

4 commits


13 Dec, 2006

7 commits


10 Dec, 2006

7 commits

  • Since Voyager and Visual WS already define ARCH_SETUP,
    it looks like PARAVIRT shouldn't be offered for them.

    In file included from arch/i386/kernel/setup.c:63:
    include/asm-i386/mach-visws/setup_arch.h:8:1: warning: "ARCH_SETUP" redefin=
    ed
    In file included from include/asm/msr.h:5,
    from include/asm/processor.h:17,
    from include/asm/thread_info.h:16,
    from include/linux/thread_info.h:21,
    from include/linux/preempt.h:9,
    from include/linux/spinlock.h:49,
    from include/linux/capability.h:45,
    from include/linux/sched.h:46,
    from arch/i386/kernel/setup.c:26:
    include/asm/paravirt.h:163:1: warning: this is the location of the previous=
    definition
    In file included from arch/i386/kernel/setup.c:63:
    include/asm-i386/mach-visws/setup_arch.h:8:1: warning: "ARCH_SETUP" redefin=
    ed
    In file included from include/asm/msr.h:5,
    from include/asm/processor.h:17,
    from include/asm/thread_info.h:16,
    from include/linux/thread_info.h:21,
    from include/linux/preempt.h:9,
    from include/linux/spinlock.h:49,
    from include/linux/capability.h:45,
    from include/linux/sched.h:46,
    from arch/i386/kernel/setup.c:26:
    include/asm/paravirt.h:163:1: warning: this is the location of the previous=
    definition

    Signed-off-by: Randy Dunlap

    Randy Dunlap
     
  • gcc 4.2 warns

    linux/arch/i386/kernel/io_apic.c: In function ‘create_irq’:
    linux/arch/i386/kernel/io_apic.c:2488: warning: ‘vector’ may be used uninitialized in this function

    The warning is false, but somewhat legitimate so work around it.

    Signed-off-by: Andi Kleen

    Andi Kleen
     
  • oprofile uses smp_num_siblings without testing for CONFIG_X86_HT.
    I looked at modifying oprofile, but this way is cleaner & simpler
    and I didn't see a good reason not to just export it when CONFIG_SMP.

    WARNING: "smp_num_siblings" [arch/i386/oprofile/oprofile.ko] undefined!

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andi Kleen

    Randy Dunlap
     
  • The new PDA code uses a dummy _proxy_pda variable to describe
    memory references to the PDA. It is never referenced
    in inline assembly, but exists as input/output arguments.
    gcc 4.2 in some cases can CSE references to this which causes
    unresolved symbols. Define it to zero to avoid this.

    Signed-off-by: Andi Kleen

    Andi Kleen
     
  • 2.6.19 stopped booting (or booted based on build/config) on our x86_64
    systems due to a bug introduced in 2.6.19. check_nmi_watchdog schedules an
    IPI on all cpus to busy wait on a flag, but fails to set the busywait
    flag if NMI functionality is disabled. This causes the secondary cpus
    to spin in an endless loop, causing the kernel bootup to hang.
    Depending upon the build, the busywait flag got overwritten (stack variable)
    and caused the kernel to bootup on certain builds. Following patch fixes
    the bug by setting the busywait flag before returning from check_nmi_watchdog.
    I guess using a stack variable is not good here as the calling function could
    potentially return while the busy wait loop is still spinning on the flag.

    AK: I redid the patch significantly to be cleaner

    Signed-off-by: Ravikiran Thirumalai
    Signed-off-by: Shai Fultheim
    Signed-off-by: Andi Kleen

    Ravikiran G Thirumalai
     
  • Fix verify_quirk_intel_irqbalance(). genapic checks should really
    happen only on affected versions of the E7520/E7320/E7525 based platforms.

    AK: This should akpm's Coyote SDV

    Signed-off-by: Suresh Siddha
    Signed-off-by: Andi Kleen

    Andi Kleen
     
  • Signed-off-by: Andi Kleen

    Andi Kleen
     

09 Dec, 2006

5 commits

  • In VMSPLIT mode, kernel PGD might have more entries than user space.

    Acked-by: Jens Axboe
    Signed-off-by: Shaohua Li
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shaohua Li
     
  • With CONFIG_FB_SGIVW=m:
    WARNING: "sgivwfb_mem_size" [drivers/video/sgivwfb.ko] undefined!
    WARNING: "sgivwfb_mem_phys" [drivers/video/sgivwfb.ko] undefined!

    (or don't allow FB_SGIVW=m in Kconfig)

    Signed-off-by: Randy Dunlap
    Acked-by: James Simmons
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • This facility provides three entry points:

    ilog2() Log base 2 of unsigned long
    ilog2_u32() Log base 2 of u32
    ilog2_u64() Log base 2 of u64

    These facilities can either be used inside functions on dynamic data:

    int do_something(long q)
    {
    ...;
    y = ilog2(x)
    ...;
    }

    Or can be used to statically initialise global variables with constant values:

    unsigned n = ilog2(27);

    When performing static initialisation, the compiler will report "error:
    initializer element is not constant" if asked to take a log of zero or of
    something not reducible to a constant. They treat negative numbers as
    unsigned.

    When not dealing with a constant, they fall back to using fls() which permits
    them to use arch-specific log calculation instructions - such as BSR on
    x86/x86_64 or SCAN on FRV - if available.

    [akpm@osdl.org: MMC fix]
    Signed-off-by: David Howells
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Herbert Xu
    Cc: David Howells
    Cc: Wojtek Kaniewski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Change all the uses of f_{dentry,vfsmnt} to f_path.{dentry,mnt} in the i386
    arch code.

    Signed-off-by: Josef "Jeff" Sipek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josef "Jeff" Sipek
     
  • This makes i386 use the generic BUG machinery. There are no functional
    changes from the old i386 implementation.

    The main advantage in using the generic BUG machinery for i386 is that the
    inlined overhead of BUG is just the ud2a instruction; the file+line(+function)
    information are no longer inlined into the instruction stream. This reduces
    cache pollution, and makes disassembly work properly.

    Signed-off-by: Jeremy Fitzhardinge
    Cc: Andi Kleen
    Cc: Hugh Dickens
    Cc: Michael Ellerman
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeremy Fitzhardinge
     

08 Dec, 2006

11 commits

  • * 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (156 commits)
    [PATCH] x86-64: Export smp_call_function_single
    [PATCH] i386: Clean up smp_tune_scheduling()
    [PATCH] unwinder: move .eh_frame to RODATA
    [PATCH] unwinder: fully support linker generated .eh_frame_hdr section
    [PATCH] x86-64: don't use set_irq_regs()
    [PATCH] x86-64: check vector in setup_ioapic_dest to verify if need setup_IO_APIC_irq
    [PATCH] x86-64: Make ix86 default to HIGHMEM4G instead of NOHIGHMEM
    [PATCH] i386: replace kmalloc+memset with kzalloc
    [PATCH] x86-64: remove remaining pc98 code
    [PATCH] x86-64: remove unused variable
    [PATCH] x86-64: Fix constraints in atomic_add_return()
    [PATCH] x86-64: fix asm constraints in i386 atomic_add_return
    [PATCH] x86-64: Correct documentation for bzImage protocol v2.05
    [PATCH] x86-64: replace kmalloc+memset with kzalloc in MTRR code
    [PATCH] x86-64: Fix numaq build error
    [PATCH] x86-64: include/asm-x86_64/cpufeature.h isn't a userspace header
    [PATCH] unwinder: Add debugging output to the Dwarf2 unwinder
    [PATCH] x86-64: Clarify error message in GART code
    [PATCH] x86-64: Fix interrupt race in idle callback (3rd try)
    [PATCH] x86-64: Remove unwind stack pointer alignment forcing again
    ...

    Fixed conflict in include/linux/uaccess.h manually

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • The elf note saving code is currently duplicated over several
    architectures. This cleanup patch simply adds code to a common file and
    then replaces the arch-specific code with calls to the newly added code.

    The only drawback with this approach is that s390 doesn't fully support
    kexec-on-panic which for that arch leads to introduction of unused code.

    Signed-off-by: Magnus Damm
    Cc: Vivek Goyal
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Magnus Damm
     
  • Every file should #include the headers containing the prototypes for
    its global functions.

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

    Adrian Bunk
     
  • There was lots of #ifdef noise in the kernel due to hotcpu_notifier(fn,
    prio) not correctly marking 'fn' as used in the !HOTPLUG_CPU case, and thus
    generating compiler warnings of unused symbols, hence forcing people to add
    #ifdefs.

    the compiler can skip truly unused functions just fine:

    text data bss dec hex filename
    1624412 728710 3674856 6027978 5bfaca vmlinux.before
    1624412 728710 3674856 6027978 5bfaca vmlinux.after

    [akpm@osdl.org: topology.c fix]
    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • smp_call_function_single() can deadlock if the caller disabled local
    interrupts (the target CPU could be spinning on call_lock). Check for that.

    Why on earth do these functions use spin_lock_bh()??

    Cc: "Randy.Dunlap"
    Cc: Andi Kleen
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • When we are unregistering a kprobe-booster, we can't release its
    instruction buffer immediately on the preemptive kernel, because some
    processes might be preempted on the buffer. The freeze_processes() and
    thaw_processes() functions can clean most of processes up from the buffer.
    There are still some non-frozen threads who have the PF_NOFREEZE flag. If
    those threads are sleeping (not preempted) at the known place outside the
    buffer, we can ensure safety of freeing.

    However, the processing of this check routine takes a long time. So, this
    patch introduces the garbage collection mechanism of insn_slot. It also
    introduces the "dirty" flag to free_insn_slot because of efficiency.

    The "clean" instruction slots (dirty flag is cleared) are released
    immediately. But the "dirty" slots which are used by boosted kprobes, are
    marked as garbages. collect_garbage_slots() will be invoked to release
    "dirty" slots if there are more than INSNS_PER_PAGE garbage slots or if
    there are no unused slots.

    Cc: "Keshavamurthy, Anil S"
    Cc: Ananth N Mavinakayanahalli
    Cc: "bibo,mao"
    Cc: Prasanna S Panchamukhi
    Cc: Yumiko Sugita
    Cc: Satoshi Oshima
    Cc: Hideo Aoki
    Signed-off-by: Masami Hiramatsu
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masami Hiramatsu
     
  • After LOADER_TYPE && INITRD_START are true, the short if-condition
    for INITRD_START can never be false.

    Remove unused code from the else condition.

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

    Henry Nestler
     
  • Name some of the remaning 'old_style_spin_init' locks

    Signed-off-by: Peter Zijlstra
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Make swsusp support i386 systems with PAE or without PSE.

    This is done by creating temporary page tables located in resume-safe page
    frames before the suspend image is restored in the same way as x86_64 does
    it.

    Signed-off-by: Rafael J. Wysocki
    Cc: Andi Kleen
    Cc: Dave Jones
    Cc: Nigel Cunningham
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Move process freezing functions from include/linux/sched.h to freezer.h, so
    that modifications to the freezer or the kernel configuration don't require
    recompiling just about everything.

    [akpm@osdl.org: fix ueagle driver]
    Signed-off-by: Nigel Cunningham
    Cc: "Rafael J. Wysocki"
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nigel Cunningham
     
  • Replace all uses of kmem_cache_t with struct kmem_cache.

    The patch was generated using the following script:

    #!/bin/sh
    #
    # Replace one string by another in all the kernel sources.
    #

    set -e

    for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
    quilt add $file
    sed -e "1,\$s/$1/$2/g" $file >/tmp/$$
    mv /tmp/$$ $file
    quilt refresh
    done

    The script was run like this

    sh replace kmem_cache_t "struct kmem_cache"

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

    Christoph Lameter