WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 11 of 38] x86: define no-op exit_idle() on 32-bit

To: Ingo Molnar <mingo@xxxxxxx>
Subject: [Xen-devel] [PATCH 11 of 38] x86: define no-op exit_idle() on 32-bit
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Thu, 13 Nov 2008 11:10:09 -0800
Cc: the arch/x86 maintainers <x86@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Thu, 13 Nov 2008 11:41:56 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1226603398@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
exit_idle() is only used on 64-bit, but define a noop version on
32-bit to allow subsequent unification.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
---
 arch/x86/include/asm/idle.h |   10 ++++++++++
 arch/x86/kernel/apic.c      |    7 +------
 arch/x86/kernel/io_apic.c   |    2 --
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/arch/x86/include/asm/idle.h b/arch/x86/include/asm/idle.h
--- a/arch/x86/include/asm/idle.h
+++ b/arch/x86/include/asm/idle.h
@@ -8,8 +8,18 @@
 void idle_notifier_register(struct notifier_block *n);
 void idle_notifier_unregister(struct notifier_block *n);
 
+#ifdef CONFIG_X86_64
 void enter_idle(void);
 void exit_idle(void);
+#else
+static inline void enter_idle(void)
+{
+}
+
+static inline void exit_idle(void)
+{
+}
+#endif /* CONFIG_X86_64 */
 
 void c1e_remove_cpu(int cpu);
 
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -808,9 +808,8 @@
         * Besides, if we don't timer interrupts ignore the global
         * interrupt lock, which is the WrongThing (tm) to do.
         */
-#ifdef CONFIG_X86_64
        exit_idle();
-#endif
+
        irq_enter();
        local_apic_timer_interrupt();
        irq_exit();
@@ -1668,9 +1667,7 @@
 {
        u32 v;
 
-#ifdef CONFIG_X86_64
        exit_idle();
-#endif
        irq_enter();
        /*
         * Check if this really is a spurious interrupt and ACK it
@@ -1699,9 +1696,7 @@
 {
        u32 v, v1;
 
-#ifdef CONFIG_X86_64
        exit_idle();
-#endif
        irq_enter();
        /* First tickle the hardware, only then report what went on. -- REW */
        v = apic_read(APIC_ESR);
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -2242,9 +2242,7 @@
 {
        unsigned vector, me;
        ack_APIC_irq();
-#ifdef CONFIG_X86_64
        exit_idle();
-#endif
        irq_enter();
 
        me = smp_processor_id();



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>