[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1402241232030.21251@ionos.tec.linutronix.de>
Date: Mon, 24 Feb 2014 12:32:46 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Gavin Shan <shangw@...ux.vnet.ibm.com>
cc: LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <peterz@...radead.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
ppc <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [patch 03/26] powerpc: eeh: Kill another abuse of irq_desc
On Mon, 24 Feb 2014, Gavin Shan wrote:
> On Sun, Feb 23, 2014 at 09:40:09PM -0000, Thomas Gleixner wrote:
> >commit 91150af3a (powerpc/eeh: Fix unbalanced enable for IRQ) is
> >another brilliant example of trainwreck engineering.
> >
> >The patch "fixes" the issue of an unbalanced call to irq_enable()
> >which causes a prominent warning by checking the disabled state of the
> >interrupt line and call conditionally into the core code.
> >
> >This is wrong in two aspects:
> >
> >1) The warning is there to tell users, that they need to fix their
> > asymetric enable/disable patterns by finding the root cause and
> > solving it there.
> >
> > It's definitely not meant to work around it by conditionally
> > calling into the core code depending on the random state of the irq
> > line.
> >
> > Asymetric irq_disable/enable calls are a clear sign of wrong usage
> > of the interfaces which have to be cured at the root and not by
> > somehow hacking around it.
> >
> >2) The abuse of core internal data structure instead of using the
> > proper interfaces for retrieving the information for the 'hack
> > around'
> >
> > irq_desc is core internal and it's clear enough stated.
> >
> >Replace at least the irq_desc abuse with the proper functions and add
> >a big fat comment why this is absurd and completely wrong.
> >
>
> Thanks for pointing it out. I think we might have this patch for now
> and I'll look into individual drivers to fix the unbalanced function
> calls later one by one.
Fine with me. You wont escape my scan scripts :)
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists