22 Aug, 2012

1 commit


21 Aug, 2012

4 commits


19 Aug, 2012

12 commits

  • Merge alpha architecture update from Michael Cree:
    "The Alpha Maintainer, Matt Turner, is currently unavailable, so I have
    collected up patches that have been posted to the linux-alpha mailing
    list over the last couple of months, and are forwarding them to you in
    the hope that you are prepared to accept them via me.

    The patches by Al Viro and myself I have been running against kernels
    for two months now so have had quite a bit of testing. All except one
    patch were intended for the 3.5 kernel but because of Matt's
    unavailability never got forwarded to you."

    * emailed patches from Michael Cree : (9 commits)
    alpha: Fix fall-out from disintegrating asm/system.h
    Redefine ATOMIC_INIT and ATOMIC64_INIT to drop the casts
    alpha: fix fpu.h usage in userspace
    alpha/mm/fault.c: Port OOM changes to do_page_fault
    alpha: take kernel_execve() out of entry.S
    alpha: take a bunch of syscalls into osf_sys.c
    alpha: Use new generic strncpy_from_user() and strnlen_user()
    alpha: Wire up cross memory attach syscalls
    alpha: Don't export SOCK_NONBLOCK to user space.

    Linus Torvalds
     
  • Commit ec2212088c42 ("Disintegrate asm/system.h for Alpha") removed
    asm/system.h however arch/alpha/oprofile/common.c requires definitions
    that were shifted from asm/system.h to asm/special_insns.h. Include
    that.

    Signed-off-by: Michael Cree
    Acked-by: Matt Turner
    Signed-off-by: Linus Torvalds

    Michael Cree
     
  • The following build error occurred during an alpha build:

    net/core/sock.c:274:36: error: initializer element is not constant

    Dave Anglin says:
    > Here is the line in sock.i:
    >
    > struct static_key memalloc_socks = ((struct static_key) { .enabled =
    > ((atomic_t) { (0) }) });

    The above line contains two compound literals. It also uses a designated
    initializer to initialize the field enabled. A compound literal is not a
    constant expression.

    The location of the above statement isn't fully clear, but if a compound
    literal occurs outside the body of a function, the initializer list must
    consist of constant expressions.

    Cc:
    Signed-off-by: Mel Gorman
    Signed-off-by: Fengguang Wu
    Signed-off-by: Michael Cree
    Acked-by: Matt Turner
    Signed-off-by: Linus Torvalds

    Mel Gorman
     
  • After commit ec2212088c42 ("Disintegrate asm/system.h for Alpha"), the
    fpu.h header which we install for userland started depending on
    special_insns.h which is not installed.

    However, fpu.h only uses that for __KERNEL__ code, so protect the
    inclusion the same way to avoid build breakage in glibc:

    /usr/include/asm/fpu.h:4:31: fatal error: asm/special_insns.h: No such file or directory

    Cc: stable@vger.kernel.org
    Reported-by: Matt Turner
    Signed-off-by: Mike Frysinger
    Signed-off-by: Michael Cree
    Acked-by: Matt Turner
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • Commit d065bd810b6d ("mm: retry page fault when blocking on disk
    transfer") and 37b23e0525d3 ("x86,mm: make pagefault killable")
    introduced changes into the x86 pagefault handler for making the page
    fault handler retryable as well as killable.

    These changes reduce the mmap_sem hold time, which is crucial during OOM
    killer invocation.

    Port these changes to ALPHA.

    Signed-off-by: Mohd. Faris
    Signed-off-by: Kautuk Consul
    Acked-by: Matt Turner
    Signed-off-by: Michael Cree
    Signed-off-by: Linus Torvalds

    Kautuk Consul
     
  • Signed-off-by: Al Viro
    Signed-off-by: Michael Cree
    Acked-by: Matt Turner
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • New helper: current_thread_info(). Allows to do a bunch of odd syscalls
    in C. While we are at it, there had never been a reason to do
    osf_getpriority() in assembler. We also get "namespace"-aware (read:
    consistent with getuid(2), etc.) behaviour from getx?id() syscalls now.

    Signed-off-by: Al Viro
    Signed-off-by: Michael Cree
    Acked-by: Matt Turner
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Similar to x86/sparc/powerpc implementations except:
    1) we implement an extremely efficient has_zero()/find_zero()
    sequence with both prep_zero_mask() and create_zero_mask()
    no-operations.
    2) Our output from prep_zero_mask() differs in that only the
    lowest eight bits are used to represent the zero bytes
    nevertheless it can be safely ORed with other similar masks
    from prep_zero_mask() and forms input to create_zero_mask(),
    the two fundamental properties prep_zero_mask() must satisfy.

    Tests on EV67 and EV68 CPUs revealed that the generic code is
    essentially as fast (to within 0.5% of CPU cycles) of the old
    Alpha specific code for large quadword-aligned strings, despite
    the 30% extra CPU instructions executed. In contrast, the
    generic code for unaligned strings is substantially slower (by
    more than a factor of 3) than the old Alpha specific code.

    Signed-off-by: Michael Cree
    Acked-by: Matt Turner
    Signed-off-by: Linus Torvalds

    Michael Cree
     
  • Add sys_process_vm_readv and sys_process_vm_writev to Alpha.

    Signed-off-by: Michael Cree
    Acked-by: Matt Turner
    Signed-off-by: Linus Torvalds

    Michael Cree
     
  • Currently we export SOCK_NONBLOCK to user space but that conflicts with
    the definition from glibc leading to compilation errors in user programs
    (e.g. see Debian bug #658460).

    The generic socket.h restricts the definition of SOCK_NONBLOCK to the
    kernel, as does the MIPS specific socket.h, so let's do the same on
    Alpha.

    Signed-off-by: Michael Cree
    Acked-by: Matt Turner
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Michael Cree
     
  • Pull ARM fixes from Russell King:
    "The largest thing in this set of changes is bringing back some of the
    ARMv3 code to fix a compile problem noticed on RiscPC, which we still
    support, even though we only support ARMv4 there.

    (The reason is that the system bus doesn't support ARMv4 half-word
    accesses, so we need the ARMv3 library code for this platform.)

    The rest are all quite minor fixes."

    * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
    ARM: 7490/1: Drop duplicate select for GENERIC_IRQ_PROBE
    ARM: Bring back ARMv3 IO and user access code
    ARM: 7489/1: errata: fix workaround for erratum #720789 on UP systems
    ARM: 7488/1: mm: use 5 bits for swapfile type encoding
    ARM: 7487/1: mm: avoid setting nG bit for user mappings that aren't present
    ARM: 7486/1: sched_clock: update epoch_cyc on resume
    ARM: 7484/1: Don't enable GENERIC_LOCKBREAK with ticket spinlocks
    ARM: 7483/1: vfp: only advertise VFPv4 in hwcaps if CONFIG_VFPv3 is enabled
    ARM: 7482/1: topology: fix section mismatch warning for init_cpu_topology

    Linus Torvalds
     
  • Some of the arguments to {g,s}etsockopt are passed in userland pointers.
    If we try to use the 64bit entry point, we end up sometimes failing.

    For example, dhcpcd doesn't run in x32:
    # dhcpcd eth0
    dhcpcd[1979]: version 5.5.6 starting
    dhcpcd[1979]: eth0: broadcasting for a lease
    dhcpcd[1979]: eth0: open_socket: Invalid argument
    dhcpcd[1979]: eth0: send_raw_packet: Bad file descriptor

    The code in particular is getting back EINVAL when doing:
    struct sock_fprog pf;
    setsockopt(s, SOL_SOCKET, SO_ATTACH_FILTER, &pf, sizeof(pf));

    Diving into the kernel code, we can see:
    include/linux/filter.h:
    struct sock_fprog {
    unsigned short len;
    struct sock_filter __user *filter;
    };

    net/core/sock.c:
    case SO_ATTACH_FILTER:
    ret = -EINVAL;
    if (optlen == sizeof(struct sock_fprog)) {
    struct sock_fprog fprog;

    ret = -EFAULT;
    if (copy_from_user(&fprog, optval, sizeof(fprog)))
    break;

    ret = sk_attach_filter(&fprog, sk);
    }
    break;

    arch/x86/syscalls/syscall_64.tbl:
    54 common setsockopt sys_setsockopt
    55 common getsockopt sys_getsockopt

    So for x64, sizeof(sock_fprog) is 16 bytes. For x86/x32, it's 8 bytes.
    This comes down to the pointer being 32bit for x32, which means we need
    to do structure size translation. But since x32 comes in directly to
    sys_setsockopt, it doesn't get translated like x86.

    After changing the syscall table and rebuilding glibc with the new kernel
    headers, dhcp runs fine in an x32 userland.

    Oddly, it seems like Linus noted the same thing during the initial port,
    but I guess that was missed/lost along the way:
    https://lkml.org/lkml/2011/8/26/452

    [ hpa: tagging for -stable since this is an ABI fix. ]

    Bugzilla: https://bugs.gentoo.org/423649
    Reported-by: Mads
    Signed-off-by: Mike Frysinger
    Link: http://lkml.kernel.org/r/1345320697-15713-1-git-send-email-vapier@gentoo.org
    Cc: H. J. Lu
    Cc: v3.4..v3.5
    Signed-off-by: H. Peter Anvin

    Mike Frysinger
     

17 Aug, 2012

5 commits


16 Aug, 2012

3 commits

  • Pull two sparc fixes from David S. Miller.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
    sparc64: Be less verbose during vmemmap population.
    sparc64: do not clobber personality flags in sys_sparc64_personality()

    Linus Torvalds
     
  • The generic atomic64 support came in 2009 to support the perf subsystem
    with the expectation that all architectures would implement atomic64
    support. Since then, other optional parts of the generic kernel have
    also come to expect atomic64 support. This patch enables generic atomic64
    support for C6X architecture.

    Signed-off-by: Mark Salter

    Mark Salter
     
  • C6X currently lacks Lx_CACHE_SHIFT defines which are needed in a
    few places in the generic kernel. This patch adds _SHIFT defines
    for the various caches and bases the Lx_CACHE_BYTES defines on
    them.

    Signed-off-by: Mark Salter

    Mark Salter
     

15 Aug, 2012

4 commits

  • Seems that Thomas' and my patches collided during the last merge
    window.

    Signed-off-by: Stephen Boyd
    Signed-off-by: Russell King

    Stephen Boyd
     
  • On a 2-node machine with 256GB of ram we get 512 lines of
    console output, which is just too much.

    This mimicks Yinghai Lu's x86 commit c2b91e2eec9678dbda274e906cc32ea8f711da3b
    (x86_64/mm: check and print vmemmap allocation continuous) except that
    we aren't ever going to get contiguous block pointers in between calls
    so just print when the virtual address or node changes.

    This decreases the output by an order of 16.

    Also demote this to KERN_DEBUG.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This reverts commit bacef661acdb634170a8faddbc1cf28e8f8b9eee.

    This commit has been found to cause serious regressions on a number of
    ASUS machines at the least. We probably need to provide a 1:1 map in
    addition to the EFI virtual memory map in order for this to work.

    Signed-off-by: H. Peter Anvin
    Reported-and-bisected-by: Jérôme Carretero
    Cc: Jan Beulich
    Cc: Matt Fleming
    Cc: Matthew Garrett
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20120805172903.5f8bb24c@zougloub.eu

    H. Peter Anvin
     
  • Recent commit 332afa656e76458ee9cf0f0d123016a0658539e4 cleaned up
    a workaround that updates irq_cfg domain for legacy irq's that
    are handled by the IO-APIC. This was assuming that the recent
    changes in assign_irq_vector() were sufficient to remove the workaround.

    But this broke couple of AMD platforms. One of them seems to be
    sending interrupts to the offline cpu's, resulting in spurious
    "No irq handler for vector xx (irq -1)" messages when those cpu's come online.
    And the other platform seems to always send the interrupt to the last logical
    CPU (cpu-7). Recent changes had an unintended side effect of using only logical
    cpu-0 in the IO-APIC RTE (during boot for the legacy interrupts) and this
    broke the legacy interrupts not getting routed to the cpu-7 on the AMD
    platform, resulting in a boot hang.

    For now, reintroduce the removed workaround, (essentially not allowing the
    vector to change for legacy irq's when io-apic starts to handle the irq. Which
    also addressed the uninteded sife effect of just specifying cpu-0 in the
    IO-APIC RTE for those irq's during boot).

    Reported-and-tested-by: Robert Richter
    Reported-and-tested-by: Borislav Petkov
    Signed-off-by: Suresh Siddha
    Link: http://lkml.kernel.org/r/1344453412.29170.5.camel@sbsiddha-desk.sc.intel.com
    Signed-off-by: H. Peter Anvin

    Suresh Siddha
     

14 Aug, 2012

5 commits

  • Pull s390 patches from Martin Schwidefsky:
    "Included are bug fixes and a patch to enable system call filtering
    with BPF."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390/compat: fix mmap compat system calls
    s390/compat: fix compat wrappers for process_vm system calls
    s390: do not clobber personality flags in sys_32_personality()
    s390/seccomp: add support for system call filtering using BPF
    s390/sclp_sdias: Add missing break and "fall through"
    s390/mm: remove MAX_PHYSADDR_BITS define

    Linus Torvalds
     
  • If PMU counter has PEBS enabled it is not enough to disable counter
    on a guest entry since PEBS memory write can overshoot guest entry
    and corrupt guest memory. Disabling PEBS during guest entry solves
    the problem.

    Tested-by: David Ahern
    Signed-off-by: Gleb Natapov
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20120809085234.GI3341@redhat.com
    Signed-off-by: Thomas Gleixner

    Gleb Natapov
     
  • The Westmere-EX uncore is similar to the Nehalem-EX uncore. The
    differences are:
    - Westmere-EX uncore has 10 instances of Cbox. The MSRs for Cbox8
    and Cbox9 in the Westmere-EX aren't contiguous with Cbox 0~7.
    - The fvid field in the ZDP_CTL_FVC register in the Mbox is
    different. It's 5 bits in the Nehalem-EX, 6 bits in the
    Westmere-EX.

    Signed-off-by: Yan, Zheng
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1344229882-3907-3-git-send-email-zheng.z.yan@intel.com
    Signed-off-by: Thomas Gleixner

    Yan, Zheng
     
  • This patch includes following fixes and update:
    - Only some events in the Sbox and Mbox can use the match/mask
    registers, add code to check this.
    - The format definitions for xbr_mm_cfg and xbr_match registers
    in the Rbox are wrong, xbr_mm_cfg should use 32 bits, xbr_match
    should use 64 bits.
    - Cleanup the Rbox code. Compute the addresses extra registers in
    the enable_event function instead of the hw_config function.
    This simplifies the code in nhmex_rbox_alter_er().

    Signed-off-by: Yan, Zheng
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1344229882-3907-2-git-send-email-zheng.z.yan@intel.com
    Signed-off-by: Thomas Gleixner

    Yan, Zheng
     
  • Fix the following section mismatch:

    WARNING: arch/x86/kernel/cpu/built-in.o(.text+0x7ad9): Section mismatch in reference from the function uncore_types_exit() to the function .init.text:uncore_type_exit()

    The function uncore_types_exit() references the function __init
    uncore_type_exit(). This is often because uncore_types_exit lacks a
    __init annotation or the annotation of uncore_type_exit is wrong.

    caused by 14371cce03c2 ("perf: Add generic PCI uncore PMU device
    support").

    Cc: Zheng Yan
    Cc: Ingo Molnar
    Signed-off-by: Borislav Petkov
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1339741902-8449-8-git-send-email-zheng.z.yan@intel.com
    Signed-off-by: Thomas Gleixner

    Borislav Petkov
     

13 Aug, 2012

4 commits

  • This partially reverts 357c9c1f07d4546bc3fbc0fd1044d96b114d14ed
    (ARM: Remove support for ARMv3 ARM610 and ARM710 CPUs).

    Although we only support StrongARM on the RiscPC, we need to keep the
    ARMv3 user access code for this platform because the bus does not
    understand half-word load/stores.

    Reported-by: Arnd Bergmann
    Signed-off-by: Russell King

    Russell King
     
  • Pull gpio fixes from Linus Walleij:
    - Fix a resource leak in the SCH driver
    - Fix the register address calculation in the MSIC driver
    - Fix the PXA driver's devicetree functions
    - Delete redundant shadow variable leftovers in the MXC driver
    - Specify the GPIO base for the device tree probe in the MXC driver
    - Add a modalias for the i.MX driver
    - Fix off-by-one bug in the Samsung driver
    - Fix erroneous errorpath in the Langwell driver

    * tag 'gpio-fixes-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
    drivers/gpio/gpio-langwell.c: fix error return code
    gpio: samsung: Fix off-by-one bug in gpio addresses
    ARM: dts: imx: add alias for gpio
    gpio/mxc: specify gpio base for device tree probe
    gpio/mxc: remove redundant shadow variables initialization
    GPIO: gpio-pxa: fix devicetree functions
    gpio: msic: Fix calculating register address in msic_gpio_to_oreg()
    gpio-sch: Fix leak of resource

    Linus Torvalds
     
  • Pull arm-soc bug fixes from Arnd Bergmann:
    "These are a bunch of bug fixes that came in after the merge window and
    one update for the MAINTAINERS file.

    The largest part of the fixes are patches that address bugs found by
    building all the ARM defconfig files. There are a lot more warnings
    that we have patches for, but the others are either still under
    discussion or are harmless and do not cause actual problems besides
    making the build slightly noisy."

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (30 commits)
    ARM: davinci: remove broken ntosd2_init_i2c
    ARM: s3c24xx: enable CONFIG_BUG for tct_hammer
    omap-rng: fix use of SIMPLE_DEV_PM_OPS
    spi/s3c64xx: improve error handling
    mtd/omap2: fix dmaengine_slave_config error handling
    gpio: em: do not discard em_gio_irq_domain_cleanup
    ARM: exynos: exynos_pm_add_dev_to_genpd may be unused
    ARM: imx: gpmi-nand depends on mxs-dma
    ARM: integrator: include
    ARM: s3c24xx: use new PWM driver
    ARM: sa1100: include linux/io.h in hackkit leds code
    Input: eeti_ts: pass gpio value instead of IRQ
    ARM: pxa: remove irq_to_gpio from ezx-pcap driver
    ARM: tegra: more regulator fixes for Harmony
    usb/ohci-omap: remove unused variable
    mfd/asic3: fix asic3_mfd_probe return value
    ARM: kirkwood: fix typo in Makefile.boot
    i.MX27: Fix emma-prp and csi clocks.
    ARM: integrator: use clk_prepare_enable() for timer
    MAINTAINERS: update entry for Linus Walleij
    ...

    Linus Torvalds
     
  • …owski/linux-dma-mapping

    Pull three dma-mapping fixes from Marek Szyprowski.

    * 'fixes-for-linus-for-3.6-rc2' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
    ARM: dma-mapping: fix incorrect freeing of atomic allocations
    ARM: dma-mapping: fix atomic allocation alignment
    ARM: mm: fix MMU mapping of CMA regions

    Linus Torvalds
     

11 Aug, 2012

2 commits

  • Commit 5a783cbc4836 ("ARM: 7478/1: errata: extend workaround for erratum
    #720789") added workarounds for erratum #720789 to the range TLB
    invalidation functions with the observation that the erratum only
    affects SMP platforms. However, when running an SMP_ON_UP kernel on a
    uniprocessor platform we must take care to preserve the ASID as the
    workaround is not required.

    This patch ensures that we don't set the ASID to 0 when flushing the TLB
    on such a system, preserving the original behaviour with the workaround
    disabled.

    Cc:
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Will Deacon
     
  • Page migration encodes the pfn in the offset field of a swp_entry_t.
    For LPAE, we support physical addresses of up to 36 bits (due to
    sparsemem limitations with the size of page flags), requiring 24 bits
    to represent a pfn. A further 3 bits are used to encode a swp_entry into
    a pte, leaving 5 bits for the type field. Furthermore, the core code
    defines MAX_SWAPFILES_SHIFT as 5, so the additional type bit does not
    get used.

    This patch reduces the width of the type field to 5 bits, allowing us
    to create up to 31 swapfiles of 64GB each.

    Cc:
    Reviewed-by: Catalin Marinas
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Will Deacon