18 Oct, 2007

40 commits

  • commit 554d284ba90bc2306c31e5363789f05c320969c3 added _GPF_NORETRY
    to floppy_64.h to prevent OOM killer on floppy DMA allocations.

    Apply the same to the 32 bit variant.

    Found during the attempt to unify the _32/_64 variants. Seperate commit
    to document the resulting code change.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Same file, except for whitespace, comment formatting and the two variants
    of fb_is_primary_device()

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Same file, except for whitespace, comment formatting and:

    32-bit: unsigned long *virt_addr = va;
    64-bit: unsigned int *virt_addr = va;

    Both can be safely replaced by:
    u32 i, *virt_addr = va;

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Unification, so we have these things in one file.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Same file, except for whitespace, comment formatting and the extra
    function prototype usc_tsc_delay() in _32.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Same file, except for whitespace, comment formatting and the extra
    defines in _64, which are conditional on VSMP anyway.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Same file, except for whitespace, comment formatting and the extra
    DEBUG_PAGE_ALLOC function in _32.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Same file, except for whitespace, comment formatting and the
    AT_SYSINFO define for 32bit

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Same file, except for whitespace, comment formatting and the
    usage of wbinvd() instead of asm volatile("wbinvd":::"memory"), which is
    the same.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Scripted unification.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Merge errno.h, resource.h, rtc.h, sections.h, serial.h and sockios.h,
    where i386 and x86_64 have no or only trivial comment/include guard
    differences.

    Build tested on both 32-bit and 64-bit, and booted on 64-bit.

    [tglx: fixup Kbuild as well]

    Signed-off-by: Roland Dreier
    Signed-off-by: Thomas Gleixner

    Roland Dreier
     
  • Merge 32/64-bit headers that simply redirect to asm-generic

    [tglx: fixup Kbuild as well]

    Signed-off-by: Brian Gerst
    Signed-off-by: Thomas Gleixner

    Brian Gerst
     
  • convert mm_context_t semaphore to a mutex.

    Signed-off-by: Luiz Fernando N. Capitulino
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Luiz Fernando N. Capitulino
     
  • Add support for and use the multi-byte NOPs recently documented to be
    available on all PentiumPro and later processors.

    This patch only applies cleanly on top of the "x86: misc.
    constifications" patch sent earlier.

    [ tglx: arch/x86 adaptation ]

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

    arch/x86/kernel/alternative.c | 23 ++++++++++++++++++++++-
    include/asm-x86/processor_32.h | 22 ++++++++++++++++++++++
    include/asm-x86/processor_64.h | 22 ++++++++++++++++++++++
    3 files changed, 66 insertions(+), 1 deletion(-)

    Jan Beulich
     
  • [ tglx: arch/x86 adaptation ]

    Signed-off-by: Luiz Fernando N. Capitulino
    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Luiz Fernando N. Capitulino
     
  • Add missing IRQs and IRQ descriptions to /proc/interrupts.

    /proc/interrupts is most useful when it displays every IRQ vector in use by
    the system, not just those somebody thought would be interesting.

    This patch inserts the following vector displays to the i386 and x86_64
    platforms, as appropriate:

    rescheduling interrupts
    TLB flush interrupts
    function call interrupts
    thermal event interrupts
    threshold interrupts
    spurious interrupts

    A threshold interrupt occurs when ECC memory correction is occuring at too
    high a frequency. Thresholds are used by the ECC hardware as occasional
    ECC failures are part of normal operation, but long sequences of ECC
    failures usually indicate a memory chip that is about to fail.

    Thermal event interrupts occur when a temperature threshold has been
    exceeded for some CPU chip. IIRC, a thermal interrupt is also generated
    when the temperature drops back to a normal level.

    A spurious interrupt is an interrupt that was raised then lowered by the
    device before it could be fully processed by the APIC. Hence the apic sees
    the interrupt but does not know what device it came from. For this case
    the APIC hardware will assume a vector of 0xff.

    Rescheduling, call, and TLB flush interrupts are sent from one CPU to
    another per the needs of the OS. Typically, their statistics would be used
    to discover if an interrupt flood of the given type has been occuring.

    AK: merged v2 and v4 which had some more tweaks
    AK: replace Local interrupts with Local timer interrupts
    AK: Fixed description of interrupt types.

    [ tglx: arch/x86 adaptation ]
    [ mingo: small cleanup ]

    Signed-off-by: Joe Korty
    Signed-off-by: Andi Kleen
    Cc: Tim Hockin
    Cc: Andi Kleen
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Joe Korty
     
  • The additional struct member of user_desc can be made conditional for
    64 bit compiles.

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

    Thomas Gleixner
     
  • Aside of the register defines the content can be shared.

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

    Thomas Gleixner
     
  • Merge the files together.

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

    Thomas Gleixner
     
  • - Fix this:

    include/asm/io.h: In function `memcpy_fromio':
    include/asm/io.h:208: warning: passing argument 2 of `__memcpy' discards qualifiers from pointer target type

    - Clean up code a bit

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

    Andrew Morton
     
  • "extern inline" will have different semantics with gcc 4.3.

    Signed-off-by: Adrian Bunk
    Acked-by: Andrey Panin
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Adrian Bunk
     
  • sys_iopl is long gone and there is no reason to declare
    sys_rt_sigaction here.

    Remove it all together and fix the whitespace mess as well.
    It's worth the trouble: 25897 -> 21337 bytes, the win is
    larger than the memory of my first computer :)

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

    Thomas Gleixner
     
  • 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
     
  • 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
     
  • 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
     
  • 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
     
  • 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
     
  • Some gcc versions (I checked at least 4.1.1 from RHEL5 & 4.1.2 from gentoo)
    can generate incorrect code with read_crX()/write_crX() functions mix up,
    due to cached results of read_crX().

    The small app for x8664 below compiled with -O2 demonstrates this
    (i686 does the same thing):

    Kirill Korotaev
     
  • Fix get_apic_id() in mach-default, so that it uses 8 bits incase of
    xAPIC case and 4 bits for legacy APIC case.

    This fixes the i386 kernel assumption that apic id is less than 16 for
    xAPIC platforms with 8 cpus or less and makes the kernel boot on such
    platforms.

    [ tglx: arch/x86 adaptation ]

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

    Siddha, Suresh B
     
  • This patch export i386 smp_call_function_mask() with EXPORT_SYMBOL().

    This function is needed by KVM to call a function on a set of CPUs.

    [ tglx: arch/x86 adaptation ]

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

    Laurent Vivier
     
  • Use the correct #define in the declaration of apicid_to_node[], to
    match the definition.

    [ tglx: arch/x86 adaptation ]

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

    Andrew Morton