1. 14 5月, 2015 2 次提交
  2. 13 5月, 2015 7 次提交
    • H
      Revert "ARM: rockchip: fix undefined instruction of reset_ctrl_regs" · 3f937cf3
      Heiko Stuebner 提交于
      This reverts commit b403125d.
      
      As reported by Chris, both commits
              b403125d "ARM: rockchip: fix undefined instruction of reset_ctrl_regs"
              0ea001d3 "ARM: rockchip: disable dapswjdp during suspend"
      actually fix the same issue and b403125d is the older one, which got
      superseded by 0ea001d3. Therefore revert the obsolete one again.
      Reported-by: NChris Zhong <zyw@rock-chips.com>
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      3f937cf3
    • K
      ARM: EXYNOS: Fix dereference of ERR_PTR returned by of_genpd_get_from_provider · 0b7dc0ff
      Krzysztof Kozlowski 提交于
      ERR_PTR was dereferenced during sub domain parsing, if parent domain
      could not be obtained (because of invalid phandle or deferred
      registration of parent domain).
      
      The Exynos power domain code checked whether
      of_genpd_get_from_provider() returned NULL and in that case it skipped
      that power domain node. However this function returns ERR_PTR or valid
      pointer, not NULL.
      
      Fixes: 0f780751 ("ARM: EXYNOS: add support for sub-power domains")
      Cc: <stable@vger.kernel.org>	[4.0+]
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: NKukjin Kim <kgene@kernel.org>
      0b7dc0ff
    • A
      x86: bpf_jit: fix FROM_BE16 and FROM_LE16/32 instructions · 343f845b
      Alexei Starovoitov 提交于
      FROM_BE16:
      'ror %reg, 8' doesn't clear upper bits of the register,
      so use additional 'movzwl' insn to zero extend 16 bits into 64
      
      FROM_LE16:
      should zero extend lower 16 bits into 64 bit
      
      FROM_LE32:
      should zero extend lower 32 bits into 64 bit
      
      Fixes: 89aa0758 ("net: sock: allow eBPF programs to be attached to sockets")
      Signed-off-by: NAlexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      343f845b
    • H
      parisc,metag: Fix crashes due to stack randomization on stack-grows-upwards architectures · d045c77c
      Helge Deller 提交于
      On architectures where the stack grows upwards (CONFIG_STACK_GROWSUP=y,
      currently parisc and metag only) stack randomization sometimes leads to crashes
      when the stack ulimit is set to lower values than STACK_RND_MASK (which is 8 MB
      by default if not defined in arch-specific headers).
      
      The problem is, that when the stack vm_area_struct is set up in fs/exec.c, the
      additional space needed for the stack randomization (as defined by the value of
      STACK_RND_MASK) was not taken into account yet and as such, when the stack
      randomization code added a random offset to the stack start, the stack
      effectively got smaller than what the user defined via rlimit_max(RLIMIT_STACK)
      which then sometimes leads to out-of-stack situations and crashes.
      
      This patch fixes it by adding the maximum possible amount of memory (based on
      STACK_RND_MASK) which theoretically could be added by the stack randomization
      code to the initial stack size. That way, the user-defined stack size is always
      guaranteed to be at minimum what is defined via rlimit_max(RLIMIT_STACK).
      
      This bug is currently not visible on the metag architecture, because on metag
      STACK_RND_MASK is defined to 0 which effectively disables stack randomization.
      
      The changes to fs/exec.c are inside an "#ifdef CONFIG_STACK_GROWSUP"
      section, so it does not affect other platformws beside those where the
      stack grows upwards (parisc and metag).
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Cc: linux-parisc@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: linux-metag@vger.kernel.org
      Cc: stable@vger.kernel.org # v3.16+
      d045c77c
    • J
      ARM: EXYNOS: Don't try to initialize suspend on old DT · e5cbec61
      Julien Grall 提交于
      Since commit 8b283c02 ("ARM: exynos4/5: convert pmu wakeup to
      stacked domains"), a suspend/resume is not supported on old DT.
      
      Although, rather than printing a warning and continue to boot, the
      kernel will segfault just after:
      
      ------------[ cut here ]------------
      
      WARNING: CPU: 1 PID: 1 at arch/arm/mach-exynos/suspend.c:726 exynos_pm_init+0x4c/0xc8()
      Modules linked in:
      CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.1.0-rc3 #1
      Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      [<c02181c4>] (unwind_backtrace) from [<c0213b2c>] (show_stack+0x10/0x14)
      [<c0213b2c>] (show_stack) from [<c0949890>] (dump_stack+0x70/0x8c)
      [<c0949890>] (dump_stack) from [<c024f0b0>] (warn_slowpath_common+0x74/0xac)
      [<c024f0b0>] (warn_slowpath_common) from [<c024f104>] (warn_slowpath_null+0x1c/0x24)
      [<c024f104>] (warn_slowpath_null) from [<c0cf1d28>] (exynos_pm_init+0x4c/0xc8)
      [<c0cf1d28>] (exynos_pm_init) from [<c0ceaae8>] (init_machine_late+0x1c/0x28)
      [<c0ceaae8>] (init_machine_late) from [<c020aa64>] (do_one_initcall+0x80/0x1d0)
      [<c020aa64>] (do_one_initcall) from [<c0ce8d4c>] (kernel_init_freeable+0x10c/0x1d8)
      [<c0ce8d4c>] (kernel_init_freeable) from [<c0944a2c>] (kernel_init+0x8/0xe4)
      [<c0944a2c>] (kernel_init) from [<c0210e60>] (ret_from_fork+0x14/0x34)
      ---[ end trace 335bd937d409f3c7 ]---
      Outdated DT detected, suspend/resume will NOT work
      Unable to handle kernel NULL pointer dereference at virtual address 00000608
      pgd = c0204000
      [00000608] *pgd=00000000
      Internal error: Oops: 5 [#1] SMP ARM
      Modules linked in:
      CPU: 1 PID: 1 Comm: swapper/0 Tainted: G        W       4.1.0-rc3 #1
      Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      task: db06c000 ti: db05a000 task.ti: db05a000
      PC is at exynos_pm_init+0x6c/0xc8
      LR is at exynos_pm_init+0x54/0xc8
      pc : [<c0cf1d48>]    lr : [<c0cf1d30>]    psr: 60000113
      sp : db05bee8  ip : 00000000  fp : 00000000
      r10: 00000116  r9 : c0dab2d4  r8 : d8d5f440
      r7 : c0db7ad8  r6 : c0db7ad8  r5 : 00000000  r4 : c0ceaacc
      r3 : c0eb2aec  r2 : c0951e40  r1 : 00000000  r0 : c0eb2acc
      Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      Control: 10c5387d  Table: 6020406a  DAC: 00000015
      Process swapper/0 (pid: 1, stack limit = 0xdb05a220)
      Stack: (0xdb05bee8 to 0xdb05c000)
      bee0:                   c0db7ad8 c0d8fe34 c0cf17c8 c0ceaae8 00000000 c020aa64
      bf00: 00000033 c09580b8 db04fd00 c0ed79a4 c0eb1000 c0ce8588 c0ca2bc4 c0353fcc
      bf20: 00000000 c0df358c 60000113 00000000 dbfffba4 00000000 c0ca2bc4 c026654c
      bf40: c0b80134 c0ca1a64 00000007 00000007 c0df3554 c0d6c2f4 00000007 c0d6c2d4
      bf60: c0eb1000 c0ce8588 c0dab2d4 00000116 00000000 c0ce8d4c 00000007 00000007
      bf80: c0ce8588 c0944a24 00000000 c0944a24 00000000 00000000 00000000 00000000
      bfa0: 00000000 c0944a2c 00000000 c0210e60 00000000 00000000 00000000 00000000
      bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
      [<c0cf1d48>] (exynos_pm_init) from [<c0ceaae8>] (init_machine_late+0x1c/0x28)
      [<c0ceaae8>] (init_machine_late) from [<c020aa64>] (do_one_initcall+0x80/0x1d0)
      [<c020aa64>] (do_one_initcall) from [<c0ce8d4c>] (kernel_init_freeable+0x10c/0x1d8)
      [<c0ce8d4c>] (kernel_init_freeable) from [<c0944a2c>] (kernel_init+0x8/0xe4)
      [<c0944a2c>] (kernel_init) from [<c0210e60>] (ret_from_fork+0x14/0x34)
      Code: e59f005c e59220c0 e5901000 e5832000 (e591e608)
      ---[ end trace 335bd937d409f3c8 ]---
      
      This is happening because pmu_base_addr is only initialized when the
      PMU is an interrupt controller. It's not the case on old DT.
      Signed-off-by: NJulien Grall <julien.grall@citrix.com>
      Signed-off-by: NKukjin Kim <kgene@kernel.org>
      e5cbec61
    • J
      ARM: dts: Add keep-power-in-suspend to WiFi SDIO node for Peach Boards · b2706879
      Javier Martinez Canillas 提交于
      The Marvell mwifiex driver prevents the system to enter into a suspend
      state if the card power is not preserved during a suspend/resume cycle.
      
      So Suspend-to-RAM and Suspend-to-idle is failing on Exynos5800 Peach Pi
      and Exynos5420 Peach Pit Chromebooks.
      
      Add the keep-power-in-suspend Power Management property to the SDIO/MMC
      node so the mwifiex suspend handler doesn't fail and the system is able
      to enter into a suspend state.
      Signed-off-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Reviewed-by: NDoug Anderson <dianders@chromium.org>
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: NKukjin Kim <kgene@kernel.org>
      b2706879
    • P
      MIPS: fix FP mode selection in lieu of .MIPS.abiflags data · 620b1550
      Paul Burton 提交于
      Commit 46490b57 ("MIPS: kernel: elf: Improve the overall ABI and FPU
      mode checks") reworked the ELF FP ABI mode selection logic, but when
      CONFIG_MIPS_O32_FP64_SUPPORT is enabled it breaks the use of binaries
      which have no PT_MIPS_ABIFLAGS program header & associated
      .MIPS.abiflags section.
      
      A default mode is selected based upon whether the ELF contains MIPS32 or
      MIPS64 code, but that selection is made in arch_elf_pt_proc.
      arch_elf_pt_proc only executes when a PT_MIPS_ABIFLAGS program header is
      found. If one is not found then arch_elf_pt_proc is never called, and no
      default overall_fp_mode value is selected. When arch_check_elf is
      called, both abi0 & abi1 are MIPS_ABI_FP_UNKNOWN which leads to both
      prog_req & interp_req being set to none_req. none_req matches none of
      the conditions for mode selection at the end of arch_check_elf, so
      overall_fp_mode is left untouched. Finally once mips_set_personality_fp
      is called the BUG() in the default case is then hit & the kernel likely
      panics.
      
      Fix this by moving the selection of a default overall mode to the start
      of arch_check_elf, which runs once per ELF executed regardless of
      whether it has a PT_MIPS_ABIFLAGS program header.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Matthew Fortune <matthew.fortune@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Cc: stable@vger.kernel.org # v4.0+
      Patchwork: http://patchwork.linux-mips.org/patch/9978/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      620b1550
  3. 12 5月, 2015 8 次提交
    • W
      arm64: perf: fix memory leak when probing PMU PPIs · 4801ba33
      Will Deacon 提交于
      Commit d795ef9a ("arm64: perf: don't warn about missing
      interrupt-affinity property for PPIs") added a check for PPIs so that
      we avoid parsing the interrupt-affinity property for these naturally
      affine interrupts.
      
      Unfortunately, this check can trigger an early (successful) return and
      we will leak the irqs array. This patch fixes the issue by reordering
      the code so that the check is performed before any independent
      allocation.
      Reported-by: NDavid Binderman <dcb314@hotmail.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      4801ba33
    • H
      ARM: gemini: fix compiler warning due wrong data type · 31fc835f
      Hans Ulli Kroll 提交于
      This patch fixes a compiler warning in gemini_restart()
      issued by commit 7b6d864b ("reboot:arm: reboot_mode
      changes from char to enum reboot_mode").
      
      arch/arm/mach-gemini/board-rut1xx.c:93:2: warning: initialization from incompatible pointer type
      
      The warning is harmless, and the patch does not need to
      be backported to stable kernels.
      
      Fixes: 7b6d864b ("reboot:arm: reboot_mode changes from char to enum reboot_mode.")
      Signed-off-by: NHans Ulli Kroll <ulli.kroll@googlemail.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      31fc835f
    • S
      ARM: vexpress/tc2: Add interrupt-affinity to the PMU node · 51ef519c
      Sudeep Holla 提交于
      Commit 9fd85eb5 ("ARM: pmu: add support for interrupt-affinity
      property") added an optional "interrupt-affinity" property, to specify
      the CPU affinity for each SPI listed in the interrupts property.
      
      Without this property, we get this boot warning:
      
        CPU PMU: Failed to parse <no-node>/interrupt-affinity[0]
      
      This patch adds interrupt-affinity to the PMU node in the
      vexpress-ca15_a7(a.k.a TC2) device tree.
      Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      51ef519c
    • R
      ARM: vexpress/ca9: Add interrupt-affinity to the PMU node · 613880a1
      Robert Schwebel 提交于
      Commit 9fd85eb5 ("ARM: pmu: add support for interrupt-affinity
      property") added an optional "interrupt-affinity" property, to specify
      the CPU affinity for each SPI listed in the interrupts property.
      
      Without this property, we get this boot warning:
      
        CPU PMU: Failed to parse <no-node>/interrupt-affinity[0]
      
      This patch adds interrupt-affinity to the PMU node in the
      vexpress-v2p-ca9 device tree.
      Signed-off-by: NRobert Schwebel <r.schwebel@pengutronix.de>
      Acked-by: NSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      613880a1
    • R
      ARM: vexpress/ca9: Add unified-cache property to l2 cache node · 2004f98a
      Robert Schwebel 提交于
      Commit d9d1f3e2 ("ARM: l2c: check that DT files specify the required
      "cache-unified" property") mandates to specify this required property.
      Without this property, we get this boot warning:
      
      "L2C: device tree omits to specify unified cache"
      
      This patch adds "cache-unified" property to L2 cache node in vexpress
      CA9 device tree.
      Signed-off-by: NRobert Schwebel <r.schwebel@pengutronix.de>
      Acked-by: NSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      2004f98a
    • S
      ARM64: juno: add sp810 support and fix sp804 clock frequency · 3bb1555c
      Sudeep Holla 提交于
      The clock generator in IOFPGA generates the two source clocks: 32kHz and
      1MHz for the SP810 System Controller.
      
      The SP810 System Controller selects 32kHz or 1MHz as the sources for
      TIM_CLK[3:0], the SP804 timer clocks. The powerup default is 32kHz but
      the maximum of "refclk" and "timclk" is chosen by the SP810 driver.
      
      This patch adds support for SP810 system controller and also fixes the
      SP804 timer clock frequency.
      
      However the SP804 driver needs to be enabled on ARM64 to test this,
      which requires SP804 driver to be moved out of arch/arm.
      
      Fixes: 71f867ec ("arm64: Add Juno board device tree.")
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Olof Johansson <olof@lixom.net>
      Acked-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      3bb1555c
    • R
      MIPS: SMP: Fix build error. · cafb45b2
      Ralf Baechle 提交于
        CC      arch/mips/kernel/smp.o
      arch/mips/kernel/smp.c: In function ‘start_secondary’:
      arch/mips/kernel/smp.c:149:2: error: passing argument 2 of ‘cpumask_set_cpu’ discards ‘volatile’ qualifier from pointer target type [-Werror]
        cpumask_set_cpu(cpu, &cpu_callin_map);
        ^
      In file included from ./arch/mips/include/asm/processor.h:14:0,
                       from ./arch/mips/include/asm/thread_info.h:15,
                       from include/linux/thread_info.h:54,
                       from include/asm-generic/preempt.h:4,
                       from arch/mips/include/generated/asm/preempt.h:1,
                       from include/linux/preempt.h:18,
                       from include/linux/interrupt.h:8,
                       from arch/mips/kernel/smp.c:24:
      include/linux/cpumask.h:272:91: note: expected ‘struct cpumask *’ but argument is of type ‘volatile struct cpumask_t *’
       static inline void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
                                                                                                 ^
      arch/mips/kernel/smp.c: In function ‘smp_prepare_boot_cpu’:
      arch/mips/kernel/smp.c:211:2: error: passing argument 2 of ‘cpumask_set_cpu’ discards ‘volatile’ qualifier from pointer target type [-Werror]
        cpumask_set_cpu(0, &cpu_callin_map);
        ^
      In file included from ./arch/mips/include/asm/processor.h:14:0,
                       from ./arch/mips/include/asm/thread_info.h:15,
                       from include/linux/thread_info.h:54,
                       from include/asm-generic/preempt.h:4,
                       from arch/mips/include/generated/asm/preempt.h:1,
                       from include/linux/preempt.h:18,
                       from include/linux/interrupt.h:8,
                       from arch/mips/kernel/smp.c:24:
      include/linux/cpumask.h:272:91: note: expected ‘struct cpumask *’ but argument is of type ‘volatile struct cpumask_t *’
       static inline void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
                                                                                                 ^
      arch/mips/kernel/smp.c: In function ‘__cpu_up’:
      arch/mips/kernel/smp.c:221:10: error: passing argument 2 of ‘cpumask_test_cpu’ discards ‘volatile’ qualifier from pointer target type [-Werror]
        while (!cpumask_test_cpu(cpu, &cpu_callin_map))
                ^
      In file included from ./arch/mips/include/asm/processor.h:14:0,
                       from ./arch/mips/include/asm/thread_info.h:15,
                       from include/linux/thread_info.h:54,
                       from include/asm-generic/preempt.h:4,
                       from arch/mips/include/generated/asm/preempt.h:1,
                       from include/linux/preempt.h:18,
                       from include/linux/interrupt.h:8,
                       from arch/mips/kernel/smp.c:24:
      include/linux/cpumask.h:294:90: note: expected ‘const struct cpumask *’ but argument is of type ‘volatile struct cpumask_t *’
       static inline int cpumask_test_cpu(int cpu, const struct cpumask *cpumask)
                                                                                                ^
      cc1: all warnings being treated as errors
      make[2]: *** [arch/mips/kernel/smp.o] Error 1
      make[1]: *** [arch/mips/kernel] Error 2
      make: *** [arch/mips] Error 2
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      cafb45b2
    • T
      ARM: OMAP2+: Remove bogus struct clk comparison for timer clock · b0897972
      Tony Lindgren 提交于
      With recent changes to use determine_rate, the comparison of two
      clocks won't work without clk_is_match that does __clk_get_hw
      on the clocks first.
      
      As we've been unconditionally already calling clk_set_parent
      already because of the bogus comparison, let's just remove the
      check as suggested by Stephen Boyd <sboyd@codeaurora.org>.
      
      Cc: Michael Turquette <mturquette@linaro.org>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
      Acked-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      b0897972
  4. 11 5月, 2015 5 次提交
  5. 10 5月, 2015 1 次提交
  6. 09 5月, 2015 7 次提交
  7. 08 5月, 2015 3 次提交
  8. 07 5月, 2015 3 次提交
  9. 06 5月, 2015 4 次提交