1. 28 2月, 2015 8 次提交
    • S
      x86: Init per-cpu shadow copy of CR4 on 32-bit CPUs too · 5b2bdbc8
      Steven Rostedt 提交于
      Commit:
      
         1e02ce4c ("x86: Store a per-cpu shadow copy of CR4")
      
      added a shadow CR4 such that reads and writes that do not
      modify the CR4 execute much faster than always reading the
      register itself.
      
      The change modified cpu_init() in common.c, so that the
      shadow CR4 gets initialized before anything uses it.
      
      Unfortunately, there's two cpu_init()s in common.c. There's
      one for 64-bit and one for 32-bit. The commit only added
      the shadow init to the 64-bit path, but the 32-bit path
      needs the init too.
      
      Link: http://lkml.kernel.org/r/20150227125208.71c36402@gandalf.local.home Fixes: 1e02ce4c "x86: Store a per-cpu shadow copy of CR4"
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Acked-by: NAndy Lutomirski <luto@amacapital.net>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Link: http://lkml.kernel.org/r/20150227145019.2bdd4354@gandalf.local.homeSigned-off-by: NIngo Molnar <mingo@kernel.org>
      5b2bdbc8
    • I
      5838d189
    • L
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 895c8b7b
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Arnd Bergmann:
       "The arm-soc bug fixes this time around are mostly for the omap
        platform, coming from a pull request from Tony Lindgren and are almost
        entirely fixing dts files.
      
        The other two changes enable support for the shmobile platform in
        generic armv7 kernels and change some properties in the ARM64
        reference board dts files"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: multi_v7_defconfig: Enable shmobile platforms
        arm64: Add L2 cache topology to ARM Ltd boards/models
        ARM: dts: am335x-bone*: usb0 is hardwired for peripheral
        ARM: dts: dra7x-evm: beagle-x15: Fix USB Host
        ARM: omap2plus_defconfig: Fix SATA boot
        ARM: omap2plus_defconfig: Enable OMAP NAND BCH driver
        ARM: dts: dra7: Correct the dma controller's property names
        ARM: dts: omap5: Correct the dma controller's property names
        ARM: dts: omap4: Correct the dma controller's property names
        ARM: dts: omap3: Correct the dma controller's property names
        ARM: dts: omap2: Correct the dma controller's property names
        ARM: dts: am437x-idk: fix sleep pinctrl state
        ARM: omap2plus_defconfig: enable TPS62362 regulator
        ARM: dts: am437x-idk: fix TPS62362 i2c bus
        ARM: dts: n900: Fix offset for smc91x ethernet
        ARM: dts: n900: fix i2c bus numbering
        ARM: dts: Fix USB dts configuration for dm816x
        ARM: dts: OMAP5: Fix SATA PHY node
        ARM: dts: DRA7: Fix SATA PHY node
      895c8b7b
    • L
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 8d20a3dd
      Linus Torvalds 提交于
      Pull arm64 fixes from Catalin Marinas:
       "Various arm64 fixes:
         - ftrace branch generation fix
         - branch instruction encoding fix
         - include files, guards and unused prototypes clean-up
         - minor VDSO ABI fix (clock_getres)
         - PSCI functions moved to .S to avoid compilation error with gcc 5
         - pte_modify fix to not ignore the mapping type
         - crypto: AES interleaved increased to 4x (for performance reasons)
         - text patching fix for modules
         - swiotlb increased back to 64MB
         - copy_siginfo_to_user32() fix for big endian"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: cpuidle: add asm/proc-fns.h inclusion
        arm64: compat Fix siginfo_t -> compat_siginfo_t conversion on big endian
        arm64: Increase the swiotlb buffer size 64MB
        arm64: Fix text patching logic when using fixmap
        arm64: crypto: increase AES interleave to 4x
        arm64: enable PTE type bit in the mask for pte_modify
        arm64: mm: remove unused functions and variable protoypes
        arm64: psci: move psci firmware calls out of line
        arm64: vdso: minor ABI fix for clock_getres
        arm64: guard asm/assembler.h against multiple inclusions
        arm64: insn: fix compare-and-branch encodings
        arm64: ftrace: fix ftrace_modify_graph_caller for branch replace
      8d20a3dd
    • L
      Merge tag 'renesas-sh-drivers-for-v4.0' of... · 1c070515
      Linus Torvalds 提交于
      Merge tag 'renesas-sh-drivers-for-v4.0' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas
      
      Pull SH driver fix from Simon Horman:
       "Disable PM runtime for multi-platform r8a7740 with genpd"
      
      * tag 'renesas-sh-drivers-for-v4.0' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
        drivers: sh: Disable PM runtime for multi-platform r8a7740 with genpd
      1c070515
    • L
      arm64: cpuidle: add asm/proc-fns.h inclusion · af4819af
      Lorenzo Pieralisi 提交于
      ARM64 CPUidle driver requires the cpu_do_idle function so that it can
      be used to enter the shallowest idle state, and it is declared in
      asm/proc-fns.h.
      
      The current ARM64 CPUidle driver does not include asm/proc-fns.h
      explicitly and it has so far relied on implicit inclusion from other
      header files.
      
      Owing to some header dependencies reshuffling this currently triggers
      build failures when CONFIG_ARM64_64K_PAGES=y:
      
      drivers/cpuidle/cpuidle-arm64.c: In function "arm64_enter_idle_state"
      drivers/cpuidle/cpuidle-arm64.c:42:3: error: implicit declaration of
      function "cpu_do_idle" [-Werror=implicit-function-declaration]
         cpu_do_idle();
         ^
      
      This patch adds the explicit inclusion of the asm/proc-fns.h header file
      in the arm64 asm/cpuidle.h header file, so that the build breakage is fixed
      and the required header inclusion is added to the appropriate arch back-end
      CPUidle header, already included by the CPUidle arm64 driver, where
      CPUidle arch related function declarations belong.
      Reported-by: NLaura Abbott <lauraa@codeaurora.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Tested-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      af4819af
    • C
      arm64: compat Fix siginfo_t -> compat_siginfo_t conversion on big endian · 9d42d48a
      Catalin Marinas 提交于
      The native (64-bit) sigval_t union contains sival_int (32-bit) and
      sival_ptr (64-bit). When a compat application invokes a syscall that
      takes a sigval_t value (as part of a larger structure, e.g.
      compat_sys_mq_notify, compat_sys_timer_create), the compat_sigval_t
      union is converted to the native sigval_t with sival_int overlapping
      with either the least or the most significant half of sival_ptr,
      depending on endianness. When the corresponding signal is delivered to a
      compat application, on big endian the current (compat_uptr_t)sival_ptr
      cast always returns 0 since sival_int corresponds to the top part of
      sival_ptr. This patch fixes copy_siginfo_to_user32() so that sival_int
      is copied to the compat_siginfo_t structure.
      
      Cc: <stable@vger.kernel.org>
      Reported-by: NBamvor Jian Zhang <bamvor.zhangjian@huawei.com>
      Tested-by: NBamvor Jian Zhang <bamvor.zhangjian@huawei.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      9d42d48a
    • C
      arm64: Increase the swiotlb buffer size 64MB · a1e50a82
      Catalin Marinas 提交于
      With commit 3690951f (arm64: Use swiotlb late initialisation), the
      swiotlb buffer size is limited to MAX_ORDER_NR_PAGES. However, there are
      platforms with 32-bit only devices that require bounce buffering via
      swiotlb. This patch changes the swiotlb initialisation to an early 64MB
      memblock allocation. In order to get the swiotlb buffer correctly
      allocated (via memblock_virt_alloc_low_nopanic), this patch also defines
      ARCH_LOW_ADDRESS_LIMIT to the maximum physical address capable of 32-bit
      DMA.
      Reported-by: NKefeng Wang <wangkefeng.wang@huawei.com>
      Tested-by: NKefeng Wang <wangkefeng.wang@huawei.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      a1e50a82
  2. 27 2月, 2015 9 次提交
    • L
      Merge tag 'hwmon-for-linus-v4.0-rc2' of... · 4f671fe2
      Linus Torvalds 提交于
      Merge tag 'hwmon-for-linus-v4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fix from Guenter Roeck:
       "Add missing return value check to ads7828 driver"
      
      * tag 'hwmon-for-linus-v4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (ads7828) Check return value of devm_regmap_init_i2c
      4f671fe2
    • L
      Merge tag 'sound-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · ed42e71a
      Linus Torvalds 提交于
      Pull sound fixes from Takashi Iwai:
       "Most of changes in this pull request are about the fixes of crash of
        FireWire drivers at hot-unplugging.  In addition, there are a few
        HD-audio fixes (removal of wrong static, a pin quirk for an ASUS mobo,
        a regression fix for runtime PM on Panther Point) and a long-standing
        (but fairly minor) bug of PCM core"
      
      * tag 'sound-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Disable runtime PM for Panther Point again
        ALSA: hda: controller code - do not export static functions
        ALSA: pcm: Don't leave PREPARED state after draining
        ALSA: fireworks/bebob/dice/oxfw: make it possible to shutdown safely
        ALSA: fireworks/bebob/dice/oxfw: allow stream destructor after releasing runtime
        ALSA: firewire-lib: remove reference counting
        ALSA: fireworks/bebob/dice/oxfw: add reference-counting for FireWire unit
        ALSA: hda - Add pin configs for ASUS mobo with IDT 92HD73XX codec
        ALSA: firewire-lib: fix an unexpected byte sequence for micro sign
      ed42e71a
    • M
      arm64: Fix text patching logic when using fixmap · f6242cac
      Marc Zyngier 提交于
      Patch 2f896d58 ("arm64: use fixmap for text patching") changed
      the way we patch the kernel text, using a fixmap when the kernel or
      modules are flagged as read only.
      
      Unfortunately, a flaw in the logic makes it fall over when patching
      modules without CONFIG_DEBUG_SET_MODULE_RONX enabled:
      
      [...]
      [   32.032636] Call trace:
      [   32.032716] [<fffffe00003da0dc>] __copy_to_user+0x2c/0x60
      [   32.032837] [<fffffe0000099f08>] __aarch64_insn_write+0x94/0xf8
      [   32.033027] [<fffffe000009a0a0>] aarch64_insn_patch_text_nosync+0x18/0x58
      [   32.033200] [<fffffe000009c3ec>] ftrace_modify_code+0x58/0x84
      [   32.033363] [<fffffe000009c4e4>] ftrace_make_nop+0x3c/0x58
      [   32.033532] [<fffffe0000164420>] ftrace_process_locs+0x3d0/0x5c8
      [   32.033709] [<fffffe00001661cc>] ftrace_module_init+0x28/0x34
      [   32.033882] [<fffffe0000135148>] load_module+0xbb8/0xfc4
      [   32.034044] [<fffffe0000135714>] SyS_finit_module+0x94/0xc4
      [...]
      
      This is triggered by the use of virt_to_page() on a module address,
      which ends to pointing to Nowhereland if you're lucky, or corrupt
      your precious data if not.
      
      This patch fixes the logic by mimicking what is done on arm:
      - If we're patching a module and CONFIG_DEBUG_SET_MODULE_RONX is set,
        use vmalloc_to_page().
      - If we're patching the kernel and CONFIG_DEBUG_RODATA is set,
        use virt_to_page().
      - Otherwise, use the provided address, as we can write to it directly.
      
      Tested on 4.0-rc1 as a KVM guest.
      Reported-by: NRichard W.M. Jones <rjones@redhat.com>
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Acked-by: NLaura Abbott <lauraa@codeaurora.org>
      Tested-by: NRichard W.M. Jones <rjones@redhat.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      f6242cac
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 7dac5cb1
      Linus Torvalds 提交于
      Pull btrfs fix from Chris Mason:
       "I'm still testing more fixes, but I wanted to get out the fix for the
        btrfs raid5/6 memory corruption I mentioned in my merge window pull"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: fix allocation size calculations in alloc_btrfs_bio
      7dac5cb1
    • A
      arm64: crypto: increase AES interleave to 4x · 0eee0fbd
      Ard Biesheuvel 提交于
      This patch increases the interleave factor for parallel AES modes
      to 4x. This improves performance on Cortex-A57 by ~35%. This is
      due to the 3-cycle latency of AES instructions on the A57's
      relatively deep pipeline (compared to Cortex-A53 where the AES
      instruction latency is only 2 cycles).
      
      At the same time, disable inline expansion of the core AES functions,
      as the performance benefit of this feature is negligible.
      
        Measured on AMD Seattle (using tcrypt.ko mode=500 sec=1):
      
        Baseline (2x interleave, inline expansion)
        ------------------------------------------
        testing speed of async cbc(aes) (cbc-aes-ce) decryption
        test 4 (128 bit key, 8192 byte blocks): 95545 operations in 1 seconds
        test 14 (256 bit key, 8192 byte blocks): 68496 operations in 1 seconds
      
        This patch (4x interleave, no inline expansion)
        -----------------------------------------------
        testing speed of async cbc(aes) (cbc-aes-ce) decryption
        test 4 (128 bit key, 8192 byte blocks): 124735 operations in 1 seconds
        test 14 (256 bit key, 8192 byte blocks): 92328 operations in 1 seconds
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      0eee0fbd
    • F
      arm64: enable PTE type bit in the mask for pte_modify · 6910fa16
      Feng Kan 提交于
      Caught during Trinity testing. The pte_modify does not allow
      modification for PTE type bit. This cause the test to hang
      the system. It is found that the PTE can't transit from an
      inaccessible page (b00) to a valid page (b11) because the mask
      does not allow it. This happens when a big block of mmaped
      memory is set the PROT_NONE, then the a small piece is broken
      off and set to PROT_WRITE | PROT_READ cause a huge page split.
      Signed-off-by: NFeng Kan <fkan@apm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      6910fa16
    • Y
      arm64: mm: remove unused functions and variable protoypes · 06ff87ba
      Yingjoe Chen 提交于
      The functions __cpu_flush_user_tlb_range and __cpu_flush_kern_tlb_range
      were removed in commit fa48e6f7 'arm64: mm: Optimise tlb flush logic
      where we have >4K granule'. Global variable cpu_tlb was never used in
      arm64.
      
      Remove them.
      Signed-off-by: NYingjoe Chen <yingjoe.chen@mediatek.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      06ff87ba
    • W
      arm64: psci: move psci firmware calls out of line · f5e0a12c
      Will Deacon 提交于
      An arm64 allmodconfig fails to build with GCC 5 due to __asmeq
      assertions in the PSCI firmware calling code firing due to mcount
      preambles breaking our assumptions about register allocation of function
      arguments:
      
        /tmp/ccDqJsJ6.s: Assembler messages:
        /tmp/ccDqJsJ6.s:60: Error: .err encountered
        /tmp/ccDqJsJ6.s:61: Error: .err encountered
        /tmp/ccDqJsJ6.s:62: Error: .err encountered
        /tmp/ccDqJsJ6.s:99: Error: .err encountered
        /tmp/ccDqJsJ6.s:100: Error: .err encountered
        /tmp/ccDqJsJ6.s:101: Error: .err encountered
      
      This patch fixes the issue by moving the PSCI calls out-of-line into
      their own assembly files, which are safe from the compiler's meddling
      fingers.
      Reported-by: NAndy Whitcroft <apw@canonical.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      f5e0a12c
    • N
      arm64: vdso: minor ABI fix for clock_getres · e1b6b6ce
      Nathan Lynch 提交于
      The vdso implementation of clock_getres currently returns 0 (success)
      whenever a null timespec is provided by the caller, regardless of the
      clock id supplied.
      
      This behavior is incorrect.  It should fall back to syscall when an
      unrecognized clock id is passed, even when the timespec argument is
      null.  This ensures that clock_getres always returns an error for
      invalid clock ids.
      Signed-off-by: NNathan Lynch <nathan_lynch@mentor.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      e1b6b6ce
  3. 26 2月, 2015 3 次提交
    • G
      ARM: multi_v7_defconfig: Enable shmobile platforms · 4a3a6f86
      Geert Uytterhoeven 提交于
      Enable support for shmobile platforms that became multi-platform aware.
      Several non-critical drivers and subsystems are built as modules, to keep
      kernel size reasonable.
      
      Tested on:
        - r8a73a4/ape6evm:
            - U-Boot fails with "Error: unrecognized/unsupported machine ID",
            - kexec works.
        - r8a7740/armadillo:
            - Hermit boot loader fails (larger image, more memory corruption),
            - kexec works.
        - r8a7791/koelsch,
        - sh73a0/kzm9g:
            - zImage+DTB from U-Boot needs CONFIG_ARM_ATAG_DTB_COMPAT=n,
            - kexec works.
        - am335x/boneblack.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: NSimon Horman <horms+renesas@verge.net.au>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      4a3a6f86
    • A
      Merge tag 'fixes-v4.0-rc1' of... · 6af714b0
      Arnd Bergmann 提交于
      Merge tag 'fixes-v4.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      Fixes for various omap devices. It's all dts and defconfig
      changes for this set:
      
      - Fix wrong DMA properties for dma to avoid them getting
        copied wrong again before we start actually using them
      
      - USB fixes to revert the extcon changes as the driver did not
        get merged yet and cause issues
      
      - Omap5 and dra7 fixes to boot from sata
      
      - Fix few am437x issues for i2c and pinctrl
      
      - Fix beaglebone for hardwared USB configuration
      
      - Defconfig changes for NAND, SATA and TPS62362
      
      - Fix n900 i2c numbering for legacy user space and smc91x
        register offset so it works also for qemu
      
      - Fix incomplete USB configuration for dm816x
      
      * tag 'fixes-v4.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: dts: am335x-bone*: usb0 is hardwired for peripheral
        ARM: dts: dra7x-evm: beagle-x15: Fix USB Host
        ARM: omap2plus_defconfig: Fix SATA boot
        ARM: omap2plus_defconfig: Enable OMAP NAND BCH driver
        ARM: dts: dra7: Correct the dma controller's property names
        ARM: dts: omap5: Correct the dma controller's property names
        ARM: dts: omap4: Correct the dma controller's property names
        ARM: dts: omap3: Correct the dma controller's property names
        ARM: dts: omap2: Correct the dma controller's property names
        ARM: dts: am437x-idk: fix sleep pinctrl state
        ARM: omap2plus_defconfig: enable TPS62362 regulator
        ARM: dts: am437x-idk: fix TPS62362 i2c bus
        ARM: dts: n900: Fix offset for smc91x ethernet
        ARM: dts: n900: fix i2c bus numbering
        ARM: dts: Fix USB dts configuration for dm816x
        ARM: dts: OMAP5: Fix SATA PHY node
        ARM: dts: DRA7: Fix SATA PHY node
      6af714b0
    • S
      arm64: Add L2 cache topology to ARM Ltd boards/models · 7934d69a
      Sudeep Holla 提交于
      Commit 5d425c18 ("arm64: kernel: add support for cpu cache
      information") adds cacheinfo support for ARM64. Since there's no
      architectural way of detecting the cpus that share particular cache,
      device tree can be used and the core cacheinfo already supports the
      same.
      
      This patch adds the L2 cache topology on Juno board, FVP/RTSM and
      foundation models.
      Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Liviu Dudau <Liviu.Dudau@arm.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      7934d69a
  4. 25 2月, 2015 20 次提交