23 Jul, 2007

10 commits

  • local_cmpxchg() should not use any LOCK prefix. This change probably
    got lost in the move to cmpxchg.h.

    Signed-off-by: Mathieu Desnoyers
    Acked-by: Christoph Lameter
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Mathieu Desnoyers
     
  • kstat_irqs(0) includes the count of interrupt 0 from all cpus, not just
    the current cpu. The updated interrupt 0 on other cpus can stop the
    nmi_watchdog from tripping, so only include the current cpu's int 0.

    Signed-off-by: Keith Owens
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Keith Owens
     
  • This mainly changes the nops for alternative, so not very revolutionary.

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Previously this flag was only used on 32bit, but some shared code can use
    it now.

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Fix

    WARNING: arch/i386/kernel/built-in.o(.text+0xdd0d): Section mismatch: reference to .init.data:cpu_llc_id (between 'set_cpu_sibling_map' and 'initialize_secondary')
    WARNING: arch/i386/kernel/built-in.o(.text+0xdd1b): Section mismatch: reference to .init.data:cpu_llc_id (between 'set_cpu_sibling_map' and 'initialize_secondary')

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • When a machine check or NMI occurs while multiple byte code is patched
    the CPU could theoretically see an inconsistent instruction and crash.
    Prevent this by temporarily disabling MCEs and returning early in the
    NMI handler.

    Based on discussion with Mathieu Desnoyers.

    Cc: Mathieu Desnoyers
    Cc: Jeremy Fitzhardinge
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • Reenable kprobes and alternative patching when the kernel text is write
    protected by DEBUG_RODATA

    Add a general utility function to change write protected text. The new
    function remaps the code using vmap to write it and takes care of CPU
    synchronization. It also does CLFLUSH to make icache recovery faster.

    There are some limitations on when the function can be used, see the
    comment.

    This is a newer version that also changes the paravirt_ops code.
    text_poke also supports multi byte patching now.

    Contains bug fixes from Zach Amsden and suggestions from Mathieu
    Desnoyers.

    Cc: Jan Beulich
    Cc: Jeremy Fitzhardinge
    Cc: Mathieu Desnoyers
    Cc: Zach Amsden
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • This patch uses the read and write functions provided at system.h
    for control registers instead of writting raw assembly over and
    over again in .c files. Functions to manipulate cr2 and cr8 were
    provided, as they were lacking.

    Also, removed some extra space after closing brackets

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Glauber de Oliveira Costa
     
  • This patch makes the i386 behave the same way that x86_64 does when a
    segfault happens. A line gets printed to the kernel log so that tools
    that need to check for failures can behave more uniformly between
    debug.show_unhandled_signals sysctl variable to 0 (or by doing echo 0 >
    /proc/sys/debug/exception-trace)

    Also, all of the lines being printed are now using printk_ratelimit() to
    deny the ability of DoS from a local user with a program like the
    following:

    main()
    {
    while (1)
    if (!fork()) *(int *)0 = 0;
    }

    This new revision also includes the fix that Andrew did which got rid of
    new sysctl that was added to the system in earlier versions of this.
    Also, 'show-unhandled-signals' sysctl has been renamed back to the old
    'exception-trace' to avoid breakage of people's scripts.

    AK: Enabling by default for i386 will be likely controversal, but let's see what happens
    AK: Really folks, before complaining just fix your segfaults
    AK: I bet this will find a lot of silent issues

    Signed-off-by: Masoud Sharbiani
    Signed-off-by: Andi Kleen
    [ Personally, I've found the complaints useful on x86-64, so I'm all for
    this. That said, I wonder if we could do it more prettily.. -Linus ]
    Signed-off-by: Linus Torvalds

    Masoud Asgharifard Sharbiani
     
  • Fix a mismerge in commit 8b6f50ef1d5cc86b278eb42bc91630fad455fb10:
    "spufs: make signal-notification files readonly for NOSCHED contexts",
    where structs got duplicated.

    Signed-off-by: Al Viro
    Acked-by: Jeremy Kerr
    Signed-off-by: Linus Torvalds

    Al Viro
     

22 Jul, 2007

