From: "Sean Nyekjær" <sean.nyekjaer@prevas.dk>
To: <linux-serial@vger.kernel.org>
Cc: Josh Cartwright <joshc@ni.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<linux-rt-users@vger.kernel.org>,
Jon Ringle <jringle@gridpoint.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] tty: serial: sc16is7xx: implemented our own oneshot-like handling
Date: Fri, 11 Mar 2016 12:33:57 +0100 [thread overview]
Message-ID: <56E2AD25.3060706@prevas.dk> (raw)
In-Reply-To: <56E29FBA.1060306@prevas.dk>
On 2016-03-11 11:36, Sean Nyekjær wrote:
>
>
> On 2016-03-11 11:34, Sean Nyekjaer wrote:
Could this work as a description?
The problem here is still the use of IRQF_ONESHOT. The semantics
of IRQF_ONESHOT are only defined w.r.t. the irq core's threaded
interrupt handling.
This implements it's own oneshot-like handling
at the device-level: in the registered irq handler, capture triggered
interrupt state, squelch/mask, and enqueue the kthread_work. In the
tail-end of the kthread_work, re-enable interrupts at the device level.
>> Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
>> ---
>> This patch depends on patch "sc16is7xx: drop bogus use of IRQF_ONESHOT"
>>
>> drivers/tty/serial/sc16is7xx.c | 9 ++++++++-
>> 1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/tty/serial/sc16is7xx.c
>> b/drivers/tty/serial/sc16is7xx.c
>> index 73d46e2..96d1f3e 100644
>> --- a/drivers/tty/serial/sc16is7xx.c
>> +++ b/drivers/tty/serial/sc16is7xx.c
>> @@ -706,13 +706,20 @@ static void sc16is7xx_ist(struct kthread_work *ws)
>> struct sc16is7xx_port *s = to_sc16is7xx_port(ws, irq_work);
>> int i;
>> - for (i = 0; i < s->devtype->nr_uart; ++i)
>> + for (i = 0; i < s->devtype->nr_uart; ++i) {
>> sc16is7xx_port_irq(s, i);
>> + enable_irq(s->p[i].port.irq);
>> + }
>> +
> Ops one-line break to much :-(
> Waiting for other comments before fixing :-)
>
> /Sean
>> }
>> static irqreturn_t sc16is7xx_irq(int irq, void *dev_id)
>> {
>> struct sc16is7xx_port *s = (struct sc16is7xx_port *)dev_id;
>> + int i;
>> +
>> + for (i = 0; i < s->devtype->nr_uart; ++i)
>> + disable_irq_nosync(s->p[i].port.irq);
>> queue_kthread_work(&s->kworker, &s->irq_work);
>
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-serial" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-03-11 11:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-11 10:34 [PATCH] tty: serial: sc16is7xx: implemented our own oneshot-like handling Sean Nyekjaer
2016-03-11 10:36 ` Sean Nyekjær
2016-03-11 11:21 ` Sebastian Andrzej Siewior
2016-03-11 11:29 ` Sean Nyekjær
2016-03-11 11:33 ` Sean Nyekjær [this message]
2016-03-11 16:43 ` Greg Kroah-Hartman
2016-03-13 10:25 ` Thomas Gleixner
2016-03-14 6:21 ` Sean Nyekjær
2016-03-14 8:48 ` Thomas Gleixner
2016-03-14 23:13 ` Jakub Kiciński
-- strict thread matches above, loose matches on Subject: below --
2016-03-13 19:05 Maarten Brock
2016-03-14 6:17 ` Sean Nyekjær
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=56E2AD25.3060706@prevas.dk \
--to=sean.nyekjaer@prevas.dk \
--cc=gregkh@linuxfoundation.org \
--cc=joshc@ni.com \
--cc=jringle@gridpoint.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).