2007-02-15 06:31:44

by Maximus

[permalink] [raw]
Subject: irqdesc porting help

Im trying to port some drivers between 2.6.14 and 2.6.19

I find that irqdesc has changed completely. how do i port
the drivers between 2.6.14 and 2.6.19?

is there a porting guide available to port the drivers
which use irqdesc?.

my drivers use variables triggered, ... which dont exist in 2.6.19
irqdesc strcuture.


Could anyone help me on this.

Regards,
Jo


2007-02-15 10:36:07

by Paul Mundt

[permalink] [raw]
Subject: Re: irqdesc porting help

On Thu, Feb 15, 2007 at 12:01:37PM +0530, Maximus wrote:
> Im trying to port some drivers between 2.6.14 and 2.6.19
>
> I find that irqdesc has changed completely. how do i port
> the drivers between 2.6.14 and 2.6.19?
>
> is there a porting guide available to port the drivers
> which use irqdesc?.
>
> my drivers use variables triggered, ... which dont exist in 2.6.19
> irqdesc strcuture.
>
Presumably you're talking about the struct hw_interrupt_type and the lack
of an irq_desc[irq].handler? There's some migration helper glue in
include/linux/irq.h that you can use, but you're better off converting
completely. You can at least get it building again by changing to
irq_desc[irq].chip, but you really want a proper irq_chip implementation
to go along with this, rather than munging in the hw_interrupt_type.

You can easily compare before-and-after versions of most of the IRQ
controllers to identify the minimal changes required.

2007-02-15 10:46:00

by Russell King

[permalink] [raw]
Subject: Re: irqdesc porting help

On Thu, Feb 15, 2007 at 07:33:47PM +0900, Paul Mundt wrote:
> On Thu, Feb 15, 2007 at 12:01:37PM +0530, Maximus wrote:
> > Im trying to port some drivers between 2.6.14 and 2.6.19
> >
> > I find that irqdesc has changed completely. how do i port
> > the drivers between 2.6.14 and 2.6.19?
> >
> > is there a porting guide available to port the drivers
> > which use irqdesc?.
> >
> > my drivers use variables triggered, ... which dont exist in 2.6.19
> > irqdesc strcuture.
> >
> Presumably you're talking about the struct hw_interrupt_type and the lack
> of an irq_desc[irq].handler? There's some migration helper glue in
> include/linux/irq.h that you can use, but you're better off converting
> completely. You can at least get it building again by changing to
> irq_desc[irq].chip, but you really want a proper irq_chip implementation
> to go along with this, rather than munging in the hw_interrupt_type.

It should be asked - why are drivers poking about in the irqdesc
structure?

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:

2007-02-15 13:11:30

by Maximus

[permalink] [raw]
Subject: Re: irqdesc porting help

Hi,
My drivers in 2.6.14 use statements like
desc->triggered = 1;
And desc also points to some members of irqdesc which arent in
2.6.19 but in 2.6.14.

Im a newbie, What changes am i supposed to make to make it work in 2.6.19.
Im not sure what changes are exactly needed.


Please Advice,

Regards,
Jo



On 2/15/07, Russell King <[email protected]> wrote:
> On Thu, Feb 15, 2007 at 07:33:47PM +0900, Paul Mundt wrote:
> > On Thu, Feb 15, 2007 at 12:01:37PM +0530, Maximus wrote:
> > > Im trying to port some drivers between 2.6.14 and 2.6.19
> > >
> > > I find that irqdesc has changed completely. how do i port
> > > the drivers between 2.6.14 and 2.6.19?
> > >
> > > is there a porting guide available to port the drivers
> > > which use irqdesc?.
> > >
> > > my drivers use variables triggered, ... which dont exist in 2.6.19
> > > irqdesc strcuture.
> > >
> > Presumably you're talking about the struct hw_interrupt_type and the lack
> > of an irq_desc[irq].handler? There's some migration helper glue in
> > include/linux/irq.h that you can use, but you're better off converting
> > completely. You can at least get it building again by changing to
> > irq_desc[irq].chip, but you really want a proper irq_chip implementation
> > to go along with this, rather than munging in the hw_interrupt_type.
>
> It should be asked - why are drivers poking about in the irqdesc
> structure?
>
> --
> Russell King
> Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
> maintainer of:
>

2007-02-15 13:16:19

by Russell King

