All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Re: [PATCH] make c/s 21089 work again with c/s 21092
@ 2010-04-14  6:41 Jan Beulich
  2010-04-14 13:25 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2010-04-14  6:41 UTC (permalink / raw)
  To: konrad.wilk; +Cc: waldi, xen-devel

>>> Konrad Rzeszutek Wilk  04/13/10 6:12 PM >>>
>On Tue, Apr 13, 2010 at 04:53:35PM +0100, Jan Beulich wrote:
>> I'm talking about PCI serial cards - in the one case I'm working with,
>
>Can't you use polling for it? For example this is what I do for my PCI
>serial card:
>
>com1=115200,8n1,0xd800,0

It works with low rates of output, but in order to not use sync_console and still be able to reliably get through high rate bursts of output, interrupt driven communication seems to be the only reliable way (other than using unreasonably high values with "serial_tx_buffer=").

And also from a more general perspective - why should legacy IRQs work, but not PCI ones?

Jan

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH] make c/s 21089 work again with c/s 21092
@ 2010-04-13 13:36 Jan Beulich
  2010-04-13 15:10 ` Bastian Blank
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2010-04-13 13:36 UTC (permalink / raw)
  To: xen-devel; +Cc: Bastian Blank

[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]

Unfortunately the latter c/s' change to mpparse.c yielded the former
patch non-functional - Xen's serial port IRQ is not in IQR_DISABLED
state, yet must be allowed to get its trigger mode and polarity set
up in order for it to be usable.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- 2010-04-13.orig/xen/arch/x86/mpparse.c	2010-04-13 15:25:22.000000000 +0200
+++ 2010-04-13/xen/arch/x86/mpparse.c	2010-04-13 15:26:38.000000000 +0200
@@ -1103,6 +1103,8 @@ int mp_register_gsi (u32 gsi, int trigge
 	int			ioapic = -1;
 	int			ioapic_pin = 0;
 	int			idx, bit = 0;
+	struct irq_desc *	desc;
+	unsigned long		flags;
 
 	/*
 	 * Mapping between Global System Interrups, which
@@ -1127,8 +1129,13 @@ int mp_register_gsi (u32 gsi, int trigge
 	if (ioapic_renumber_irq)
 		gsi = ioapic_renumber_irq(ioapic, gsi);
 
-	if (!(irq_to_desc(gsi)->status & IRQ_DISABLED))
+	desc = irq_to_desc(gsi);
+	spin_lock_irqsave(&desc->lock, flags);
+	if (!(desc->status & IRQ_DISABLED) && desc->handler != &no_irq_type) {
+		spin_unlock_irqrestore(&desc->lock, flags);
 		return -EEXIST;
+	}
+	spin_unlock_irqrestore(&desc->lock, flags);
 
 	/* 
 	 * Avoid pin reprogramming.  PRTs typically include entries  




[-- Attachment #2: x86-startup-irq-from-setup-gsi-fix2.patch --]
[-- Type: text/plain, Size: 1229 bytes --]

Unfortunately the latter c/s' change to mpparse.c yielded the former
patch non-functional - Xen's serial port IRQ is not in IQR_DISABLED
state, yet must be allowed to get its trigger mode and polarity set
up in order for it to be usable.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- 2010-04-13.orig/xen/arch/x86/mpparse.c	2010-04-13 15:25:22.000000000 +0200
+++ 2010-04-13/xen/arch/x86/mpparse.c	2010-04-13 15:26:38.000000000 +0200
@@ -1103,6 +1103,8 @@ int mp_register_gsi (u32 gsi, int trigge
 	int			ioapic = -1;
 	int			ioapic_pin = 0;
 	int			idx, bit = 0;
+	struct irq_desc *	desc;
+	unsigned long		flags;
 
 	/*
 	 * Mapping between Global System Interrups, which
@@ -1127,8 +1129,13 @@ int mp_register_gsi (u32 gsi, int trigge
 	if (ioapic_renumber_irq)
 		gsi = ioapic_renumber_irq(ioapic, gsi);
 
-	if (!(irq_to_desc(gsi)->status & IRQ_DISABLED))
+	desc = irq_to_desc(gsi);
+	spin_lock_irqsave(&desc->lock, flags);
+	if (!(desc->status & IRQ_DISABLED) && desc->handler != &no_irq_type) {
+		spin_unlock_irqrestore(&desc->lock, flags);
 		return -EEXIST;
+	}
+	spin_unlock_irqrestore(&desc->lock, flags);
 
 	/* 
 	 * Avoid pin reprogramming.  PRTs typically include entries  

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-14 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-14  6:41 Re: [PATCH] make c/s 21089 work again with c/s 21092 Jan Beulich
2010-04-14 13:25 ` Konrad Rzeszutek Wilk
  -- strict thread matches above, loose matches on Subject: below --
2010-04-13 13:36 Jan Beulich
2010-04-13 15:10 ` Bastian Blank
2010-04-13 15:53   ` Jan Beulich
2010-04-13 16:11     ` Konrad Rzeszutek Wilk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.