lkml.org 
[lkml]   [2018]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/idt: Simplify the idt_setup_apic_and_irq_gates()
On Tue, 22 May 2018, Dou Liyang wrote:

> Hi Thomas,
>
> At 05/19/2018 08:32 PM, Thomas Gleixner wrote:
> > On Thu, 26 Apr 2018, Dou Liyang wrote:
> >
> > > The vectors between FIRST_SYSTEM_VECTOR and NR_VECTORS are special IRQ
> > > vectors used by the SMP architecture. But, if X86_LOCAL_APIC=n, it will
> > > not be used, and the FIRST_SYSTEM_VECTOR is equal to NR_VECTORS.
> >
> > Correct, but that function has nothing to do with FIRST_SYSTEM_VECTOR.
> >
>
> Oops, sorry, when I reread, my changelog even made me misunderstand.
> the patch hided it.
>
> void __init idt_setup_apic_and_irq_gates(void)
> ...
> for_each_clear_bit_from(i, system_vectors, FIRST_SYSTEM_VECTOR)
> ^^^^^^^^^^^^^^^^^^^
> ...
> for_each_clear_bit_from(i, system_vectors, NR_VECTORS)
>
> What I want to say is:
>
>   In the APIC=n system, the FIRST_SYSTEM_VECTOR is equal to
>   NR_VECTORS, So all entries has been set by
>
> for_each_clear_bit_from(i, system_vectors, FIRST_SYSTEM_VECTOR)
>        ...
>
>   the following setup code for APIC=n is redundant. Just setup gates for
>   APIC=y.
>
> If it is OK, I will send v2.

Right you are. I got confused ....
\
 
 \ /
  Last update: 2018-05-22 16:18    [W:0.712 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site