25 Jul, 2008

6 commits

  • This patch introduces the new syscall pipe2 which is like pipe but it also
    takes an additional parameter which takes a flag value. This patch implements
    the handling of O_CLOEXEC for the flag. I did not add support for the new
    syscall for the architectures which have a special sys_pipe implementation. I
    think the maintainers of those archs have the chance to go with the unified
    implementation but that's up to them.

    The implementation introduces do_pipe_flags. I did that instead of changing
    all callers of do_pipe because some of the callers are written in assembler.
    I would probably screw up changing the assembly code. To avoid breaking code
    do_pipe is now a small wrapper around do_pipe_flags. Once all callers are
    changed over to do_pipe_flags the old do_pipe function can be removed.

    The following test must be adjusted for architectures other than x86 and
    x86-64 and in case the syscall numbers changed.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #include
    #include
    #include
    #include

    #ifndef __NR_pipe2
    # ifdef __x86_64__
    # define __NR_pipe2 293
    # elif defined __i386__
    # define __NR_pipe2 331
    # else
    # error "need __NR_pipe2"
    # endif
    #endif

    int
    main (void)
    {
    int fd[2];
    if (syscall (__NR_pipe2, fd, 0) != 0)
    {
    puts ("pipe2(0) failed");
    return 1;
    }
    for (int i = 0; i < 2; ++i)
    {
    int coe = fcntl (fd[i], F_GETFD);
    if (coe == -1)
    {
    puts ("fcntl failed");
    return 1;
    }
    if (coe & FD_CLOEXEC)
    {
    printf ("pipe2(0) set close-on-exit for fd[%d]\n", i);
    return 1;
    }
    }
    close (fd[0]);
    close (fd[1]);

    if (syscall (__NR_pipe2, fd, O_CLOEXEC) != 0)
    {
    puts ("pipe2(O_CLOEXEC) failed");
    return 1;
    }
    for (int i = 0; i < 2; ++i)
    {
    int coe = fcntl (fd[i], F_GETFD);
    if (coe == -1)
    {
    puts ("fcntl failed");
    return 1;
    }
    if ((coe & FD_CLOEXEC) == 0)
    {
    printf ("pipe2(O_CLOEXEC) does not set close-on-exit for fd[%d]\n", i);
    return 1;
    }
    }
    close (fd[0]);
    close (fd[1]);

    puts ("OK");

    return 0;
    }
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Signed-off-by: Ulrich Drepper
    Acked-by: Davide Libenzi
    Cc: Michael Kerrisk
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ulrich Drepper
     
  • Almost all users of this field need a PFN instead of a physical address,
    so replace node_boot_start with node_min_pfn.

    [Lee.Schermerhorn@hp.com: fix spurious BUG_ON() in mark_bootmem()]
    Signed-off-by: Johannes Weiner
    Cc:
    Signed-off-by: Lee Schermerhorn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • Straight forward extensions for huge pages located in the PUD instead of
    PMDs.

    Signed-off-by: Andi Kleen
    Signed-off-by: Nick Piggin
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • The goal of this patchset is to support multiple hugetlb page sizes. This
    is achieved by introducing a new struct hstate structure, which
    encapsulates the important hugetlb state and constants (eg. huge page
    size, number of huge pages currently allocated, etc).

    The hstate structure is then passed around the code which requires these
    fields, they will do the right thing regardless of the exact hstate they
    are operating on.

    This patch adds the hstate structure, with a single global instance of it
    (default_hstate), and does the basic work of converting hugetlb to use the
    hstate.

    Future patches will add more hstate structures to allow for different
    hugetlbfs mounts to have different page sizes.

    [akpm@linux-foundation.org: coding-style fixes]
    Acked-by: Adam Litke
    Acked-by: Nishanth Aravamudan
    Signed-off-by: Andi Kleen
    Signed-off-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • The double indirection here is not needed anywhere and hence (at least)
    confusing.

    Signed-off-by: Jan Beulich
    Cc: Hugh Dickins
    Cc: Nick Piggin
    Cc: Christoph Lameter
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: "Luck, Tony"
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Acked-by: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • There are a lot of places that define either a single bootmem descriptor or an
    array of them. Use only one central array with MAX_NUMNODES items instead.

    Signed-off-by: Johannes Weiner
    Acked-by: Ralf Baechle
    Cc: Ingo Molnar
    Cc: Richard Henderson
    Cc: Russell King
    Cc: Tony Luck
    Cc: Hirokazu Takata
    Cc: Geert Uytterhoeven
    Cc: Kyle McMartin
    Cc: Paul Mackerras
    Cc: Paul Mundt
    Cc: David S. Miller
    Cc: Yinghai Lu
    Cc: Christoph Lameter
    Cc: Mel Gorman
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

