Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp12029pja; Fri, 22 Nov 2019 02:47:17 -0800 (PST) X-Google-Smtp-Source: APXvYqzwarLbUVq6s62punyrC6lEMn4o4wenrMZ5WDKp01O9Hynms+2f98uAuNDUTd4K3Rxmwtcu X-Received: by 2002:a17:906:57c3:: with SMTP id u3mr21736201ejr.254.1574419637642; Fri, 22 Nov 2019 02:47:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574419637; cv=none; d=google.com; s=arc-20160816; b=S3lExzJ+Z72z5XMpfFm84c5wvzqN2kM6MRQvjsmrVnUB5rtQqmPKn/Z2DsdI+0kOyt Z1T6iIoKcvPdmn/b5ZOd5XPIA/gIfraIs6PJY1wRM8906o1k3WMFlMplE4Y3n4c11SP5 SkGByscpuSTh/6Zei7NBet4syvgo392nIcXqzyrsNZ5kwgF+BvUovuZt3Tet0/1cCD8g KUgJCOzczyVtYTGq5Sh+H57T4USbZjnry0P27ATw1n3jE6UPahpTaLkd+A6qbQ8RnBgB BHVNmWu+ppbblZXSQ4y3SFqyhNPHBq7enQLysbiQAD35fApz4ROeRu62FrPPshfwD655 pzpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YCT0yqVDgkDU7INLJ4wUPh3qCprItsrtN2ad4SJa0k8=; b=lqle0h3IKn6LL9LQXk6TZm2ewRkdaIZ8pDU35E6CCc+tQV/5BQvUcpyb76SPRg7f3C M3oEpiurwNp/7raBvhWj9Zg8jnODo0vXTxwWRIZvw4HnWBHR8oRZu78DFgAka9cpciAD UkGkRxqmF8Y+KJtoYtWa+MeU5ILWbo9twXITKq71dzN9wEfzf40DkD3dFaWmdNxENotH 0MUe3AQhshTbwcNomGIWt4MCZ7SIXe4wZTyKSiDvGgCJ8O8kr3AGtbZ1xQbsgvK+PBf+ 5ySJgn1X1n88qFQL8NDeb2gMYpN1f3yPKbp9g7nLF8bm58NtQJm9nbRLmlCE4rcWvqAn qCeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RH4sBbTx; 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 o5si4008824ejn.123.2019.11.22.02.46.54; Fri, 22 Nov 2019 02:47:17 -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; dkim=pass header.i=@kernel.org header.s=default header.b=RH4sBbTx; 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 S1729138AbfKVKml (ORCPT + 99 others); Fri, 22 Nov 2019 05:42:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:47818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727913AbfKVKmh (ORCPT ); Fri, 22 Nov 2019 05:42:37 -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 F1E1F20637; Fri, 22 Nov 2019 10:42:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574419356; bh=mTMyNZmUP7m6m+GiNwq3SSg7P7nkivXNNpmlCAQfuDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RH4sBbTxE9CBEzj9DQFqJhMvczd/dJA6qcMbvCEK4zZ839TpdH87RClY/yWusXYbN DapmLGsaskXfGHbJMpros6oDPNjE+Mzr4xkPNNqeH7aIgi9fpCJC+iF7maYHiZ0vT2 hk3TdKLX01/x1F1r7oldtty/uIKfgx6lEeROyyTA= 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.9 085/222] powerpc/pseries: Disable CPU hotplug across migrations Date: Fri, 22 Nov 2019 11:27:05 +0100 Message-Id: <20191122100909.678879936@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100830.874290814@linuxfoundation.org> References: <20191122100830.874290814@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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