[permalink] [raw]
Subject: Re: irqdesc porting help

On Thu, Feb 15, 2007 at 06:41:25PM +0530, Maximus wrote:
> Hi,
> My drivers in 2.6.14 use statements like
> desc->triggered = 1;
> And desc also points to some members of irqdesc which arent in
> 2.6.19 but in 2.6.14.

But why do you have code which accesses these members? Can you show
your code?

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:

2007-02-15 13:16:47

by Arjan van de Ven

[permalink] [raw]
Subject: Re: irqdesc porting help

On Thu, 2007-02-15 at 18:41 +0530, Maximus wrote:
> Hi,
> My drivers in 2.6.14 use statements like
> desc->triggered = 1;
> And desc also points to some members of irqdesc which arent in
> 2.6.19 but in 2.6.14.
>
> Im a newbie, What changes am i supposed to make to make it work in 2.6.19.
> Im not sure what changes are exactly needed.
>


can you just post your driver so that the people here see what you are
actually doing ?


2007-02-20 07:03:38

by Maximus

[permalink] [raw]
Subject: Re: irqdesc porting help

Hi,
Sorry for the late response, attached is the code im trying to port
to linux - 2.6.20.


Regards,
Jo




On 2/15/07, Paul Mundt <[email protected]> wrote:
> On Thu, Feb 15, 2007 at 12:01:37PM +0530, Maximus wrote:
> > Im trying to port some drivers between 2.6.14 and 2.6.19
> >
> > I find that irqdesc has changed completely. how do i port
> > the drivers between 2.6.14 and 2.6.19?
> >
> > is there a porting guide available to port the drivers
> > which use irqdesc?.
> >
> > my drivers use variables triggered, ... which dont exist in 2.6.19
> > irqdesc strcuture.
> >
> Presumably you're talking about the struct hw_interrupt_type and the lack
> of an irq_desc[irq].handler? There's some migration helper glue in
> include/linux/irq.h that you can use, but you're better off converting
> completely. You can at least get it building again by changing to
> irq_desc[irq].chip, but you really want a proper irq_chip implementation
> to go along with this, rather than munging in the hw_interrupt_type.
>
> You can easily compare before-and-after versions of most of the IRQ
> controllers to identify the minimal changes required.
>


Attachments:
(No filename) (1.12 kB)
twl4030_core.c (35.75 kB)
Download all attachments

2007-02-20 10:54:30

by Komal Shah

[permalink] [raw]
Subject: Re: irqdesc porting help

Maximus,

On 2/20/07, Maximus <[email protected]> wrote:
> Hi,
> Sorry for the late response, attached is the code im trying to port
> to linux - 2.6.20.
>
>

Have you checked http://source.mvista.com/git linux-omap-2.6 git tree.
Syed Khasim has already submitted this OMAP2430 TWL4030 chip core
driver there, which is already synced with 2.6.20.

--
---Komal Shah
http://komalshah.blogspot.com

2007-02-20 10:58:33

by Komal Shah

[permalink] [raw]
Subject: Re: irqdesc porting help

On 2/20/07, Komal Shah <[email protected]> wrote:
> Maximus,
>
> On 2/20/07, Maximus <[email protected]> wrote:
> > Hi,
> > Sorry for the late response, attached is the code im trying to port
> > to linux - 2.6.20.
> >
> >
>
> Have you checked http://source.mvista.com/git linux-omap-2.6 git tree.
> Syed Khasim has already submitted this OMAP2430 TWL4030 chip core
> driver there, which is already synced with 2.6.20.
>

I just checked that code, and there is a line like:

393 /*
394 * Earlier this was desc->triggered = 1;
395 */
396 desc->status = IRQ_INPROGRESS;

So, I hope this helps, but still need to check its correctness.

--
---Komal Shah
http://komalshah.blogspot.com

2007-02-20 11:43:47

by Thomas Gleixner

[permalink] [raw]
Subject: Re: irqdesc porting help

On Tue, 2007-02-20 at 12:33 +0530, Maximus wrote:
> Hi,
> Sorry for the late response, attached is the code im trying to port
> to linux - 2.6.20.

Why does this need to use a kernel thread in the first place ? Usually
chained handlers demultiplex the primary interrupt and invoke the
demultiplexed interrupts.

There are tons of working examples in arch/arm/mach-xxxx

tglx