Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1774619ybc; Wed, 20 Nov 2019 04:01:02 -0800 (PST) X-Google-Smtp-Source: APXvYqyv29lip4AL2LNafMPuWiQ9SomM/eORSKVLh7hO23zYN9I3IYKPLIv0TUkLn7t7v1sPXchD X-Received: by 2002:a17:906:f10:: with SMTP id z16mr5056226eji.211.1574251262161; Wed, 20 Nov 2019 04:01:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574251262; cv=none; d=google.com; s=arc-20160816; b=jdY6958kk73VhTZ+oeK48DGKgL/rpbRkDSXpkj+g57Q196SYKfJinCtLHzM+Q6wdRC cDn2ici/2ZLPNdYmEe43MOUXdshi25KVDpsp8JZc1Nw7kzEH9cgx1uBQzHwLlelIFX6x LDTu3JAKYDsQyDUspsKz7CNvxFZi+JJs25Ij8C6OEIMR/EBWa76AsbdcGB8W2BA5nXoI p4/ra+AxAKOvodBFcJhTvwWSvSt6xdlE2gA4zqgynvEoqgx7vCYhebaIAqHtlkENXRjF TfZ/ceE32OaC6dMM7hs7ExRx2KlZAXFKYI6gYWwOC1IIwEFNBzYxuPTeoQCJMqvfzFlj KR5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Nt5xjSiGYOHYEQVIXJk5rADpnC42YWtRxh9E9fatw8I=; b=i/4miLvPgZDn1EHKtFGdLIK74/Dun206bU1Kp5tGUqimUsl9mDlJdKMUHzpYrp+3TU mgG4aTczssaoSWk+U9Jc01vlIQI5NqvpKqNsNnha9XHHPHT/I9mt42irhTVrDZYhLzAw KbFlzTbArSUOs7BLu/pKiOrqDsLB9FdueOzr9UwDQ/GM6gFSDDxzgq1noFDQqIn3m3XD BnwWFjdk6TEkzzCZQ5m/ewPfXPAcCJlqYOPzyyoIEz66jmSsNyGysHt6zBbW8WArpZfi m9uRw2HYtVzAb2SYO8YqB3ljS2NjaSR3SB/HiCQ75tpA9SCLJb9XtAuorOWy+eCFXOVJ tK1g== ARC-Authentication-Results: i=1; mx.google.com; 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 f25si15977024eje.225.2019.11.20.04.00.36; Wed, 20 Nov 2019 04:01:02 -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; 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 S1729003AbfKTLJi (ORCPT + 99 others); Wed, 20 Nov 2019 06:09:38 -0500 Received: from foss.arm.com ([217.140.110.172]:37448 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728995AbfKTLJi (ORCPT ); Wed, 20 Nov 2019 06:09:38 -0500 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 8BFC131B; Wed, 20 Nov 2019 03:09:37 -0800 (PST) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 720363F6C4; Wed, 20 Nov 2019 03:09:36 -0800 (PST) Date: Wed, 20 Nov 2019 11:09:34 +0000 From: Qais Yousef To: "James E.J. Bottomley" , Helge Deller Cc: Richard Fontana , Armijn Hemel , linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Greg Kroah-Hartman Subject: Re: [PATCH 06/12] parisc: Replace cpu_up/down with device_online/offline Message-ID: <20191120110933.wjtmpc4pmqmxhmma@e107158-lin.cambridge.arm.com> References: <20191030153837.18107-1-qais.yousef@arm.com> <20191030153837.18107-7-qais.yousef@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191030153837.18107-7-qais.yousef@arm.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/30/19 15:38, Qais Yousef wrote: > 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 > --- > > 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..? Helge, James Do you have any comment on this? I have no means to test it and I'd appreciate if you can spin it through one of your systems. Thanks -- Qais Yousef > > > 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 > > -- > 2.17.1 >