linux/arch/arm/plat-samsung
Tushar Behera d6838a62b4 ARM: SAMSUNG: Use spin_lock_{irqsave,irqrestore} in clk_set_rate
The spinlock clocks_lock can be held during ISR, hence it is not safe to
hold that lock with disabling interrupts.

It fixes following potential deadlock.

=========================================================
[ INFO: possible irq lock inversion dependency detected ]
3.6.0-rc4+ #2 Not tainted
---------------------------------------------------------
swapper/0/1 just changed the state of lock:
 (&(&host->lock)->rlock){-.....}, at: [<c027fb0d>] sdhci_irq+0x15/0x564
but this lock took another, HARDIRQ-unsafe lock in the past:
 (clocks_lock){+.+...}

and interrupts could create inverse lock ordering between them.

other info that might help us debug this:
 Possible interrupt unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(clocks_lock);
                               local_irq_disable();
                               lock(&(&host->lock)->rlock);
                               lock(clocks_lock);
  <Interrupt>
    lock(&(&host->lock)->rlock);

 *** DEADLOCK ***

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-09-18 10:05:34 +09:00
..
include/plat ARM: SAMSUNG: Add API to set platform data for s5p-tv driver 2012-08-08 15:53:38 +09:00
Kconfig ARM: s3c24xx: use new PWM driver 2012-08-09 15:16:43 +02:00
Makefile Merge branch 'for-3.6' of git://gitorious.org/linux-pwm/linux-pwm 2012-07-30 09:22:37 -07:00
adc.c ARM: SAMSUNG: fix race in s3c_adc_start for ADC 2012-07-13 15:35:04 +09:00
clock-clksrc.c
clock.c ARM: SAMSUNG: Use spin_lock_{irqsave,irqrestore} in clk_set_rate 2012-09-18 10:05:34 +09:00
cpu.c
dev-backlight.c
dev-uart.c
devs.c ARM: SAMSUNG: Add API to set platform data for s5p-tv driver 2012-08-08 15:53:38 +09:00
dma-ops.c ARM: SAMSUNG: Fix compiler warning in dma-ops.c file 2012-06-27 11:32:08 +09:00
dma.c
init.c
irq-vic-timer.c
platformdata.c
pm-check.c
pm-gpio.c
pm.c ARM: Samsung: Make uart_save static in pm.c file 2012-08-08 09:04:51 +09:00
pwm-clock.c
s3c-dma-ops.c ARM: SAMSUNG: Add config() function in DMA common operations 2012-06-20 08:07:35 +09:00
s5p-clock.c ARM: SAMSUNG: Update default rate for xusbxti clock 2012-07-13 15:34:30 +09:00
s5p-dev-mfc.c
s5p-dev-uart.c
s5p-irq-eint.c
s5p-irq-gpioint.c
s5p-irq-pm.c
s5p-irq.c
s5p-pm.c
s5p-sleep.S
s5p-time.c
setup-mipiphy.c
time.c
wakeup-mask.c