From patchwork Mon Mar 23 13:51:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qais Yousef X-Patchwork-Id: 11453047 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 5093892A for ; Mon, 23 Mar 2020 13:52:40 +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 315382072D for ; Mon, 23 Mar 2020 13:52:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 315382072D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass 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 1jGNUX-0002o3-Bv; Mon, 23 Mar 2020 13:51: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 1jGNUW-0002nm-KO for xen-devel@lists.xenproject.org; Mon, 23 Mar 2020 13:51:44 +0000 X-Inumbo-ID: 6e311f80-6d0d-11ea-82d5-12813bfff9fa Received: from foss.arm.com (unknown [217.140.110.172]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 6e311f80-6d0d-11ea-82d5-12813bfff9fa; Mon, 23 Mar 2020 13:51:43 +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 A5CE1FEC; Mon, 23 Mar 2020 06:51:43 -0700 (PDT) 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 A6B293F52E; Mon, 23 Mar 2020 06:51:42 -0700 (PDT) From: Qais Yousef To: Thomas Gleixner Date: Mon, 23 Mar 2020 13:51:06 +0000 Message-Id: <20200323135110.30522-14-qais.yousef@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200323135110.30522-1-qais.yousef@arm.com> References: <20200323135110.30522-1-qais.yousef@arm.com> Subject: [Xen-devel] [PATCH v4 13/17] 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. Reviewed-by: Juergen Gross 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); } }