diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-07-14 03:59:06 -0400 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-07-14 04:02:13 -0400 |
commit | 773922e1dab93a62e60cfb34afadb0f66d5f12e9 (patch) | |
tree | f13ea310c22080a90dcbc9580b678cbd91c44838 /arch/s390/kernel/process.c | |
parent | 9d92a7e1b0d095c8be96ce5e592c6c5541684631 (diff) |
[S390] idle: remove idle notifier chain.
The idle notifier chain consists of at most one element. So there's
no point in having a notifier chain. Remove it and directly call the
function.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/process.c')
-rw-r--r-- | arch/s390/kernel/process.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 7920861109d2..85defd01d293 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -75,46 +75,19 @@ unsigned long thread_saved_pc(struct task_struct *tsk) | |||
75 | return sf->gprs[8]; | 75 | return sf->gprs[8]; |
76 | } | 76 | } |
77 | 77 | ||
78 | /* | ||
79 | * Need to know about CPUs going idle? | ||
80 | */ | ||
81 | static ATOMIC_NOTIFIER_HEAD(idle_chain); | ||
82 | DEFINE_PER_CPU(struct s390_idle_data, s390_idle); | 78 | DEFINE_PER_CPU(struct s390_idle_data, s390_idle); |
83 | 79 | ||
84 | int register_idle_notifier(struct notifier_block *nb) | ||
85 | { | ||
86 | return atomic_notifier_chain_register(&idle_chain, nb); | ||
87 | } | ||
88 | EXPORT_SYMBOL(register_idle_notifier); | ||
89 | |||
90 | int unregister_idle_notifier(struct notifier_block *nb) | ||
91 | { | ||
92 | return atomic_notifier_chain_unregister(&idle_chain, nb); | ||
93 | } | ||
94 | EXPORT_SYMBOL(unregister_idle_notifier); | ||
95 | |||
96 | static int s390_idle_enter(void) | 80 | static int s390_idle_enter(void) |
97 | { | 81 | { |
98 | struct s390_idle_data *idle; | 82 | struct s390_idle_data *idle; |
99 | int nr_calls = 0; | ||
100 | void *hcpu; | ||
101 | int rc; | ||
102 | 83 | ||
103 | hcpu = (void *)(long)smp_processor_id(); | ||
104 | rc = __atomic_notifier_call_chain(&idle_chain, S390_CPU_IDLE, hcpu, -1, | ||
105 | &nr_calls); | ||
106 | if (rc == NOTIFY_BAD) { | ||
107 | nr_calls--; | ||
108 | __atomic_notifier_call_chain(&idle_chain, S390_CPU_NOT_IDLE, | ||
109 | hcpu, nr_calls, NULL); | ||
110 | return rc; | ||
111 | } | ||
112 | idle = &__get_cpu_var(s390_idle); | 84 | idle = &__get_cpu_var(s390_idle); |
113 | spin_lock(&idle->lock); | 85 | spin_lock(&idle->lock); |
114 | idle->idle_count++; | 86 | idle->idle_count++; |
115 | idle->in_idle = 1; | 87 | idle->in_idle = 1; |
116 | idle->idle_enter = get_clock(); | 88 | idle->idle_enter = get_clock(); |
117 | spin_unlock(&idle->lock); | 89 | spin_unlock(&idle->lock); |
90 | vtime_stop_cpu_timer(); | ||
118 | return NOTIFY_OK; | 91 | return NOTIFY_OK; |
119 | } | 92 | } |
120 | 93 | ||
@@ -122,13 +95,12 @@ void s390_idle_leave(void) | |||
122 | { | 95 | { |
123 | struct s390_idle_data *idle; | 96 | struct s390_idle_data *idle; |
124 | 97 | ||
98 | vtime_start_cpu_timer(); | ||
125 | idle = &__get_cpu_var(s390_idle); | 99 | idle = &__get_cpu_var(s390_idle); |
126 | spin_lock(&idle->lock); | 100 | spin_lock(&idle->lock); |
127 | idle->idle_time += get_clock() - idle->idle_enter; | 101 | idle->idle_time += get_clock() - idle->idle_enter; |
128 | idle->in_idle = 0; | 102 | idle->in_idle = 0; |
129 | spin_unlock(&idle->lock); | 103 | spin_unlock(&idle->lock); |
130 | atomic_notifier_call_chain(&idle_chain, S390_CPU_NOT_IDLE, | ||
131 | (void *)(long) smp_processor_id()); | ||
132 | } | 104 | } |
133 | 105 | ||
134 | extern void s390_handle_mcck(void); | 106 | extern void s390_handle_mcck(void); |