1. 23 10月, 2017 1 次提交
    • V
      ARM: 8708/1: NOMMU: Rework MPU to be mostly done in C · a0995c08
      Vladimir Murzin 提交于
      Currently, there are several issues with how MPU is setup:
      
       1. We won't boot if MPU is missing
       2. We won't boot if use XIP
       3. Further extension of MPU setup requires asm skills
      
      The 1st point can be relaxed, so we can continue with boot CPU even if
      MPU is missed and fail boot for secondaries only. To address the 2nd
      point we could create region covering CONFIG_XIP_PHYS_ADDR - _end and
      that might work for the first stage of MPU enable, but due to MPU's
      alignment requirement we could cover too much, IOW we need more
      flexibility in how we're partitioning memory regions... and it'd be
      hardly possible to archive because of the 3rd point.
      
      This patch is trying to address 1st and 3rd issues and paves the path
      for 2nd and further improvements.
      
      The most visible change introduced with this patch is that we start
      using mpu_rgn_info array (as it was supposed?), so change in MPU setup
      done by boot CPU is recorded there and feed to secondaries. It
      allows us to keep minimal region setup for boot CPU and do the rest in
      C. Since we start programming MPU regions in C evaluation of MPU
      constrains (number of regions supported and minimal region order) can
      be done once, which in turn open possibility to free-up "probe"
      region early.
      Tested-by: NSzemző András <sza@esh.hu>
      Tested-by: NAlexandre TORGUE <alexandre.torgue@st.com>
      Tested-by: NBenjamin Gaignard <benjamin.gaignard@linaro.org>
      Signed-off-by: NVladimir Murzin <vladimir.murzin@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      a0995c08
  2. 22 9月, 2015 2 次提交
  3. 26 8月, 2015 1 次提交
  4. 01 8月, 2015 1 次提交
    • S
      ARM: 8392/3: smp: Only expose /sys/.../cpuX/online if hotpluggable · 787047ee
      Stephen Boyd 提交于
      Writes to /sys/.../cpuX/online fail if we determine the platform
      doesn't support hotplug for that CPU. Furthermore, if the cpu_die
      op isn't specified the system hangs when we try to offline a CPU
      and it comes right back online unexpectedly. Let's figure this
      stuff out before we make the sysfs nodes so that the online file
      doesn't even exist if it isn't (at least sometimes) possible to
      hotplug the CPU.
      
      Add a new 'cpu_can_disable' op and repoint all 'cpu_disable'
      implementations at it because all implementers use the op to
      indicate if a CPU can be hotplugged or not in a static fashion.
      With PSCI we may need to add a 'cpu_disable' op so that the
      secure OS can be migrated off the CPU we're trying to hotplug.
      In this case, the 'cpu_can_disable' op will indicate that all
      CPUs are hotpluggable by returning true, but the 'cpu_disable' op
      will make a PSCI migration call and occasionally fail, denying
      the hotplug of a CPU. This shouldn't be any worse than x86 where
      we may indicate that all CPUs are hotpluggable but occasionally
      we can't offline a CPU due to check_irq_vectors_for_cpu_disable()
      failing to find a CPU to move vectors to.
      
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Nicolas Pitre <nico@linaro.org>
      Cc: Dave Martin <Dave.Martin@arm.com>
      Acked-by: Simon Horman <horms@verge.net.au> [shmobile portion]
      Tested-by: NSimon Horman <horms@verge.net.au>
      Cc: Magnus Damm <magnus.damm@gmail.com>
      Cc: <linux-sh@vger.kernel.org>
      Tested-by: NTyler Baker <tyler.baker@linaro.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      787047ee
  5. 02 6月, 2015 2 次提交
  6. 27 8月, 2014 1 次提交
  7. 22 3月, 2014 1 次提交
    • A
      ARM: sunxi: fix build for THUMB2_KERNEL · 1146b600
      Arnd Bergmann 提交于
      Building an SMP kernel for the sunxi platform with THUMB2 instructions
      fails with this error at the moment:
      
      headsmp.S:7: Error: Thumb encoding does not support an immediate here -- `msr cpsr_fsxc,#0xd3'
      
      Since the generic secondary_startup function already does
      the same thing in a safe way, we can just drop the private
      sunxi implementation and jump straight to secondary_startup.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      1146b600
  8. 12 2月, 2014 1 次提交
    • S
      ARM: Introduce CPU_METHOD_OF_DECLARE() for cpu hotplug/smp · 6c3ff8b1
      Stephen Boyd 提交于
      The goal of multi-platform kernels is to remove the need for mach
      directories and machine descriptors. To further that goal,
      introduce CPU_METHOD_OF_DECLARE() to allow cpu hotplug/smp
      support to be separated from the machine descriptors.
      Implementers should specify an enable-method property in their
      cpus node and then implement a matching set of smp_ops in their
      hotplug/smp code, wiring it up with the CPU_METHOD_OF_DECLARE()
      macro. When the kernel is compiled we'll collect all the
      enable-method smp_ops into one section for use at boot.
      
      At boot time we'll look for an enable-method in each cpu node and
      try to match that against all known CPU enable methods in the
      kernel. If there are no enable-methods in the cpu nodes we
      fallback to the cpus node and try to use any enable-method found
      there. If that doesn't work we fall back to the old way of using
      the machine descriptor.
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: <devicetree@vger.kernel.org>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NKumar Gala <galak@codeaurora.org>
      6c3ff8b1
  9. 24 9月, 2013 1 次提交
    • N
      ARM: SMP: basic IPI triggered completion support · 5135d875
      Nicolas Pitre 提交于
      We need a mechanism to let an inbound CPU signal that it is alive before
      even getting into the kernel environment i.e. from early assembly code.
      Using an IPI is the simplest way to achieve that.
      
      This adds some basic infrastructure to register a struct completion
      pointer to be "completed" when the dedicated IPI for this task is
      received.
      Signed-off-by: NNicolas Pitre <nico@linaro.org>
      5135d875
  10. 08 6月, 2013 1 次提交
    • 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
  11. 13 11月, 2012 1 次提交
  12. 14 9月, 2012 2 次提交
  13. 13 9月, 2012 1 次提交
    • M
      ARM: SoC: add per-platform SMP operations · abcee5fb
      Marc Zyngier 提交于
      This adds a 'struct smp_operations' to abstract the CPU initialization
      and hot plugging functions on SMP systems, which otherwise conflict
      in a multiplatform kernel. This also helps shmobile and potentially
      others that have more than one method to do these.
      
      To allow the kernel to continue building, the platform hooks are
      defined as weak symbols which are overrided by the platform code.
      Once all platforms are converted, the "weak" attribute will be
      removed and the function made static.
      
      Unlike the original version from Marc, this new version from Arnd
      does not use a generalized abstraction for per-soc data structures
      but only tries to solve the problem for the SMP operations. This
      way, we can collapse the previous four data structures into a
      single struct, which is less systematic but also easier to follow
      as a causal reader.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Acked-by: NNicolas Pitre <nico@fluxnic.net>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      abcee5fb
  14. 23 1月, 2012 1 次提交
  15. 23 10月, 2011 1 次提交
    • M
      ARM: gic: consolidate PPI handling · 292b293c
      Marc Zyngier 提交于
      PPI handling is a bit of an odd beast. It uses its own low level
      handling code and is hardwired to the local timers (hence lacking
      a registration interface).
      
      Instead, switch the low handling to the normal SPI handling code.
      PPIs are handled by the handle_percpu_devid_irq flow.
      
      This also allows the removal of some duplicated code.
      
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: David Brown <davidb@codeaurora.org>
      Cc: Bryan Huntsman <bryanh@codeaurora.org>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Magnus Damm <magnus.damm@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Acked-by: NDavid Brown <davidb@codeaurora.org>
      Tested-by: NDavid Brown <davidb@codeaurora.org>
      Tested-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      292b293c
  16. 17 10月, 2011 2 次提交
  17. 26 5月, 2011 1 次提交
  18. 25 5月, 2011 1 次提交
  19. 23 5月, 2011 1 次提交
  20. 20 12月, 2010 2 次提交
  21. 03 12月, 2010 1 次提交
  22. 15 5月, 2010 1 次提交
  23. 24 9月, 2009 1 次提交
  24. 28 5月, 2009 1 次提交
  25. 18 5月, 2009 1 次提交
  26. 17 5月, 2009 1 次提交
  27. 01 12月, 2008 1 次提交
  28. 07 8月, 2008 1 次提交
  29. 03 8月, 2008 1 次提交
  30. 26 6月, 2008 1 次提交
  31. 05 2月, 2008 2 次提交
  32. 26 4月, 2006 1 次提交
  33. 16 2月, 2006 1 次提交
    • R
      [ARM] Fix SMP initialisation oops · 7bbb7940
      Russell King 提交于
      A change to the SMP initialisation caused the following oops:
      
       CPU1: Booted secondary processor
       CPU1: D VIPT write-back cache
       CPU1: I cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
       CPU1: D cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
       <7>Calibrating delay loop... 83.14 BogoMIPS (lpj=415744)
       <1>Unable to handle kernel NULL pointer dereference at virtual address 0000001c
       ...
       PC is at enqueue_task+0x1c/0x64
       LR is at activate_task+0xcc/0xe4
      
      SMP initialisation now requires cpu_possible_map to be initialised in
      setup_arch().  Move this from smp_prepare_cpus() to smp_init_cpus()
      and call it from our setup_arch() if CONFIG_SMP is enabled.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      7bbb7940
  34. 09 11月, 2005 1 次提交