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-changelog

[Xen-changelog] [xen-unstable] x86: com devices's irqaction shouldn't fr

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: com devices's irqaction shouldn't free.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 02 Sep 2009 23:40:14 -0700
Delivery-date: Wed, 02 Sep 2009 23:41:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1251959847 -3600
# Node ID 74bbd1eb759885aaf8e76b27a49a9115a9d35f69
# Parent  cfcfc0856b2f3fd57c3b5ff3e4e27106b2c72888
x86: com devices's irqaction shouldn't free.

Since irqs of serial devices are initialized in early Xen and
its irqaction is not allocated from heap, so doesn't need free
in release irq logic.

Signed-off-by: Xiantao Zhang <xiantao.zhang@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/irq.c    |    3 ++-
 xen/include/xen/irq.h |    8 +++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff -r cfcfc0856b2f -r 74bbd1eb7598 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Thu Sep 03 07:29:29 2009 +0100
+++ b/xen/arch/x86/irq.c        Thu Sep 03 07:37:27 2009 +0100
@@ -537,6 +537,7 @@ int request_irq(unsigned int irq,
     action->handler = handler;
     action->name = devname;
     action->dev_id = dev_id;
+    action->free_on_release = 1;
 
     retval = setup_irq(irq, action);
     if (retval)
@@ -564,7 +565,7 @@ void release_irq(unsigned int irq)
     /* Wait to make sure it's not being used on another CPU */
     do { smp_mb(); } while ( desc->status & IRQ_INPROGRESS );
 
-    if (action)
+    if (action && action->free_on_release)
         xfree(action);
 }
 
diff -r cfcfc0856b2f -r 74bbd1eb7598 xen/include/xen/irq.h
--- a/xen/include/xen/irq.h     Thu Sep 03 07:29:29 2009 +0100
+++ b/xen/include/xen/irq.h     Thu Sep 03 07:37:27 2009 +0100
@@ -7,11 +7,11 @@
 #include <asm/regs.h>
 #include <asm/hardirq.h>
 
-struct irqaction
-{
+struct irqaction {
     void (*handler)(int, void *, struct cpu_user_regs *);
     const char *name;
     void *dev_id;
+    bool_t free_on_release;
 };
 
 /*
@@ -63,10 +63,8 @@ struct irq_cfg;
  * This is the "IRQ descriptor", which contains various information
  * about the irq, including what kind of hardware handling it has,
  * whether it is disabled etc etc.
- *
- * Pad this out to 32 bytes for cache and indexing reasons.
  */
-typedef struct irq_desc{
+typedef struct irq_desc {
     unsigned int status;               /* IRQ status */
     hw_irq_controller *handler;
     struct msi_desc   *msi_desc;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: com devices's irqaction shouldn't free., Xen patchbot-unstable <=