From patchwork Wed Oct 30 15:38:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qais Yousef X-Patchwork-Id: 11219823 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9047D14DB for ; Wed, 30 Oct 2019 15:42:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 78AF5208C0 for ; Wed, 30 Oct 2019 15:42:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726175AbfJ3PmZ (ORCPT ); Wed, 30 Oct 2019 11:42:25 -0400 Received: from foss.arm.com ([217.140.110.172]:36674 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727357AbfJ3PmY (ORCPT ); Wed, 30 Oct 2019 11:42:24 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EC85F68D; Wed, 30 Oct 2019 08:42:23 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B40743F6C4; Wed, 30 Oct 2019 08:42:22 -0700 (PDT) From: Qais Yousef To: Thomas Gleixner , Greg Kroah-Hartman Cc: Qais Yousef , "James E.J. Bottomley" , Helge Deller , Richard Fontana , Armijn Hemel , linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/12] parisc: Replace cpu_up/down with device_online/offline Date: Wed, 30 Oct 2019 15:38:31 +0000 Message-Id: <20191030153837.18107-7-qais.yousef@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191030153837.18107-1-qais.yousef@arm.com> References: <20191030153837.18107-1-qais.yousef@arm.com> Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org The core device API performs extra housekeeping bits that are missing from directly calling cpu_up/down. See commit a6717c01ddc2 ("powerpc/rtas: use device model APIs and serialization during LPM") for an example description of what might go wrong. This also prepares to make cpu_up/down a private interface for anything but the cpu subsystem. Signed-off-by: Qais Yousef CC: "James E.J. Bottomley" CC: Helge Deller CC: Richard Fontana CC: Armijn Hemel CC: Greg Kroah-Hartman CC: Thomas Gleixner CC: linux-parisc@vger.kernel.org CC: linux-kernel@vger.kernel.org Acked-by: Helge Deller # parisc --- Couldn't compile test this one. I'm not confident that this is a correct patch to be honest. This __init indicates we're booting the secondary cpus and that might be too early in the process to use the core API..? arch/parisc/kernel/processor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index 13f771f74ee3..4dde5fe78f0c 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c @@ -212,7 +212,9 @@ static int __init processor_probe(struct parisc_device *dev) #ifdef CONFIG_SMP if (cpuid) { set_cpu_present(cpuid, true); - cpu_up(cpuid); + lock_device_hotplug(); + device_online(get_cpu_device(cpuid)); + unlock_device_hotplug(); } #endif