mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jianyu Zhan <nasa4836@gmail.com>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	Aravind.Gopalakrishnan@amd.com, brgerst@gmail.com, bp@suse.de,
	feng.wu@intel.com, jiang.liu@linux.intel.com, nasa4836@gmail.com,
	tj@kernel.org, dvlasenk@redhat.com, penberg@cs.helsinki.fi,
	yhlu.kernel@gmail.com, andi@firstfloor.org, luto@kernel.org,
	ajm@sgi.com, yinghai@kernel.org, akinobu.mita@gmail.com
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on
Date: Sat, 12 Mar 2016 23:10:19 +0800	[thread overview]
Message-ID: <fa064e4e2fd688a42480f686825f485ade4e30ca.1457790777.git.nasa4836@gmail.com> (raw)
In-Reply-To: <cover.1457790776.git.nasa4836@gmail.com>

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 <nasa4836@gmail.com>
---
 arch/x86/include/asm/desc.h | 2 ++
 arch/x86/kernel/irqinit.c   | 3 ---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h
index 4e10d73..4fc2deb 100644
--- a/arch/x86/include/asm/desc.h
+++ b/arch/x86/include/asm/desc.h
@@ -383,8 +383,10 @@ static inline void alloc_system_vector(int vector)
 {
 	if (!test_bit(vector, used_vectors)) {
 		set_bit(vector, used_vectors);
+#ifdef CONFIG_X86_LOCAL_APIC
 		if (first_system_vector > vector)
 			first_system_vector = vector;
+#endif
 	} else {
 		BUG();
 	}
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c
index 0e9fa7c..e999b38 100644
--- a/arch/x86/kernel/irqinit.c
+++ b/arch/x86/kernel/irqinit.c
@@ -188,9 +188,6 @@ void __init native_init_IRQ(void)
 	 * 'special' SMP interrupts)
 	 */
 	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) {
 		/* IA32_SYSCALL_VECTOR could be used in trap_init already. */
 		set_intr_gate(i, irq_entries_start +
-- 
2.4.3

  parent reply	other threads:[~2016-03-12 15:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-12 15:05 [PATCH 0/3] x86/irq: Refactor special vector definition and cleanup Jianyu Zhan
2016-03-12 15:06 ` [PATCH 1/3] x86/asm/irq: Rearrange definitoin of specical irq vectors " Jianyu Zhan
2016-03-12 15:10 ` [PATCH 2/3] x86/irq: refactor native_init_IRQ Jianyu Zhan
2016-03-12 15:30   ` kbuild test robot
2016-03-12 15:36     ` Jianyu Zhan
2016-03-12 16:25   ` kbuild test robot
2016-03-12 15:10 ` Jianyu Zhan [this message]
2016-03-12 20:08   ` [PATCH 3/3] x86/irq: update first_system_vector only when X86_LOCAL_PIC is on Thomas Gleixner
2016-03-13  1:28     ` Jianyu Zhan
2016-03-13  6:35       ` Thomas Gleixner
2016-03-13  7:25         ` Jianyu Zhan
2016-03-13  7:41           ` Jianyu Zhan
2016-03-13  7:55           ` Thomas Gleixner
2016-03-13  8:20             ` Jianyu Zhan
2016-03-13  9:11               ` Thomas Gleixner
2016-03-13  9:29                 ` Jianyu Zhan
2016-03-13  9:33                   ` Thomas Gleixner
2016-03-13 10:08                     ` Jianyu Zhan
2016-03-13 11:12                       ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fa064e4e2fd688a42480f686825f485ade4e30ca.1457790777.git.nasa4836@gmail.com \
    --to=nasa4836@gmail.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=ajm@sgi.com \
    --cc=akinobu.mita@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=bp@suse.de \
    --cc=brgerst@gmail.com \
    --cc=dvlasenk@redhat.com \
    --cc=feng.wu@intel.com \
    --cc=hpa@zytor.com \
    --cc=jiang.liu@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=penberg@cs.helsinki.fi \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=x86@kernel.org \
    --cc=yhlu.kernel@gmail.com \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome