From: Stefan Roese <hidden> Date: 2006-11-20 11:04:51
This patch fixes a problem seen on multiple 4xx platforms, where
the UART0 interrupt number is 0. The macro "is_real_interrupt" lead
on those systems to not use an real interrupt but the timer based
implementation.
This problem was detected and fixed by
Charles Gales [off-list ref] and John Baxter [off-list ref]
from AMCC.
Signed-off-by: Stefan Roese <sr@denx.de>
---
commit f83094acd3258575c9a5cdb1d65e241c16eff03a
tree 72582c5eeb2a9c8ea57287616d51e42fff8ed641
parent f56f68c4e1977f0e884a304af4c617bed4909417
author Stefan Roese [off-list ref] Sat, 18 Nov 2006 10:28:50 +0100
committer Stefan Roese [off-list ref] Sat, 18 Nov 2006 10:28:50 +0100
drivers/serial/8250.c | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
On Mon, 20 Nov 2006 12:00:36 +0100
Stefan Roese [off-list ref] wrote:
This patch fixes a problem seen on multiple 4xx platforms, where
the UART0 interrupt number is 0. The macro "is_real_interrupt" lead
on those systems to not use an real interrupt but the timer based
implementation.
NAK.
Zero means "no interrupt" in the Linux space. If you have a physical IRQ
0 remap it to a convenient number (eg map IRQ's + 1, or stick it on the
end). The logical and physical IRQ numbering in Linux don't have to match
up - and given some platforms have IRQ numbering per bus and the like
clearly doesn't in many cases.
From: Stefan Roese <hidden> Date: 2006-11-20 11:55:13
On Monday 20 November 2006 12:42, Alan wrote:
On Mon, 20 Nov 2006 12:00:36 +0100
Stefan Roese [off-list ref] wrote:
quoted
This patch fixes a problem seen on multiple 4xx platforms, where
the UART0 interrupt number is 0. The macro "is_real_interrupt" lead
on those systems to not use an real interrupt but the timer based
implementation.
NAK.
I knew it. ;-)
Zero means "no interrupt" in the Linux space. If you have a physical IRQ
0 remap it to a convenient number (eg map IRQ's + 1, or stick it on the
end). The logical and physical IRQ numbering in Linux don't have to match
up - and given some platforms have IRQ numbering per bus and the like
clearly doesn't in many cases.
Let's see, if I got this right. You mean that on such a platform, where 0 is a
valid physical IRQ, we should assign another value as virtual IRQ number (not
0 and not -1 of course). And then the platform "pic" implementation should
take care of the remapping of these virtual IRQ numbers to the physical
numbers.
Correct?
Best regards,
Stefan
On Mon, 20 Nov 2006 12:54:32 +0100 (MET)
Stefan Roese [off-list ref] wrote:
Let's see, if I got this right. You mean that on such a platform, where 0 is a
valid physical IRQ, we should assign another value as virtual IRQ number (not
0 and not -1 of course). And then the platform "pic" implementation should
take care of the remapping of these virtual IRQ numbers to the physical
numbers.
Correct?
From: Russell King <hidden> Date: 2006-11-20 13:05:04
On Mon, Nov 20, 2006 at 12:10:15PM +0000, Alan wrote:
On Mon, 20 Nov 2006 12:54:32 +0100 (MET)
Stefan Roese [off-list ref] wrote:
quoted
Let's see, if I got this right. You mean that on such a platform, where 0 is a
valid physical IRQ, we should assign another value as virtual IRQ number (not
0 and not -1 of course). And then the platform "pic" implementation should
take care of the remapping of these virtual IRQ numbers to the physical
numbers.
Correct?
Absolutely correct in all the detail.
Since IRQ0 is not valid, can we arrange for the generic interrupt
infrastructure to always fail it's allocation, and then remove the
utterly unused bloatful irq_desc[0] ?
Didn't think so since x86 folk would scream. Wait a moment, x86 can
map IRQ0 to some other number for the timer interrupt, just like
other architectures are being forced to map their UART interrupts.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
From: Sergei Shtylyov <hidden> Date: 2006-11-20 13:26:40
Hello.
Stefan Roese wrote:
This patch fixes a problem seen on multiple 4xx platforms, where
the UART0 interrupt number is 0. The macro "is_real_interrupt" lead
on those systems to not use an real interrupt but the timer based
implementation.
This problem was detected and fixed by
Charles Gales [off-list ref] and John Baxter [off-list ref]
from AMCC.
Signed-off-by: Stefan Roese <sr@denx.de>
---
commit f83094acd3258575c9a5cdb1d65e241c16eff03a
tree 72582c5eeb2a9c8ea57287616d51e42fff8ed641
parent f56f68c4e1977f0e884a304af4c617bed4909417
author Stefan Roese [off-list ref] Sat, 18 Nov 2006 10:28:50 +0100
committer Stefan Roese [off-list ref] Sat, 18 Nov 2006 10:28:50 +0100
This should have been done in <asm/serial.h> instead, like this:
#undef is_real_interrupt(irq)
#define is_real_interrupt(irq) 1
Not too smart as well,but at least this wasy you won't be pulluting the generic code...
WBR, Sergei
On Mon, 20 Nov 2006 12:54:32 +0100 (MET)
Stefan Roese [off-list ref] wrote:
quoted
Let's see, if I got this right. You mean that on such a platform, where 0 is a
valid physical IRQ, we should assign another value as virtual IRQ number (not
0 and not -1 of course). And then the platform "pic" implementation should
take care of the remapping of these virtual IRQ numbers to the physical
numbers.
Since IRQ0 is not valid, can we arrange for the generic interrupt
infrastructure to always fail it's allocation, and then remove the
utterly unused bloatful irq_desc[0] ?
Didn't think so since x86 folk would scream. Wait a moment, x86 can
map IRQ0 to some other number for the timer interrupt, just like
other architectures are being forced to map their UART interrupts.
I think, what Russell means, is this:
#define is_real_interrupt(irq) ((irq) != NO_IRQ)
where the NO_IRQ macro has been introduced a LONG time ago specifically
for this purpose, and is conveniently defined on some platforms to
(unsigned int)-1 or similar, including asm-powerpc/irq.h. And yes, this
has been discussed MANY times.
Thanks
Guennadi
---
Guennadi Liakhovetski