From: Tomasz Wroblewski <tomasz.wroblewski@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, keir@xen.org
Subject: Re: [PATCH] V2 pci uart - better cope with UART being temporarily unavailable
Date: Tue, 27 Aug 2013 16:02:43 +0200 [thread overview]
Message-ID: <521CB183.8030307@citrix.com> (raw)
In-Reply-To: <521CCCF402000078000EECD0@nat28.tlf.novell.com>
On 08/27/2013 03:59 PM, Jan Beulich wrote:
>>>> On 27.08.13 at 15:44, Tomasz Wroblewski<tomasz.wroblewski@citrix.com> wrote:
>> On 08/27/2013 02:26 PM, Jan Beulich wrote:
>>>>>> On 27.08.13 at 12:15, Tomasz Wroblewski<tomasz.wroblewski@citrix.com> wrote:
>>>> @@ -102,12 +107,17 @@ static void __ns16550_poll(struct cpu_user_regs *regs)
>>>> if ( uart->intr_works )
>>>> return; /* Interrupts work - no more polling */
>>>>
>>>> - while ( ns_read_reg(uart, UART_LSR)& UART_LSR_DR )
>>>> - serial_rx_interrupt(port, regs);
>>>> + while ( ns_read_reg(uart, UART_LSR)& UART_LSR_DR )
>>>> + {
>>>> + serial_rx_interrupt(port, regs);
>>>> + if ( ns16550_ioport_invalid(uart) )
>>>> + goto out;
>>>> + }
>>>>
>>>> if ( ns_read_reg(uart, UART_LSR)& UART_LSR_THRE )
>>>> serial_tx_interrupt(port, regs);
>>>>
>>>> +out:
>>> So serial_rx_interrupt() gets run once in that case, but
>>> serial_tx_interrupt() not at all? That not only inconsistent, I also
>>> can't see why anything would need to be done here at all in this
>>> case. Plus doing the check before the loop would shrink patch
>>> size.
>> So I presume it is impossible for dom0 code to run on another cpu whilst
>> xen is executing the poll routine, I was not sure at all about this?
>> Would like to avoid the possibility of dom0 disabling device whilst this
>> loop is running.
> Of course can a Dom0 vCPU run on another pCPU.
>
> And yes, I hence appreciate reducing the risk window. But then
> please do the check before calling serial_rx_interrupt().
>
Ah sure, will repost v4 soon then
prev parent reply other threads:[~2013-08-27 14:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-27 10:15 [PATCH] V2 pci uart - better cope with UART being temporarily unavailable Tomasz Wroblewski
2013-08-27 12:26 ` Jan Beulich
2013-08-27 13:36 ` Tomasz Wroblewski
2013-08-27 13:58 ` Jan Beulich
2013-08-27 13:44 ` Tomasz Wroblewski
2013-08-27 13:59 ` Jan Beulich
2013-08-27 14:02 ` Tomasz Wroblewski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=521CB183.8030307@citrix.com \
--to=tomasz.wroblewski@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.