kernel-ark/kernel/time
Li Zhong 6296ace467 nohz: Protect smp_processor_id() in tick_nohz_task_switch()
I saw following error when testing the latest nohz code on
Power:

[   85.295384] BUG: using smp_processor_id() in preemptible [00000000] code: rsyslogd/3493
[   85.295396] caller is .tick_nohz_task_switch+0x1c/0xb8
[   85.295402] Call Trace:
[   85.295408] [c0000001fababab0] [c000000000012dc4] .show_stack+0x110/0x25c (unreliable)
[   85.295420] [c0000001fababba0] [c0000000007c4b54] .dump_stack+0x20/0x30
[   85.295430] [c0000001fababc10] [c00000000044eb74] .debug_smp_processor_id+0xf4/0x124
[   85.295438] [c0000001fababca0] [c0000000000d7594] .tick_nohz_task_switch+0x1c/0xb8
[   85.295447] [c0000001fababd20] [c0000000000b9748] .finish_task_switch+0x13c/0x160
[   85.295455] [c0000001fababdb0] [c0000000000bbe50] .schedule_tail+0x50/0x124
[   85.295463] [c0000001fababe30] [c000000000009dc8] .ret_from_fork+0x4/0x54

The code below moves the test into local_irq_save/restore
section to avoid the above complaint.

Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/1367119558.6391.34.camel@ThinkPad-T5421.cn.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-04-29 13:17:33 +02:00
..
alarmtimer.c alarmtimer: Rename alarmtimer_remove to alarmtimer_dequeue 2012-09-24 12:38:03 -04:00
clockevents.c clockevents: export clockevents_config_and_register for module use 2013-01-14 10:12:37 -08:00
clocksource.c kernel-time: fix s/then/than/ spelling errors 2012-03-23 16:49:21 -07:00
jiffies.c time: Kill xtime_lock, replacing it with jiffies_lock 2012-11-13 14:08:23 -05:00
Kconfig nohz: Select VIRT_CPU_ACCOUNTING_GEN from full dynticks config 2013-04-26 18:56:59 +02:00
Makefile time: remove the timecompare code. 2012-11-01 11:41:35 -04:00
ntp.c Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-02-22 19:25:09 -08:00
posix-clock.c kernel: Fix files explicitly needing EXPORT_SYMBOL infrastructure 2011-10-31 19:30:05 -04:00
tick-broadcast.c nohz: Switch from "extended nohz" to "full nohz" based naming 2013-04-15 19:58:17 +02:00
tick-common.c nohz: Switch from "extended nohz" to "full nohz" based naming 2013-04-15 19:58:17 +02:00
tick-internal.h time: Kill xtime_lock, replacing it with jiffies_lock 2012-11-13 14:08:23 -05:00
tick-oneshot.c clockevents: Make minimum delay adjustments configurable 2011-09-08 11:10:56 +02:00
tick-sched.c nohz: Protect smp_processor_id() in tick_nohz_task_switch() 2013-04-29 13:17:33 +02:00
timeconv.c time: add function to convert between calendar time and broken-down time for universal use 2009-09-24 07:20:56 -07:00
timekeeping.c arm-soc: cleanups 2013-02-21 14:58:40 -08:00
timer_list.c nohz: Rename ts->idle_tick to ts->last_tick 2012-06-11 20:07:17 +02:00
timer_stats.c locking, timer_stats: Annotate table_lock as raw 2011-09-13 11:12:00 +02:00