From: Baoquan He <bhe@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: ebiederm@xmission.com, tglx@linutronix.de, mingo@redhat.com,
hpa@zytor.com, x86@kernel.org, douly.fnst@cn.fujitsu.com,
joro@8bytes.org, uobergfe@redhat.com, prarit@redhat.com,
Baoquan He <bhe@redhat.com>
Subject: [PATCH v2 2/2] x86/apic: Set up through-local-APIC on boot CPU's LINT0 if 'noapic' specified
Date: Thu, 25 Jan 2018 22:11:34 +0800 [thread overview]
Message-ID: <20180125141134.25053-3-bhe@redhat.com> (raw)
In-Reply-To: <20180125141134.25053-1-bhe@redhat.com>
Kdump kernel will become very slow if 'noapic' is specified. Normal kernel
won't.
In normal kernel the legacy irq mode is enabled in BIOS. If it is virtual
virtual wire mode, the local-APIC has been enabled and set as
through-local-APIC. Though specifying 'noapic' in normal kernel it still
have the virtual wire mode working. In kdump kernel, local-APIC is disabled
in crashed kernel before jump to kdump kernel since commit 522e664644
("x86/apic: Disable I/O APIC before shutdown of the local APIC"). So we
need set up through-local-APIC on boot CPU explicitly in setup_local_APIC()
if 'noapic' specified.
Do it now.
Signed-off-by: Baoquan He <bhe@redhat.com>
---
arch/x86/kernel/apic/apic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 25ddf02598d2..3fc259b4dd2d 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1570,7 +1570,7 @@ void setup_local_APIC(void)
* TODO: set up through-local-APIC from through-I/O-APIC? --macro
*/
value = apic_read(APIC_LVT0) & APIC_LVT_MASKED;
- if (!cpu && (pic_mode || !value)) {
+ if (!cpu && (pic_mode || !value || skip_ioapic_setup)) {
value = APIC_DM_EXTINT;
apic_printk(APIC_VERBOSE, "enabled ExtINT on CPU#%d\n", cpu);
} else {
--
2.13.6
next prev parent reply other threads:[~2018-01-25 14:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-25 14:11 [PATCH v2 0/2] x86/apic/kexec: Legacy irq setting fixs in kdump kernel Baoquan He
2018-01-25 14:11 ` [PATCH v2 1/2] x86/apic/kexec: Enable legacy irq mode before jump to kexec/kdump kernel Baoquan He
2018-02-07 17:11 ` Eric W. Biederman
2018-02-07 17:35 ` Eric W. Biederman
2018-02-07 19:48 ` Eric W. Biederman
2018-02-08 12:34 ` Baoquan He
2018-01-25 14:11 ` Baoquan He [this message]
2018-02-02 4:04 ` [PATCH v2 0/2] x86/apic/kexec: Legacy irq setting fixs in kdump kernel Dou Liyang
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=20180125141134.25053-3-bhe@redhat.com \
--to=bhe@redhat.com \
--cc=douly.fnst@cn.fujitsu.com \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=prarit@redhat.com \
--cc=tglx@linutronix.de \
--cc=uobergfe@redhat.com \
--cc=x86@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