From: Ian Campbell <Ian.Campbell@citrix.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: linux-kernel@vger.kernel.org, Milton Miller <miltonm@bga.com>,
Hendrik Brueckner <brueckner@linux.vnet.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: [PATCH] HVC: do not request the irq twice.
Date: Fri, 23 Jan 2009 09:45:23 +0000 [thread overview]
Message-ID: <1232703923.22248.230.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <200901222009.43342.borntraeger@de.ibm.com>
On Thu, 2009-01-22 at 20:09 +0100, Christian Borntraeger wrote:
> Am Thursday 22 January 2009 18:56:08 schrieb Ian Campbell:
> > --- a/drivers/char/hvc_irq.c
> > +++ b/drivers/char/hvc_irq.c
> > @@ -28,6 +28,10 @@ int notifier_add_irq(struct hvc_struct *hp, int irq)
> > hp->irq_requested = 0;
> > return 0;
> > }
> > +
> > + if (hp->irq_requested)
> > + return 0;
> > +
> > rc = request_irq(irq, hvc_handle_interrupt, IRQF_DISABLED,
> > "hvc_console", hp);
> > if (!rc)
>
> Unfortunately I have no system with an irq based hvc console - I cannot test
> this patch. Anyway, the patch looks sane:
>
> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
>
> If this really fixes a problem, I am asking myself, if notifier_del can be
> called several times as well. If yes, it might be better to call free_irq at
> the last notifier_del - which means we need proper refcounting. Otherwise the
> console switches into polling mode....
Hmm, interesting question. It looks like the count field in struct
hvc_struct is being used to count opens and closes which should
reference count the IRQ usage too.
Oh, I see, hvc_hangup resets count but the Xen dom0 hv_ops was missing
the hangup hook to release the IRQ -- I'll fix this.
I think this patch can be ignored, real bug is on the Xen side.
Ian.
prev parent reply other threads:[~2009-01-23 9:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-22 17:56 Ian Campbell
2009-01-22 19:09 ` Christian Borntraeger
2009-01-23 9:45 ` Ian Campbell [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=1232703923.22248.230.camel@zakaz.uk.xensource.com \
--to=ian.campbell@citrix.com \
--cc=benh@kernel.crashing.org \
--cc=borntraeger@de.ibm.com \
--cc=brueckner@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miltonm@bga.com \
--cc=rusty@rustcorp.com.au \
/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
all inboxes | Powered by JetHome®