From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752658AbeAQJ1u (ORCPT + 1 other); Wed, 17 Jan 2018 04:27:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41892 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751019AbeAQJ1s (ORCPT ); Wed, 17 Jan 2018 04:27:48 -0500 Date: Wed, 17 Jan 2018 17:27:43 +0800 From: Baoquan He To: linux-kernel@vger.kernel.org, ebiederm@xmission.com Cc: mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com, x86@kernel.org, douly.fnst@cn.fujitsu.com, rostedt@goodmis.org, jgross@suse.com, peterz@infradead.org, uobergfe@redhat.com, joro@8bytes.org Subject: Re: [RESEND PATCH 1/3] x86/apic: Set up through LAPIC on boot CPU's LINT0 if ioapic is disabled Message-ID: <20180117092743.GL10882@localhost.localdomain> References: <1515123732-28908-1-git-send-email-bhe@redhat.com> <20180105043750.GJ7235@x1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180105043750.GJ7235@x1> User-Agent: Mutt/1.9.1 (2017-09-22) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 17 Jan 2018 09:27:48 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: CC Eric On 01/05/18 at 12:37pm, Baoquan He wrote: > Kdump kernel will become very slow if 'noapic' is specified in kernel > command line. Normal kernel doesn't have this issue. > > This is because the legacy irq mode is disabled in crashed kernel before > jump jump to kdump kernel since commit 522e664644 ("x86/apic: Disable I/O > APIC before shutdown of the local APIC") is merged. While in normal kernel, > the legacy irq mode has been set in BIOS. > > So we need set the delivery mode AS ExtINT for LVT0 of boot CPU's LAPIC > explicitly if IO-APIC is disabled, to set up through-local-APIC. > > Signed-off-by: Baoquan He > --- > 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 880441f24146..7e613fb90630 100644 > --- a/arch/x86/kernel/apic/apic.c > +++ b/arch/x86/kernel/apic/apic.c > @@ -1521,7 +1521,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.5.5 >