Skip to content
  1. May 22, 2017
  2. May 19, 2017
    • Arnd Bergmann's avatar
      ARM: remove duplicate 'const' annotations' · 0527873b
      Arnd Bergmann authored
      
      
      gcc-7 warns about some declarations that are more 'const' than necessary:
      
      arch/arm/mach-at91/pm.c:338:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
       static const struct of_device_id const ramc_ids[] __initconst = {
      arch/arm/mach-bcm/bcm_kona_smc.c:36:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
       static const struct of_device_id const bcm_kona_smc_ids[] __initconst = {
      arch/arm/mach-spear/time.c:207:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
       static const struct of_device_id const timer_of_match[] __initconst = {
      arch/arm/mach-omap2/prm_common.c:714:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
       static const struct of_device_id const omap_prcm_dt_match_table[] __initconst = {
      arch/arm/mach-omap2/vc.c:562:35: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
       static const struct i2c_init_data const omap4_i2c_timing_data[] __initconst = {
      
      The ones in arch/arm were apparently all introduced accidentally by one
      commit that correctly marked a lot of variables as __initconst.
      
      Fixes: 19c233b7 ("ARM: appropriate __init annotation for const data")
      Acked-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      Acked-by: default avatarNicolas Pitre <nico@linaro.org>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Acked-by: default avatarKrzysztof Hałasa <khalasa@piap.pl>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      0527873b
    • Linus Walleij's avatar
      ARM: configs: add a gemini defconfig · 877dd4b1
      Linus Walleij authored
      
      
      It makes sense to have a stripped-down defconfig for just Gemini, as
      it is a pretty small platform used in NAS etc, and will use appended
      device tree. It is also quick to compile and test. Hopefully this
      defconfig can be a good base for distributions such as OpenWRT.
      
      I plan to add in the config options needed for the different
      variants of Gemini as we go along.
      
      Cc: Janos Laube <janos.dev@gmail.com>
      Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>
      Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      877dd4b1
    • Olof Johansson's avatar
      devicetree: Move include prefixes from arch to separate directory · d5d332d3
      Olof Johansson authored
      We use a directory under arch/$ARCH/boot/dts as an include path
      that has links outside of the subtree to find dt-bindings from under
      include/dt-bindings. That's been working well, but new DT architectures
      haven't been adding them by default.
      
      Recently there's been a desire to share some of the DT material between
      arm and arm64, which originally caused developers to create symlinks or
      relative includes between the subtrees. This isn't ideal -- it breaks
      if the DT files aren't stored in the exact same hierarchy as the kernel
      tree, and generally it's just icky.
      
      As a somewhat cleaner solution we decided to add a $ARCH/ prefix link
      once, and allow DTS files to reference dtsi (and dts) files in other
      architectures that way.
      
      Original approach was to create these links under each architecture,
      but it lead to the problem of recursive symlinks.
      
      As a remedy, move the include link directories out of the architecture
      trees into a common location. At ...
      d5d332d3
  3. May 17, 2017
    • Ravikumar Kattekola's avatar
      ARM: dts: dra7: Reduce cpu thermal shutdown temperature · bca52388
      Ravikumar Kattekola authored
      
      
      On dra7, as per TRM, the HW shutdown (TSHUT) temperature is hardcoded
      to 123C and cannot be modified by SW. This means when the temperature
      reaches 123C HW asserts TSHUT output which signals a warm reset.
      This reset is held until the temperature goes below the TSHUT low (105C).
      
      While in SW, the thermal driver continuously monitors current temperature
      and takes decisions based on whether it reached an alert or a critical point.
      The intention of setting a SW critical point is to prevent force reset by HW
      and instead do an orderly_poweroff(). But if the SW critical temperature is
      greater than or equal to that of HW then it defeats the purpose. To address
      this and let SW take action before HW does keep the SW critical temperature
      less than HW TSHUT value.
      
      The value for SW critical temperature was chosen as 120C just to ensure
      we give SW sometime before HW catches up.
      
      Document reference
      SPRUI30C – DRA75x, DRA74x Technical Reference Manual - November 2016
      SPRUHZ6H - AM572x Technical Reference Manual - November 2016
      
      Tested on:
      DRA75x PG 2.0 Rev H EVM
      
      Signed-off-by: default avatarRavikumar Kattekola <rk@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      bca52388
  4. May 16, 2017
  5. May 15, 2017
  6. May 11, 2017
  7. May 10, 2017
    • Nicolas Dichtel's avatar
      uapi: export all headers under uapi directories · fcc8487d
      Nicolas Dichtel authored
      
      
      Regularly, when a new header is created in include/uapi/, the developer
      forgets to add it in the corresponding Kbuild file. This error is usually
      detected after the release is out.
      
      In fact, all headers under uapi directories should be exported, thus it's
      useless to have an exhaustive list.
      
      After this patch, the following files, which were not exported, are now
      exported (with make headers_install_all):
      asm-arc/kvm_para.h
      asm-arc/ucontext.h
      asm-blackfin/shmparam.h
      asm-blackfin/ucontext.h
      asm-c6x/shmparam.h
      asm-c6x/ucontext.h
      asm-cris/kvm_para.h
      asm-h8300/shmparam.h
      asm-h8300/ucontext.h
      asm-hexagon/shmparam.h
      asm-m32r/kvm_para.h
      asm-m68k/kvm_para.h
      asm-m68k/shmparam.h
      asm-metag/kvm_para.h
      asm-metag/shmparam.h
      asm-metag/ucontext.h
      asm-mips/hwcap.h
      asm-mips/reg.h
      asm-mips/ucontext.h
      asm-nios2/kvm_para.h
      asm-nios2/ucontext.h
      asm-openrisc/shmparam.h
      asm-parisc/kvm_para.h
      asm-powerpc/perf_regs.h
      asm-sh/kvm_para.h
      asm-sh/ucontext.h
      asm-tile/shmparam.h
      asm-unicore32/shmparam.h
      asm-unicore32/ucontext.h
      asm-x86/hwcap2.h
      asm-xtensa/kvm_para.h
      drm/armada_drm.h
      drm/etnaviv_drm.h
      drm/vgem_drm.h
      linux/aspeed-lpc-ctrl.h
      linux/auto_dev-ioctl.h
      linux/bcache.h
      linux/btrfs_tree.h
      linux/can/vxcan.h
      linux/cifs/cifs_mount.h
      linux/coresight-stm.h
      linux/cryptouser.h
      linux/fsmap.h
      linux/genwqe/genwqe_card.h
      linux/hash_info.h
      linux/kcm.h
      linux/kcov.h
      linux/kfd_ioctl.h
      linux/lightnvm.h
      linux/module.h
      linux/nbd-netlink.h
      linux/nilfs2_api.h
      linux/nilfs2_ondisk.h
      linux/nsfs.h
      linux/pr.h
      linux/qrtr.h
      linux/rpmsg.h
      linux/sched/types.h
      linux/sed-opal.h
      linux/smc.h
      linux/smc_diag.h
      linux/stm.h
      linux/switchtec_ioctl.h
      linux/vfio_ccw.h
      linux/wil6210_uapi.h
      rdma/bnxt_re-abi.h
      
      Note that I have removed from this list the files which are generated in every
      exported directories (like .install or .install.cmd).
      
      Thanks to Julien Floret <julien.floret@6wind.com> for the tip to get all
      subdirs with a pure makefile command.
      
      For the record, note that exported files for asm directories are a mix of
      files listed by:
       - include/uapi/asm-generic/Kbuild.asm;
       - arch/<arch>/include/uapi/asm/Kbuild;
       - arch/<arch>/include/asm/Kbuild.
      
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Acked-by: default avatarMark Salter <msalter@redhat.com>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      fcc8487d
    • Arnd Bergmann's avatar
      ARM: omap2+: make omap4_get_cpu1_ns_pa_addr declaration usable · 6f921208
      Arnd Bergmann authored
      
      
      When CONFIG_PM is disabled, we get a build error:
      
      arch/arm/mach-omap2/omap-smp.c: In function 'omap4_smp_maybe_reset_cpu1':
      arch/arm/mach-omap2/omap-smp.c:309:20: error: implicit declaration of function 'omap4_get_cpu1_ns_pa_addr'; did you mean 'omap4_get_scu_base'? [-Werror=implicit-function-declaration]
      
      We need to fix this in multiple files, to ensure the declaration is visible,
      to actually build the function without CONFIG_PM, and to only call it
      when OMAP4 and/or OMAP5 are enabled.
      
      Fixes: 351b7c49 ("ARM: omap2+: Revert omap-smp.c changes resetting CPU1 during boot")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      6f921208
    • John Crispin's avatar
      arm: dts: mt7623: add clock-frequency to the a7 timer node to mt7623.dtsi · 7e6c7fe9
      John Crispin authored
      
      
      We need to tell the driver what the timers frequency is and that the core
      has not be configured by the bootrom. Not doing so makes the unit not
      boot.
      
      Signed-off-by: default avatarJohn Crispin <john@phrozen.org>
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
      7e6c7fe9
  8. May 09, 2017
  9. May 08, 2017
  10. May 04, 2017
    • Christoffer Dall's avatar
      KVM: arm/arm64: Move shared files to virt/kvm/arm · 35d2d5d4
      Christoffer Dall authored
      
      
      For some time now we have been having a lot of shared functionality
      between the arm and arm64 KVM support in arch/arm, which not only
      required a horrible inter-arch reference from the Makefile in
      arch/arm64/kvm, but also created confusion for newcomers to the code
      base, as was recently seen on the mailing list.
      
      Further, it causes confusion for things like cscope, which needs special
      attention to index specific shared files for arm64 from the arm tree.
      
      Move the shared files into virt/kvm/arm and move the trace points along
      with it.  When moving the tracepoints we have to modify the way the vgic
      creates definitions of the trace points, so we take the chance to
      include the VGIC tracepoints in its very own special vgic trace.h file.
      
      Signed-off-by: default avatarChristoffer Dall <cdall@linaro.org>
      35d2d5d4
  11. May 02, 2017
    • Julien Grall's avatar
      xen: Implement EFI reset_system callback · e371fd76
      Julien Grall authored
      When rebooting DOM0 with ACPI on ARM64, the kernel is crashing with the stack
      trace [1].
      
      This is happening because when EFI runtimes are enabled, the reset code
      (see machine_restart) will first try to use EFI restart method.
      
      However, the EFI restart code is expecting the reset_system callback to
      be always set. This is not the case for Xen and will lead to crash.
      
      The EFI restart helper is used in multiple places and some of them don't
      not have fallback (see machine_power_off). So implement reset_system
      callback as a call to xen_reboot when using EFI Xen.
      
      [   36.999270] reboot: Restarting system
      [   37.002921] Internal error: Attempting to execute userspace memory: 86000004 [#1] PREEMPT SMP
      [   37.011460] Modules linked in:
      [   37.014598] CPU: 0 PID: 1 Comm: systemd-shutdow Not tainted 4.11.0-rc1-00003-g1e248b60a39b-dirty #506
      [   37.023903] Hardware name: (null) (DT)
      [   37.027734] task: ffff800902068000 task.stack: ffff800902064000
      [   37.033739] PC is at 0x0
      [...
      e371fd76
    • Julien Grall's avatar
    • Stefano Stabellini's avatar
      xen/arm,arm64: fix xen_dma_ops after 815dd187 "Consolidate get_dma_ops..." · e0586326
      Stefano Stabellini authored
      
      
      The following commit:
      
        commit 815dd187
        Author: Bart Van Assche <bart.vanassche@sandisk.com>
        Date:   Fri Jan 20 13:04:04 2017 -0800
      
            treewide: Consolidate get_dma_ops() implementations
      
      rearranges get_dma_ops in a way that xen_dma_ops are not returned when
      running on Xen anymore, dev->dma_ops is returned instead (see
      arch/arm/include/asm/dma-mapping.h:get_arch_dma_ops and
      include/linux/dma-mapping.h:get_dma_ops).
      
      Fix the problem by storing dev->dma_ops in dev_archdata, and setting
      dev->dma_ops to xen_dma_ops. This way, xen_dma_ops is returned naturally
      by get_dma_ops. The Xen code can retrieve the original dev->dma_ops from
      dev_archdata when needed. It also allows us to remove __generic_dma_ops
      from common headers.
      
      Signed-off-by: default avatarStefano Stabellini <sstabellini@kernel.org>
      Tested-by: default avatarJulien Grall <julien.grall@arm.com>
      Suggested-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Cc: <stable@vger.kernel.org>        [4.11+]
      CC: linux@armlinux.org.uk
      CC: catalin.marinas@arm.com
      CC: will.deacon@arm.com
      CC: boris.ostrovsky@oracle.com
      CC: jgross@suse.com
      CC: Julien Grall <julien.grall@arm.com>
      e0586326
  12. Apr 29, 2017
  13. Apr 28, 2017
  14. Apr 27, 2017
  15. Apr 26, 2017
    • Grygorii Strashko's avatar
      ARM: 8672/1: mm: remove tasklist locking from update_sections_early() · 11ce4b33
      Grygorii Strashko authored
      
      
      The below backtrace can be observed on -rt kernel with
      CONFIG_DEBUG_MODULE_RONX (4.9 kernel CONFIG_DEBUG_RODATA) option enabled:
      
       BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:993
       in_atomic(): 1, irqs_disabled(): 128, pid: 14, name: migration/0
       1 lock held by migration/0/14:
        #0:  (tasklist_lock){+.+...}, at: [<c01183e8>] update_sections_early+0x24/0xdc
       irq event stamp: 38
       hardirqs last  enabled at (37): [<c08f6f7c>] _raw_spin_unlock_irq+0x24/0x68
       hardirqs last disabled at (38): [<c01fdfe8>] multi_cpu_stop+0xd8/0x138
       softirqs last  enabled at (0): [<c01303ec>] copy_process.part.5+0x238/0x1b64
       softirqs last disabled at (0): [<  (null)>]   (null)
       Preemption disabled at: [<c01fe244>] cpu_stopper_thread+0x80/0x10c
       CPU: 0 PID: 14 Comm: migration/0 Not tainted 4.9.21-rt16-02220-g49e319c #15
       Hardware name: Generic DRA74X (Flattened Device Tree)
       [<c0112014>] (unwind_backtrace) from [<c010d370>] (show_stack+0x10/0x14)
       [<c010d370>] (show_stack) from [<c049beb8>] (dump_stack+0xa8/0xd4)
       [<c049beb8>] (dump_stack) from [<c01631a0>] (___might_sleep+0x1bc/0x2ac)
       [<c01631a0>] (___might_sleep) from [<c08f7244>] (__rt_spin_lock+0x1c/0x30)
       [<c08f7244>] (__rt_spin_lock) from [<c08f77a4>] (rt_read_lock+0x54/0x68)
       [<c08f77a4>] (rt_read_lock) from [<c01183e8>] (update_sections_early+0x24/0xdc)
       [<c01183e8>] (update_sections_early) from [<c01184b0>] (__fix_kernmem_perms+0x10/0x1c)
       [<c01184b0>] (__fix_kernmem_perms) from [<c01fe010>] (multi_cpu_stop+0x100/0x138)
       [<c01fe010>] (multi_cpu_stop) from [<c01fe24c>] (cpu_stopper_thread+0x88/0x10c)
       [<c01fe24c>] (cpu_stopper_thread) from [<c015edc4>] (smpboot_thread_fn+0x174/0x31c)
       [<c015edc4>] (smpboot_thread_fn) from [<c015a988>] (kthread+0xf0/0x108)
       [<c015a988>] (kthread) from [<c0108818>] (ret_from_fork+0x14/0x3c)
       Freeing unused kernel memory: 1024K (c0d00000 - c0e00000)
      
      The stop_machine() is called with cpus = NULL from fix_kernmem_perms() and
      mark_rodata_ro() which means only one CPU will execute
      update_sections_early() while all other CPUs will spin and wait. Hence,
      it's safe to remove tasklist locking from update_sections_early(). As part
      of this change also mark functions which are local to this module as
      static.
      
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Acked-by: default avatarLaura Abbott <labbott@redhat.com>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      11ce4b33