1. 17 May, 2015 8 commits
    • Denys Vlasenko's avatar
      x86/asm/entry/64: Use shorter MOVs from segment registers · adeb5537
      Denys Vlasenko authored
      The "movw %ds,%cx" instruction needs a 0x66 prefix, while
      "movl %ds,%ecx" does not.
      
      The difference is that latter form (on 64-bit CPUs)
      overwrites the entire %ecx, not only its lower half.
      
      But subsequent code doesn't depend on the value of upper
      half of %ecx, so we can safely use the shorter instruction.
      
      The new code is also faster than the old one - now we don't
      depend on the old value of %ecx, but this code fragment is
      not performance-critical so it does not matter much.
      Signed-off-by: default avatarDenys Vlasenko <dvlasenk@redhat.com>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Drewry <wad@chromium.org>
      Link: http://lkml.kernel.org/r/1431722346-26585-1-git-send-email-dvlasenk@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      adeb5537
    • Borislav Petkov's avatar
      x86/asm/head*.S: Change global labels to local · e839004b
      Borislav Petkov authored
      Make the disassembly look less confusing:
      
        -- head_64.o.before.asm
        ++ head_64.o.after.asm
         0000000000000120 <early_idt_handler>:
          120:	fc                   	cld
          121:	83 3c 24 02          	cmpl   $0x2,(%rsp)
        - 125:	0f 84 9d 00 00 00    	je     1c8 <is_nmi>
        + 125:	0f 84 9d 00 00 00    	je     1c8 <early_idt_handler+0xa8>
          12b:	83 3d 00 00 00 00 02 	cmpl   $0x2,0x0(%rip)        # 132 <early_idt_handler+0x12>
          132:	74 7e                	je     1b2 <early_idt_handler+0x92>
          134:	ff 05 00 00 00 00    	incl   0x0(%rip)        # 13a <early_idt_handler+0x1a>
        @@ -1198,9 +1198,7 @@ Disassembly of section .init.text:
          1bf:	5a                   	pop    %rdx
          1c0:	59                   	pop    %rcx
          1c1:	58                   	pop    %rax
        - 1c2:	ff 0d 00 00 00 00    	decl   0x0(%rip)        # 1c8 <is_nmi>
        -
        -00000000000001c8 <is_nmi>:
        + 1c2:	ff 0d 00 00 00 00    	decl   0x0(%rip)        # 1c8 <early_idt_handler+0xa8>
          1c8:	48 83 c4 10          	add    $0x10,%rsp
          1cc:	48 cf                	iretq
      
        -- head_32.o.before.asm
        ++ head_32.o.after.asm
         0000016c <early_idt_handler>:
          16c:  fc                      cld
          16d:  83 3c 24 02             cmpl   $0x2,(%esp)
        - 171:  74 73                   je     1e6 <is_nmi>
        + 171:  74 73                   je     1e6 <ex_entry+0xc>
          173:  36 83 3d 00 00 00 00    cmpl   $0x2,%ss:0x0
          17a:  02
          17b:  74 5a                   je     1d7 <hlt_loop>
        @@ -483,8 +483,6 @@ Disassembly of section .init.text:
          1dd:  59                      pop    %ecx
          1de:  58                      pop    %eax
          1df:  36 ff 0d 00 00 00 00    decl   %ss:0x0
        -
        -000001e6 <is_nmi>:
          1e6:  83 c4 08                add    $0x8,%esp
          1e9:  cf                      iret
          1ea:  66 90                   xchg   %ax,%ax
      
      No functionality change.
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@linux.intel.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1431793079-11153-1-git-send-email-bp@alien8.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e839004b
    • Ingo Molnar's avatar
      Merge branch 'linus' into x86/asm, to resolve conflicts · 75d95d84
      Ingo Molnar authored
      Conflicts:
      	tools/testing/selftests/x86/Makefile
      	tools/testing/selftests/x86/run_x86_tests.sh
      75d95d84
    • Ingo Molnar's avatar
      x86: Pack loops tightly as well · 52648e83
      Ingo Molnar authored
      Packing loops tightly (-falign-loops=1) is beneficial to code size:
      
           text        data    bss     dec              filename
       12566391        1617840 1089536 15273767         vmlinux.align.16-byte
       12224951        1617840 1089536 14932327         vmlinux.align.1-byte
       11976567        1617840 1089536 14683943         vmlinux.align.1-byte.funcs-1-byte
       11903735        1617840 1089536 14611111         vmlinux.align.1-byte.funcs-1-byte.loops-1-byte
      
      Which reduces the size of the kernel by another 0.6%, so the
      the total combined size reduction of the alignment-packing
      patches is ~5.5%.
      
      The x86 decoder bandwidth and caching arguments laid out in:
      
        be6cb027 ("x86: Align jump targets to 1-byte boundaries")
      
      apply to loop alignment as well.
      
      Furtermore, modern CPU uarchs have a loop cache/buffer that
      is a L0 cache before even any uop cache, covering a few
      dozen most recently executed instructions.
      
      This loop cache generally does not have the 16-byte alignment
      restrictions of the uop cache.
      
      Now loop alignment can still be beneficial if:
      
       - a loop is cache-hot and its surroundings are not.
      
       - if the loop is so cache hot that the instruction
         flow becomes x86 decoder bandwidth limited
      
      But loop alignment is harmful if:
      
       - a loop is cache-cold
      
       - a loop's surroundings are cache-hot as well
      
       - two cache-hot loops are close to each other
      
       - if the loop fits into the loop cache
      
       - if the code flow is not decoder bandwidth limited
      
      and I'd argue that the latter five scenarios are much
      more common in the kernel, as our hottest loops are
      typically:
      
       - pointer chasing: this should fit into the loop cache
         in most cases and is typically data cache and address
         generation limited
      
       - generic memory ops (memset, memcpy, etc.): these generally
         fit into the loop cache as well, and are likewise data
         cache limited.
      
      So this patch packs loop addresses tightly as well.
      Acked-by: default avatarDenys Vlasenko <dvlasenk@redhat.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Aswin Chandramouleeswaran <aswin@hp.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jason Low <jason.low2@hp.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tim Chen <tim.c.chen@linux.intel.com>
      Link: http://lkml.kernel.org/r/20150410123017.GB19918@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      52648e83
    • Linus Torvalds's avatar
      Merge tag 'usb-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · c0655fe9
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some USB fixes and new device ids for 4.1-rc4.
      
        All are pretty minor, and have been in linux-next successfully"
      
      * tag 'usb-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb-storage: Add NO_WP_DETECT quirk for Lacie 059f:0651 devices
        Added another USB product ID for ELAN touchscreen quirks.
        xhci: gracefully handle xhci_irq dead device
        xhci: Solve full event ring by increasing TRBS_PER_SEGMENT to 256
        xhci: fix isoc endpoint dequeue from advancing too far on transaction error
        usb: chipidea: debug: avoid out of bound read
        USB: visor: Match I330 phone more precisely
        USB: pl2303: Remove support for Samsung I330
        USB: cp210x: add ID for KCF Technologies PRN device
        usb: gadget: remove incorrect __init/__exit annotations
        usb: phy: isp1301: work around tps65010 dependency
        usb: gadget: serial: fix re-ordering of tx data
        usb: gadget: hid: Fix static variable usage
        usb: gadget: configfs: Fix interfaces array NULL-termination
        usb: gadget: xilinx: fix devm_ioremap_resource() check
        usb: dwc3: dwc3-omap: correct the register macros
      c0655fe9
    • Linus Torvalds's avatar
      Merge tag 'tty-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · dd8edd7e
      Linus Torvalds authored
      Pull tty/serial fixes from Greg KH:
       "Here's some TTY and serial driver fixes for reported issues.
      
        All of these have been in linux-next successfully"
      
      * tag 'tty-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        pty: Fix input race when closing
        tty/n_gsm.c: fix a memory leak when gsmtty is removed
        Revert "serial/amba-pl011: Leave the TX IRQ alone when the UART is not open"
        serial: omap: Fix error handling in probe
        earlycon: Revert log warnings
      dd8edd7e
    • Linus Torvalds's avatar
      Merge tag 'staging-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 3f4741b1
      Linus Torvalds authored
      Pull staging / IIO driver fixes from Greg KH:
       "Here's some staging and iio driver fixes to resolve a number of
        reported issues.
      
        All of these have been in linux-next for a while"
      
      * tag 'staging-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (31 commits)
        iio: light: hid-sensor-prox: Fix memory leak in probe()
        iio: adc: cc10001: Add delay before setting START bit
        iio: adc: cc10001: Fix regulator_get_voltage() return value check
        iio: adc: cc10001: Fix incorrect use of power-up/power-down register
        staging: gdm724x: Correction of variable usage after applying ALIGN()
        iio: adc: cc10001: Fix the channel number mapping
        staging: vt6655: lock MACvWriteBSSIDAddress.
        staging: vt6655: CARDbUpdateTSF bss timestamp correct tsf counter value.
        staging: vt6655: vnt_tx_packet Correct TX order of OWNED_BY_NIC
        staging: vt6655: Fix 80211 control and management status reporting.
        staging: vt6655: implement IEEE80211_TX_STAT_NOACK_TRANSMITTED
        staging: vt6655: device_free_tx_buf use only ieee80211_tx_status_irqsafe
        staging: vt6656: use ieee80211_tx_info to select packet type.
        staging: rtl8712: freeing an ERR_PTR
        staging: sm750: remove incorrect __exit annotation
        iio: kfifo: Set update_needed to false only if a buffer was allocated
        iio: mcp320x: Fix occasional incorrect readings
        iio: accel: mma9553: check input value for activity period
        iio: accel: mma9553: add enable channel for activity
        iio: accel: mma9551_core: prevent buffer overrun
        ...
      3f4741b1
    • Linus Torvalds's avatar
      Merge tag 'char-misc-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 148c46f3
      Linus Torvalds authored
      Pull char/misc fix from Greg KH:
       "Here is one fix, in the extcon subsystem, that resolves a reported
        issue.
      
        It's been in linux-next for a number of weeks now, sorry for not
        getting it to you sooner"
      
      * tag 'char-misc-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        extcon: usb-gpio: register extcon device before IRQ registration
      148c46f3
  2. 16 May, 2015 9 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · 92752b5c
      Linus Torvalds authored
      Pull UML hostfs fix from Richard Weinberger:
       "This contains a single fix for a regression introduced in 4.1-rc1"
      
      * 'for-linus-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        hostfs: Use correct mask for file mode
      92752b5c
    • Linus Torvalds's avatar
      Merge tag 'upstream-4.1-rc4' of git://git.infradead.org/linux-ubifs · 1630ee5e
      Linus Torvalds authored
      Pull UBI bufix from Richard Weinberger:
       "This contains a single bug fix for the UBI block driver"
      
      * tag 'upstream-4.1-rc4' of git://git.infradead.org/linux-ubifs:
        UBI: block: Add missing cache flushes
      1630ee5e
    • Linus Torvalds's avatar
      Merge tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 6a8098a4
      Linus Torvalds authored
      Pull ext4 fixes from Ted Ts'o:
       "Fix a number of ext4 bugs; the most serious of which is a bug in the
        lazytime mount optimization code where we could end up updating the
        timestamps to the wrong inode"
      
      * tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: fix an ext3 collapse range regression in xfstests
        jbd2: fix r_count overflows leading to buffer overflow in journal recovery
        ext4: check for zero length extent explicitly
        ext4: fix NULL pointer dereference when journal restart fails
        ext4: remove unused function prototype from ext4.h
        ext4: don't save the error information if the block device is read-only
        ext4: fix lazytime optimization
      6a8098a4
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · c7309e88
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "The first commit is a fix from Filipe for a very old extent buffer
        reuse race that triggered a BUG_ON.  It hasn't come up often, I looked
        through old logs at FB and we hit it a handful of times over the last
        year.
      
        The rest are other corners he hit during testing"
      
      * 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: fix race when reusing stale extent buffers that leads to BUG_ON
        Btrfs: fix race between block group creation and their cache writeout
        Btrfs: fix panic when starting bg cache writeout after IO error
        Btrfs: fix crash after inode cache writeback failure
      c7309e88
    • Linus Torvalds's avatar
      Merge branch 'master' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 518af3cb
      Linus Torvalds authored
      Pull MIPS fixes from Ralf Baechle:
       "Seven small fixes.  The shortlog below is a good description so no
        need to elaborate.
      
        It has sat in linux-next and survived the usual automated testing by
        Imagination's test farm"
      
      * 'master' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: tlb-r4k: Fix PG_ELPA comment
        MIPS: Fix up obsolete cpu_set usage
        MIPS: IP32: Fix build errors in reset code in DS1685 platform hook.
        MIPS: KVM: Fix unused variable build warning
        MIPS: traps: remove extra Tainted: line from __show_regs() output
        MIPS: Fix wrong CHECKFLAGS (sparse builds) with GCC 5.1
        MIPS: Fix a preemption issue with thread's FPU defaults
      518af3cb
    • Linus Torvalds's avatar
      Merge tag 'arc-4.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · 2ed3d795
      Linus Torvalds authored
      Pull ARC fixes from Vineet Gupta.
      
      * tag 'arc-4.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: inline cache flush toggle helpers
        ARC: With earlycon in use, retire EARLY_PRINTK
        ARC: unbork !LLSC build
      2ed3d795
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · d6610270
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "Nothing frightening this time, just smaller fixes in a number of
        places.
      
        The other changes contained here are:
      
         MAINTAINERS file updates:
      
         - The mach-gemini maintainer is back in action and has a new git tree
      
         - Krzysztof Kozlowski has volunteered to be a new co-maintainer for
           the samsung platforms
      
         - updates to the files that belong to Marvell mvebu
      
        Bug fixes:
      
         - The largest changes are on omap2, but are only to avoid some
           harmless warnings and to fix reset on omap4
      
         - a small regression fix on tegra
      
         - multiple fixes for incorrect IRQ affinity on vexpress
      
         - the missing system controller on arm64 juno is added
      
         - one revert of a patch that was accidentally applied twice for
           mach-rockchip
      
         - two clock related DT fixes for mvebu
      
         - a workaround for suspend with old DT binaries on new exynos kernels
      
         - Another fix for suspend on exynos, needs to be backported"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (21 commits)
        MAINTAINERS: Add dts entries for some of the Marvell SoCs
        MAINTAINERS: ARM: EXYNOS: Add Krzysztof Kozlowski as co-maintainer
        ARM: EXYNOS: Use of_machine_is_compatible instead of soc_is_exynos4
        ARM: EXYNOS: Fix failed second suspend on Exynos4
        Revert "ARM: rockchip: fix undefined instruction of reset_ctrl_regs"
        ARM: EXYNOS: Fix dereference of ERR_PTR returned by of_genpd_get_from_provider
        ARM: EXYNOS: Don't try to initialize suspend on old DT
        ARM: dts: Add keep-power-in-suspend to WiFi SDIO node for Peach Boards
        ARM: gemini: fix compiler warning due wrong data type
        ARM: vexpress/tc2: Add interrupt-affinity to the PMU node
        ARM: vexpress/ca9: Add interrupt-affinity to the PMU node
        ARM: vexpress/ca9: Add unified-cache property to l2 cache node
        ARM64: juno: add sp810 support and fix sp804 clock frequency
        ARM: Gemini: Maintainers update
        ARM: OMAP2+: Remove bogus struct clk comparison for timer clock
        ARM: dove: Add clock-names to CuBox Si5351 clk generator
        ARM: AM33xx+: hwmod: re-use omap4 implementations for reset functionality
        ARM: OMAP4+: PRM: add support for passing status register/bit info to reset
        ARM: AM43xx: hwmod: add VPFE hwmod entries
        ARM: mvebu: Fix the main PLL frequency on Armada 375, 38x and 39x SoCs
        ...
      d6610270
    • Linus Torvalds's avatar
      Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · 73786683
      Linus Torvalds authored
      Pull thermal fixes from Zhang Rui:
       "Specifics:
      
         - fix an issue in intel_powerclamp driver that idle injection target
           is not accurately maintained on newer Intel CPUs.  Package C8 to
           C10 states are introduced on these CPUs but they were not included
           in the package c-state residency calculation.  From Jacob Pan.
      
         - fix a problem that package c-state idle injection was missing on
           Broadwell server, by adding its id to intel_powerclamp driver.
           From Jacob Pan.
      
         - a couple of small fixes and cleanups from Joe Perches, Mathias
           Krause, Dan Carpenter and Anand Moon"
      
      * 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
        tools/thermal: tmon: fixed the 'make install' command
        thermal: rockchip: fix an error code
        thermal/powerclamp: fix missing newer package c-states
        thermal/intel_powerclamp: add id for broadwell server
        thermal/intel_powerclamp: add __init / __exit annotations
        thermal: Use bool function return values of true/false not 1/0
      73786683
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-4.1-rc4' of... · d70933be
      Linus Torvalds authored
      Merge tag 'linux-kselftest-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fixes from Shuah Khan:
       "Urgent fix for Kselftest regression introduced in 4.1-rc1 by the new
        x86 test due to its hard dependency on 32-bit build environment.
      
        A set of 5 patches fix the make kselftest run and kselftest install"
      
      * tag 'linux-kselftest-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests, x86: Rework x86 target architecture detection
        selftests, x86: Remove useless run_tests rule
        selftests/x86: install tests
        selftest/x86: have no dependency on all when cross building
        selftest/x86: build both bitnesses
      d70933be
  3. 15 May, 2015 23 commits
    • Linus Torvalds's avatar
      Merge branch 'parisc-4.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 4b470f12
      Linus Torvalds authored
      Pull parisc fixes from Helge Deller:
       "One important patch which fixes crashes due to stack randomization on
        architectures where the stack grows upwards (currently parisc and
        metag only).
      
        This bug went unnoticed on parisc since kernel 3.14 where the flexible
        mmap memory layout support was added by commit 9dabf60d.  The
        changes in fs/exec.c are inside an #ifdef CONFIG_STACK_GROWSUP section
        and will not affect other platforms.
      
        The other two patches rename args of the kthread_arg() function and
        fixes a printk output"
      
      * 'parisc-4.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc,metag: Fix crashes due to stack randomization on stack-grows-upwards architectures
        parisc: copy_thread(): rename 'arg' argument to 'kthread_arg'
        parisc: %pf is only for function pointers
      4b470f12
    • James Hogan's avatar
      MIPS: tlb-r4k: Fix PG_ELPA comment · e05cb568
      James Hogan authored
      The ELPA bit in PageGrain is all about large *physical* addresses, so
      correct the reference to "large virtual address" in the comment above
      where it is set for MIPS64.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: David Daney <ddaney@caviumnetworks.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/10038/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      e05cb568
    • Ezequiel Garcia's avatar
      MIPS: Fix up obsolete cpu_set usage · 7363cb7d
      Ezequiel Garcia authored
      cpu_set was removed (along with a bunch of cpumask helpers) by
      commit 2f0f267e ("cpumask: remove deprecated functions.").
      
      Fix this by replacing cpu_set with cpumask_set_cpu. Without this
      fix the following error is triggered when CONFIG_MIPS_MT_FPAFF=y.
      
        arch/mips/kernel/smp-cps.c: In function 'cps_smp_setup':
        arch/mips/kernel/smp-cps.c:95:3: error: implicit declaration of function 'cpu_set' [-Werror=implicit-function-declaration]
      
      Fixes: 90db024f ("MIPS: smp-cps: cpu_set FPU mask if FPU present")
      Signed-off-by: default avatarEzequiel Garcia <ezequiel.garcia@imgtec.com>
      Acked-by: default avatarNiklas Cassel <niklass@axis.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/9912/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      7363cb7d
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · be5e32fc
      Linus Torvalds authored
      Pull x86 build fix from Ingo Molnar:
       "A bzImage build fix on older distros"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/vdso: Fix 'make bzImage' on older distros
      be5e32fc
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 14db1e8d
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
       "Two fixes: a suspend/resume related regression fix, and an RT priority
        boosting fix"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/core: Fix regression in cpuset_cpu_inactive() for suspend
        sched: Handle priority boosted tasks proper in setscheduler()
      14db1e8d
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ef4a293a
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "Mostly tooling fixes, but also a lockdep annotation fix, a PMU event
        list fix and a new model addition"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tools/liblockdep: Fix compilation error
        tools/liblockdep: Fix linker error in case of cross compile
        perf tools: Use getconf to determine number of online CPUs
        tools: Fix tools/vm build
        perf/x86/rapl: Enable Broadwell-U RAPL support
        perf/x86/intel: Fix SLM cache event list
        perf: Annotate inherited event ctx->mutex recursion
      ef4a293a
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 214e9f72
      Linus Torvalds authored
      Pull irq fix from Ingo Molnar:
       "A tegra irqchip driver memory corruption fix"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip: tegra: Set the proper base address in irq chip data
      214e9f72
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · c4d0bcc2
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Radeon:
           one oops fix, one bug fix, one pci id addition patch
      
        i915:
           one suspend/resume regression fix.
      
        All seems quiet enough."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/radeon: don't do mst probing if MST isn't enabled.
        drm/radeon: add new bonaire pci id
        drm/radeon: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling
        drm/i915: Avoid GPU hang when coming out of s3 or s4
      c4d0bcc2
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 0336104d
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "8 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        mm, numa: really disable NUMA balancing by default on single node machines
        MAINTAINERS: update Jingoo Han's email address
        CMA: page_isolation: check buddy before accessing it
        uidgid: make uid_valid and gid_valid work with !CONFIG_MULTIUSER
        kernfs: do not account ino_ida allocations to memcg
        gfp: add __GFP_NOACCOUNT
        tools/vm: fix page-flags build
        drivers/rtc/rtc-armada38x.c: remove unused local `flags'
      0336104d
    • Arnd Bergmann's avatar
      Merge tag 'samsung-fixes-2' of... · 56523eef
      Arnd Bergmann authored
      Merge tag 'samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes
      
      Merge "Samsung 2nd fixes for v4.1" from Kukjin Kim:
      
      - fix second S2R on exynos4412 based Trats2, Odroid U3 boards which
        happened after enabling L2$ and caused by commit 13cfa6c4 ("ARM:
        EXYNOS: Fix CPU idle clock down after CPU off")
        And replace the soc_is_exynosxxx() macro with of_compatible_xxx
      
      - fix dereference of ERR_PTR of of_genpd_get_from_provider()
      
      - fix suspend problem on old DT machines to skip the initialization
        suspend and caused by commit 8b283c02 ("ARM: exynos4/5: convert
        pmu wakeup to stacked domains")
      
      - add keep-power-in-suspend for Peach Boards to support S2R and has
        been missed in previous pull-request for fixes
      
      * tag 'samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
        ARM: EXYNOS: Use of_machine_is_compatible instead of soc_is_exynos4
        ARM: EXYNOS: Fix failed second suspend on Exynos4
        ARM: EXYNOS: Fix dereference of ERR_PTR returned by of_genpd_get_from_provider
        ARM: EXYNOS: Don't try to initialize suspend on old DT
        ARM: dts: Add keep-power-in-suspend to WiFi SDIO node for Peach Boards
      56523eef
    • Arnd Bergmann's avatar
      Merge tag 'mvebu-fixes-4.1-2' of git://git.infradead.org/linux-mvebu into fixes · cc1c1b5d
      Arnd Bergmann authored
      Merge "mvebu fixes for 4.1 (part 2)" from Gregory CLEMENT:
      
      Fix the main PLL frequency on Armada 375, 38x and 39x SoCs
      Add clock-names to CuBox Si5351 clk generator
      Add dts entries in the MAINTAINERS file
      
      * tag 'mvebu-fixes-4.1-2' of git://git.infradead.org/linux-mvebu:
        MAINTAINERS: Add dts entries for some of the Marvell SoCs
        ARM: dove: Add clock-names to CuBox Si5351 clk generator
        ARM: mvebu: Fix the main PLL frequency on Armada 375, 38x and 39x SoCs
      cc1c1b5d
    • Gregory CLEMENT's avatar
      MAINTAINERS: Add dts entries for some of the Marvell SoCs · 31c17ac9
      Gregory CLEMENT authored
      Since many releases, the modifications of the mvebu and berlin device
      tree files are merged through the mvebu subsystem. This patch makes it
      official in order to help the contributors using the get_maintainer.pl
      to find the accurate peoples.
      
      In the same time, updated the mvebu description which now includes the
      kirkwood SoCs and new Armada SoCs.
      Signed-off-by: default avatarGregory CLEMENT <gregory.clement@free-electrons.com>
      Acked-by: default avatarSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      Acked-by: default avatarJason Cooper <jason@lakedaemon.net>
      Acked-by: default avatarAndrew Lunn <andrew@lunn.ch>
      31c17ac9
    • Ingo Molnar's avatar
      x86: Align jump targets to 1-byte boundaries · be6cb027
      Ingo Molnar authored
      The following NOP in a hot function caught my attention:
      
        >   5a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
      
      That's a dead NOP that bloats the function a bit, added for the
      default 16-byte alignment that GCC applies for jump targets.
      
      I realize that x86 CPU manufacturers recommend 16-byte jump
      target alignments (it's in the Intel optimization manual),
      to help their relatively narrow decoder prefetch alignment
      and uop cache constraints, but the cost of that is very
      significant:
      
              text           data       bss         dec      filename
          12566391        1617840   1089536    15273767      vmlinux.align.16-byte
          12224951        1617840   1089536    14932327      vmlinux.align.1-byte
      
      By using 1-byte jump target alignment (i.e. no alignment at all)
      we get an almost 3% reduction in kernel size (!) - and a
      probably similar reduction in I$ footprint.
      
      Now, the usual justification for jump target alignment is the
      following:
      
       - modern decoders tend to have 16-byte (effective) decoder
         prefetch windows. (AMD documents it higher but measurements
         suggest the effective prefetch window on curretn uarchs is
         still around 16 bytes)
      
       - on Intel there's also the uop-cache with cachelines that have
         16-byte granularity and limited associativity.
      
       - older x86 uarchs had a penalty for decoder fetches that crossed
         16-byte boundaries. These limits are mostly gone from recent
         uarchs.
      
      So if a forward jump target is aligned to cacheline boundary then
      prefetches will start from a new prefetch-cacheline and there's
      higher chance for decoding in fewer steps and packing tightly.
      
      But I think that argument is flawed for typical optimized kernel
      code flows: forward jumps often go to 'cold' (uncommon) pieces
      of code, and  aligning cold code to cache lines does not bring a
      lot of advantages  (they are uncommon), while it causes
      collateral damage:
      
       - their alignment 'spreads out' the cache footprint, it shifts
         followup hot code further out
      
       - plus it slows down even 'cold' code that immediately follows 'hot'
         code (like in the above case), which could have benefited from the
         partial cacheline that comes off the end of hot code.
      
      But even in the cache-hot case the 16 byte alignment brings
      disadvantages:
      
       - it spreads out the cache footprint, possibly making the code
         fall out of the L1 I$.
      
       - On Intel CPUs, recent microarchitectures have plenty of
         uop cache (typically doubling every 3 years) - while the
         size of the L1 cache grows much less aggressively. So
         workloads are rarely uop cache limited.
      
      The only situation where alignment might matter are tight
      loops that could fit into a single 16 byte chunk - but those
      are pretty rare in the kernel: if they exist they tend
      to be pointer chasing or generic memory ops, which both tend
      to be cache miss (or cache allocation) intensive and are not
      decoder bandwidth limited.
      
      So the balance of arguments strongly favors packing kernel
      instructions tightly versus maximizing for decoder bandwidth:
      this patch changes the jump target alignment from 16 bytes
      to 1 byte (tightly packed, unaligned).
      Acked-by: default avatarDenys Vlasenko <dvlasenk@redhat.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Aswin Chandramouleeswaran <aswin@hp.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jason Low <jason.low2@hp.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tim Chen <tim.c.chen@linux.intel.com>
      Link: http://lkml.kernel.org/r/20150410120846.GA17101@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      be6cb027
    • Ingo Molnar's avatar
      Merge branch 'liblockdep-fixes' of... · 60d5ddea
      Ingo Molnar authored
      Merge branch 'liblockdep-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux into perf/urgent
      
      Pull liblockdep fixes from Sasha Levin:
      
       "two fixes that deal with compilation errors in liblockdep."
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      60d5ddea
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2015-05-13' of git://anongit.freedesktop.org/drm-intel into drm-fixes · 47231324
      Dave Airlie authored
      fix one gpu hang on resume.
      
      * tag 'drm-intel-fixes-2015-05-13' of git://anongit.freedesktop.org/drm-intel:
        drm/i915: Avoid GPU hang when coming out of s3 or s4
      47231324
    • Dave Airlie's avatar
      Merge branch 'drm-fixes-4.1' of git://people.freedesktop.org/~agd5f/linux into drm-fixes · e52f649e
      Dave Airlie authored
      radeon minor fixes, and pci id addition.
      * 'drm-fixes-4.1' of git://people.freedesktop.org/~agd5f/linux:
        drm/radeon: don't do mst probing if MST isn't enabled.
        drm/radeon: add new bonaire pci id
        drm/radeon: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling
      e52f649e
    • Theodore Ts'o's avatar
      ext4: fix an ext3 collapse range regression in xfstests · b9576fc3
      Theodore Ts'o authored
      The xfstests test suite assumes that an attempt to collapse range on
      the range (0, 1) will return EOPNOTSUPP if the file system does not
      support collapse range.  Commit 280227a7: "ext4: move check under
      lock scope to close a race" broke this, and this caused xfstests to
      fail when run when testing file systems that did not have the extents
      feature enabled.
      Reported-by: default avatarEric Whitney <enwlinux@gmail.com>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      b9576fc3
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · f0897f4c
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "Two fixes here, one revert of a recent ACPICA commit that broke audio
        support on one Dell machine and a fix for a long-standing issue that
        may cause systems to break randomly during boot.
      
        Specifics:
      
         - The recent ACPICA commit that set the ACPI _REV return value to 2
           (which is the value always used by Windows and now mandated by the
           spec too) in order to prevent the firmware people from using it to
           play tricks with us caused a serious audio regression to happen on
           Dell XPS 13 (the AML on that machine uses the _REV return value to
           decide how to expose audio to the OS and does that to hide the lack
           of proper support for its I2S audio in Linux), so revert that
           commit for now and we'll revisit the issue in the next cycle.
      
         - Ensure that the ordering of acpi_reserve_resources() with respect
           to the rest of the ACPI initialization sequence will always be the
           same, or the IO or memory region occupied by the ACPI fixed
           registers may be assigned to a PCI host bridge as a result of a
           race and random breakage ensues going forward"
      
      * tag 'pm+acpi-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        Revert "ACPICA: Permanently set _REV to the value '2'."
        ACPI / init: Fix the ordering of acpi_reserve_resources()
      f0897f4c
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · fc8c540b
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
      
       - fix potential memory leak in perf PMU probing
      
       - BPF sign extension fix for 64-bit immediates
      
       - fix build failure with unusual configuration
      
       - revert unused and broken branch patching from alternative code
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: perf: fix memory leak when probing PMU PPIs
        arm64: bpf: fix signedness bug in loading 64-bit immediate
        arm64: mm: Fix build error with CONFIG_SPARSEMEM_VMEMMAP disabled
        Revert "arm64: alternative: Allow immediate branch as alternative instruction"
      fc8c540b
    • Linus Torvalds's avatar
      Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · 3c25a75e
      Linus Torvalds authored
      Pull dmi fixes from Jean Delvare.
      
      * 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
        firmware: dmi_scan: Fix ordering of product_uuid
        firmware: dmi_scan: Simplified displayed version
      3c25a75e
    • Mel Gorman's avatar
      mm, numa: really disable NUMA balancing by default on single node machines · b0dc2b9b
      Mel Gorman authored
      NUMA balancing is meant to be disabled by default on UMA machines but
      the check is using nr_node_ids (highest node) instead of
      num_online_nodes (online nodes).
      
      The consequences are that a UMA machine with a node ID of 1 or higher
      will enable NUMA balancing.  This will incur useless overhead due to
      minor faults with the impact depending on the workload.  These are the
      impact on the stats when running a kernel build on a single node machine
      whose node ID happened to be 1:
      
        			       vanilla     patched
        NUMA base PTE updates          5113158           0
        NUMA huge PMD updates              643           0
        NUMA page range updates        5442374           0
        NUMA hint faults               2109622           0
        NUMA hint local faults         2109622           0
        NUMA hint local percent            100         100
        NUMA pages migrated                  0           0
      Signed-off-by: default avatarMel Gorman <mgorman@suse.de>
      Reviewed-by: default avatarRik van Riel <riel@redhat.com>
      Cc: <stable@vger.kernel.org>	[3.8+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b0dc2b9b
    • Jingoo Han's avatar
      MAINTAINERS: update Jingoo Han's email address · b7701755
      Jingoo Han authored
      Change my private email address.
      Signed-off-by: default avatarJingoo Han <jingoohan1@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b7701755
    • Hui Zhu's avatar
      CMA: page_isolation: check buddy before accessing it · 1ae7013d
      Hui Zhu authored
      I had an issue:
      
          Unable to handle kernel NULL pointer dereference at virtual address 0000082a
          pgd = cc970000
          [0000082a] *pgd=00000000
          Internal error: Oops: 5 [#1] PREEMPT SMP ARM
          PC is at get_pageblock_flags_group+0x5c/0xb0
          LR is at unset_migratetype_isolate+0x148/0x1b0
          pc : [<c00cc9a0>]    lr : [<c0109874>]    psr: 80000093
          sp : c7029d00  ip : 00000105  fp : c7029d1c
          r10: 00000001  r9 : 0000000a  r8 : 00000004
          r7 : 60000013  r6 : 000000a4  r5 : c0a357e4  r4 : 00000000
          r3 : 00000826  r2 : 00000002  r1 : 00000000  r0 : 0000003f
          Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
          Control: 10c5387d  Table: 2cb7006a  DAC: 00000015
          Backtrace:
              get_pageblock_flags_group+0x0/0xb0
              unset_migratetype_isolate+0x0/0x1b0
              undo_isolate_page_range+0x0/0xdc
              __alloc_contig_range+0x0/0x34c
              alloc_contig_range+0x0/0x18
      
      This issue is because when calling unset_migratetype_isolate() to unset
      a part of CMA memory, it try to access the buddy page to get its status:
      
      		if (order >= pageblock_order) {
      			page_idx = page_to_pfn(page) & ((1 << MAX_ORDER) - 1);
      			buddy_idx = __find_buddy_index(page_idx, order);
      			buddy = page + (buddy_idx - page_idx);
      
      			if (!is_migrate_isolate_page(buddy)) {
      
      But the begin addr of this part of CMA memory is very close to a part of
      memory that is reserved at boot time (not in buddy system).  So add a
      check before accessing it.
      
      [akpm@linux-foundation.org: use conventional code layout]
      Signed-off-by: default avatarHui Zhu <zhuhui@xiaomi.com>
      Suggested-by: default avatarLaura Abbott <labbott@redhat.com>
      Suggested-by: default avatarJoonsoo Kim <iamjoonsoo.kim@lge.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1ae7013d