summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/process.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-19 08:04:23 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-19 08:04:23 -0800
commitaa3f98037ce3bcf850bb41f7530754d27481a792 (patch)
treeaa539f1e52ea35f7c9f7a3e6e2171d72863e51d4 /arch/s390/kernel/process.c
parentf6c427663a158056cd8ca71c01f30653e4b313f7 (diff)
parente5fa443ea05f71b5253818890c6d32174cbab36f (diff)
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: [S390] qdio: FCP/SCSI write I/O stagnates on LPAR [S390] Fix futex_atomic_cmpxchg_std inline assembly. [S390] dcss: Fix Unlikely(x) != y [S390] sclp: clean up send/receive naming scheme [S390] etr: fix compile error on !SMP [S390] qdio: fix qdio_activate timeout handling. [S390] Initialize per cpu lowcores on cpu hotplug. [S390] find bit corner case. [S390] dasd: fix locking in __dasd_device_process_final_queue [S390] Make sure enabled wait psw is loaded in default_idle. [S390] Let NR_CPUS default to 32/64 on s390/s390x. [S390] cio: Do timed recovery on workqueue. [S390] cio: Remember to initialize recovery_lock.
Diffstat (limited to 'arch/s390/kernel/process.c')
-rw-r--r--arch/s390/kernel/process.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index a6a4729e0e9..1c59ec161cf 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -114,24 +114,27 @@ extern void s390_handle_mcck(void);
static void default_idle(void)
{
int cpu, rc;
+ int nr_calls = 0;
+ void *hcpu;
#ifdef CONFIG_SMP
struct s390_idle_data *idle;
#endif
/* CPU is going idle. */
cpu = smp_processor_id();
-
+ hcpu = (void *)(long)cpu;
local_irq_disable();
if (need_resched()) {
local_irq_enable();
return;
}
- rc = atomic_notifier_call_chain(&idle_chain,
- S390_CPU_IDLE, (void *)(long) cpu);
- if (rc != NOTIFY_OK && rc != NOTIFY_DONE)
- BUG();
- if (rc != NOTIFY_OK) {
+ rc = __atomic_notifier_call_chain(&idle_chain, S390_CPU_IDLE, hcpu, -1,
+ &nr_calls);
+ if (rc == NOTIFY_BAD) {
+ nr_calls--;
+ __atomic_notifier_call_chain(&idle_chain, S390_CPU_NOT_IDLE,
+ hcpu, nr_calls, NULL);
local_irq_enable();
return;
}