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-ia64-devel] Re: [PATCH] xen: make events.c compile for ia64.

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-ia64-devel] Re: [PATCH] xen: make events.c compile for ia64.
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Fri, 10 Oct 2008 15:50:49 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 09 Oct 2008 23:50:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <48EB7BF4.9060604@xxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20081007022519.GD31420%yamahata@xxxxxxxxxxxxx> <48EB7BF4.9060604@xxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
On Tue, Oct 07, 2008 at 08:10:44AM -0700, Jeremy Fitzhardinge wrote:
> >-static void xen_do_irq(unsigned irq, struct pt_regs *regs)
> >  
> 
> I was hoping this would be generic enough to work on ia64, if you define 
> an appropriate handle_irq() (and exit_idle, I guess).  Is there 
> something else you need to do here?

By reviewing my patches, I found that the logic itself is generic enough.
But can we prefix exit_idle() and handle_irq() with xen_?
They are too generic to be defined in arch xen code.


xen: make events.c portable.

- prefix xen_ to exit_idle(), handle_irq().
  They are too generic name to be defined in arch xen specific code.
- move #include <asm/idle.h> from events.c to include/asm-x86/xen/event.h
  only x86 has it.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r 9e8842013b3b drivers/xen/events.c
--- a/drivers/xen/events.c      Mon Oct 06 16:11:39 2008 +0900
+++ b/drivers/xen/events.c      Fri Oct 10 15:40:44 2008 +0900
@@ -29,7 +29,6 @@
 
 #include <asm/ptrace.h>
 #include <asm/irq.h>
-#include <asm/idle.h>
 #include <asm/sync_bitops.h>
 #include <asm/xen/hypercall.h>
 #include <asm/xen/hypervisor.h>
@@ -830,11 +829,11 @@
                                irq, info->u.pirq.gsi, info->u.pirq.vector);
        }
 
-       exit_idle();
+       xen_exit_idle();
        irq_enter();
 
        //printk("cpu %d handling irq %d\n", smp_processor_id(), info->irq);
-       handle_irq(irq, regs);
+       xen_handle_irq(irq, regs);
 
        irq_exit();
 
diff -r 9e8842013b3b include/asm-x86/xen/events.h
--- a/include/asm-x86/xen/events.h      Mon Oct 06 16:11:39 2008 +0900
+++ b/include/asm-x86/xen/events.h      Fri Oct 10 15:40:44 2008 +0900
@@ -1,5 +1,7 @@
 #ifndef ASM_X86__XEN__EVENTS_H
 #define ASM_X86__XEN__EVENTS_H
+
+#include <asm/idle.h>
 
 enum ipi_vector {
        XEN_RESCHEDULE_VECTOR,
@@ -15,4 +17,14 @@
        return raw_irqs_disabled_flags(regs->flags);
 }
 
+static inline void xen_exit_idle(void)
+{
+       exit_idle();
+}
+
+static inline void xen_handle_irq(unsigned irq, struct pt_regs *regs)
+{
+       handle_irq(irq, regs);
+}
+
 #endif /* ASM_X86__XEN__EVENTS_H */



-- 
yamahata

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

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