1. 22 10月, 2012 1 次提交
  2. 20 9月, 2012 1 次提交
    • M
      ARM: 7535/1: Reprogram smp_twd based on new common clk framework notifiers · 2b25d9f6
      Mike Turquette 提交于
      Running cpufreq driver on imx6q, the following warning is seen.
      
      $ BUG: sleeping function called from invalid context at kernel/mutex.c:269
      
      <snip>
      
      stack backtrace:
      Backtrace:
      [<80011d64>] (dump_backtrace+0x0/0x10c) from [<803fc164>] (dump_stack+0x18/0x1c)
       r6:bf8142e0 r5:bf814000 r4:806ac794 r3:bf814000
      [<803fc14c>] (dump_stack+0x0/0x1c) from [<803fd444>] (print_usage_bug+0x250/0x2b
      8)
      [<803fd1f4>] (print_usage_bug+0x0/0x2b8) from [<80060f90>] (mark_lock+0x56c/0x67
      0)
      [<80060a24>] (mark_lock+0x0/0x670) from [<80061a20>] (__lock_acquire+0x98c/0x19b
      4)
      [<80061094>] (__lock_acquire+0x0/0x19b4) from [<80062f14>] (lock_acquire+0x68/0x
      7c)
      [<80062eac>] (lock_acquire+0x0/0x7c) from [<80400f28>] (mutex_lock_nested+0x78/0
      x344)
       r7:00000000 r6:bf872000 r5:805cc858 r4:805c2a04
      [<80400eb0>] (mutex_lock_nested+0x0/0x344) from [<803089ac>] (clk_get_rate+0x1c/
      0x58)
      [<80308990>] (clk_get_rate+0x0/0x58) from [<80013c48>] (twd_update_frequency+0x1
      8/0x50)
       r5:bf253d04 r4:805cadf4
      [<80013c30>] (twd_update_frequency+0x0/0x50) from [<80068e20>] (generic_smp_call
      _function_single_interrupt+0xd4/0x13c)
       r4:bf873ee0 r3:80013c30
      [<80068d4c>] (generic_smp_call_function_single_interrupt+0x0/0x13c) from [<80013
      34c>] (handle_IPI+0xc0/0x194)
       r8:00000001 r7:00000000 r6:80574e48 r5:bf872000 r4:80593958
      [<8001328c>] (handle_IPI+0x0/0x194) from [<800084e8>] (gic_handle_irq+0x58/0x60)
       r8:00000000 r7:bf873f8c r6:bf873f58 r5:80593070 r4:f4000100
      r3:00000005
      [<80008490>] (gic_handle_irq+0x0/0x60) from [<8000e124>] (__irq_svc+0x44/0x60)
      Exception stack(0xbf873f58 to 0xbf873fa0)
      3f40:                                                       00000001 00000001
      3f60: 00000000 bf814000 bf872000 805cab48 80405aa4 80597648 00000000 412fc09a
      3f80: bf872000 bf873fac bf873f70 bf873fa0 80063844 8000f1f8 20000013 ffffffff
       r6:ffffffff r5:20000013 r4:8000f1f8 r3:bf814000
      [<8000f1b8>] (default_idle+0x0/0x4c) from [<8000f428>] (cpu_idle+0x98/0x114)
      [<8000f390>] (cpu_idle+0x0/0x114) from [<803f9834>] (secondary_start_kernel+0x11
      c/0x140)
      [<803f9718>] (secondary_start_kernel+0x0/0x140) from [<103f9234>] (0x103f9234)
       r6:10c03c7d r5:0000001f r4:4f86806a r3:803f921c
      
      It looks that the warning is caused by that twd_update_frequency() gets
      called from an atomic context while it calls clk_get_rate() where a
      mutex gets held.
      
      To fix the warning, let's convert common clk users over to clk notifiers
      in place of CPUfreq notifiers.  This works out nicely for Cortex-A9
      MPcore designs that scale all CPUs at the same frequency.
      
      Platforms that have not been converted to the common clk framework and
      support CPUfreq will rely on the old mechanism.  Once these platforms
      are converted over fully then we can remove the CPUfreq-specific bits
      for good.
      Signed-off-by: NMike Turquette <mturquette@linaro.org>
      Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
      Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
      Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      2b25d9f6
  3. 20 4月, 2012 1 次提交
  4. 16 4月, 2012 1 次提交
  5. 13 3月, 2012 4 次提交
  6. 21 2月, 2012 1 次提交
    • S
      ARM: 7336/1: smp_twd: Don't register CPUFREQ notifiers if local timers are not initialised · 910ba598
      Santosh Shilimkar 提交于
      Current ARM local timer code registers CPUFREQ notifiers even in case
      the twd_timer_setup() isn't called. That seems to be wrong and
      would eventually lead to kernel crash on the CPU frequency transitions
      on the SOCs where the local timer doesn't exist or broken because of
      hardware BUG. Fix it by testing twd_evt and *__this_cpu_ptr(twd_evt).
      
      The issue was observed with v3.3-rc3 and building an OMAP2+ kernel
      on OMAP3 SOC which doesn't have TWD.
      
      Below is the dump for reference :
      
       Unable to handle kernel paging request at virtual address 007e900
       pgd = cdc20000
       [007e9000] *pgd=00000000
       Internal error: Oops: 5 [#1] SMP
       Modules linked in:
       CPU: 0    Not tainted  (3.3.0-rc3-pm+debug+initramfs #9)
       PC is at twd_update_frequency+0x34/0x48
       LR is at twd_update_frequency+0x10/0x48
       pc : [<c001382c>]    lr : [<c0013808>]    psr: 60000093
       sp : ce311dd8  ip : 00000000  fp : 00000000
       r10: 00000000  r9 : 00000001  r8 : ce310000
       r7 : c0440458  r6 : c00137f8  r5 : 00000000  r4 : c0947a74
       r3 : 00000000  r2 : 007e9000  r1 : 00000000  r0 : 00000000
       Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment usr
       Control: 10c5387d  Table: 8dc20019  DAC: 00000015
       Process sh (pid: 599, stack limit = 0xce3102f8)
       Stack: (0xce311dd8 to 0xce312000)
       1dc0:                                                       6000c
       1de0: 00000001 00000002 00000000 00000000 00000000 00000000 00000
       1e00: ffffffff c093d8f0 00000000 ce311ebc 00000001 00000001 ce310
       1e20: c001386c c0437c4c c0e95b60 c0e95ba8 00000001 c0e95bf8 ffff4
       1e40: 00000000 00000000 c005ef74 ce310000 c0435cf0 ce311ebc 00000
       1e60: ce352b40 0007a120 c08d5108 c08ba040 c08ba040 c005f030 00000
       1e80: c08bc554 c032fe2c 0007a120 c08d4b64 ce352b40 c08d8618 ffff8
       1ea0: c08ba040 c033364c ce311ecc c0433b50 00000002 ffffffea c0330
       1ec0: 0007a120 0007a120 22222201 00000000 22222222 00000000 ce357
       1ee0: ce3d6000 cdc2aed8 ce352ba0 c0470164 00000002 c032f47c 00034
       1f00: c0331cac ce352b40 00000007 c032f6d0 ce352bbc 0003d090 c0930
       1f20: c093d8bc c03306a4 00000007 ce311f80 00000007 cdc2aec0 ce358
       1f40: ce8d20c0 00000007 b6fe5000 ce311f80 00000007 ce310000 0000c
       1f60: c000de74 ce987400 ce8d20c0 b6fe5000 00000000 00000000 0000c
       1f80: 00000000 00000000 001fbac8 00000000 00000007 001fbac8 00004
       1fa0: c000df04 c000dd60 00000007 001fbac8 00000001 b6fe5000 00000
       1fc0: 00000007 001fbac8 00000007 00000004 b6fe5000 00000000 00202
       1fe0: 00000000 beb565f8 00101ffc 00008e8c 60000010 00000001 00000
       [<c001382c>] (twd_update_frequency+0x34/0x48) from [<c008ac4c>] )
       [<c008ac4c>] (smp_call_function_single+0x17c/0x1c8) from [<c0013)
       [<c0013890>] (twd_cpufreq_transition+0x24/0x30) from [<c0437c4c>)
       [<c0437c4c>] (notifier_call_chain+0x44/0x84) from [<c005efe4>] ()
       [<c005efe4>] (__srcu_notifier_call_chain+0x70/0xa4) from [<c005f)
       [<c005f030>] (srcu_notifier_call_chain+0x18/0x20) from [<c032fe2)
       [<c032fe2c>] (cpufreq_notify_transition+0xc8/0x1b0) from [<c0333)
       [<c033364c>] (omap_target+0x1b4/0x28c) from [<c032f47c>] (__cpuf)
       [<c032f47c>] (__cpufreq_driver_target+0x50/0x64) from [<c0331d24)
       [<c0331d24>] (cpufreq_set+0x78/0x98) from [<c032f6d0>] (store_sc)
       [<c032f6d0>] (store_scaling_setspeed+0x5c/0x74) from [<c03306a4>)
       [<c03306a4>] (store+0x58/0x74) from [<c014d868>] (sysfs_write_fi)
       [<c014d868>] (sysfs_write_file+0x80/0xb4) from [<c00f2c2c>] (vfs)
       [<c00f2c2c>] (vfs_write+0xa8/0x138) from [<c00f2e9c>] (sys_write)
       [<c00f2e9c>] (sys_write+0x40/0x6c) from [<c000dd60>] (ret_fast_s)
       Code: e594300c e792210c e1a01000 e5840004 (e7930002)
       ---[ end trace 5da3b5167c1ecdda ]---
      Reported-by: NKevin Hilman <khilman@ti.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      910ba598
  7. 23 1月, 2012 1 次提交
  8. 24 12月, 2011 3 次提交
  9. 23 10月, 2011 1 次提交
  10. 12 8月, 2011 1 次提交
  11. 07 7月, 2011 1 次提交
  12. 26 1月, 2011 1 次提交
  13. 11 1月, 2011 1 次提交
  14. 20 12月, 2010 1 次提交
    • R
      ARM: localtimer: clean up local timer on hot unplug · 10034aab
      Russell King 提交于
      When a CPU is hot unplugged, the generic tick code cleans up the
      clock event device, but fails to call down to the device's set_mode
      function to actually shut the device down.
      
      To work around this, we've historically had a local_timer_stop()
      callback out of the hotplug code.  However, this adds needless
      complexity when we have the clock event device itself available.
      
      Explicitly call the clock event device's set_mode function with
      CLOCK_EVT_MODE_UNUSED, so that the hardware can be cleanly shutdown
      without any special external callbacks.  When/if the generic code
      is fixed, percpu_timer_stop() can be killed off.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      10034aab
  15. 15 12月, 2010 1 次提交
  16. 27 7月, 2010 1 次提交
    • R
      ARM: SMP: Always enable clock event broadcast support · 5388a6b2
      Russell King 提交于
      The TWD local timers are unable to wake up the CPU when it is placed
      into a low power mode, eg. C3.  Therefore, we need to adapt things
      such that the TWD code can cope with this.
      
      We do this by always providing a broadcast tick function, and marking
      the fact that the TWD local timer will stop in low power modes.  This
      means that when the CPU is placed into a low power mode, the core
      timer code marks this fact, and allows an IPI to be given to the core.
      Tested-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      5388a6b2
  17. 12 5月, 2010 1 次提交
  18. 09 12月, 2009 1 次提交
  19. 29 9月, 2009 1 次提交
    • R
      ARM: Fix __cpuexit section mismatch warnings · 90140c30
      Russell King 提交于
      Fix:
      
      WARNING: vmlinux.o(.text+0x247c): Section mismatch in reference from the function cpu_idle() to the function .cpuexit.text:cpu_die()
      The function cpu_idle() references a function in an exit section.
      Often the function cpu_die() has valid usage outside the exit section
      and the fix is to remove the __cpuexit annotation of cpu_die.
      
      WARNING: vmlinux.o(.cpuexit.text+0x3c): Section mismatch in reference from the function cpu_die() to the function .cpuinit.text:secondary_start_kernel()
      The function __cpuexit cpu_die() references
      a function __cpuinit secondary_start_kernel().
      This is often seen when error handling in the exit function
      uses functionality in the init path.
      The fix is often to remove the __cpuinit annotation of
      secondary_start_kernel() so it may be used outside an init section.
      
      Sam says:
      > The annotation of cpu_die() is wrong.
      > To be annotated __cpuexit the function shall:
      > - be used in exit context and only in exit context with HOTPLUG_CPU=n
      > - be used outside exit context with HOTPLUG_CPU=y
      
      So, this also means __cpu_disable(), __cpu_die() and twd_timer_stop() are
      also wrong.  However, removing __cpuexit from cpu_die() creates:
      
      WARNING: vmlinux.o(.text+0x6834): Section mismatch in reference from the function cpu_die() to the function .cpuinit.text:secondary_start_kernel()
      The function cpu_die() references
      the function __cpuinit secondary_start_kernel().
      This is often because cpu_die lacks a __cpuinit
      annotation or the annotation of secondary_start_kernel is wrong.
      
      so fix this using __ref.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      90140c30
  20. 18 5月, 2009 4 次提交
  21. 02 4月, 2009 1 次提交
  22. 13 12月, 2008 1 次提交
  23. 01 12月, 2008 1 次提交
  24. 06 9月, 2008 1 次提交
  25. 07 8月, 2008 2 次提交
  26. 05 2月, 2008 4 次提交
  27. 21 5月, 2007 1 次提交
  28. 09 1月, 2006 1 次提交