Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0d2be08893605be00de0f95ee7e4b8917ea1ebc3
Commit:     0d2be08893605be00de0f95ee7e4b8917ea1ebc3
Parent:     931bb68ba6355b7111966c90822ed862c102a9cd
Author:     Heiko Carstens <[EMAIL PROTECTED]>
AuthorDate: Mon Nov 5 11:10:10 2007 +0100
Committer:  Martin Schwidefsky <[EMAIL PROTECTED]>
CommitDate: Mon Nov 5 11:10:16 2007 +0100

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>
---
 arch/s390/kernel/process.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 96492cf..29f7884 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -92,6 +92,7 @@ EXPORT_SYMBOL(unregister_idle_notifier);
 
 void do_monitor_call(struct pt_regs *regs, long interruption_code)
 {
+#ifdef CONFIG_SMP
        struct s390_idle_data *idle;
 
        idle = &__get_cpu_var(s390_idle);
@@ -99,7 +100,7 @@ void do_monitor_call(struct pt_regs *regs, long 
interruption_code)
        idle->idle_time += get_clock() - idle->idle_enter;
        idle->in_idle = 0;
        spin_unlock(&idle->lock);
-
+#endif
        /* disable monitor call class 0 */
        __ctl_clear_bit(8, 15);
 
@@ -114,7 +115,9 @@ extern void s390_handle_mcck(void);
 static void default_idle(void)
 {
        int cpu, rc;
+#ifdef CONFIG_SMP
        struct s390_idle_data *idle;
+#endif
 
        /* CPU is going idle. */
        cpu = smp_processor_id();
@@ -151,13 +154,14 @@ static void default_idle(void)
                s390_handle_mcck();
                return;
        }
-
+#ifdef CONFIG_SMP
        idle = &__get_cpu_var(s390_idle);
        spin_lock(&idle->lock);
        idle->idle_count++;
        idle->in_idle = 1;
        idle->idle_enter = get_clock();
        spin_unlock(&idle->lock);
+#endif
        trace_hardirqs_on();
        /* Wait for external, I/O or machine check interrupt. */
        __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT |
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to