Received: by 10.223.176.5 with SMTP id f5csp595077wra; Fri, 9 Feb 2018 04:11:41 -0800 (PST) X-Google-Smtp-Source: AH8x226hTQx30BCl5QAHWj4c0394oyYdMZKzE8Vvm6yDetxGPvqhISXY7ln9zn52HhcBe2R5UH89 X-Received: by 10.99.181.4 with SMTP id y4mr2312421pge.344.1518178301377; Fri, 09 Feb 2018 04:11:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518178301; cv=none; d=google.com; s=arc-20160816; b=TVUd6MJFvjRL4g++6E0dVUck83jxryS1kxvNLxALaZlYEp8GGj1pxIFreVK0yH7ZJr AmpOrE81OnUOHLpzm2hoLGYrxMio2iYsNfp8SQzkqVoQc+dtNE9IAPnhAtkgRmL/Zb7G 42AgrRo/WxQ2Eg6PyaygEwI8VS5N68uZEpnNEfxQkBOyZUbTI94YGkCDQnj+6sybHGFI B3ls4o39lDzdJnmF4CBRteHrMBmnqr8EX5Ue5cZMrPge4HPAuCxy571LL87OPO77KWOG dZ/RvWJnO/s7jVycHYXBmo/167g/MAVFCdRObxouqFc+dnwmzYUo5fc1jc8JxV8vzP4z oSvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=DNan6gernd0nv2dLAJdXbB4oxqQjgm66LRU19x45Bow=; b=Soom0GHVZv95ILWy191blGYeYCQVsMUhLeM8WWu6oF7lGrgjCKMcpvpKoUWKBE9UMh /OEbjQHd3qKSjlaTPWLEfDujael8Yc3HuUQ81L8z6a62L+Pj707pa07fbQkm2fPxg1pR Xm4wTVfB4stw7JoilAZMwkTjEnG18wLeFTCeV/SzJur5wIM3mt/JOhqBZIngn9+ZAN4D 69uutZBMkKUnFPpEJ9gQaYKxKLgyUOpftybxMDWMAcICamg7OWJSOjGVQaKeztgYsDRt TdBPycO48WTSF1mHBhOkuBCr80yFwmzRrvLkN2ZZ2vj6bVFO1FbG6h+dBPP6wvl4x2A8 AyMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y5si13925pfg.267.2018.02.09.04.11.27; Fri, 09 Feb 2018 04:11:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752373AbeBIMKq (ORCPT + 99 others); Fri, 9 Feb 2018 07:10:46 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:50726 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752331AbeBIMKn (ORCPT ); Fri, 9 Feb 2018 07:10:43 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C952E4022931; Fri, 9 Feb 2018 12:10:42 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-8-18.pek2.redhat.com [10.72.8.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 210032024CA2; Fri, 9 Feb 2018 12:10:37 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org, ebiederm@xmission.com Cc: mingo@kernel.org, tglx@linutronix.de, x86@kernel.org, douly.fnst@cn.fujitsu.com, joro@8bytes.org, uobergfe@redhat.com, prarit@redhat.com, Baoquan He Subject: [PATCH v3 5/5] x86/apic: Set up through-local-APIC on boot CPU if 'noapic' specified Date: Fri, 9 Feb 2018 20:10:08 +0800 Message-Id: <20180209121008.28980-6-bhe@redhat.com> In-Reply-To: <20180209121008.28980-1-bhe@redhat.com> References: <20180209121008.28980-1-bhe@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Fri, 09 Feb 2018 12:10:42 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Fri, 09 Feb 2018 12:10:42 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'bhe@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently kdump kernel becomes very slow if 'noapic' is specified. Normal kernel won't. Kernel parameter 'noapic' is used to disable IO-APIC in system for testing or special purpose. Here the root cause is that in kdump kernel LAPIC is disabled since commit 522e664644 ("x86/apic: Disable I/O APIC before shutdown of the local APIC"). In this case We need set up through-local-APIC on boot CPU in setup_local_APIC(). While In normal kernel the legacy irq mode is enabled in BIOS. If it is virtual wire mode, the local-APIC has been enabled and set as through-local-APIC. Though we fix the regression introduced by criminal commit 522e664644, for safety and clarity, better set up through-local-APIC explicitly, but not rely on the default boot irq mode. Do it now. 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 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