* On creation of irq_desc and irq_data.
@ 2013-06-20 10:39 mind entropy
0 siblings, 0 replies; 3+ messages in thread
From: mind entropy @ 2013-06-20 10:39 UTC (permalink / raw)
To: kernelnewbies
Hi,
I am reading through mini2440 code. I am going through the init_irq
(http://lxr.free-electrons.com/source/arch/arm/mach-s3c24xx/mach-mini2440.c#L689)
code. In it (http://lxr.free-electrons.com/source/arch/arm/mach-s3c24xx/irq.c#L446)
there is irq_domain_add_legacy(..) which references irq_desc and
irq_data. I am not sure where these descriptors are created? In the
irq_domain_add_legacy there is a lookup for irq_data from the number.
Could someone tell where these descriptors are created?
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* On creation of irq_desc and irq_data.
@ 2013-06-20 18:15 mind entropy
2013-06-21 2:49 ` Subhra S. Sarkar
0 siblings, 1 reply; 3+ messages in thread
From: mind entropy @ 2013-06-20 18:15 UTC (permalink / raw)
To: kernelnewbies
> Hi,
>
> I am reading through mini2440 code. I am going through the init_irq
> (http://lxr.free-electrons.com/source/arch/arm/mach-s3c24xx/mach-mini2440.c#L689)
> code. In it (http://lxr.free-electrons.com/source/arch/arm/mach-s3c24xx/irq.c#L446)
> there is irq_domain_add_legacy(..) which references irq_desc and
> irq_data. I am not sure where these descriptors are created? In the
> irq_domain_add_legacy there is a lookup for irq_data from the number.
> Could someone tell where these descriptors are created?
>
> Thanks.
I think it is statically created here
https://github.com/torvalds/linux/blob/master/kernel/irq/irqdesc.c#L243
and the initialization happens in early_irq_init(..) here
https://github.com/torvalds/linux/blob/master/kernel/irq/irqdesc.c#L251.
Please correct me if I am wrong.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* On creation of irq_desc and irq_data.
2013-06-20 18:15 On creation of irq_desc and irq_data mind entropy
@ 2013-06-21 2:49 ` Subhra S. Sarkar
0 siblings, 0 replies; 3+ messages in thread
From: Subhra S. Sarkar @ 2013-06-21 2:49 UTC (permalink / raw)
To: kernelnewbies
mind entropy <mindentropy <at> gmail.com> writes:
>
> > Hi,
> >
> > I am reading through mini2440 code. I am going through the init_irq
> > (http://lxr.free-electrons.com/source/arch/arm/mach-s3c24xx/mach-
mini2440.c#L689)
> > code. In it (http://lxr.free-electrons.com/source/arch/arm/mach-
s3c24xx/irq.c#L446)
> > there is irq_domain_add_legacy(..) which references irq_desc and
> > irq_data. I am not sure where these descriptors are created? In the
> > irq_domain_add_legacy there is a lookup for irq_data from the number.
> > Could someone tell where these descriptors are created?
> >
> > Thanks.
>
> I think it is statically created here
> https://github.com/torvalds/linux/blob/master/kernel/irq/irqdesc.c#L243
> and the initialization happens in early_irq_init(..) here
> https://github.com/torvalds/linux/blob/master/kernel/irq/irqdesc.c#L251.
>
> Please correct me if I am wrong.
>
> Thanks.
>
Within the function definition for irq_domain_add_legacy (), a pointer to
the structure irq_data is obtained [$KERN_HOME/kernel/irq/irqdomain.c, L:
232] by returning from function irq_get_irq_data()
[$KERN_HOME/kernel/irq/chip.c, L: 147]. Function irq_get_irq_data() in turn
retrieves the pointer to corresponding irq_desc structure from array of the
same type in $KERN_HOME/kernel/irq/irqdesc.c, L: 243. So, you're correct,
IMHO.
~Sarkar
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-21 2:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-20 18:15 On creation of irq_desc and irq_data mind entropy
2013-06-21 2:49 ` Subhra S. Sarkar
-- strict thread matches above, loose matches on Subject: below --
2013-06-20 10:39 mind entropy
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).