Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2232639imm; Mon, 28 May 2018 04:26:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq41v7tQZJH7Y7pA/OkK/YcHYsSShxTJH1Z311MCMNhPsWWg4bLSlkkKhL4lkCt4Wjukhxy X-Received: by 2002:a62:18d6:: with SMTP id 205-v6mr13133839pfy.242.1527506783274; Mon, 28 May 2018 04:26:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527506783; cv=none; d=google.com; s=arc-20160816; b=KXWbqTlURLOBRvJ4Pk7L85UFhDVX4Am3KHgCtxE4AjlSSIRYRnCTxtfBo+YTaGUCua 09ROyKEAHiM+TYIQQCPj735Fdrs1nEBscLYyoDVsoyKXi4tub7Q3/BebeAs/SzZHCrw9 Eo5Sxv0LXaJelf+qb3wguREMAqo2DLfhMguSvHvxROa9TK9VWs8OFfAeJ9jhwAPIJ428 9RDIovxcG0Xr6Kt/+uKipid/nxaYjyyppKCurrSYLxiuScQw/CxYcIKkh4rxhz3CeJ4L L9LCex7OT/Wud9Tg+nEkRPpgSvffxiWR2gETe+xjMAQxdh5NU1Pp9NSmuYN9jNIM7I45 MDmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Iokug1eDWapSSrIw5y8gWq1d6kr43C3wESFL4bwW87c=; b=yVscq89Xxk/L4AKwYu+lB8TJQ+iTfRtaB5Yjrdo1oJiPIk9NwmbRFFmju1qt52NKPg 2ZOtlFVkK8eR81Vo4rzLgqpnmTPltCRjOCSX2dONkWbNYte7gjdc0nj32ETd7Cl97Xgc vDfo2Vf+iZ6yj+KOWNJK4YExrLqjJV0FGZicfeSutRaN7dVLuz88q2rsWe6eL1CkajHV m+qeUBvPVQmWty8Qz2UcdYQeQkukZFyRRJBQ+vOIkreC53BTfLFmeQOX4X0IJvRXJ0C1 rH59qTvL6DzJNEuKCcncO5aNcbG17c9yYgYoIEOEo71pR9A2PYakIDEgq3QJdVP0vgTn lV/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BiGoLyN5; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w20-v6si30330690pfn.12.2018.05.28.04.26.08; Mon, 28 May 2018 04:26:23 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=BiGoLyN5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424784AbeE1LZE (ORCPT + 99 others); Mon, 28 May 2018 07:25:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:34482 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424426AbeE1LPY (ORCPT ); Mon, 28 May 2018 07:15:24 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5F07F208A1; Mon, 28 May 2018 11:15:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527506123; bh=kM+rja1nIHHaxTohjX7vSTyPjmUs8fHGJwy2w9bQkq4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BiGoLyN5TURfqDajAOg1BnGGnk6lQwSZGwPqCdc/KZbD2nQ6fp8+WmQD4CLOlBmEH KKvo7+uJjEgSqzFHrBcs8WHjRWAdsrlif1UEQkzzjzInC02+2iLYBgoOCg12qtgPFT feTtlZCOkN69tL49kExFu8FqQKXpGJeBL7u5l2Eo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Baoquan He , "Eric W. Biederman" , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , douly.fnst@cn.fujitsu.com, joro@8bytes.org, prarit@redhat.com, uobergfe@redhat.com, Ingo Molnar , Sasha Levin Subject: [PATCH 4.16 249/272] x86/apic: Set up through-local-APIC mode on the boot CPU if noapic specified Date: Mon, 28 May 2018 12:04:42 +0200 Message-Id: <20180528100301.194366723@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100240.256525891@linuxfoundation.org> References: <20180528100240.256525891@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Baoquan He [ Upstream commit bee3204ec3c49f6f53add9c3962c9012a5c036fa ] Currently the kdump kernel becomes very slow if 'noapic' is specified. Normal kernel doesn't have this bug. 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(). In normal kernel the legacy irq mode is enabled by the BIOS. If it is virtual wire mode, the local-APIC has been enabled and set as through-local-APIC. Though we fixed the regression introduced by commit 522e664644, to further improve robustness set up the through-local-APIC mode explicitly, do not rely on the default boot IRQ mode. Signed-off-by: Baoquan He Reviewed-by: Eric W. Biederman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: douly.fnst@cn.fujitsu.com Cc: joro@8bytes.org Cc: prarit@redhat.com Cc: uobergfe@redhat.com Link: http://lkml.kernel.org/r/20180214054656.3780-7-bhe@redhat.com [ Rewrote the changelog. ] Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/apic/apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 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 {