22 Jul, 2008

2 commits

  • This allow to dynamically generate attributes and share show/store
    functions between attributes. Right now most attributes are generated
    by special macros and lots of duplicated code. With the attribute
    passed it's instead possible to attach some data to the attribute
    and then use that in shared low level functions to do different things.

    I need this for the dynamically generated bank attributes in the x86
    machine check code, but it'll allow some further cleanups.

    I converted all users in tree to the new show/store prototype. It's a single
    huge patch to avoid unbisectable sections.

    Runtime tested: x86-32, x86-64
    Compiled only: ia64, powerpc
    Not compile tested/only grep converted: sh, arm, avr32

    Signed-off-by: Andi Kleen
    Signed-off-by: Greg Kroah-Hartman

    Andi Kleen
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: (25 commits)
    mmtimer: Push BKL down into the ioctl handler
    [IA64] Remove experimental status of kdump
    [IA64] Update ia64 mmr list for SGI uv
    [IA64] Avoid overflowing ia64_cpu_to_sapicid in acpi_map_lsapic()
    [IA64] adding parameter check to module_free()
    [IA64] improper printk format in acpi-cpufreq
    [IA64] pv_ops: move some functions in ivt.S to avoid lack of space.
    [IA64] pvops: documentation on ia64/pv_ops
    [IA64] pvops: add to hooks, pv_time_ops, for steal time accounting.
    [IA64] pvops: add hooks, pv_irq_ops, to paravirtualized irq related operations.
    [IA64] pvops: add hooks, pv_iosapic_ops, to paravirtualize iosapic.
    [IA64] pvops: define initialization hooks, pv_init_ops, for paravirtualized environment.
    [IA64] pvops: paravirtualize NR_IRQS
    [IA64] pvops: paravirtualize entry.S
    [IA64] pvops: paravirtualize ivt.S
    [IA64] pvops: paravirtualize minstate.h.
    [IA64] pvops: define paravirtualized instructions for native.
    [IA64] pvops: preparation for paravirtulization of hand written assembly code.
    [IA64] pvops: introduce pv_cpu_ops to paravirtualize privileged instructions.
    [IA64] pvops: add an early setup hook for pv_ops.
    ...

    Linus Torvalds
     

21 Jul, 2008

2 commits

  • * 'kvm-updates-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (70 commits)
    KVM: Adjust smp_call_function_mask() callers to new requirements
    KVM: MMU: Fix potential race setting upper shadow ptes on nonpae hosts
    KVM: x86 emulator: emulate clflush
    KVM: MMU: improve invalid shadow root page handling
    KVM: MMU: nuke shadowed pgtable pages and ptes on memslot destruction
    KVM: Prefix some x86 low level function with kvm_, to avoid namespace issues
    KVM: check injected pic irq within valid pic irqs
    KVM: x86 emulator: Fix HLT instruction
    KVM: Apply the kernel sigmask to vcpus blocked due to being uninitialized
    KVM: VMX: Add ept_sync_context in flush_tlb
    KVM: mmu_shrink: kvm_mmu_zap_page requires slots_lock to be held
    x86: KVM guest: make kvm_smp_prepare_boot_cpu() static
    KVM: SVM: fix suspend/resume support
    KVM: s390: rename private structures
    KVM: s390: Set guest storage limit and offset to sane values
    KVM: Fix memory leak on guest exit
    KVM: s390: dont allocate dirty bitmap
    KVM: move slots_lock acquision down to vapic_exit
    KVM: VMX: Fake emulate Intel perfctr MSRs
    KVM: VMX: Fix a wrong usage of vmcs_config
    ...

    Linus Torvalds
     
  • Noted by Tony Luck although I've done the patches differently and also
    removed some other bogus oddments.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     

20 Jul, 2008

4 commits


18 Jul, 2008

