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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 8E308C43331 for ; Sun, 10 Nov 2019 03:02:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A28E21848 for ; Sun, 10 Nov 2019 03:02:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573354978; bh=mTMyNZmUP7m6m+GiNwq3SSg7P7nkivXNNpmlCAQfuDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=TnEf0DG0iDDYgIsuKuTsPy5wV1jqMS+gLzRKksZT7QH/VveAnrfgBe3nT6swR1yFZ uB42JXJAt5/nziN6VttrtzErNbguI/F4Dzyel4rWnHy8I5K6H6dqZ0VPDmteAKer3e sUOyekltfWicTYBbq6uz6KW2hcSV2131cW/djPcc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726811AbfKJCs4 (ORCPT ); Sat, 9 Nov 2019 21:48:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:56972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726609AbfKJCs4 (ORCPT ); Sat, 9 Nov 2019 21:48:56 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1006A22573; Sun, 10 Nov 2019 02:48:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573354135; bh=mTMyNZmUP7m6m+GiNwq3SSg7P7nkivXNNpmlCAQfuDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dkMPRTYSDrvUqH2gryJMuRAWcw2mJTxSNx2k1KSAxQmW1LZjDfxMnC3y2bGmLnXvy ZN3/WvZu8BX9fJy9CxjeSJr98qoISm+sNVvsZBt8AABkpPo3l6BQUSnFc0uytuMfcp q1014251I2kvghCr+NPVQBe++NBaTR4cgsce41Rw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Fontenot , Tyrel Datwyler , Michael Ellerman , Sasha Levin , linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 4.9 06/66] powerpc/pseries: Disable CPU hotplug across migrations Date: Sat, 9 Nov 2019 21:47:45 -0500 Message-Id: <20191110024846.32598-6-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191110024846.32598-1-sashal@kernel.org> References: <20191110024846.32598-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 a309a7a29cc60..641f3e4c33808 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