Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2212154imm; Mon, 28 May 2018 04:03:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqsZ6Fg4Es3Rw/WVbof9RTEHopDn4z/pvDWMYPrMwQbZWF5loRlI9JqYGeLOEnukfRKUxDH X-Received: by 2002:a17:902:8685:: with SMTP id g5-v6mr12949234plo.302.1527505414482; Mon, 28 May 2018 04:03:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527505414; cv=none; d=google.com; s=arc-20160816; b=yxczz5VhPJA0Da6eLtY988U3bu7swrjmMgw/2Y8jchGE42DE0uRkVNSoiGTV01cmI3 jLaA/avF2UL+5qK08/1OuGE2w+KPNQSsjXH977yQsw0Zy27ykhqGswfseT7sDDvGC+8D nNdT/U20GEQ6qeMmGLstCxES3c06PtUf1YHNuCNgIzX5TwknQepS3XX1tGhqIa788Nai 8i3fDuWWs+EFS7/VlUvYtPYE3JoH7I4zoj9+y7HGHd8lDI73dknWEp/p/OtftkE016fF rHfJcWJtppa1FgrnUECkXSaJncQ1Z6sIyh4NkEyoDV3QhtzoIeWYg2ly+5cKYJypnHh3 P2iA== 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=kqdQBgqauVgJVIP5IsAdRgG2D92KhN2y6nQ5sj8s9SY=; b=UuozrGmF//f3oCYSE/ySeRcOASnvsSRYj43YHd9Si0m61uj/htGIiXqD7whMQpEA1E 52KPqV2WdlVUWojrp9zvT65/WdEMqrwaKu1AH9NGkNdgzbKn90bgjqDZTlkNm9/qFaEF HboP+s6KWxuuZIx2RMOBZc7mRBZTnEdjlQcQt3kO0awcTINr566EjHBNv3VkujFWV9hV 32YwmJvTx7RvFdFI/5BxRAuQ9prSxkke2O6zwnjbKDZo7NF70bhDLVdsI0NkN+Ux/ioD ixDKrhibBzEfFdqjLkb6qfwTqbaAoLYw6ERUHxkK34AcwxBJag0gxLO/b+262Q8HAQhI qNLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kHjFmTYH; 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 r15-v6si5573855pgn.498.2018.05.28.04.03.16; Mon, 28 May 2018 04:03:34 -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=kHjFmTYH; 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 S1422905AbeE1LDJ (ORCPT + 99 others); Mon, 28 May 2018 07:03:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:50298 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422873AbeE1LDB (ORCPT ); Mon, 28 May 2018 07:03:01 -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 568E92088E; Mon, 28 May 2018 11:03:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527505380; bh=Zp06V1icacpb5TcT/McayaXcwe9cntgZSPAt2d6Aup0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kHjFmTYHLOsQH2VqyogF4koHaMUJRm6vIqrWCAosshLfrLLbmiiyQgKDFLMyAh521 NJvgSeG722gKNCpJ4FniBr+BGrwfENLPYzwpr3O30zzSTfcOJLwLXzWjFV707m5GDg RhuEZaAxOjUzbCZnMsTLVnosaUhfaWFg5lVcS2zA= 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.14 477/496] x86/apic: Set up through-local-APIC mode on the boot CPU if noapic specified Date: Mon, 28 May 2018 12:04:22 +0200 Message-Id: <20180528100340.002614291@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@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.14-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 @@ -1481,7 +1481,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 {