6 commits

  • This patch removes the experimental status of kdump on IA64. kdump is on IA64
    now since more than one year and it has proven to be stable.

    Signed-off-by: Bernhard Walle
    Signed-off-by: Tony Luck

    Bernhard Walle
     
  • acpi_map_lsapic tries to stuff a long into ia64_cpu_to_sapicid[],
    which can only hold ints, so let's fix that.

    We need to update the signature of acpi_map_cpu2node() too.

    Signed-off-by: Alex Chiang
    Signed-off-by: Tony Luck

    Alex Chiang
     
  • module_free() refers the first parameter before checking.
    But it is called like below(in kernel/kprobes). The first parameter is always NULL.
    This happens when many probe points(>1024) are set by kprobes.
    I encountered this with using SystemTap. It can set many probes easily.

    static int __kprobes collect_one_slot(struct kprobe_insn_page *kip, int idx)
    {
    ...
    if (kip->nused == 0) {
    hlist_del(&kip->hlist);
    if (hlist_empty(&kprobe_insn_pages)) {
    ...
    } else {
    module_free(NULL, kip->insns); //<<< 1st param always NULL
    kfree(kip);
    }
    return 1;
    }
    return 0;
    }

    Signed-off-by: Akiyama, Nobuyuki
    Signed-off-by: Tony Luck

    Akiyama, Nobuyuki
     
  • When dprintk is enabled the following warnings are generated:
    arch/ia64/kernel/cpufreq/acpi-cpufreq.c: In function 'processor_set_pstate':
    arch/ia64/kernel/cpufreq/acpi-cpufreq.c:54: warning: format '%x' expects type 'unsigned int', but argumen
    t 3 has type 's64'
    arch/ia64/kernel/cpufreq/acpi-cpufreq.c: In function 'processor_get_pstate':
    arch/ia64/kernel/cpufreq/acpi-cpufreq.c:76: warning: format '%x' expects type 'unsigned int', but argumen
    t 2 has type 's64'

    Signed-off-by: Denis V. Lunev
    Signed-off-by: Tony Luck

    Denis V. Lunev
     
  • Tony Luck
     
  • Fix calls of smp_call_function*() in arch/ia64/kvm for recent API
    changes.

    CC [M] arch/ia64/kvm/kvm-ia64.o
    arch/ia64/kvm/kvm-ia64.c: In function 'handle_global_purge':
    arch/ia64/kvm/kvm-ia64.c:398: error: too many arguments to function 'smp_call_function_single'
    arch/ia64/kvm/kvm-ia64.c: In function 'kvm_vcpu_kick':
    arch/ia64/kvm/kvm-ia64.c:1696: error: too many arguments to function 'smp_call_function_single'

    Signed-off-by: Takashi Iwai
    Acked-by Xiantao Zhang
    Signed-off-by: Linus Torvalds

    Takashi Iwai
     

17 Jul, 2008

2 commits

  • "idle=nomwait" disables the use of the MWAIT
    instruction from both C1 (C1_FFH) and deeper (C2C3_FFH)
    C-states.

    When MWAIT is unavailable, the BIOS and OS generally
    negotiate to use the HALT instruction for C1,
    and use IO accesses for deeper C-states.

    This option is useful for power and performance
    comparisons, and also to work around BIOS bugs
    where broken MWAIT support is advertised.

    http://bugzilla.kernel.org/show_bug.cgi?id=10807
    http://bugzilla.kernel.org/show_bug.cgi?id=10914

    Signed-off-by: Zhao Yakui
    Signed-off-by: Li Shaohua
    Signed-off-by: Len Brown
    Signed-off-by: Andi Kleen

    Zhao Yakui
     
  • "idle=halt" limits the idle loop to using
    the halt instruction. No MWAIT, no IO accesses,
    no C-states deeper than C1.

    If something is broken in the idle code,
    "idle=halt" is a less severe workaround
    than "idle=poll" which disables all power savings.

    Signed-off-by: Zhao Yakui
    Signed-off-by: Len Brown
    Signed-off-by: Andi Kleen

    Zhao Yakui
     

16 Jul, 2008

2 commits

  • …l/git/tip/linux-2.6-tip

    * 'generic-ipi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (22 commits)
    generic-ipi: more merge fallout
    generic-ipi: merge fix
    x86, visws: use mach-default/entry_arch.h
    x86, visws: fix generic-ipi build
    generic-ipi: fixlet
    generic-ipi: fix s390 build bug
    generic-ipi: fix linux-next tree build failure
    fix: "smp_call_function: get rid of the unused nonatomic/retry argument"
    fix: "smp_call_function: get rid of the unused nonatomic/retry argument"
    fix "smp_call_function: get rid of the unused nonatomic/retry argument"
    on_each_cpu(): kill unused 'retry' parameter
    smp_call_function: get rid of the unused nonatomic/retry argument
    sh: convert to generic helpers for IPI function calls
    parisc: convert to generic helpers for IPI function calls
    mips: convert to generic helpers for IPI function calls
    m32r: convert to generic helpers for IPI function calls
    arm: convert to generic helpers for IPI function calls
    alpha: convert to generic helpers for IPI function calls
    ia64: convert to generic helpers for IPI function calls
    powerpc: convert to generic helpers for IPI function calls
    ...

    Fix trivial conflicts due to rcu updates in kernel/rcupdate.c manually

    Linus Torvalds
     
  • Conflicts:

    arch/powerpc/Kconfig
    arch/s390/kernel/time.c
    arch/x86/kernel/apic_32.c
    arch/x86/kernel/cpu/perfctr-watchdog.c
    arch/x86/kernel/i8259_64.c
    arch/x86/kernel/ldt.c
    arch/x86/kernel/nmi_64.c
    arch/x86/kernel/smpboot.c
    arch/x86/xen/smp.c
    include/asm-x86/hw_irq_32.h
    include/asm-x86/hw_irq_64.h
    include/asm-x86/mach-default/irq_vectors.h
    include/asm-x86/mach-voyager/irq_vectors.h
    include/asm-x86/smp.h
    kernel/Makefile

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

