From patchwork Wed Oct 30 15:38:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qais Yousef X-Patchwork-Id: 11219825 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 EAA13912 for ; Wed, 30 Oct 2019 15:58:23 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D018D21906 for ; Wed, 30 Oct 2019 15:58:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D018D21906 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iPqKz-00006J-54; Wed, 30 Oct 2019 15:56:45 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iPq7B-0007MF-PO for xen-devel@lists.xenproject.org; Wed, 30 Oct 2019 15:42:29 +0000 X-Inumbo-ID: e10f0e76-fb2b-11e9-9528-12813bfff9fa Received: from foss.arm.com (unknown [217.140.110.172]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id e10f0e76-fb2b-11e9-9528-12813bfff9fa; Wed, 30 Oct 2019 15:42:29 +0000 (UTC) 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 AECB5337; Wed, 30 Oct 2019 08:42:28 -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 90E333F6C4; Wed, 30 Oct 2019 08:42:27 -0700 (PDT) From: Qais Yousef To: Thomas Gleixner , Greg Kroah-Hartman Date: Wed, 30 Oct 2019 15:38:33 +0000 Message-Id: <20191030153837.18107-9-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> X-Mailman-Approved-At: Wed, 30 Oct 2019 15:56:43 +0000 Subject: [Xen-devel] [PATCH 08/12] driver: xen: Replace cpu_up/down with device_online/offline X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, Boris Ostrovsky , Qais Yousef MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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: Boris Ostrovsky CC: Juergen Gross CC: Stefano Stabellini CC: xen-devel@lists.xenproject.org CC: linux-kernel@vger.kernel.org --- drivers/xen/cpu_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/cpu_hotplug.c b/drivers/xen/cpu_hotplug.c index f192b6f42da9..ec975decb5de 100644 --- a/drivers/xen/cpu_hotplug.c +++ b/drivers/xen/cpu_hotplug.c @@ -94,7 +94,7 @@ static int setup_cpu_watcher(struct notifier_block *notifier, for_each_possible_cpu(cpu) { if (vcpu_online(cpu) == 0) { - (void)cpu_down(cpu); + device_offline(get_cpu_device(cpu)); set_cpu_present(cpu, false); } }