Re: [PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on

2016-03-13 Thread Thomas Gleixner
On Sun, 13 Mar 2016, Jianyu Zhan wrote: > On Sun, Mar 13, 2016 at 5:33 PM, Thomas Gleixner wrote: > > IRQ_WORK can work w/o APIC > > > > Emphasis on CAN. If the APIC is available it's used, if not then there is no > > point in setting up the gate for nothing. > > > > So why would your patch

Re: [PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on

2016-03-13 Thread Jianyu Zhan
On Sun, Mar 13, 2016 at 5:33 PM, Thomas Gleixner wrote: > IRQ_WORK can work w/o APIC > > Emphasis on CAN. If the APIC is available it's used, if not then there is no > point in setting up the gate for nothing. > > So why would your patch do any good? I understood it is no point setting up i

Re: [PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on

2016-03-13 Thread Thomas Gleixner
On Sun, 13 Mar 2016, Jianyu Zhan wrote: > On Sun, Mar 13, 2016 at 5:11 PM, Thomas Gleixner wrote: > > On Sun, 13 Mar 2016, Jianyu Zhan wrote: > >> On Sun, Mar 13, 2016 at 3:55 PM, Thomas Gleixner > >> wrote: > >> > if LOCAL_APIC is disabled it does not use the interrupt, simply because > >> > t

Re: [PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on

2016-03-13 Thread Jianyu Zhan
On Sun, Mar 13, 2016 at 5:11 PM, Thomas Gleixner wrote: > On Sun, 13 Mar 2016, Jianyu Zhan wrote: >> On Sun, Mar 13, 2016 at 3:55 PM, Thomas Gleixner wrote: >> > if LOCAL_APIC is disabled it does not use the interrupt, simply because >> > there >> > is no way to trigger it. That setup is inside

Re: [PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on

2016-03-13 Thread Thomas Gleixner
On Sun, 13 Mar 2016, Jianyu Zhan wrote: > On Sun, Mar 13, 2016 at 3:55 PM, Thomas Gleixner wrote: > > if LOCAL_APIC is disabled it does not use the interrupt, simply because > > there > > is no way to trigger it. That setup is inside #ifdef CONFIG_X86_LOCAL_APIC > > for > > exactly that reason.

Re: [PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on

2016-03-13 Thread Jianyu Zhan
On Sun, Mar 13, 2016 at 3:55 PM, Thomas Gleixner wrote: > if LOCAL_APIC is disabled it does not use the interrupt, simply because there > is no way to trigger it. That setup is inside #ifdef CONFIG_X86_LOCAL_APIC for > exactly that reason. > > Just because IRQ_WORK has no config dependency on LOCA

Re: [PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on

2016-03-12 Thread Thomas Gleixner
On Sun, 13 Mar 2016, Jianyu Zhan wrote: > On Sun, Mar 13, 2016 at 2:35 PM, Thomas Gleixner wrote: > >> On Sun, Mar 13, 2016 at 4:08 AM, Thomas Gleixner > >> wrote: > >> > This is pointless, because it's only called when local apic is enabled > >> > as all > >> > call sites of alloc_intr_gate()

Re: [PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on

2016-03-12 Thread Jianyu Zhan
On Sun, Mar 13, 2016 at 3:25 PM, Jianyu Zhan wrote: > My purpose of posting this patch set is trying to make the system vector > layout > reveal this fact. > > we have SMP system vector defined first( these may rely on or not rely > on CONFIG_X86_LOCAL_APIC), > > then comes the CONFIG_X86_LOCAL_A

Re: [PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on

2016-03-12 Thread Jianyu Zhan
On Sun, Mar 13, 2016 at 2:35 PM, Thomas Gleixner wrote: >> On Sun, Mar 13, 2016 at 4:08 AM, Thomas Gleixner wrote: >> > This is pointless, because it's only called when local apic is enabled as >> > all >> > call sites of alloc_intr_gate() depend on CONFIG_X86_LOCAL_APIC >> >> Not exactly,

Re: [PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on

2016-03-12 Thread Thomas Gleixner
On Sun, 13 Mar 2016, Jianyu Zhan wrote: > On Sun, Mar 13, 2016 at 4:08 AM, Thomas Gleixner wrote: > > This is pointless, because it's only called when local apic is enabled as > > all > > call sites of alloc_intr_gate() depend on CONFIG_X86_LOCAL_APIC > > Not exactly, currently at least

Re: [PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on

2016-03-12 Thread Jianyu Zhan
On Sun, Mar 13, 2016 at 4:08 AM, Thomas Gleixner wrote: > This is pointless, because it's only called when local apic is enabled as all > call sites of alloc_intr_gate() depend on CONFIG_X86_LOCAL_APIC Not exactly, currently at least smp_intr_init() DOES NOT depend on CONFIG_X86_LOCAL_API

Re: [PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on

2016-03-12 Thread Thomas Gleixner
On Sat, 12 Mar 2016, Jianyu Zhan wrote: > During native_init_IRQ(), we will update first_system_vector conditionally > when we init system vector. But on !CONFIG_X86_LOCAL_PIC, we prefer it > to NR_IRQS, so don't bother set it on this case. > > Signed-off-by: Jianyu Zhan > --- > arch/x86/includ

[PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on

2016-03-12 Thread Jianyu Zhan
During native_init_IRQ(), we will update first_system_vector conditionally when we init system vector. But on !CONFIG_X86_LOCAL_PIC, we prefer it to NR_IRQS, so don't bother set it on this case. Signed-off-by: Jianyu Zhan --- arch/x86/include/asm/desc.h | 2 ++ arch/x86/kernel/irqinit.c | 3 --