[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1200956801.6807.16.camel@pasglop>
Date: Tue, 22 Jan 2008 10:06:41 +1100
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Jon Smirl <jonsmirl@...il.com>
Cc: Jean Delvare <khali@...ux-fr.org>, i2c@...sensors.org,
linuxppc-dev@...abs.org, linux-kernel@...r.kernel.org
Subject: Re: [i2c] [PATCH 19 3/5] Clean up error returns
On Sun, 2008-01-20 at 10:18 -0500, Jon Smirl wrote:
> > So it seems to me like the polling mode code is never actually used?
> > Unless some platforms include an "empty" IRQ in their device
> > definition. Which indeed seems to be the case... but then they set
> the
> > IRQ to 0, NOT to NO_IRQ, so I'm wondering if the change you propose
> is
> > really correct.
>
> All of this is very confusing to me, There are physical IRQs and
> virtual IRQs. Apparently zero is a legal physical IRQ but it is not a
> legal virtual IRQ. We only get virtual IRQs in this code. We need to
> get BenH to give us the right answer on these two cases.
Testing against NO_IRQ for a linux IRQ number should always be correct.
Physical IRQ numbers are remapped and shouldn't be visible to drivers,
NO_IRQ is a value that never exist for a valid logical interrupt number,
that is 0 for arch/powerpc and -1 for arch/ppc.
Ben.
--
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