1. 01 2月, 2014 1 次提交
  2. 19 9月, 2013 1 次提交
    • V
      ARM: OMAP4: cpuidle: fix: call cpu_cluster_pm_exit conditionally · 78350271
      Vladimir Murzin 提交于
      We call cpu_cluster_pm_enter for dev->cpu == 0 only, but
      cpu_cluster_pm_exit called without that check.
      
      Because of that unhandled page fault may happen:
      
      [    3.803405] Unable to handle kernel paging request at virtual address 00002500
      [    3.810974] pgd = c0004000
      [    3.813812] [00002500] *pgd=00000000
      [    3.817596] Internal error: Oops: 5 [#1] SMP ARM
      [    3.822418] Modules linked in:
      [    3.825653] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.11.0-rc6+ #21
      [    3.832397] task: ed86ef40 ti: ed896000 task.ti: ed896000
      [    3.838073] PC is at irq_notifier+0x234/0x25c
      [    3.842651] LR is at irq_notifier+0x218/0x25c
      [    3.847229] pc : [<c0029ed8>]    lr : [<c0029ebc>]    psr: 80000193
      [    3.847229] sp : ed897ee8  ip : 00000005  fp : 00000001
      [    3.859283] r10: c0b395f0  r9 : c0b30594  r8 : c0b8c2ac
      [    3.864776] r7 : ffffffff  r6 : 00000000  r5 : 00000005  r4 : 00000000
      [    3.871643] r3 : 00002500  r2 : 00000000  r1 : 00000005  r0 : 44302244
      [    3.878479] Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      [    3.886260] Control: 10c5387d  Table: 8000404a  DAC: 00000015
      [    3.892272] Process swapper/1 (pid: 0, stack limit = 0xed896240)
      [    3.898590] Stack: (0xed897ee8 to 0xed898000)
      [    3.903167] 7ee0:                   c0979c3a 00000001 ed897ef8 ed896000 c0014f7c 00000000
      [    3.911743] 7f00: 00000005 00000000 ffffffff c0b8c2ac c0b395f0 c077c04c c0c94b48 c0b3953c
      [    3.920318] 7f20: c0bcd928 00000002 c0b39524 c00cfad8 00000000 ffffffff 00000000 c00cfb10
      [    3.928924] 7f40: c14e62c0 c002c1c8 c002c0ac c14e62c0 00000002 e251c37d 00000000 c0b39548
      [    3.937499] 7f60: c0b395f0 c05a1bc4 e251c37d 00000000 00000005 c05a3870 edc90380 edc90380
      [    3.946105] 7f80: edc90394 c14e62c0 c0b39548 00000002 c0784064 c05a3c78 c0b395e0 c14e62c0
      [    3.954681] 7fa0: 00000002 c0b39548 c0bc9db8 00000000 00000001 c05a1dc0 ed896000 00000015
      [    3.963287] 7fc0: c0bc9db8 ed896000 8000406a c0b30594 c0784064 c000e504 00000746 c007a528
      [    3.971862] 7fe0: 00000001 0000001d 600001d3 c0bcc004 00000000 800086c4 ee0aa6a7 d2aabaa9
      [    3.980499] [<c0029ed8>] (irq_notifier+0x234/0x25c) from [<c077c04c>] (notifier_call_chain+0x38/0x68)
      [    3.990173] [<c077c04c>] (notifier_call_chain+0x38/0x68) from [<c00cfad8>] (cpu_pm_notify+0x20/0x38)
      [    3.999786] [<c00cfad8>] (cpu_pm_notify+0x20/0x38) from [<c00cfb10>] (cpu_cluster_pm_exit+0x20/0x50)
      [    4.009399] [<c00cfb10>] (cpu_cluster_pm_exit+0x20/0x50) from [<c002c1c8>] (omap_enter_idle_coupled+0x11c/0x14c)
      [    4.020111] [<c002c1c8>] (omap_enter_idle_coupled+0x11c/0x14c) from [<c05a1bc4>] (cpuidle_enter_state+0x40/0xec)
      [    4.030822] [<c05a1bc4>] (cpuidle_enter_state+0x40/0xec) from [<c05a3c78>] (cpuidle_enter_state_coupled+0x1f4/0x240)
      [    4.041870] [<c05a3c78>] (cpuidle_enter_state_coupled+0x1f4/0x240) from [<c05a1dc0>] (cpuidle_idle_call+0x150/0x228)
      [    4.052947] [<c05a1dc0>] (cpuidle_idle_call+0x150/0x228) from [<c000e504>] (arch_cpu_idle+0x8/0x38)
      [    4.062499] [<c000e504>] (arch_cpu_idle+0x8/0x38) from [<c007a528>] (cpu_startup_entry+0x178/0x1e4)
      [    4.071990] [<c007a528>] (cpu_startup_entry+0x178/0x1e4) from [<800086c4>] (0x800086c4)
      [    4.080383] Code: e5922288 03a03b0a 13a03c25 e0823003 (e5932000)
      [    4.086791] ---[ end trace d83954a84a6fa69e ]---
      
      It is supposed that sar_base is initialized in irq_save_context, which
      is called on CPU_CLUSTER_PM_ENTER notification. If this notification
      has been missed and CPU_CLUSTER_PM_EXIT is received sar_base is NULL.
      
      Fix it by calling CPU_CLUSTER_PM_{ENTER,EXIT} under the same condition.
      Signed-off-by: NVladimir Murzin <murzin.v@gmail.com>
      Acked-by: NKevin Hilman <khilman@linaro.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      78350271
  3. 23 4月, 2013 2 次提交
  4. 10 4月, 2013 5 次提交
  5. 06 4月, 2013 1 次提交
  6. 01 4月, 2013 2 次提交
  7. 28 3月, 2013 1 次提交
  8. 15 12月, 2012 1 次提交
    • P
      ARM: OMAP3/4: cpuidle: fix sparse and checkpatch warnings · 9db316b6
      Paul Walmsley 提交于
      Fix the following sparse warnings in the OMAP3/4 CPUIdle code:
      
      arch/arm/mach-omap2/cpuidle34xx.c:272:1: warning: symbol 'omap3_idle_dev' was not declared. Should it be static?
      arch/arm/mach-omap2/cpuidle34xx.c:274:23: warning: symbol 'omap3_idle_driver' was not declared. Should it be static?
      arch/arm/mach-omap2/cpuidle44xx.c:164:1: warning: symbol 'omap4_idle_dev' was not declared. Should it be static?
      arch/arm/mach-omap2/cpuidle44xx.c:166:23: warning: symbol 'omap4_idle_driver' was not declared. Should it be static?
      
      Also fix the following checkpatch warnings:
      
      WARNING: please, no space before tabs
      #44: FILE: arch/arm/mach-omap2/cpuidle34xx.c:105:
      +^I.name = ^I"omap3_idle",$
      
      WARNING: please, no space before tabs
      #45: FILE: arch/arm/mach-omap2/cpuidle34xx.c:106:
      +^I.owner = ^ITHIS_MODULE,$
      
      ERROR: code indent should use tabs where possible
      #211: FILE: arch/arm/mach-omap2/cpuidle44xx.c:74:
      +                        /* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */$
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      9db316b6
  9. 23 8月, 2012 1 次提交
    • A
      ARM: omap: allow building omap44xx without SMP · c7a9b09b
      Arnd Bergmann 提交于
      The new omap4 cpuidle implementation currently requires
      ARCH_NEEDS_CPU_IDLE_COUPLED, which only works on SMP.
      
      This patch makes it possible to build a non-SMP kernel
      for that platform. This is not normally desired for
      end-users but can be useful for testing.
      
      Without this patch, building rand-0y2jSKT results in:
      
      drivers/cpuidle/coupled.c: In function 'cpuidle_coupled_poke':
      drivers/cpuidle/coupled.c:317:3: error: implicit declaration of function '__smp_call_function_single' [-Werror=implicit-function-declaration]
      
      It's not clear if this patch is the best solution for
      the problem at hand. I have made sure that we can now
      build the kernel in all configurations, but that does
      not mean it will actually work on an OMAP44xx.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Tested-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Tony Lindgren <tony@atomide.com>
      c7a9b09b
  10. 26 7月, 2012 3 次提交
    • S
      ARM: OMAP4: CPUidle: Open broadcast clock-event device. · b93d70ae
      Santosh Shilimkar 提交于
      OMAP4 idle driver uses CLOCK_EVT_NOTIFY_BROADCAST_[ENTER/EXIT]
      for broadcast clock events. But _ENTER/_EXIT doesn't really open
      broadcast clock events and to explicitly setup the broadcast device,
      CLOCK_EVT_NOTIFY_BROADCAST_ON should be used.
      
      Add the missing CLOCK_EVT_NOTIFY_BROADCAST_ON clockevent notifications.
      This will setup the broadcast timer in either periodic/oneshot modes
      correctly. Recent clockevent infrastructure change 77b0d60c {leave the
      broadcast device in shutdown mode when not needed} exposed this bug
      leading to boot hangs in oneshot mode. Prior to this, periodic broadcast
      mode was also broken. This change fixes both the periodic/oneshot broadcast
      modes.
      
      Discussion thread :
      	https://lkml.org/lkml/2012/4/9/13Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      b93d70ae
    • K
      ARM: OMAP4: CPUidle: add synchronization for coupled idle states · 5b4d5bcc
      Kevin Hilman 提交于
      With coupled idle states, a failure for any CPU to hit a low power
      state must be coordinated such that all CPUs abort.
      
      On OMAP4, when entering a coupled state, CPU0 has to wait for CPU1 to
      enter its low power state before it can enter its low power state.
      
      This is implemented by letting CPU0 wait for the CPU1 powerdomain to
      hit off.  However, there are conditions where CPU1 might abort/fail
      and not hit off while CPU0 is waiting for it.  For example, a CPU1
      wakeup or a failed attempt to hit off due to hardware conditions.
      
      To avoid the deadlock where CPU0 would continually wait for CPU1 to
      hit off-mode, this patch adds a flag to signal when each CPU has come
      out of its low-power state.  CPU0 then checks whether CPU1 has hit off
      *or* has already completed its attempt to hit off.  If the latter,
      CPU0 must abort its attempt to hit a low-power state so the coupled
      state enter method can return.
      
      In addition, cpuidle_coupled_parallel_barrier() is used to ensure the
      clearing of the 'done' flag is synchronized on all CPUs.
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      5b4d5bcc
    • S
      ARM: OMAP4: CPUidle: Use coupled cpuidle states to implement SMP cpuidle. · dd3ad97c
      Santosh Shilimkar 提交于
      OMAP4 CPUDILE driver is converted mainly based on notes from the
      coupled cpuidle patch series.
      
      The changes include :
      - Register both CPUs and C-states to cpuidle driver.
      - Set struct cpuidle_device.coupled_cpus
      - Set struct cpuidle_device.safe_state to non coupled state.
      - Set CPUIDLE_FLAG_COUPLED in struct cpuidle_state.flags for each
        state that affects multiple cpus.
      - Separate ->enter hooks for coupled & simple idle.
      - CPU0 wait loop for CPU1 power transition.
      - CPU1 wakeup mechanism for the idle exit.
      - Enabling ARCH_NEEDS_CPU_IDLE_COUPLED for OMAP4.
      
      Thanks to Kevin Hilman and Colin Cross on the suggestions/fixes
      on the intermediate version of this patch.
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      dd3ad97c
  11. 20 6月, 2012 1 次提交
    • D
      ARM: OMAP3/4: consolidate cpuidle Makefile · 164e0cbf
      Daniel Lezcano 提交于
      The current Makefile compiles the cpuidle34xx.c and cpuidle44xx.c files
      even if the cpuidle option is not set in the kernel.
      
      This patch fixes this by creating a section in the Makefile where these
      files are compiled only if the CONFIG_CPU_IDLE option is set.
      
      This modification breaks an implicit dependency between CPU_IDLE and PM as
      they belong to the same block in the Makefile. This is fixed in the Kconfig
      by selecting explicitely PM is CPU_IDLE is set.
      
      The linux coding style recommend to use no-op functions in the headers
      when the subsystem is disabled instead of adding big section in C files.
      
      This patch fix this also.
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Reviewed-by: NJean Pihet <j-pihet@ti.com>
      Reviewed-by: NRajendra Nayak <rnayak@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      164e0cbf
  12. 04 5月, 2012 7 次提交
  13. 21 3月, 2012 1 次提交
  14. 15 2月, 2012 1 次提交
  15. 09 12月, 2011 2 次提交