30 commits

  • * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
    [NET]: Add missing entries to family name tables
    [NET]: Make NETDEVICES depend on NET.
    [IPV6]: endianness bug in ip6_tunnel
    [IrDA]: TOSHIBA_FIR depends on virt_to_bus
    [IrDA]: EP7211 IR driver port to the latest SIR API
    [IrDA] Typo fix in irnetlink.c copyright
    [NET]: Fix loopback crashes when multiqueue is enabled.
    [IPV4]: Fix inetpeer gcc-4.2 warnings

    Linus Torvalds
     
  • * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
    [SPARC64]: ERROR: "sys_ioctl" [arch/sparc64/solaris/solaris.ko] undefined!
    [SPARC32]: Make PAGE_SHARED a read-mostly variable.
    [SPARC32]: Take enable_irq/disable_irq out of line.
    [SPARC32]: clean include/asm-sparc/irq.h
    [SPARC32]: Fix rounding errors in ndelay/udelay implementation.

    Linus Torvalds
     
  • Add missing entries to af_family_clock_key_strings[].

    Signed-off-by: David Howells
    Signed-off-by: David S. Miller

    David Howells
     
  • From: Christoph Hellwig

    On Fri, Jul 20, 2007 at 09:24:42AM -0400, Horst H. von Brand wrote:
    > When building v2.6.22-3478-g275afca on sparc64 (.config attached) I get:
    >
    > MODPOST vmlinux
    > Building modules, stage 2.
    > MODPOST 463 modules
    > ERROR: "sys_ioctl" [arch/sparc64/solaris/solaris.ko] undefined!

    Sorry, my fault.

    It looked to me like sparc64 exports sys_ioctl on it's own, but it
    only exports compat_sys_ioctl on it's own.

    Signed-off-by: David S. Miller

    Christoph Hellwig
     
  • same scheme as for sparc64, same rationale

    Signed-off-by: Al Viro
    Signed-off-by: David S. Miller

    Al Viro
     
  • Signed-off-by: Al Viro
    Signed-off-by: David S. Miller

    Al Viro
     
  • Move stuff used only by arch/sparc/kernel/* into arch/sparc/kernel/irq.h
    and into individual files in there (e.g. macros internal to sun4m_irq.c,
    etc.)

    Signed-off-by: Al Viro
    Signed-off-by: David S. Miller

    Al Viro
     
  • __ndelay and __udelay have not been delayung >= specified time.
    The problem with __ndelay has been tacked down to the rounding of the
    multiplier constant. By changing this, delays > app 18us are correctly
    calculated.
    The problem with __udelay has also been tracked down to rounding issues.
    Changing the multiplier constant (to match that used in sparc64) corrects
    for large delays and adding in a rounding constant corrects for trunctaion
    errors in the claculations.
    Many short delays will return without looping. This is not an error as there
    is the fixed delay of doing all the maths to calculate the loop count.

    Signed-off-by: Mark Fortescue
    Signed-off-by: David S. Miller

    Mark
     
  • Enabling drivers from "Devices > Networking" (in menuconfig), for
    example SLIP and/or PLIP, throws link time errors when CONFIG_NET itself
    is =n. Have CONFIG_NETDEVICES depend on CONFIG_NET.

    Signed-off-by: Jan Engelhardt
    Signed-off-by: David S. Miller

    Jan Engelhardt
     
  • Signed-off-by: Al Viro
    Signed-off-by: David S. Miller

    Al Viro
     
  • Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Samuel Ortiz
    Signed-off-by: David S. Miller

    Stephen Rothwell
     
  • The EP7211 SIR driver was the only one left without a new SIR API port.

    Signed-off-by: Samuel Ortiz
    Signed-off-by: David S. Miller

    Samuel Ortiz
     
  • Signed-off-by: Samuel Ortiz
    Signed-off-by: David S. Miller

    Samuel Ortiz
     
  • This patch introduces struct pci_sysdata to x86 and x86-64, and
    converts the existing two users (NUMA, Calgary) to use it.

    This lays the groundwork for having other users of sysdata, such as
    the PCI domains work.

    The Calgary bits are tested, the NUMA bits just look ok.

    Signed-off-by: Jeff Garzik
    Signed-off-by: Muli Ben-Yehuda
    Signed-off-by: Linus Torvalds

    Muli Ben-Yehuda
     
  • This makes k8topology multicore aware instead of limited to signle- and
    dual-core CPUs. It uses the CPUID to be more future proof.

    Signed-off-by: Joachim Deguara
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Joachim Deguara
     
  • Leftovers from the removal of the more general (but abandoned) SMP
    alternatives.

    Signed-off-by: Jan Beulich
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • Signed-off-by: Robert P. J. Day
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     
  • Dead or misnamed CONFIG_BALANCED_IRQ_DEBUG found by Robert P. J. Day.
    It's not a Kconfig variable.

    Since this debug code is ancient, I suggest to get rid of this
    misleading CONFIG_ macro by deleting all of this debug code.

    Signed-off-by: Stefan Richter
    Cc: Ingo Molnar
    Cc: "Robert P. J. Day"
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Stefan Richter
     
  • Insert HPET resources after pci probing has been completed in order to
    avoid resource conflicts with PCI resource reservation. With this change
    the HPET firmware resources will be identified, but it should also not
    cause issues when the HPET address falls on a BAR in a PCI device, and the
    PCI enumeration cannot reserve the resources.

    Signed-off-by: Aaron Durbin
    Cc: john stultz
    Cc: Thomas Gleixner
    Cc: Len Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Aaron Durbin
     
  • This builds upon the existing geode infrastructure, but adds southbridge
    support, some GPIO functions, and a header file (asm-i386/geode.h) with some
    useful GX/LX detection tests.

    The majority of this code was written by Jordan Crouse.

    Signed-off-by: Jordan Crouse
    Signed-off-by: Andres Salomon
    Cc: Alan Cox
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andres Salomon
     
  • Signed-off-by: Dan Aloni
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Dan Aloni
     
  • Users that use kernel log filtering (e.g. via syslogd or a proprietry method)
    wouldn't like to see warning prints that are not really warnings.

    Signed-off-by: Dan Aloni
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Dan Aloni
     
  • get_vm_area always returns an area with an adjacent guard page. That guard
    page is included in vm_struct.size. iounmap uses vm_struct.size to
    determine how much address space needs to have change_page_attr applied to
    it, which will BUG if applied to the guard page.

    This patch adds a helper function - get_vm_area_size() in linux/vmalloc.h -
    to return the actual size of a vm area, and uses it to make iounmap do the
    right thing. There are probably other places which should be using
    get_vm_area_size().

    Thanks to Dave Young for debugging the
    problem.

    [ Andi, it wasn't clear to me whether x86_64 needs the same fix. ]

    Signed-off-by: Jeremy Fitzhardinge
    Cc: Dave Young
    Cc: Chuck Ebbert
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Jeremy Fitzhardinge
     
  • setup_pit_timer is declared in asm-i386/timer.h. Move it to the pit header
    file, so it can be used by x86_64 as well.

    Move also the PIT constants.

    Signed-off-by: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • I fixed this in x86_64. Looks like the kind of thing that will break voyager
    on i386.

    Signed-off-by: Chris Wright
    Signed-off-by: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Chris Wright
     
  • Remove the volatile in apic. We have a cpu_relax() in the wait loop. Fix a
    coding style issue while at it.

    Signed-off-by: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • [akpm@linux-foundation.org: build fix]
    Signed-off-by: Yinghai Lu
    Cc: Alan Cox
    Cc: "Eric W. Biederman"
    Cc: Muli Ben-Yehuda
    Cc: Vivek Goyal
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Yinghai Lu
     
  • When NUMA emulation succeeds, acpi_numa needs to be set to -1 so that
    srat_disabled() will always return true. We won't be calling
    acpi_scan_nodes() or registering the true nodes we've found.

    [hugh@veritas.com: Fix x86_64 CONFIG_NUMA_EMU build: acpi_numa needs CONFIG_ACPI_NUMA]
    Signed-off-by: David Rientjes
    Cc: Len Brown
    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • e820_hole_size() now uses the newly extracted helper function,
    e820_find_active_region(), to determine the size of usable RAM in a range of
    PFN's.

    This was previously broken because of two reasons:

    - The start and end PFN's of each e820 entry were not properly rounded
    prior to excluding those entries in the range, and

    - Entries smaller than a page were not properly excluded from being
    accumulated.

    This resulted in emulated nodes being incorrectly mapped to ranges that
    were completely reserved and not candidates for being registered as
    active ranges.

    Signed-off-by: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • For K8 system: 4G RAM with memory hole remapping enabled, or more than 4G
    RAM installed. when using kexec to load second kernel. In the second
    kernel, when mem is allocated for GART, it will do the memset for clear, it
    will cause restart, because some device still used that for dma. solution
    will be:

    in second kernel: disable that at first before we try to allocate mem for
    it. or in the first kernel: do disable that before shutdown.
    Andi/Eric/Alan prefer to second one for clean shutdown in first kernel.
    Andi also point out need to consider to AGP enable but mem less 4G case
    too.

    Signed-off-by: Yinghai Lu
    Cc: Alan Cox
    Cc: "Eric W. Biederman"
    Cc: Muli Ben-Yehuda
    Cc: Vivek Goyal
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Yinghai Lu