Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1356617

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

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on
Date 2016-03-13 07:40 +0100
Message-ID <rc7QZ-1Kn-3@gated-at.bofh.it> (permalink)
References <rbTl0-7Va-15@gated-at.bofh.it> <rbTuG-847-17@gated-at.bofh.it> <rbYb0-393-5@gated-at.bofh.it> <rc310-6Fl-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, 13 Mar 2016, Jianyu Zhan wrote:

> On Sun, Mar 13, 2016 at 4:08 AM, Thomas Gleixner <tglx@linutronix.de> 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_APIC:
> 
> static void __init smp_intr_init(void)
> {
> #ifdef CONFIG_SMP

It does, because CONFIG_SMP enables CONFIG_X86_LOCAL_APIC

> I know this is weird, because modern SMP machines implies Local APIC.
> But currently we have CONFIG_SMP detangle from CONFIG_X86_LOCAL_APIC,
> which I think is fine.

Do you actually understand how all that works together?
 
> Another place which is weird is CONFIG_IRQ_WORK.  Technically,  it
> does not depend
> on SMP,   nor even necessary Local APIC.  Actually, it is just a base
> configuration selected
> by others.  But currently we have the

Have you tried to enable it independent from CONFIG_X86_LOCAL_APIC?
 
> >>       i = FIRST_EXTERNAL_VECTOR;
> >> -#ifndef CONFIG_X86_LOCAL_APIC
> >> -#define first_system_vector NR_VECTORS
> >> -#endif
> >>       for_each_clear_bit_from(i, used_vectors, first_system_vector) {
> >
> > And how exactly is this here supposed to compile when CONFIG_X86_LOCAL_APIC=n?
> 
> Dunno.  I guess this code on !CONFIG_X86_LOCAL_APIC case hasn't been
> tested yet ?

It's your job to at least compile test your patches not the job of others.
 
> For CONFIG_X86_LOCAL_APIC case,  the define makes sense.
> But for ! CONFIG_X86_LOCAL_APIC case,  why we confine it to NR_VECTORS
> is a mystery
> to me.  Have digged into git history, but found no proof.

And because it's a mystery you can just change it as you think it's fine and
thereby break the build?
 
> So to maintain consistency, this patch just retain what it is,  but we
> do not bother update it for
> !CONFIG_X86_LOCAL_APIC case.

To maintain consistency we leave it as is, because that actually compiles AND
works.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] x86/irq: Refactor special vector definition and cleanup Jianyu Zhan <nasa4836@gmail.com> - 2016-03-12 16:10 +0100
  [PATCH 1/3] x86/asm/irq: Rearrange definitoin of specical irq vectors and cleanup. Jianyu Zhan <nasa4836@gmail.com> - 2016-03-12 16:10 +0100
  [PATCH 2/3] x86/irq: refactor native_init_IRQ Jianyu Zhan <nasa4836@gmail.com> - 2016-03-12 16:20 +0100
    Re: [PATCH 2/3] x86/irq: refactor native_init_IRQ kbuild test robot <lkp@intel.com> - 2016-03-12 16:40 +0100
      Re: [PATCH 2/3] x86/irq: refactor native_init_IRQ Jianyu Zhan <nasa4836@gmail.com> - 2016-03-12 16:40 +0100
    Re: [PATCH 2/3] x86/irq: refactor native_init_IRQ kbuild test robot <lkp@intel.com> - 2016-03-12 17:30 +0100
  [PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on Jianyu Zhan <nasa4836@gmail.com> - 2016-03-12 16:20 +0100
    Re: [PATCH 3/3] x86/irq: update first_system_vector only when  X86_LOCAL_PIC is on Thomas Gleixner <tglx@linutronix.de> - 2016-03-12 21:20 +0100
      Re: [PATCH 3/3] x86/irq: update first_system_vector only when  X86_LOCAL_PIC is on Jianyu Zhan <nasa4836@gmail.com> - 2016-03-13 02:30 +0100
        Re: [PATCH 3/3] x86/irq: update first_system_vector only when  X86_LOCAL_PIC is on Thomas Gleixner <tglx@linutronix.de> - 2016-03-13 07:40 +0100
          Re: [PATCH 3/3] x86/irq: update first_system_vector only when  X86_LOCAL_PIC is on Jianyu Zhan <nasa4836@gmail.com> - 2016-03-13 08:30 +0100
            Re: [PATCH 3/3] x86/irq: update first_system_vector only when  X86_LOCAL_PIC is on Jianyu Zhan <nasa4836@gmail.com> - 2016-03-13 08:50 +0100
            Re: [PATCH 3/3] x86/irq: update first_system_vector only when  X86_LOCAL_PIC is on Thomas Gleixner <tglx@linutronix.de> - 2016-03-13 09:00 +0100
              Re: [PATCH 3/3] x86/irq: update first_system_vector only when  X86_LOCAL_PIC is on Jianyu Zhan <nasa4836@gmail.com> - 2016-03-13 09:30 +0100
                Re: [PATCH 3/3] x86/irq: update first_system_vector only when  X86_LOCAL_PIC is on Thomas Gleixner <tglx@linutronix.de> - 2016-03-13 10:20 +0100
                Re: [PATCH 3/3] x86/irq: update first_system_vector only when  X86_LOCAL_PIC is on Jianyu Zhan <nasa4836@gmail.com> - 2016-03-13 10:40 +0100
                Re: [PATCH 3/3] x86/irq: update first_system_vector only when  X86_LOCAL_PIC is on Thomas Gleixner <tglx@linutronix.de> - 2016-03-13 10:40 +0100
                Re: [PATCH 3/3] x86/irq: update first_system_vector only when  X86_LOCAL_PIC is on Jianyu Zhan <nasa4836@gmail.com> - 2016-03-13 11:10 +0100
                Re: [PATCH 3/3] x86/irq: update first_system_vector only when  X86_LOCAL_PIC is on Thomas Gleixner <tglx@linutronix.de> - 2016-03-13 12:20 +0100

csiph-web