Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1643637ybv; Sun, 23 Feb 2020 11:31:14 -0800 (PST) X-Google-Smtp-Source: APXvYqxhdMsvKW/ZpFyLrJoLT1ph+kMrq3yVQbPYlX2jOaJEQD9aJy8OPDuK/0g5wJ0KaFqSDEF1 X-Received: by 2002:a9d:6288:: with SMTP id x8mr36150622otk.2.1582486274074; Sun, 23 Feb 2020 11:31:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582486274; cv=none; d=google.com; s=arc-20160816; b=qq56WwlSVpOCUVafaxxSyQHiEWBWeWNwjI/etHfDqER3zc49kOzinXn1LLukJGhzXT 1m+T5J542QbeMj3QmDevK3rxxZR7fcCmURFieSfpD2tFkiRszzGglB+/uhWWmrC4mD6H BCeAPaO7PfOStBf4Emfm7o9LGENOkARBClvnvOnEm9DcDdeusefXKCVK8epSzkC5+P4A vQnYyLZ2TG/9WCebpyzFet/+H/rUbrDDRVLX5+9gm+YF2hHP4uvIrVIDzBOqdnj1JF8O UEnaj2JhGSF16o2EDue0LGpMuU8mWEQ+v9y80s19KDXccmmNeh2gFdo1EYczubwl4siO JX3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=bVQGXrGrCHMujonzvcmvuue8TtFeZS4I6eF6IGu0KV0=; b=NxWIZaCETUYIVXNZyAWxBPbjvw4S9tbBBvJX+y1RKN5EBqIe6WwBQ4FUMp0f7w11YT fJXm0I79xB3Jq/0HulIHEWbRj8HLU0chAowie3vaIMjaYpyhws4pJqHh+2QeYyvZiVnJ EFZe7jqbOv8Aez6yscWsS1AEo5FRMss9Bcz9zZXyXR8PlcKWFIL6Wtg9+GF6vLYEwjcK KUUiO2KTuOrvBHG3AoXHwfF4CsgG0T15ZeZJRzHpHUj3qcLVzcq58exBcJXVmPKWMB/v MvJ8B+j8FECJ9saTk2howaXGiWOHTqCVbXWnZAadJ1DJ1c382JJdokm5YaK7UiSFAqhk CaVA== 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 65si4604160oif.14.2020.02.23.11.31.02; Sun, 23 Feb 2020 11:31:14 -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 S1727459AbgBWTab (ORCPT + 99 others); Sun, 23 Feb 2020 14:30:31 -0500 Received: from foss.arm.com ([217.140.110.172]:51422 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727267AbgBWTaI (ORCPT ); Sun, 23 Feb 2020 14:30:08 -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 C4526106F; Sun, 23 Feb 2020 11:30:07 -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 6D44E3F6CF; Sun, 23 Feb 2020 11:30:06 -0800 (PST) From: Qais Yousef To: Thomas Gleixner Cc: "Paul E . McKenney" , Qais Yousef , "David S. Miller" , Bjorn Helgaas , "Rafael J. Wysocki" , Greg Kroah-Hartman , Sakari Ailus , sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 09/15] sparc: Replace cpu_up/down with add/remove_cpu Date: Sun, 23 Feb 2020 19:29:36 +0000 Message-Id: <20200223192942.18420-10-qais.yousef@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200223192942.18420-1-qais.yousef@arm.com> References: <20200223192942.18420-1-qais.yousef@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. Acked-by: David S. Miller Signed-off-by: Qais Yousef CC: "David S. Miller" CC: Thomas Gleixner CC: Bjorn Helgaas CC: "Rafael J. Wysocki" CC: Greg Kroah-Hartman CC: Sakari Ailus CC: sparclinux@vger.kernel.org CC: linux-kernel@vger.kernel.org --- David, this now uses add/remove_cpu() which you should be CCed on. I wasn't sure if I can keep your Ack or remove it in this case. Please let me know if you need more clarification. arch/sparc/kernel/ds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c index bbf59b3b4af8..75232cbd58bf 100644 --- a/arch/sparc/kernel/ds.c +++ b/arch/sparc/kernel/ds.c @@ -555,7 +555,7 @@ static int dr_cpu_configure(struct ds_info *dp, struct ds_cap_state *cp, printk(KERN_INFO "ds-%llu: Starting cpu %d...\n", dp->id, cpu); - err = cpu_up(cpu); + err = add_cpu(cpu); if (err) { __u32 res = DR_CPU_RES_FAILURE; __u32 stat = DR_CPU_STAT_UNCONFIGURED; @@ -611,7 +611,7 @@ static int dr_cpu_unconfigure(struct ds_info *dp, printk(KERN_INFO "ds-%llu: Shutting down cpu %d...\n", dp->id, cpu); - err = cpu_down(cpu); + err = remove_cpu(cpu); if (err) dr_cpu_mark(resp, cpu, ncpus, DR_CPU_RES_FAILURE, -- 2.17.1