From: Grant Likely <grant.likely@secretlab.ca>
To: Michael Ellerman <michael@ellerman.id.au>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 2/6] powerpc/pseries: Use irq_has_action() in eeh_disable_irq()
Date: Wed, 14 Oct 2009 12:33:23 -0600 [thread overview]
Message-ID: <fa686aa40910141133m29117b3cm6047d666c66a5d71@mail.gmail.com> (raw)
In-Reply-To: <1dc0d81f3202c61cbd1bb1508cb3a2ed04dc036a.1255499081.git.michael@ellerman.id.au>
On Tue, Oct 13, 2009 at 11:44 PM, Michael Ellerman
<michael@ellerman.id.au> wrote:
> Rather than open-coding our own check, use irq_has_action()
> to check if an irq has an action - ie. is "in use".
>
> irq_has_action() doesn't take the descriptor lock, but it
> shouldn't matter - we're just using it as an indicator
> that the irq is in use. disable_irq_nosync() will take
> the descriptor lock before doing anything also.
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Looks good to me
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> =A0arch/powerpc/platforms/pseries/eeh_driver.c | =A0 18 +----------------=
-
> =A01 files changed, 1 insertions(+), 17 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/p=
latforms/pseries/eeh_driver.c
> index 0e8db67..ef8e454 100644
> --- a/arch/powerpc/platforms/pseries/eeh_driver.c
> +++ b/arch/powerpc/platforms/pseries/eeh_driver.c
> @@ -63,22 +63,6 @@ static void print_device_node_tree(struct pci_dn *pdn,=
int dent)
> =A0}
> =A0#endif
>
> -/**
> - * irq_in_use - return true if this irq is being used
> - */
> -static int irq_in_use(unsigned int irq)
> -{
> - =A0 =A0 =A0 int rc =3D 0;
> - =A0 =A0 =A0 unsigned long flags;
> - =A0 struct irq_desc *desc =3D irq_desc + irq;
> -
> - =A0 =A0 =A0 spin_lock_irqsave(&desc->lock, flags);
> - =A0 =A0 =A0 if (desc->action)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 rc =3D 1;
> - =A0 =A0 =A0 spin_unlock_irqrestore(&desc->lock, flags);
> - =A0 =A0 =A0 return rc;
> -}
> -
> =A0/**
> =A0* eeh_disable_irq - disable interrupt for the recovering device
> =A0*/
> @@ -93,7 +77,7 @@ static void eeh_disable_irq(struct pci_dev *dev)
> =A0 =A0 =A0 =A0if (dev->msi_enabled || dev->msix_enabled)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return;
>
> - =A0 =A0 =A0 if (!irq_in_use(dev->irq))
> + =A0 =A0 =A0 if (!irq_has_action(dev->irq))
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return;
>
> =A0 =A0 =A0 =A0PCI_DN(dn)->eeh_mode |=3D EEH_MODE_IRQ_DISABLED;
> --
> 1.6.2.1
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2009-10-14 18:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-14 5:44 [PATCH 1/6] powerpc: Make NR_IRQS a CONFIG option Michael Ellerman
2009-10-14 5:44 ` [PATCH 2/6] powerpc/pseries: Use irq_has_action() in eeh_disable_irq() Michael Ellerman
2009-10-14 18:33 ` Grant Likely [this message]
2009-10-14 5:44 ` [PATCH 3/6] powerpc: Remove get_irq_desc() Michael Ellerman
2009-10-14 19:02 ` Grant Likely
2009-10-14 5:44 ` [PATCH 4/6] powerpc: Make virq_debug_show() cope with sparse irq_descs Michael Ellerman
2009-10-14 18:34 ` Grant Likely
2009-10-14 5:45 ` [PATCH 5/6] powerpc: Rearrange and fix show_interrupts() for " Michael Ellerman
2009-10-14 18:37 ` Grant Likely
2009-10-14 5:45 ` [PATCH 6/6] powerpc: Enable sparse irq_descs on powerpc Michael Ellerman
2009-10-14 18:44 ` Grant Likely
2009-10-14 23:51 ` Michael Ellerman
2009-10-15 0:33 ` Grant Likely
2009-10-14 18:59 ` [PATCH 1/6] powerpc: Make NR_IRQS a CONFIG option Grant Likely
2009-10-14 23:47 ` Michael Ellerman
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=fa686aa40910141133m29117b3cm6047d666c66a5d71@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=linuxppc-dev@ozlabs.org \
--cc=michael@ellerman.id.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;
as well as URLs for NNTP newsgroup(s).