1. 18 7月, 2014 7 次提交
    • R
      ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ · 6ebbf2ce
      Russell King 提交于
      ARMv6 and greater introduced a new instruction ("bx") which can be used
      to return from function calls.  Recent CPUs perform better when the
      "bx lr" instruction is used rather than the "mov pc, lr" instruction,
      and this sequence is strongly recommended to be used by the ARM
      architecture manual (section A.4.1.1).
      
      We provide a new macro "ret" with all its variants for the condition
      code which will resolve to the appropriate instruction.
      
      Rather than doing this piecemeal, and miss some instances, change all
      the "mov pc" instances to use the new macro, with the exception of
      the "movs" instruction and the kprobes code.  This allows us to detect
      the "mov pc, lr" case and fix it up - and also gives us the possibility
      of deploying this for other registers depending on the CPU selection.
      Reported-by: NWill Deacon <will.deacon@arm.com>
      Tested-by: Stephen Warren <swarren@nvidia.com> # Tegra Jetson TK1
      Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> # mioa701_bootresume.S
      Tested-by: Andrew Lunn <andrew@lunn.ch> # Kirkwood
      Tested-by: NShawn Guo <shawn.guo@freescale.com>
      Tested-by: Tony Lindgren <tony@atomide.com> # OMAPs
      Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com> # Armada XP, 375, 385
      Acked-by: Sekhar Nori <nsekhar@ti.com> # DaVinci
      Acked-by: Christoffer Dall <christoffer.dall@linaro.org> # kvm/hyp
      Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> # PXA3xx
      Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> # Xen
      Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> # ARMv7M
      Tested-by: Simon Horman <horms+renesas@verge.net.au> # Shmobile
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      6ebbf2ce
    • R
      ARM: make it easier to check the CPU part number correctly · af040ffc
      Russell King 提交于
      Ensure that platform maintainers check the CPU part number in the right
      manner: the CPU part number is meaningless without also checking the
      CPU implement(e|o)r (choose your preferred spelling!)  Provide an
      interface which returns both the implementer and part number together,
      and update the definitions to include the implementer.
      
      Mark the old function as being deprecated... indeed, using the old
      function with the definitions will now always evaluate as false, so
      people must update their un-merged code to the new function.  While
      this could be avoided by adding new definitions, we'd also have to
      create new names for them which would be awkward.
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      af040ffc
    • K
      ARM: 8099/1: EXYNOS: Fix MCPM build with SUSPEND=n · ee2593ef
      Krzysztof Kozlowski 提交于
      Building of EXYNOS5420_MCPM with disabled SUSPEND fails:
      arch/arm/mach-exynos/built-in.o: In function `exynos_mcpm_init':
      arch/arm/mach-exynos/mcpm-exynos.c:361: undefined reference to `mcpm_loopback'
      
      The exynos_mcpm_init() in mcp-exynos.c calls mcpm_loopback() which
      depends on cpu_suspend function (ARM_CPU_SUSPEND).
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      ee2593ef
    • N
      ARM: 8083/1: exynos: activate the CCI on boot CPU/cluster using the MCPM loopback · fbb04990
      Nicolas Pitre 提交于
      The Chromebook firmware doesn't enable the CCI for the boot cpu, and
      arguably it shouldn't have to either. Let's have the kernel handle the
      
      CCI on its own for the boot CPU the same way it does it for secondary CPUs
      by using the MCPM loopback.
      
      This allows to boot all 8 cores on exynos5420-peach-pit,
      exynos5800-peach-pi and ARM Chromebook 2.
      Signed-off-by: NNicolas Pitre <nico@linaro.org>
      Tested-by: NTushar Behera <tushar.b@samsung.com>
      Reviewed-by: NKevin Hilman <khilman@linaro.org>
      Tested-by: NKevin Hilman <khilman@linaro.org>
      Tested-by: NDoug Anderson <dianders@chromium.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      fbb04990
    • N
      ARM: 8082/1: TC2: test the MCPM loopback during boot · 3592d7e0
      Nicolas Pitre 提交于
      This is not strictly needed on TC2 but still a good idea to exercise
      that code.
      Signed-off-by: Nnicolas Pitre <nico@linaro.org>
      Reviewed-by: NKevin Hilman <khilman@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      3592d7e0
    • N
      ARM: 8081/1: MCPM: provide infrastructure to allow for MCPM loopback · 3721924c
      Nicolas Pitre 提交于
      The kernel already has the responsibility to handle resources such as the
      
      CCI when hotplugging CPUs, during the booting of secondary CPUs, and when
      resuming from suspend/idle.  It would be more coherent and less confusing
      if the CCI for the boot CPU (or cluster)  was also initialized by the
      kernel rather than expecting the firmware/bootloader to do it and only in
      that case. After all, the kernel has all the necessary code already and
      the bootloader shouldn't have to care at all.
      
      The CCI may be turned on only when the cache is off. Leveraging the CPU
      suspend code to loop back through the low-level MCPM entry point is all
      that is needed to properly turn on the CCI from the kernel by using the
      same code as during secondary boot.
      
      Let's provide a generic MCPM loopback function that can be invoked by
      backend initialization code to set things (CCI or similar) on the boot
      CPU just as it is done for the other CPUs.
      Signed-off-by: NNicolas Pitre <nico@linaro.org>
      Reviewed-by: NKevin Hilman <khilman@linaro.org>
      Tested-by: NKevin Hilman <khilman@linaro.org>
      Tested-by: NDoug Anderson <dianders@chromium.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      3721924c
    • A
      ARM: 8101/1: mach-iop13xx: fix possible build failure · 731542ef
      Arnd Bergmann 提交于
      After applying patch:
      	"ARM: 8078/1: get rid of hardcoded assumptions about kernel stack size"
      
      following build failure happens on iop13xx platform:
      
         In file included from include/linux/srcu.h:33:0,
                          from include/linux/notifier.h:15,
                          from include/linux/reboot.h:5,
                          from arch/arm/mach-iop13xx/include/mach/iop13xx.h:6,
                          from arch/arm/mach-iop13xx/include/mach/hardware.h:14,
                          from arch/arm/mach-iop13xx/include/mach/memory.h:4,
                          from arch/arm/include/asm/memory.h:24,
                          from arch/arm/include/asm/page.h:163,
                          from arch/arm/include/asm/thread_info.h:17,
                          from include/linux/thread_info.h:54,
                          from include/asm-generic/preempt.h:4,
                          from arch/arm/include/generated/asm/preempt.h:1,
                          from include/linux/preempt.h:18,
                          from include/linux/spinlock.h:50,
                          from include/linux/seqlock.h:35,
                          from include/linux/time.h:5,
                          from include/uapi/linux/timex.h:56,
                          from include/linux/timex.h:56,
                          from include/linux/sched.h:19,
                          from arch/arm/kernel/asm-offsets.c:13:
         include/linux/rcupdate.h: In function '__rcu_read_lock':
      >> include/linux/rcupdate.h:220:2: error: implicit declaration of function 'preempt_disable' [-Werror=implicit-function-declaration]
           preempt_disable();
      
      The problem here is recursive header inclusion which could be avoided by
      removing linux/reboot.h from mach/iop13xxx.h.
      linux/reboot.h in include/mach/iop13xx.h is needed only for enum reboot_mode,
      so header it could be replaced with a enum declaration.
      
      Whatever patch "ARM: 8078/1: get rid of hardcoded assumptions about kernel stack size"
      does, I think it's good to avoid unnecessary header inclusion here in any case.
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Reported-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NAndrey Ryabinin <a.ryabinin@samsung.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      731542ef
  2. 01 7月, 2014 4 次提交
  3. 29 6月, 2014 6 次提交
  4. 26 6月, 2014 23 次提交