1. 06 5月, 2016 1 次提交
  2. 13 6月, 2015 1 次提交
    • S
      ARM: 8383/1: nommu: avoid deprecated source register on mov · 970d96f9
      Stefan Agner 提交于
      In Thumb2 mode, the stack register r13 is deprecated if the
      destination register is the program counter (r15). Similar to
      head.S, head-nommu.S uses r13 to store the return address used
      after configuring the CPU's CP15 register. However, since we do
      not enable a MMU, there will be no address switch and it is
      possible to use branch with link instruction to call
      __after_proc_init.
      
      Avoid using r13 completely by using bl to call __after_proc_init
      and get rid of __secondary_switched.
      
      Beside removing unnecessary complexity, this also fixes a
      compiler warning when compiling a !MMU kernel:
      Warning: Use of r13 as a source register is deprecated when r15
      is the destination register.
      
      Tested-?by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
      Signed-off-by: NStefan Agner <stefan@agner.ch>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      970d96f9
  3. 02 6月, 2015 1 次提交
    • R
      ARM: redo TTBR setup code for LPAE · b2c3e38a
      Russell King 提交于
      Re-engineer the LPAE TTBR setup code.  Rather than passing some shifted
      address in order to fit in a CPU register, pass either a full physical
      address (in the case of r4, r5 for TTBR0) or a PFN (for TTBR1).
      
      This removes the ARCH_PGD_SHIFT hack, and the last dangerous user of
      cpu_set_ttbr() in the secondary CPU startup code path (which was there
      to re-set TTBR1 to the appropriate high physical address space on
      Keystone2.)
      Tested-by: NMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      b2c3e38a
  4. 09 5月, 2015 1 次提交
  5. 21 4月, 2015 1 次提交
  6. 18 7月, 2014 1 次提交
    • 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
  7. 14 12月, 2013 1 次提交
    • R
      ARM: fix asm/memory.h build error · b713aa0b
      Russell King 提交于
      Jason Gunthorpe reports a build failure when ARM_PATCH_PHYS_VIRT is
      not defined:
      
      In file included from arch/arm/include/asm/page.h:163:0,
                       from include/linux/mm_types.h:16,
                       from include/linux/sched.h:24,
                       from arch/arm/kernel/asm-offsets.c:13:
      arch/arm/include/asm/memory.h: In function '__virt_to_phys':
      arch/arm/include/asm/memory.h:244:40: error: 'PHYS_OFFSET' undeclared (first use in this function)
      arch/arm/include/asm/memory.h:244:40: note: each undeclared identifier is reported only once for each function it appears in
      arch/arm/include/asm/memory.h: In function '__phys_to_virt':
      arch/arm/include/asm/memory.h:249:13: error: 'PHYS_OFFSET' undeclared (first use in this function)
      
      Fixes: ca5a45c0 ("ARM: mm: use phys_addr_t appropriately in p2v and v2p conversions")
      Tested-By: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      b713aa0b
  8. 01 8月, 2013 1 次提交
  9. 15 7月, 2013 1 次提交
    • P
      arm: delete __cpuinit/__CPUINIT usage from all ARM users · 8bd26e3a
      Paul Gortmaker 提交于
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      Note that some harmless section mismatch warnings may result, since
      notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
      and are flagged as __cpuinit  -- so if we remove the __cpuinit from
      the arch specific callers, we will also get section mismatch warnings.
      As an intermediate step, we intend to turn the linux/init.h cpuinit
      related content into no-ops as early as possible, since that will get
      rid of these warnings.  In any case, they are temporary and harmless.
      
      This removes all the ARM uses of the __cpuinit macros from C code,
      and all __CPUINIT from assembly code.  It also had two ".previous"
      section statements that were paired off against __CPUINIT
      (aka .section ".cpuinit.text") that also get removed here.
      
      [1] https://lkml.org/lkml/2013/5/20/589
      
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      8bd26e3a
  10. 17 6月, 2013 1 次提交
    • J
      ARM: mpu: protect the vectors page with an MPU region · 9dfc28b6
      Jonathan Austin 提交于
      Without an MMU it is possible for userspace programs to start executing code
      in places that they have no business executing. The MPU allows some level of
      protection against this.
      
      This patch protects the vectors page from access by userspace processes.
      Userspace tasks that dereference a null pointer are already protected by an
      svc at 0x0 that kills them. However when tasks use an offset from a null
      pointer (eg a function in a null struct) they miss this carefully placed svc
      and enter the exception vectors in user mode, ending up in the kernel.
      
      This patch causes programs that do this to receive a SEGV instead of happily
      entering the kernel in user-mode, and hence avoid a 'Bad Mode' panic.
      
      As part of this change it is necessary to make sigreturn happen via the
      stack when there is not an sa_restorer function. This change is invisible to
      userspace, and irrelevant to code compiled using a uClibc toolchain, which
      always uses an sa_restorer function.
      
      Because we don't get to remap the vectors in !MMU kuser_helpers are not
      in a defined location, and hence aren't usable. This means we don't need to
      worry about keeping them accessible from PL0
      Signed-off-by: NJonathan Austin <jonathan.austin@arm.com>
      Reviewed-by: NWill Deacon <will.deacon@arm.com>
      CC: Nicolas Pitre <nico@linaro.org>
      CC: Catalin Marinas <catalin.marinas@arm.com>
      9dfc28b6
  11. 08 6月, 2013 3 次提交
    • J
      ARM: mpu: add MPU initialisation for secondary cores · eb08375e
      Jonathan Austin 提交于
      The MPU initialisation on the primary core is performed in two stages, one
      minimal stage to ensure the CPU can boot and a second one after
      sanity_check_meminfo. As the memory configuration is known by the time we
      boot secondary cores only a single step is necessary, provided the values
      for DRSR are passed to secondaries.
      
      This patch implements this arrangement. The configuration generated for the
      MPU regions is made available to the secondary core, which can then use the
      asm MPU intialisation code to program a complete region configuration.
      
      This is necessary for SMP configurations without an MMU, as the MPU
      initialisation is the only way to ensure that memory is specified as
      'shared'.
      Signed-off-by: NJonathan Austin <jonathan.austin@arm.com>
      Reviewed-by: NWill Deacon <will.deacon@arm.com>
      CC: Nicolas Pitre <nico@linaro.org>
      eb08375e
    • J
      ARM: mpu: add early bring-up code for the ARMv7 PMSA-compliant MPU · 67c9845b
      Jonathan Austin 提交于
      This patch adds initial support for using the MPU, which is necessary for
      SMP operation on PMSAv7 processors because it is the only way to ensure
      memory is shared. This is an initial patch and full SMP support is added
      later in this series.
      
      The setup of the MPU is performed in a way analagous to that for the MMU:
      Very early initialisation before the C environment is brought up, followed
      by a sanity check and more complete initialisation in C.
      
      This patch provides the simplest possible memory region configuration:
      MPU_PROBE_REGION: Reserved for probing MPU details, not enabled
      MPU_BG_REGION: A 'background' region that specifies all memory strongly ordered
      MPU_RAM_REGION: A single shared, cacheable, normal region for the valid RAM.
      
      In this early initialisation code we simply map the whole of the address
      space with the BG_REGION and (at least) the kernel with the RAM_REGION. The
      MPU has region alignment constraints that require us to round past the end
      of the kernel.
      
      As region 2 has a higher priority than region 1, it overrides the strongly-
      ordered behaviour for RAM only.
      
      Subsequent patches will add more complete initialisation from the C-world
      and support for bringing up secondary CPUs.
      Signed-off-by: NJonathan Austin <jonathan.austin@arm.com>
      Reviewed-by: NWill Deacon <will.deacon@arm.com>
      CC: Hyok S. Choi <hyok.choi@samsung.com>
      67c9845b
    • W
      ARM: nommu: add entry point for secondary CPUs to head-nommu.S · 01fafcab
      Will Deacon 提交于
      This patch adds a secondary_startup entry point to head-nommu.S so that
      we can boot secondary CPUs on an SMP nommu configuration.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      CC: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
      CC: Nicolas Pitre <nico@linaro.org>
      01fafcab
  12. 18 4月, 2013 1 次提交
  13. 01 2月, 2013 1 次提交
  14. 07 12月, 2012 1 次提交
  15. 29 3月, 2012 1 次提交
  16. 24 3月, 2012 1 次提交
  17. 19 7月, 2011 1 次提交
    • D
      ARM: 6999/1: head, zImage: Always Enter the kernel in ARM state · 540b5738
      Dave Martin 提交于
      Currently, the documented kernel entry requirements are not
      explicit about whether the kernel should be entered in ARM or
      Thumb, leading to an ambiguitity about how to enter Thumb-2
      kernels.  As a result, the kernel is reliant on the zImage
      decompressor to enter the kernel proper in the correct instruction
      set state.
      
      This patch changes the boot entry protocol for head.S and Image to
      be the same as for zImage: in all cases, the kernel is now entered
      in ARM.
      
      Documentation/arm/Booting is updated to reflect this new policy.
      
      A different rule will be needed for Cortex-M class CPUs as and when
      support for those lands in mainline, since these CPUs don't support
      the ARM instruction set at all: a note is added to the effect that
      the kernel must be entered in Thumb on such systems.
      Signed-off-by: NDave Martin <dave.martin@linaro.org>
      Acked-by: NNicolas Pitre <nicolas.pitre@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      540b5738
  18. 16 2月, 2011 1 次提交
  19. 08 10月, 2010 1 次提交
  20. 24 11月, 2009 1 次提交
  21. 24 7月, 2009 2 次提交
  22. 01 9月, 2008 1 次提交
  23. 07 8月, 2008 1 次提交
  24. 08 5月, 2007 1 次提交
  25. 30 11月, 2006 1 次提交
  26. 29 9月, 2006 1 次提交
    • H
      [ARM] nommu: confirms the CR_V bit in nommu mode · 6afd6fae
      Hyok S. Choi 提交于
      In nommu mode, the exception vector location depends on the platforms.
      Some of the implementations may have some special exception control
      forwarding method in their ROM/flash and for some of them has its own
      re-mapping mechanism by the h/w.
      
      This patch introduces a special configuration CONFIG_CPU_HIGH_VECTOR which
      turns on the CR_V bit in nommu mode. The CR_V bit is turned off by default.
      This feature depends on CP15 and does not supported by ARM740.
      Signed-off-by: NHyok S. Choi <hyok.choi@samsung.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      6afd6fae
  27. 28 9月, 2006 1 次提交
    • H
      [ARM] nommu: manage the CP15 things · f12d0d7c
      Hyok S. Choi 提交于
      All the current CP15 access codes in ARM arch can be categorized and
      conditioned by the defines as follows:
      
           Related operation	Safe condition
        a. any CP15 access	!CPU_CP15
        b. alignment trap	CPU_CP15_MMU
        c. D-cache(C-bit)	CPU_CP15
        d. I-cache		CPU_CP15 && !( CPU_ARM610 || CPU_ARM710 ||
      				CPU_ARM720 || CPU_ARM740 ||
      				CPU_XSCALE || CPU_XSC3 )
        e. alternate vector	CPU_CP15 && !CPU_ARM740
        f. TTB		CPU_CP15_MMU
        g. Domain		CPU_CP15_MMU
        h. FSR/FAR		CPU_CP15_MMU
      
      For example, alternate vector is supported if and only if
      "CPU_CP15 && !CPU_ARM740" is satisfied.
      Signed-off-by: NHyok S. Choi <hyok.choi@samsung.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      f12d0d7c
  28. 01 7月, 2006 1 次提交
  29. 25 6月, 2006 1 次提交
  30. 05 5月, 2006 1 次提交
  31. 24 4月, 2006 1 次提交
  32. 27 3月, 2006 1 次提交