aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2007-11-05 05:10:10 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-11-05 05:10:16 -0500
commit0d2be08893605be00de0f95ee7e4b8917ea1ebc3 (patch)
treeb9d9b4d0ef7079d5cea961dccb7c9e828aca275c /arch
parent931bb68ba6355b7111966c90822ed862c102a9cd (diff)
[S390] Fix compile on !CONFIG_SMP.
Commit fae8b22d3e3e3a3d317a7746493997af02a3f35c "[S390] Add per-cpu idle time / idle count sysfs attributes" causes a link error on !CONFIG_SMP. Fix this by adding some #ifdef's. Real fix would be to cleanup the code since we don't register a cpu on !CONFIG_SMP. But that would be quite a big patch. For the time being this is good enough. arch/s390/kernel/built-in.o: In function `do_monitor_call': (.text+0x50d4): undefined reference to `per_cpu__s390_idle' arch/s390/kernel/built-in.o: In function `cpu_idle': (.text+0x518c): undefined reference to `per_cpu__s390_idle' make: *** [.tmp_vmlinux1] Error 1 Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/kernel/process.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 96492cf2d491..29f7884b4ffa 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -92,6 +92,7 @@ EXPORT_SYMBOL(unregister_idle_notifier);
92 92
93void do_monitor_call(struct pt_regs *regs, long interruption_code) 93void do_monitor_call(struct pt_regs *regs, long interruption_code)
94{ 94{
95#ifdef CONFIG_SMP
95 struct s390_idle_data *idle; 96 struct s390_idle_data *idle;
96 97
97 idle = &__get_cpu_var(s390_idle); 98 idle = &__get_cpu_var(s390_idle);
@@ -99,7 +100,7 @@ void do_monitor_call(struct pt_regs *regs, long interruption_code)
99 idle->idle_time += get_clock() - idle->idle_enter; 100 idle->idle_time += get_clock() - idle->idle_enter;
100 idle->in_idle = 0; 101 idle->in_idle = 0;
101 spin_unlock(&idle->lock); 102 spin_unlock(&idle->lock);
102 103#endif
103 /* disable monitor call class 0 */ 104 /* disable monitor call class 0 */
104 __ctl_clear_bit(8, 15); 105 __ctl_clear_bit(8, 15);
105 106
@@ -114,7 +115,9 @@ extern void s390_handle_mcck(void);
114static void default_idle(void) 115static void default_idle(void)
115{ 116{
116 int cpu, rc; 117 int cpu, rc;
118#ifdef CONFIG_SMP
117 struct s390_idle_data *idle; 119 struct s390_idle_data *idle;
120#endif
118 121
119 /* CPU is going idle. */ 122 /* CPU is going idle. */
120 cpu = smp_processor_id(); 123 cpu = smp_processor_id();
@@ -151,13 +154,14 @@ static void default_idle(void)
151 s390_handle_mcck(); 154 s390_handle_mcck();
152 return; 155 return;
153 } 156 }
154 157#ifdef CONFIG_SMP
155 idle = &__get_cpu_var(s390_idle); 158 idle = &__get_cpu_var(s390_idle);
156 spin_lock(&idle->lock); 159 spin_lock(&idle->lock);
157 idle->idle_count++; 160 idle->idle_count++;
158 idle->in_idle = 1; 161 idle->in_idle = 1;
159 idle->idle_enter = get_clock(); 162 idle->idle_enter = get_clock();
160 spin_unlock(&idle->lock); 163 spin_unlock(&idle->lock);
164#endif
161 trace_hardirqs_on(); 165 trace_hardirqs_on();
162 /* Wait for external, I/O or machine check interrupt. */ 166 /* Wait for external, I/O or machine check interrupt. */
163 __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT | 167 __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT |