* Query: Boot time allocation of irq descriptors
@ 2015-02-11 14:50 Vijay Kilari
2015-02-11 14:55 ` Andrew Cooper
2015-02-11 15:05 ` Jan Beulich
0 siblings, 2 replies; 5+ messages in thread
From: Vijay Kilari @ 2015-02-11 14:50 UTC (permalink / raw)
To: Ian Campbell, Stefano Stabellini
Cc: manish.jaggi, Julien Grall, Stefano Stabellini,
xen-devel@lists.xen.org
Hi ,
I just glaced at the x86 code, here nr_irqs are set to 1024, which includes
normal irq's and MSI's. Memory for these descriptors are allocated at boot time.
is it correct?
int __init init_irq_data(void)
{
...
for (vector = 0; vector < NR_VECTORS; ++vector)
this_cpu(vector_irq)[vector] = INT_MIN;
irq_desc = xzalloc_array(struct irq_desc, nr_irqs);
...
}
In xen/include/asm-x86/irq.h
#define MSI_IRQ(irq) ((irq) >= nr_irqs_gsi && (irq) < nr_irqs)
Regards
Vijay
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Query: Boot time allocation of irq descriptors
2015-02-11 14:50 Query: Boot time allocation of irq descriptors Vijay Kilari
@ 2015-02-11 14:55 ` Andrew Cooper
2015-02-11 15:03 ` Vijay Kilari
2015-02-11 15:05 ` Jan Beulich
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2015-02-11 14:55 UTC (permalink / raw)
To: Vijay Kilari, Ian Campbell, Stefano Stabellini
Cc: manish.jaggi, Julien Grall, Stefano Stabellini,
xen-devel@lists.xen.org
On 11/02/15 14:50, Vijay Kilari wrote:
> Hi ,
>
> I just glaced at the x86 code, here nr_irqs are set to 1024, which includes
> normal irq's and MSI's. Memory for these descriptors are allocated at boot time.
> is it correct?
>
> int __init init_irq_data(void)
> {
>
> ...
> for (vector = 0; vector < NR_VECTORS; ++vector)
> this_cpu(vector_irq)[vector] = INT_MIN;
>
> irq_desc = xzalloc_array(struct irq_desc, nr_irqs);
>
> ...
> }
>
>
> In xen/include/asm-x86/irq.h
>
> #define MSI_IRQ(irq) ((irq) >= nr_irqs_gsi && (irq) < nr_irqs)
What do you think is incorrect about it?
~Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Query: Boot time allocation of irq descriptors
2015-02-11 14:55 ` Andrew Cooper
@ 2015-02-11 15:03 ` Vijay Kilari
2015-02-11 15:08 ` Jan Beulich
0 siblings, 1 reply; 5+ messages in thread
From: Vijay Kilari @ 2015-02-11 15:03 UTC (permalink / raw)
To: Andrew Cooper
Cc: Ian Campbell, Stefano Stabellini, manish.jaggi, Julien Grall,
xen-devel@lists.xen.org, Stefano Stabellini
On Wed, Feb 11, 2015 at 8:25 PM, Andrew Cooper
<andrew.cooper3@citrix.com> wrote:
> On 11/02/15 14:50, Vijay Kilari wrote:
>> Hi ,
>>
>> I just glaced at the x86 code, here nr_irqs are set to 1024, which includes
>> normal irq's and MSI's. Memory for these descriptors are allocated at boot time.
>> is it correct?
>>
>> int __init init_irq_data(void)
>> {
>>
>> ...
>> for (vector = 0; vector < NR_VECTORS; ++vector)
>> this_cpu(vector_irq)[vector] = INT_MIN;
>>
>> irq_desc = xzalloc_array(struct irq_desc, nr_irqs);
>>
>> ...
>> }
>>
>>
>> In xen/include/asm-x86/irq.h
>>
>> #define MSI_IRQ(irq) ((irq) >= nr_irqs_gsi && (irq) < nr_irqs)
>
> What do you think is incorrect about it?
Nothing wrong with it.
I am trying to add MSI support for arm64 where the number of
MSI interrupts are not limited to 1024. It can support large number of MSI's.
Just trying to understand how many MSI's that x86 supports and is there
any generic code that I can use for arm64.
Looks like I have to do something for arm64
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Query: Boot time allocation of irq descriptors
2015-02-11 14:50 Query: Boot time allocation of irq descriptors Vijay Kilari
2015-02-11 14:55 ` Andrew Cooper
@ 2015-02-11 15:05 ` Jan Beulich
1 sibling, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2015-02-11 15:05 UTC (permalink / raw)
To: Vijay Kilari
Cc: Ian Campbell, Stefano Stabellini, manish.jaggi, Julien Grall,
xen-devel@lists.xen.org, Stefano Stabellini
>>> On 11.02.15 at 15:50, <vijay.kilari@gmail.com> wrote:
> I just glaced at the x86 code, here nr_irqs are set to 1024, which
> includes
> normal irq's and MSI's. Memory for these descriptors are allocated at boot
> time.
> is it correct?
>
> int __init init_irq_data(void)
> {
>
> ...
> for (vector = 0; vector < NR_VECTORS; ++vector)
> this_cpu(vector_irq)[vector] = INT_MIN;
>
> irq_desc = xzalloc_array(struct irq_desc, nr_irqs);
One day we'd like to allocate at least the MSI ones only on demand...
Jan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Query: Boot time allocation of irq descriptors
2015-02-11 15:03 ` Vijay Kilari
@ 2015-02-11 15:08 ` Jan Beulich
0 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2015-02-11 15:08 UTC (permalink / raw)
To: Vijay Kilari
Cc: Ian Campbell, Stefano Stabellini, Andrew Cooper, manish.jaggi,
Julien Grall, xen-devel@lists.xen.org, Stefano Stabellini
>>> On 11.02.15 at 16:03, <vijay.kilari@gmail.com> wrote:
> On Wed, Feb 11, 2015 at 8:25 PM, Andrew Cooper
> <andrew.cooper3@citrix.com> wrote:
>> On 11/02/15 14:50, Vijay Kilari wrote:
>>> Hi ,
>>>
>>> I just glaced at the x86 code, here nr_irqs are set to 1024, which
> includes
>>> normal irq's and MSI's. Memory for these descriptors are allocated at boot
> time.
>>> is it correct?
>>>
>>> int __init init_irq_data(void)
>>> {
>>>
>>> ...
>>> for (vector = 0; vector < NR_VECTORS; ++vector)
>>> this_cpu(vector_irq)[vector] = INT_MIN;
>>>
>>> irq_desc = xzalloc_array(struct irq_desc, nr_irqs);
>>>
>>> ...
>>> }
>>>
>>>
>>> In xen/include/asm-x86/irq.h
>>>
>>> #define MSI_IRQ(irq) ((irq) >= nr_irqs_gsi && (irq) < nr_irqs)
>>
>> What do you think is incorrect about it?
>
> Nothing wrong with it.
>
> I am trying to add MSI support for arm64 where the number of
> MSI interrupts are not limited to 1024. It can support large number of
> MSI's.
So where did you spot this 1024? What I find (and wrote) is
if ( nr_irqs == 0 )
nr_irqs = cpu_has_apic ?
max(16U + num_present_cpus() * NR_DYNAMIC_VECTORS,
8 * nr_irqs_gsi) :
nr_irqs_gsi;
else if ( nr_irqs < 16 )
nr_irqs = 16;
Jan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-02-11 15:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-11 14:50 Query: Boot time allocation of irq descriptors Vijay Kilari
2015-02-11 14:55 ` Andrew Cooper
2015-02-11 15:03 ` Vijay Kilari
2015-02-11 15:08 ` Jan Beulich
2015-02-11 15:05 ` Jan Beulich
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.