* arm NO_IRQ = -1 - zynq axi_ethernet driver
@ 2013-01-03 13:47 Michal Simek
2013-01-03 13:54 ` Russell King - ARM Linux
2013-01-03 13:58 ` Rob Herring
0 siblings, 2 replies; 4+ messages in thread
From: Michal Simek @ 2013-01-03 13:47 UTC (permalink / raw)
To: linux-arm-kernel
Hi Grand, Russell, Arnd, Olof and Rob,
I am getting one problem with axi_ethernet driver because I want to remove
NO_IRQ from axi_ethernet driver because NO_IRQ was setup to 0 and
removed from microblaze long time ago.
Some patches from reference.
"microblaze: Change NO_IRQ to 0"
sha1: 6c7a2676f594ca9a30203b4fd5dc26b53682cffe
and
"microblaze: Remove NO_IRQ from architecture"
sha1: 18e3b1075b1bc4a6027a6612fe70a5c81c209ec7
but we can also use this driver on arm Zynq platform.
It is easy to add
#ifndef NO_IRQ
#define NO_IRQ 0
#endif
to the driver to cover Microblaze case but it will be just workaround.
>From patches description NO_IRQ shouldn't be used by any driver
+ from Grant description
"As has been discussed many times[1], Using NO_IRQ set to anything other
than 0 is bug waiting to happen since many drivers follow the pattern
"if (!irq)" for testing whether or not an irq has been set."
+ link
[1] http://lkml.org/lkml/2005/11/21/221
Was there any attempt to remove NO_IRQ from ARM?
Any problem to do it?
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian
^ permalink raw reply [flat|nested] 4+ messages in thread
* arm NO_IRQ = -1 - zynq axi_ethernet driver
2013-01-03 13:47 arm NO_IRQ = -1 - zynq axi_ethernet driver Michal Simek
@ 2013-01-03 13:54 ` Russell King - ARM Linux
2013-01-03 13:58 ` Rob Herring
1 sibling, 0 replies; 4+ messages in thread
From: Russell King - ARM Linux @ 2013-01-03 13:54 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jan 03, 2013 at 02:47:08PM +0100, Michal Simek wrote:
> Hi Grand, Russell, Arnd, Olof and Rob,
>
> I am getting one problem with axi_ethernet driver because I want to remove
> NO_IRQ from axi_ethernet driver because NO_IRQ was setup to 0 and
> removed from microblaze long time ago.
> Some patches from reference.
> "microblaze: Change NO_IRQ to 0"
> sha1: 6c7a2676f594ca9a30203b4fd5dc26b53682cffe
> and
> "microblaze: Remove NO_IRQ from architecture"
> sha1: 18e3b1075b1bc4a6027a6612fe70a5c81c209ec7
>
> but we can also use this driver on arm Zynq platform.
> It is easy to add
> #ifndef NO_IRQ
> #define NO_IRQ 0
> #endif
> to the driver to cover Microblaze case but it will be just workaround.
>
> >From patches description NO_IRQ shouldn't be used by any driver
> + from Grant description
>
> "As has been discussed many times[1], Using NO_IRQ set to anything other
> than 0 is bug waiting to happen since many drivers follow the pattern
> "if (!irq)" for testing whether or not an irq has been set."
>
> + link
> [1] http://lkml.org/lkml/2005/11/21/221
>
> Was there any attempt to remove NO_IRQ from ARM?
We have been removing it gradually over time. Any new platform should
already be using 0 for no IRQ, and the only way to do this is to have
drivers using NO_IRQ test for irq <= 0.
Removing NO_IRQ=-1 on a single day is incredibly difficult.
^ permalink raw reply [flat|nested] 4+ messages in thread
* arm NO_IRQ = -1 - zynq axi_ethernet driver
2013-01-03 13:47 arm NO_IRQ = -1 - zynq axi_ethernet driver Michal Simek
2013-01-03 13:54 ` Russell King - ARM Linux
@ 2013-01-03 13:58 ` Rob Herring
2013-01-09 16:52 ` Michal Simek
1 sibling, 1 reply; 4+ messages in thread
From: Rob Herring @ 2013-01-03 13:58 UTC (permalink / raw)
To: linux-arm-kernel
On 01/03/2013 07:47 AM, Michal Simek wrote:
> Hi Grand, Russell, Arnd, Olof and Rob,
>
> I am getting one problem with axi_ethernet driver because I want to remove
> NO_IRQ from axi_ethernet driver because NO_IRQ was setup to 0 and
> removed from microblaze long time ago.
> Some patches from reference.
> "microblaze: Change NO_IRQ to 0"
> sha1: 6c7a2676f594ca9a30203b4fd5dc26b53682cffe
> and
> "microblaze: Remove NO_IRQ from architecture"
> sha1: 18e3b1075b1bc4a6027a6612fe70a5c81c209ec7
>
> but we can also use this driver on arm Zynq platform.
> It is easy to add
> #ifndef NO_IRQ
> #define NO_IRQ 0
> #endif
> to the driver to cover Microblaze case but it will be just workaround.
>
> From patches description NO_IRQ shouldn't be used by any driver
> + from Grant description
>
> "As has been discussed many times[1], Using NO_IRQ set to anything other
> than 0 is bug waiting to happen since many drivers follow the pattern
> "if (!irq)" for testing whether or not an irq has been set."
>
> + link
> [1] http://lkml.org/lkml/2005/11/21/221
>
> Was there any attempt to remove NO_IRQ from ARM?
> Any problem to do it?
It's not removed, but we've trimmed it out of most things. It appears
that drivers are mostly not using it other than powerpc drivers. It is
not really necessary to remove it from the arch. Drivers should simply
check for (irq <= 0) for error cases. I'm not sure if there are any
platforms left using irq 0 as a valid irq.
Rob
^ permalink raw reply [flat|nested] 4+ messages in thread
* arm NO_IRQ = -1 - zynq axi_ethernet driver
2013-01-03 13:58 ` Rob Herring
@ 2013-01-09 16:52 ` Michal Simek
0 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2013-01-09 16:52 UTC (permalink / raw)
To: linux-arm-kernel
2013/1/3 Rob Herring <robherring2@gmail.com>:
> On 01/03/2013 07:47 AM, Michal Simek wrote:
>> Hi Grand, Russell, Arnd, Olof and Rob,
>>
>> I am getting one problem with axi_ethernet driver because I want to remove
>> NO_IRQ from axi_ethernet driver because NO_IRQ was setup to 0 and
>> removed from microblaze long time ago.
>> Some patches from reference.
>> "microblaze: Change NO_IRQ to 0"
>> sha1: 6c7a2676f594ca9a30203b4fd5dc26b53682cffe
>> and
>> "microblaze: Remove NO_IRQ from architecture"
>> sha1: 18e3b1075b1bc4a6027a6612fe70a5c81c209ec7
>>
>> but we can also use this driver on arm Zynq platform.
>> It is easy to add
>> #ifndef NO_IRQ
>> #define NO_IRQ 0
>> #endif
>> to the driver to cover Microblaze case but it will be just workaround.
>>
>> From patches description NO_IRQ shouldn't be used by any driver
>> + from Grant description
>>
>> "As has been discussed many times[1], Using NO_IRQ set to anything other
>> than 0 is bug waiting to happen since many drivers follow the pattern
>> "if (!irq)" for testing whether or not an irq has been set."
>>
>> + link
>> [1] http://lkml.org/lkml/2005/11/21/221
>>
>> Was there any attempt to remove NO_IRQ from ARM?
>> Any problem to do it?
>
> It's not removed, but we've trimmed it out of most things. It appears
> that drivers are mostly not using it other than powerpc drivers. It is
> not really necessary to remove it from the arch. Drivers should simply
> check for (irq <= 0) for error cases. I'm not sure if there are any
> platforms left using irq 0 as a valid irq.
Unfortunately microblaze system can use any IRQ number but MB NO_IRQ is 0
that's why it shouldn't hurt because on ARM axi ethernet can't be on IRQ 0.
Thanks for hint,
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-09 16:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-03 13:47 arm NO_IRQ = -1 - zynq axi_ethernet driver Michal Simek
2013-01-03 13:54 ` Russell King - ARM Linux
2013-01-03 13:58 ` Rob Herring
2013-01-09 16:52 ` Michal Simek
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).