From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A637C432C3 for ; Tue, 19 Nov 2019 05:50:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E785621783 for ; Tue, 19 Nov 2019 05:50:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574142617; bh=0nt6omekfdvnZbVzvocj9xSl1eWhEFqOqV5EXwNxaH0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=d6nilynnwK42gnBjN0bOIm2sl9atrrssn83iJCOX51/Vv/8h32qxveuikZHyLpG9X jt5neERBpC9JmCVcwiKWEdlbdh7LsS4i4roFIgYcorwbGaRE7wfeZF7prVEjh/kFHr 1BrEktS7EQ8AtNT35eAYXD2TU8bPanPb/hi9kg1c= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731256AbfKSFuP (ORCPT ); Tue, 19 Nov 2019 00:50:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:47192 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731592AbfKSFuM (ORCPT ); Tue, 19 Nov 2019 00:50:12 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 E305A20862; Tue, 19 Nov 2019 05:50:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574142611; bh=0nt6omekfdvnZbVzvocj9xSl1eWhEFqOqV5EXwNxaH0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=auZniHqSvWJjd6NKWjszbEaAjyfL/lpUA3KGfnpp0A7hLY8oKn5jhVNtGUR/TUHy8 ZLtSPbDqFuyD2MOekp1no+8J/tvnd8fCb3ZCp6r84x2N1jqBml/gYPyfcchCsaUAO9 BjwisHZ0ZJuJ8E5FMOTrplzkOx3LR5d6wfucdwJ4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Fontenot , Tyrel Datwyler , Michael Ellerman , Sasha Levin Subject: [PATCH 4.14 141/239] powerpc/pseries: Disable CPU hotplug across migrations Date: Tue, 19 Nov 2019 06:19:01 +0100 Message-Id: <20191119051331.714026993@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191119051255.850204959@linuxfoundation.org> References: <20191119051255.850204959@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Nathan Fontenot [ Upstream commit 85a88cabad57d26d826dd94ea34d3a785824d802 ] When performing partition migrations all present CPUs must be online as all present CPUs must make the H_JOIN call as part of the migration process. Once all present CPUs make the H_JOIN call, one CPU is returned to make the rtas call to perform the migration to the destination system. During testing of migration and changing the SMT state we have found instances where CPUs are offlined, as part of the SMT state change, before they make the H_JOIN call. This results in a hung system where every CPU is either in H_JOIN or offline. To prevent this this patch disables CPU hotplug during the migration process. Signed-off-by: Nathan Fontenot Reviewed-by: Tyrel Datwyler Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/kernel/rtas.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 141d192c69538..a01f83ba739ef 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c @@ -984,6 +984,7 @@ int rtas_ibm_suspend_me(u64 handle) goto out; } + cpu_hotplug_disable(); stop_topology_update(); /* Call function on all CPUs. One of us will make the @@ -998,6 +999,7 @@ int rtas_ibm_suspend_me(u64 handle) printk(KERN_ERR "Error doing global join\n"); start_topology_update(); + cpu_hotplug_enable(); /* Take down CPUs not online prior to suspend */ cpuret = rtas_offline_cpus_mask(offline_mask); -- 2.20.1