|
|
|
|
|
|
|
|
|
|
xen-devel
RE: [Xen-devel] [PATCH] Don't free irqaction for com irq when release ir
Unless I missed something, it looks like Keir's modified
version of this patch (20153) neglects to set the
free_on_release=0 for the com irqs.
> -----Original Message-----
> From: Zhang, Xiantao [mailto:xiantao.zhang@xxxxxxxxx]
> Sent: Wednesday, September 02, 2009 10:15 PM
> To: Xen; Keir Fraser
> Subject: [Xen-devel] [PATCH] Don't free irqaction for com irq when
> release irq.
>
>
> # HG changeset patch
> # User root@xxxxxxxxxxxxxxxxxxxxx
> # Date 1251916103 14400
> # Node ID 49e847aed58dde35f8a0f909999d01d97be6f531
> # Parent 3b7cbf32fee909d860daacf70b8c3b97eaf036b5
> 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>
>
> diff -r 3b7cbf32fee9 -r 49e847aed58d xen/arch/x86/irq.c
> --- a/xen/arch/x86/irq.c Mon Aug 31 10:54:32 2009 +0100
> +++ b/xen/arch/x86/irq.c Wed Sep 02 14:28:23 2009 -0400
> @@ -564,7 +564,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 ( !COM_IRQ(irq) && action )
> xfree(action);
> }
>
> diff -r 3b7cbf32fee9 -r 49e847aed58d xen/arch/x86/setup.c
> --- a/xen/arch/x86/setup.c Mon Aug 31 10:54:32 2009 +0100
> +++ b/xen/arch/x86/setup.c Wed Sep 02 14:28:23 2009 -0400
> @@ -464,10 +464,10 @@ void __init __start_xen(unsigned long mb
>
> /* We initialise the serial devices very early so we can
> get debugging. */
> ns16550.io_base = 0x3f8;
> - ns16550.irq = 4;
> + ns16550.irq = COM1_IRQ;
> ns16550_init(0, &ns16550);
> ns16550.io_base = 0x2f8;
> - ns16550.irq = 3;
> + ns16550.irq = COM2_IRQ;
> ns16550_init(1, &ns16550);
> console_init_preirq();
>
> diff -r 3b7cbf32fee9 -r 49e847aed58d xen/include/asm-x86/irq.h
> --- a/xen/include/asm-x86/irq.h Mon Aug 31 10:54:32 2009 +0100
> +++ b/xen/include/asm-x86/irq.h Wed Sep 02 14:28:23 2009 -0400
> @@ -26,6 +26,11 @@
> #define MAX_NR_IRQS (2 * MAX_GSI_IRQS)
>
> #define irq_cfg(irq) &irq_cfg[(irq)]
> +
> +#define COM1_IRQ 4
> +#define COM2_IRQ 3
> +
> +#define COM_IRQ(irq) ((irq) == COM1_IRQ || (irq) == COM2_IRQ)
>
> struct irq_cfg {
> int vector;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|