11 Jul, 2008

1 commit


01 Jul, 2008

2 commits

  • The symbol account_system_vtime is used by the kvm module but
    not exported. This breaks building with CONFIG_VIRT_CPU_ACCOUNTING
    and CONFIG_KVM=m.

    Signed-off-by: Doug Chapman
    Acked-by: Hidetosho Seto
    Signed-off-by: Tony Luck

    Doug Chapman
     
  • On a system where there are no hot pluggable cpus "additional_cpus"
    is still set to -1 at the point where we call per_cpu_scan_finalize().
    If we didn't find an SRAT table and so pick the default "32" for the
    number of cpus, when we get to:
    high_cpu = min(high_cpu + reserve_cpus, NR_CPUS);
    we will end up initializing for just 31 cpus ... and so we will
    die horribly when bringing up cpu#32.

    Problem introduced by: 2c6e6db41f01b6b4eb98809350827c9678996698
    "Minimize per_cpu reservations."

    Acked-by: Robin Holt
    Signed-off-by: Tony Luck

    Tony Luck
     

26 Jun, 2008

4 commits


25 Jun, 2008

3 commits

  • As noted by Akinobu Mita alloc_bootmem and related functions never return
    NULL and always return a zeroed region of memory. Thus a NULL test or
    memset after calls to these functions is unnecessary.

    Signed-off-by: Julia Lawall
    Signed-off-by: Tony Luck

    Julia Lawall
     
  • The fix applied in e0c6d97c65e0784aade7e97b9411f245a6c543e7
    "security hole in sn2_ptc_proc_write" didn't take into account
    the case where count==0 (which results in a buffer underrun
    when adding the trailing '\0'). Thanks to Andi Kleen for
    pointing this out.

    Signed-off-by: Cliff Wickman
    Signed-off-by: Tony Luck

    Cliff Wickman
     
  • Call check_sal_cache_flush() after platform_setup() as
    check_sal_cache_flush() now relies on being able to call platform
    vector code.

    Problem was introduced by: 3463a93def55c309f3c0d0a8aaf216be3be42d64
    "Update check_sal_cache_flush to use platform_send_ipi()"

    Signed-off-by: Jes Sorensen
    Tested-by: Alex Chiang:
    Signed-off-by: Tony Luck

    Jes Sorensen
     

23 Jun, 2008

1 commit


21 Jun, 2008

1 commit


17 Jun, 2008

2 commits


16 Jun, 2008

1 commit


12 Jun, 2008

1 commit

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (23 commits)
    ACPICA: fix stray va_end() caused by mis-merge
    ACPI: Reject below-freezing temperatures as invalid critical temperatures
    ACPICA: Fix for access to deleted object
    ACPICA: Fix to make _SST method optional
    ACPICA: Fix for Load operator, load table at the namespace root
    ACPICA: Ignore ACPI table signature for Load() operator
    ACPICA: Fix to allow zero-length ASL field declarations
    ACPI: use memory_read_from_buffer()
    bay: exit if notify handler cannot be installed
    dock.c remove trailing printk whitespace
    proper prototype for acpi_processor_tstate_has_changed()
    ACPI: handle invalid ACPI SLIT table
    PNPACPI: use _CRS IRQ descriptor length for _SRS
    pnpacpi: fix shareable IRQ encode/decode
    pnpacpi: fix IRQ flag decoding
    MAINTAINERS: update ACPI homepage
    ACPI 2.6.26-rc2: Add missing newline to DSDT/SSDT warning message
    ACPI: EC: Use msleep instead of udelay while waiting for event.
    thinkpad-acpi: fix LED handling on older ThinkPads
    thinkpad-acpi: fix initialization error paths
    ...

    Linus Torvalds