18 Oct, 2007

40 commits

  • .. as they're, with a single exception, never written to.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Jan Beulich
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Jan Beulich
     
  • Move the = into the __setup line.
    Document the option in kernel-parameters.txt by adding a pointer
    to the x86-64 specific documentation.

    [ tglx: arch/x86 adaptation ]

    Pointed out by Robert Day
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Andi Kleen
     
  • These build warnings:

    In file included 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/vmalloc.h:4,
    from arch/i386/boot/compressed/misc.c:14:
    include/asm/processor.h: In function cpuid_count
    include/asm/processor.h:615: warning: pointer targets in passing argument 1 of native_cpuid differ in signedness
    include/asm/processor.h:615: warning: pointer targets in passing argument 2 of native_cpuid differ in signedness
    include/asm/processor.h:615: warning: pointer targets in passing argument 3 of native_cpuid differ in signedness
    include/asm/processor.h:615: warning: pointer targets in passing argument 4 of native_cpuid differ in signedness

    come because the arguments have been specified as pointers to (signed) int
    types, not unsigned. So let's specify those as unsigned. Do some codingstyle
    here and there while at it.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Satyam Sharma
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Satyam Sharma
     
  • .i is an ending used for preprocessed stuff.

    This patch therefore renames assembler include files to .h and guards
    the contents with an #ifdef __ASSEMBLY__.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Adrian Bunk
     
  • It is not good taste to have macros with additions that do not have
    parenthesises around them. This patch parethesizes the IRQ vector
    macros for x86_64 arch.

    Note, this caused me a bit of heart-ache debugging lguest64.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Steven Rostedt
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Steven Rostedt
     
  • The return type of __scanbit() doesn't match the return type of
    find_{first,next}_bit(). Thus when you construct something like
    this:

    boolean ? __scanbit() : find_first_bit()

    you get an unsigned long result if "boolean" is true, and a signed
    long result if "boolean" is false.

    In file included from /home/cel/src/linux/include/linux/mmzone.h:15,
    from /home/cel/src/linux/include/linux/gfp.h:4,
    from /home/cel/src/linux/include/linux/slab.h:14,
    from /home/cel/src/linux/include/linux/percpu.h:5,
    from
    /home/cel/src/linux/include/linux/rcupdate.h:41,
    from /home/cel/src/linux/include/linux/dcache.h:10,
    from /home/cel/src/linux/include/linux/fs.h:275,
    from /home/cel/src/linux/fs/nfs/sysctl.c:9:
    /home/cel/src/linux/include/linux/nodemask.h: In function
    ‘__first_node’:
    /home/cel/src/linux/include/linux/nodemask.h:229: warning: signed and
    unsigned type in conditional expression
    /home/cel/src/linux/include/linux/nodemask.h: In function
    ‘__next_node’:
    /home/cel/src/linux/include/linux/nodemask.h:235: warning: signed and
    unsigned type in conditional expression
    /home/cel/src/linux/include/linux/nodemask.h: In function
    ‘__first_unset_node’:
    /home/cel/src/linux/include/linux/nodemask.h:253: warning: signed and
    unsigned type in conditional expression

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Chuck Lever
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Chuck Lever
     
  • This patch removes the __STR() and STR() macros from x86_64 header files.
    They seem to be legacy, and has no more users. Even if there were users,
    they should use __stringify() instead.

    In fact, there were one third place in which this macro was defined
    (ia32_binfmt.c), and used just below. In this file, usage was properly
    converted to __stringify()

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • Remove the x86_cpu_to_log_apicid array. It is set in
    arch/x86_64/kernel/genapic_flat.c:flat_init_apic_ldr() and
    arch/x86_64/kernel/smpboot.c:do_boot_cpu() but it is never
    referenced.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Mike Travis
    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Mike Travis
     
  • The constraints in the inline assembler implementation of i386
    strrchr() were incorrect and break the build with recent gcc 4.3.
    Since there are only very few callers of strrchr() and none of them
    are performance relevant just remove the assembler implementation
    and use the C fallback instead.

    [ tglx: arch/x86 adaptation ]

    Cc: rguenther@suse.de
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Andi Kleen
     
  • The volatile keyword has already been removed from the declaration of atomic_t
    on x86_64. For consistency, remove it from atomic64_t as well.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Chris Snook
    Signed-off-by: Andi Kleen
    CC: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Chris Snook
     
  • smp_call_function_single() now knows how to call the function on the
    current cpu.

    [ tglx: arch/x86 adaptation ]

    Cc: H. Peter Anvin
    Signed-off-by: Avi Kivity
    Signed-off-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Avi Kivity
     
  • smp_call_function_single() now knows how to call the function on the
    current cpu.

    [ tglx: arch/x86 adaptation ]

    Cc: H. Peter Anvin
    Signed-off-by: Avi Kivity
    Signed-off-by: Andi Kleen
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Avi Kivity
     
  • arch/x86_64/kernel/io_apic.c | 56080 -> 56038 (-42 bytes)

    also eliminate unnecessary local variable assignment.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Mariusz Kozlowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Mariusz Kozlowski
     
  • As long as there's no write access to this variable there's no reason to
    let gcc check it at runtime.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Adrian Bunk
     
  • This patch contains the following cleanups:
    - make some needlessly global functions static
    - #if 0 the unused es7000_stop_cpu()

    AK: actually removed es7000_stop_cpu
    AK: fixed a non ISO prototype too

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Adrian Bunk
     
  • smp_call_function_single handles the call to local CPU case correctly
    now, no need to handle this in the caller.

    [ tglx: arch/x86 adaptation ]

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

    akpm@linux-foundation.org
     
  • Create an inline function for clflush(), with the proper arguments,
    and use it instead of hard-coding the instruction.

    This also removes one instance of hard-coded wbinvd, based on a patch
    by Bauder de Oliveira Costa.

    [ tglx: arch/x86 adaptation ]

    Cc: Andi Kleen
    Cc: Glauber de Oliveira Costa
    Signed-off-by: H. Peter Anvin
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    H. Peter Anvin
     
  • .. as they're never written to.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Jan Beulich
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Jan Beulich
     
  • - Mark function static
    - Clarify license

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Andi Kleen
     
  • Miscellaneous x86 stuff that can live in .rodata.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Jan Beulich
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Jan Beulich
     
  • more struct irqaction initializer cleanups.

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

    Thomas Gleixner
     
  • clean up struct irqaction initializers to C99.

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

    Thomas Gleixner
     
  • The i386 irqstat per cpu conversion left an bogus export of the old
    irqstat array in the header file. Remove it.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • - It was redundant with sync_core()
    - It was unused
    - It was broken: no input arguments to cpuid; could fault randomly
    depending on eax contents.

    Now it's gone.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Andi Kleen
     
  • cpuid_class_cpu_callback() is callback function of a CPU hotplug
    notifier_block (that is already marked as __cpuinitdata). Therefore
    it can safely be marked as __cpuinit.

    cpuid_device_create() is only referenced from other functions that
    are __cpuinit or __init. So it can also be safely marked __cpuinit.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Satyam Sharma
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Satyam Sharma
     
  • msr_class_cpu_callback() can be marked __cpuinit, being the notifier
    callback for a __cpuinitdata notifier_block. So can be marked
    msr_device_create() too, called only from the newly-__cpuinit
    msr_class_cpu_callback() or from __init-marked msr_init().

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Satyam Sharma
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Satyam Sharma
     
  • add cpu core name for arch/i386/Kconfig.cpu:Pentium 4 sections help
    add Pentium D for arch/i386/Kconfig.cpu
    add Pentium D for arch/x86_64/Kconfig

    AK: Clarified some of the descriptions
    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Oliver Pinter
    Signed-off-by: Andi Kleen
    Acked-by: Sam Ravnborg
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Oliver Pinter
     
  • This patch cleans up duplicate includes in
    arch/i386/xen/

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Jesper Juhl
    Signed-off-by: Andi Kleen
    Cc: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Jesper Juhl
     
  • This patch makes some needlessly global variables static.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Adrian Bunk
     
  • This brings x86_64 into line with all other architectures by only defining
    cond_syscall() when __KERNEL__ is defined.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Mike Frysinger
     
  • This patch makes the needlessly global struct apic_probe static.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Adrian Bunk
     
  • When comparing a pointer, it's clearer to compare it to NULL than to 0.

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Yoann Padioleau
    Signed-off-by: Andi Kleen
    Cc: ak@suse.de
    Cc: discuss@x86-64.org
    Cc: akpm@linux-foundation.org
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Yoann Padioleau
     
  • This patch cleans up duplicate includes in arch/i386/kernel/

    [ tglx: arch/x86 adaptation ]

    Signed-off-by: Jesper Juhl
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Jesper Juhl
     
  • Remove rogue default m in drivers/video/Kconfig

    default m is near always wrong, like here. For some reason ACPI
    likes to reintroduce these and I like to immediately squash them again
    before they pollute too many .configs.

    Cc: len.brown@intel.com
    Cc: luming.yu@gmail.com
    Acked-by: Len Brown
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Andi Kleen
     
  • cache_shared_cpu_map_setup() and cache_remove_shared_cpu_map()
    are functions called from another function that is __cpuinit. But the
    !CONFIG_SMP empty-body stubs of these functions are unconditionally
    marked __init, which is actively wrong, and will lead to oops. But we
    never saw this oops, because they always managed to get inlined in their
    callsites, by virtue of being empty-body stubs! They should still be
    __cpuinit, of course.

    assocs[], levels[] and types[] are only referenced from function that is
    __cpuinit. So these are candidates for being marked __cpuinitdata.

    [akpm@linux-foundation.org: build fix]
    Signed-off-by: Satyam Sharma
    Cc: Andi Kleen
    Cc: Venkatesh Pallipadi
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Satyam Sharma
     
  • use dev_to_node() to get node for device in dma_alloc_pages().

    Signed-off-by: Yinghai Lu
    Acked-by: Christoph Lameter
    Cc: Christoph Lameter
    Cc: Andy Whitcroft
    Cc: Jeff Garzik
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Yinghai Lu
     
  • HP ProLiant systems DL385 G2 and DL585 G2 need pci=bfsort to enumerate PCI
    devices in the expected order.

    Matt sayeth:

    biosdevname is a userspace app I wrote to help solve this so we don't need
    to patch the kernel for future systems. It's not integrated into any
    distributions properly yet, but is included in openSUSE 10.3 and Fedora 8
    for people who want to download and install it there. It acts as a udev
    helper.

    For the time being, patching the kernel is necessary. I really hope
    biosdevname eliminates that need in future distributions.

    http://linux.dell.com/biosdevname/

    Signed-off-by: Michal Schmidt
    Cc:
    Cc: Matt Domsch
    Cc: Andy Gospodarek
    Cc: Greg KH
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Michal Schmidt
     
  • The old check we used based on dev->bus->number is wrong for devices on
    CalIOC2. Instead look whether we have an IOMMU table for that bus - if
    not, translation is disabled.

    Thanks to Murillo Fernandes Bernardes for
    spotting, suggesting a fix and testing.

    Signed-off-by: Muli Ben-Yehuda
    Acked-by: Murillo Fernandes Bernardes
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Muli Ben-Yehuda
     
  • This patch fixes a bug of change_page_attr/change_page_attr_addr on
    Intel x86_64 CPUs. After changing page attribute to be executable with
    these functions, the page remains un-executable on Intel x86_64 CPU.
    Because on Intel x86_64 CPU, only if the "NX" bits of all four level
    page tables are cleared, the corresponding page is executable (refer to
    section 4.13.2 of Intel 64 and IA-32 Architectures Software Developer's
    Manual). So, the bug is fixed through clearing the "NX" bit of PMD when
    splitting the huge PMD.

    Signed-off-by: Huang Ying
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Huang, Ying
     
  • A while ago Randy Dunlap and Adrian Bunk suggested we simply prevent UP
    voyager building. I resisted this on the grounds that the nagging was the
    only thing that was going to cause me to look at this. However, now I
    think we should probably take this course.

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

    James Bottomley