1. 23 6月, 2016 3 次提交
    • T
      ARM: OMAP4+: Reset CPU1 properly for kexec · 32518852
      Tony Lindgren 提交于
      We need to reset CPU1 properly for kexec when booting different
      kernel versions. Otherwise CPU1 will attempt to boot the the
      previous kernel's start_secondary(). Note that the restctrl
      register is different from the low-power mode wakeup register
      CPU1_WAKEUP_NS_PA_ADDR. We need to configure both.
      
      Let's fix the issue by defining SoC specific data to initialize
      things in a more generic way. And let's also standardize omap-smp.c
      to use soc_is instead of cpu_is while at it.
      Acked-by: NSantosh Shilimkar <ssantosh@kernel.org>
      Tested-by: NKeerthy <j-keerthy@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      32518852
    • T
      ARM: OMAP4+: Prevent CPU1 related hang with kexec · 0573b957
      Tony Lindgren 提交于
      Kexec booted kernels on omap4 will hang early during the boot if the
      booted kernel is different version from the previous kernel.
      
      This is because the previous kernel may have configured low-power mode
      using CPU1_WAKEUP_NS_PA_ADDR. In that case it points to the previous
      kernel's omap4_secondary_startup(), and CPU1 can be in low power mode
      from the previous kernel. When the new kernel configures the CPU1
      clockdomain, CPU1 can wake from low power state prematurely during
      omap44xx_clockdomains_init() running random code.
      
      Let's fix the issue by configuring CPU1_WAKEUP_NS_PA_ADDR before we
      call omap44xx_clockdomains_init(). Note that this is very early during
      the init, and we will do proper CPU1 reset during SMP init a bit later
      on in omap4_smp_prepare_cpus(). And we need to do this when SMP is
      not enabled as the previous kernel may have had it enabled.
      Acked-by: NSantosh Shilimkar <ssantosh@kernel.org>
      Tested-by: NKeerthy <j-keerthy@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      0573b957
    • T
      ARM: OMAP4+: Initialize SAR RAM base early for proper CPU1 reset for kexec · f4b9f40a
      Tony Lindgren 提交于
      Prepare things for making kexec work on SMP omap variants by initializing
      SARM RAM base early. This allows us to configure CPU1 for kexec in case
      the previous kernel has put CPU1 in low power mode.
      
      Note that this should not prevent moving other SAR RAM code to live
      under drivers. However for kexec, we will need this very early.
      Acked-by: NSantosh Shilimkar <ssantosh@kernel.org>
      Tested-by: NKeerthy <j-keerthy@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      f4b9f40a
  2. 22 6月, 2016 3 次提交
  3. 10 6月, 2016 12 次提交
  4. 03 6月, 2016 3 次提交
  5. 13 5月, 2016 1 次提交
    • N
      ARM: OMAP5 / DRA7: Introduce workaround for 801819 · c0053bd5
      Nishanth Menon 提交于
      Add workaround for Cortex-A15 ARM erratum 801819 which says in summary
      that "A livelock can occur in the L2 cache arbitration that might
      prevent a snoop from completing. Under certain conditions this can
      cause the system to deadlock. "
      
      Recommended workaround is as follows:
      Do both of the following:
      
      1) Do not use the write-back no-allocate memory type.
      2) Do not issue write-back cacheable stores at any time when the cache
      is disabled (SCTLR.C=0) and the MMU is enabled (SCTLR.M=1). Because it
      is implementation defined whether cacheable stores update the cache when
      the cache is disabled it is not expected that any portable code will
      execute cacheable stores when the cache is disabled.
      
      For implementations of Cortex-A15 configured without the “L2 arbitration
      register slice” option (typically one or two core systems), you must
      also do the following:
      
      3) Disable write-streaming in each CPU by setting ACTLR[28:25] = 0b1111
      
      So, we provide an option to disable write streaming on OMAP5 and DRA7.
      It is a rare condition to occur and may be enabled selectively based
      on platform acceptance of risk.
      
      Applies to: A15 revisions r2p0, r2p1, r2p2, r2p3 or r2p4 and REVIDR[3]
      is set to 0.
      
      Based on ARM errata Document revision 18.0 (22 Nov 2013)
      
      Note: the configuration for the workaround needs to be done with
      each CPU bringup, since CPU0 bringup is done by bootloader, it is
      recommended to have the workaround in the bootloader, kernel also does
      ensure that CPU0 has the workaround and makes the workaround active
      when CPU1 gets active.
      
      With CONFIG_SMP disabled, it is expected to be done by the bootloader.
      
      This does show significant degradation in synthetic tests such as
      mbw (https://packages.qa.debian.org/m/mbw.html)
      mbw -n 100 100|grep AVG (on a test platform)
      Without enabling the erratum:
      AVG Method: MEMCPY  Elapsed: 0.13406  MiB: 100.00000  Copy: 745.913 MiB/s
      AVG Method: DUMB    Elapsed: 0.06746  MiB: 100.00000  Copy: 1482.357 MiB/s
      AVG Method: MCBLOCK Elapsed: 0.03058  MiB: 100.00000  Copy: 3270.569 MiB/s
      After enabling the erratum:
      AVG Method: MEMCPY  Elapsed: 0.13757  MiB: 100.00000  Copy: 726.913 MiB/s
      AVG Method: DUMB    Elapsed: 0.12024  MiB: 100.00000  Copy: 831.668 MiB/s
      AVG Method: MCBLOCK Elapsed: 0.09243  MiB: 100.00000  Copy: 1081.942 MiB/s
      
      Most benchmarks are designed for specific performance analysis, so
      overall usecase must be considered before making a decision to
      enable/disable the erratum workaround.
      
      Pending internal investigation, the erratum is kept disabled by default.
      
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Suggested-by: NRichard Woodruff <r-woodruff2@ti.com>
      Suggested-by: NBrad Griffis <bgriffis@ti.com>
      Signed-off-by: NNishanth Menon <nm@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      c0053bd5
  6. 29 4月, 2016 2 次提交
  7. 25 4月, 2016 1 次提交
  8. 19 4月, 2016 1 次提交
  9. 15 4月, 2016 3 次提交
  10. 14 4月, 2016 6 次提交
  11. 11 4月, 2016 5 次提交
    • S
      ARM: OMAP2+: hwmod: fix _idle() hwmod state sanity check sequence · c20c8f75
      Suman Anna 提交于
      The omap_hwmod _enable() function can return success without setting
      the hwmod state to _HWMOD_STATE_ENABLED for IPs with reset lines when
      all of the reset lines are asserted. The omap_hwmod _idle() function
      also performs a similar check, but after checking for the hwmod state
      first. This triggers the WARN when pm_runtime_get and pm_runtime_put
      are invoked on IPs with all reset lines asserted. Reverse the checks
      for hwmod state and reset lines status to fix this.
      
      Issue found during a unbind operation on a device with reset lines
      still asserted, example backtrace below
      
       ------------[ cut here ]------------
       WARNING: CPU: 1 PID: 879 at arch/arm/mach-omap2/omap_hwmod.c:2207 _idle+0x1e4/0x240()
       omap_hwmod: mmu_dsp: idle state can only be entered from enabled state
       Modules linked in:
       CPU: 1 PID: 879 Comm: sh Not tainted 4.4.0-00008-ga989d951331a #3
       Hardware name: Generic OMAP5 (Flattened Device Tree)
       [<c0018e60>] (unwind_backtrace) from [<c0014dc4>] (show_stack+0x10/0x14)
       [<c0014dc4>] (show_stack) from [<c037ac28>] (dump_stack+0x90/0xc0)
       [<c037ac28>] (dump_stack) from [<c003f420>] (warn_slowpath_common+0x78/0xb4)
       [<c003f420>] (warn_slowpath_common) from [<c003f48c>] (warn_slowpath_fmt+0x30/0x40)
       [<c003f48c>] (warn_slowpath_fmt) from [<c0028c20>] (_idle+0x1e4/0x240)
       [<c0028c20>] (_idle) from [<c0029080>] (omap_hwmod_idle+0x28/0x48)
       [<c0029080>] (omap_hwmod_idle) from [<c002a5a4>] (omap_device_idle+0x3c/0x90)
       [<c002a5a4>] (omap_device_idle) from [<c0427a90>] (__rpm_callback+0x2c/0x60)
       [<c0427a90>] (__rpm_callback) from [<c0427ae4>] (rpm_callback+0x20/0x80)
       [<c0427ae4>] (rpm_callback) from [<c0427f84>] (rpm_suspend+0x138/0x74c)
       [<c0427f84>] (rpm_suspend) from [<c0428b78>] (__pm_runtime_idle+0x78/0xa8)
       [<c0428b78>] (__pm_runtime_idle) from [<c041f514>] (__device_release_driver+0x64/0x100)
       [<c041f514>] (__device_release_driver) from [<c041f5d0>] (device_release_driver+0x20/0x2c)
       [<c041f5d0>] (device_release_driver) from [<c041d85c>] (unbind_store+0x78/0xf8)
       [<c041d85c>] (unbind_store) from [<c0206df8>] (kernfs_fop_write+0xc0/0x1c4)
       [<c0206df8>] (kernfs_fop_write) from [<c018a120>] (__vfs_write+0x20/0xdc)
       [<c018a120>] (__vfs_write) from [<c018a9cc>] (vfs_write+0x90/0x164)
       [<c018a9cc>] (vfs_write) from [<c018b1f0>] (SyS_write+0x44/0x9c)
       [<c018b1f0>] (SyS_write) from [<c0010420>] (ret_fast_syscall+0x0/0x1c)
       ---[ end trace a4182013c75a9f50 ]---
      
      While at this, fix the sequence in _shutdown() as well, though there
      is no easy reproducible scenario.
      
      Fixes: 747834ab ("ARM: OMAP2+: hwmod: revise hardreset behavior")
      Signed-off-by: NSuman Anna <s-anna@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      c20c8f75
    • S
      ARM: DRA7: hwmod: Add data for GPTimer 12 · 22d20cb4
      Suman Anna 提交于
      Add the hwmod data for GPTimer 12. GPTimer 12 is present in
      WKUPAON power domain and is clocked from a secure 32K clock.
      GPTimer 12 serves as a secure timer on HS devices, but is
      available for kernel on regular GP devices.
      
      The hwmod link is registered only on GP devices. The hwmod data
      also reused the existing timer class instead of reintroducing
      the identical dra7xx_timer_secure_sysc class which was dropped
      in commit edec1786 ("ARM: DRA7: hwmod: Fix the hwmod class
      for GPTimer4").
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Signed-off-by: NSuman Anna <s-anna@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      22d20cb4
    • L
      ARM: AMx3xx: RTC: Add lock and unlock functions · b5a553c0
      Lokesh Vutla 提交于
      Hook omap_hwmod_rtc_unlock/lock functions into RTC hwmod,
      so that SYSCONFIG register is updated properly.
      Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      b5a553c0
    • L
      ARM: DRA7: RTC: Add lock and unlock functions · d7d31b89
      Lokesh Vutla 提交于
      Hook omap_hwmod_rtc_unlock/lock functions into RTC hwmod,
      so that SYSCONFIG register is updated properly
      Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com>
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      d7d31b89
    • L
      ARM: OMAP2+: hwmod: RTC: Add lock and unlock functions · 461932df
      Lokesh Vutla 提交于
      RTC IP have kicker feature which prevents spurious writes to its registers.
      In order to write into any of the RTC registers, KICK values has to be
      written to KICK registers. Also, RTC busy flag needs to be polled for
      non-TC registers as well, without which update is not proper and confirmed
      it by testing on DRA7-evm.
      Introduce omap_hwmod_rtc_unlock/lock functions, which  writes into these
      KICK registers inorder to lock and unlock RTC registers.
      Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com>
      [paul@pwsan.com: fixed subject line]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      461932df