diff options
author | Mike Galbraith <efault@gmx.de> | 2011-12-07 06:48:42 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-02-19 02:42:47 -0500 |
commit | 066361a7c58cb6c8b18c7ce0ee8527bb1ce58460 (patch) | |
tree | f85ceaaf812d371256cb8c063c277c86d5472991 /drivers/idle | |
parent | eece09ec213e93333010bf4c6bb9175b32229c54 (diff) |
intel_idle: Convert i7300_idle_lock to raw_spinlock
24 core Intel box's first exposure to 3.0.12-rt30-rc3 didn't go well.
[ 27.104159] i7300_idle: loaded v1.55
[ 27.104192] BUG: scheduling while atomic: swapper/2/0/0x00000002
[ 27.104309] Pid: 0, comm: swapper/2 Tainted: G N 3.0.12-rt30-rc3-rt #1
[ 27.104317] Call Trace:
[ 27.104338] [<ffffffff810046a5>] dump_trace+0x85/0x2e0
[ 27.104372] [<ffffffff8144eb00>] thread_return+0x12b/0x30b
[ 27.104381] [<ffffffff8144f1b9>] schedule+0x29/0xb0
[ 27.104389] [<ffffffff814506e5>] rt_spin_lock_slowlock+0xc5/0x240
[ 27.104401] [<ffffffffa01f818f>] i7300_idle_notifier+0x3f/0x360 [i7300_idle]
[ 27.104415] [<ffffffff814546c7>] notifier_call_chain+0x37/0x70
[ 27.104426] [<ffffffff81454748>] __atomic_notifier_call_chain+0x48/0x70
[ 27.104439] [<ffffffff81001a39>] cpu_idle+0x89/0xb0
[ 27.104449] bad: scheduling from the idle thread!
This lock is taken from interrupt disabled context in the guts of
idle. Convert it to a raw_spinlock.
Signed-off-by: Mike Galbraith <efault@gmx.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Andy Henroid <andrew.d.henroid@intel.com>
Link: http://lkml.kernel.org/r/1323258522.5057.73.camel@marge.simson.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/idle')
-rw-r--r-- | drivers/idle/i7300_idle.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/idle/i7300_idle.c b/drivers/idle/i7300_idle.c index fa080ebd568f..ffeebc7e9f1c 100644 --- a/drivers/idle/i7300_idle.c +++ b/drivers/idle/i7300_idle.c | |||
@@ -75,7 +75,7 @@ static unsigned long past_skip; | |||
75 | 75 | ||
76 | static struct pci_dev *fbd_dev; | 76 | static struct pci_dev *fbd_dev; |
77 | 77 | ||
78 | static spinlock_t i7300_idle_lock; | 78 | static raw_spinlock_t i7300_idle_lock; |
79 | static int i7300_idle_active; | 79 | static int i7300_idle_active; |
80 | 80 | ||
81 | static u8 i7300_idle_thrtctl_saved; | 81 | static u8 i7300_idle_thrtctl_saved; |
@@ -457,7 +457,7 @@ static int i7300_idle_notifier(struct notifier_block *nb, unsigned long val, | |||
457 | idle_begin_time = ktime_get(); | 457 | idle_begin_time = ktime_get(); |
458 | } | 458 | } |
459 | 459 | ||
460 | spin_lock_irqsave(&i7300_idle_lock, flags); | 460 | raw_spin_lock_irqsave(&i7300_idle_lock, flags); |
461 | if (val == IDLE_START) { | 461 | if (val == IDLE_START) { |
462 | 462 | ||
463 | cpumask_set_cpu(smp_processor_id(), idle_cpumask); | 463 | cpumask_set_cpu(smp_processor_id(), idle_cpumask); |
@@ -506,7 +506,7 @@ static int i7300_idle_notifier(struct notifier_block *nb, unsigned long val, | |||
506 | } | 506 | } |
507 | } | 507 | } |
508 | end: | 508 | end: |
509 | spin_unlock_irqrestore(&i7300_idle_lock, flags); | 509 | raw_spin_unlock_irqrestore(&i7300_idle_lock, flags); |
510 | return 0; | 510 | return 0; |
511 | } | 511 | } |
512 | 512 | ||
@@ -548,7 +548,7 @@ struct debugfs_file_info { | |||
548 | 548 | ||
549 | static int __init i7300_idle_init(void) | 549 | static int __init i7300_idle_init(void) |
550 | { | 550 | { |
551 | spin_lock_init(&i7300_idle_lock); | 551 | raw_spin_lock_init(&i7300_idle_lock); |
552 | total_us = 0; | 552 | total_us = 0; |
553 | 553 | ||
554 | if (i7300_idle_platform_probe(&fbd_dev, &ioat_dev, forceload)) | 554 | if (i7300_idle_platform_probe(&fbd_dev, &ioat_dev, forceload)) |