Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp356568imm; Fri, 3 Aug 2018 04:45:33 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcGd/5GlmdbiGAym7wR2UiYxq1DvDZXQIiyZ4LIkAgDW7nX+YLFo1uLDkzunV0eTS9y6uaN X-Received: by 2002:a62:3ece:: with SMTP id y75-v6mr4149491pfj.7.1533296733770; Fri, 03 Aug 2018 04:45:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533296733; cv=none; d=google.com; s=arc-20160816; b=wKQo28pn5HN7JoOAG4txjL0pTkkv8twg+iN6+LVC7EEKbDQ7nIqyTmBLMSTgcWfB2C j1SV8+cjR1fz2WWdPkHOcj7Dqv5mevxRBuqqbdn7LUQLoGvgCb3QfwDZJ1cVBbGxir0d 6wFBPiPLjeBSqha/EAH92YtdRjuiIkXDe0KeE5s1xjPgEIIXvLPHNFdiFBsPKxLYWQz/ e1xvfhu6hohx3iFzVQxAGp/o9VGO4n8Za791zhquFWUeScwmsyub78OhplS+xZx14Jck RuhzBuwL1N24eNhU2YZySDOf8AAtSnB3a7jddk7kZQq/KvvtTDFpDnJxI+Cv5udOtsjW /NDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=byNl4k1fXCCyiuXFGYmnPHf0o5+0YMzTptwVVa/XV2M=; b=f7UBnKvTZaNp4ciwY2g1mjuurr1O7I8H5+/o+5UnBbr9j/vq0sqzqMo0uMeGD5N+7H adfqwEp+z49mPJ1q24Lepp2I9kXv8LZ4xKejndi3gk32W276K4W8KhM1zu6/Kt8NZKPU bDcsMIgrRc3xcHq3xdXzHGTZguGwmVceM3wkKlQ0tFiq3uJTGt/1UFUR3gVSvC2mZ8yR 1OfcZp3u5mTnZA8/MFOwBh2OfpbMPnbmsSCCYbjeANWe4E+082MxtSS2QQ2scT9bgz00 4sYIxKuHhdNokgx9no8SG50ClmSvxGqSvFnrrUhR+RRvzFfJEzvyvhePqRW66sfwmXMu aCpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jYzzhvNY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p67-v6si4951622pfg.295.2018.08.03.04.45.19; Fri, 03 Aug 2018 04:45:33 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=jYzzhvNY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729407AbeHCNkJ (ORCPT + 99 others); Fri, 3 Aug 2018 09:40:09 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:50597 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728198AbeHCNkG (ORCPT ); Fri, 3 Aug 2018 09:40:06 -0400 Received: by mail-it0-f67.google.com with SMTP id j81-v6so6179413ite.0 for ; Fri, 03 Aug 2018 04:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=byNl4k1fXCCyiuXFGYmnPHf0o5+0YMzTptwVVa/XV2M=; b=jYzzhvNYoqJwpAPS1knAXX8xC+DkR6kUl/Rmym1ob4aVcpjIB47hj+fucZcJgXaN1x lbm/EI/J8wuAGoPoplOFJOt9OUEfMX6xdDzIyudBRWcGXgCCUXMMTkIa/3A/YTfGb93I PpDSKeHc0eWUY60qi+uQvPZpRFvJykT8uKVFg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=byNl4k1fXCCyiuXFGYmnPHf0o5+0YMzTptwVVa/XV2M=; b=Jb4Tnm3nC+kNbojXl6xsj/nrdk+QVgEtAKqUTiNX3dw7QbfL23OBNmgMhKCYhADH70 nNPUBEXb6B3p+sC+EpwE2DZ8qUfSq1n6VhZ7Z/fnYnrQJG1KdU5ScXj9jlBVPEdhddRK 5vneBSoOfGKSGYRO21xCZoTGYdI5W+zte9axt4M6Q8e9/sey8AFm8LI4SR7eKx3zxQHy 6n7XqvFpWXYKIaCgMQorTMqKR325Vi182r7OQSnU5Eznq4y40DCBRW95VieFeyAlUC+d 4TU9CyuC/tc7aU80Lci2tdyjoOzKK4ITlXFD9P4r0o1IpV7ZFlBEZJbABpOtn2DMx5id 6Hgw== X-Gm-Message-State: AOUpUlHIGGDnKJHy9pkXJ37mkm1dTbVAPzgJi/eRGpsQacHCnjw83Wuw R/Cm+OJjCLbqln8OODAnSoqwyKvz9nHLW70kuEJO/Q== X-Received: by 2002:a02:579a:: with SMTP id b26-v6mr3009930jad.107.1533296648958; Fri, 03 Aug 2018 04:44:08 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:2b03:0:0:0:0:0 with HTTP; Fri, 3 Aug 2018 04:44:08 -0700 (PDT) In-Reply-To: <3889041.sTGkQNs1Ck@aspire.rjw.lan> References: <20180620172226.15012-1-ulf.hansson@linaro.org> <20180620172226.15012-6-ulf.hansson@linaro.org> <3889041.sTGkQNs1Ck@aspire.rjw.lan> From: Ulf Hansson Date: Fri, 3 Aug 2018 13:44:08 +0200 Message-ID: Subject: Re: [PATCH v8 05/26] PM / Domains: Add helper functions to attach/detach CPUs to/from genpd To: "Rafael J. Wysocki" Cc: Sudeep Holla , Lorenzo Pieralisi , Mark Rutland , Linux PM , Kevin Hilman , Lina Iyer , Lina Iyer , Rob Herring , Daniel Lezcano , Thomas Gleixner , Vincent Guittot , Stephen Boyd , Juri Lelli , Geert Uytterhoeven , Linux ARM , linux-arm-msm , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19 July 2018 at 12:22, Rafael J. Wysocki wrote: > On Wednesday, June 20, 2018 7:22:05 PM CEST Ulf Hansson wrote: >> Introduce two new genpd helper functions, of_genpd_attach|detach_cpu(), >> which takes the CPU-number as an in-parameter. >> >> To attach a CPU to a genpd, of_genpd_attach_cpu() starts by fetching the >> struct device belonging to the CPU. Then it calls genpd_dev_pm_attach(), >> which via DT tries to hook up the CPU device to its corresponding PM >> domain. If it succeeds, of_genpd_attach_cpu() continues to prepare/enable >> runtime PM of the device. >> >> To detach a CPU from its PM domain, of_genpd_attach_cpu() reverse the >> operations made from of_genpd_attach_cpu(). However, first it checks that >> the CPU device has a valid PM domain pointer assigned, as to make sure it >> belongs to genpd. >> >> Cc: Lina Iyer >> Co-developed-by: Lina Iyer >> Signed-off-by: Ulf Hansson >> --- >> drivers/base/power/domain.c | 69 +++++++++++++++++++++++++++++++++++++ >> include/linux/pm_domain.h | 9 +++++ >> 2 files changed, 78 insertions(+) [...] > I'd combine this with patch [04/26]. The split here is somewhat artificial IMO. I wanted to keep one change per patch, hence the split. $subject patch introduces helpers to add CPU devices to genpd and isn't really part of making genpd to cope with CPU devices. So $subject patch is about avoiding open coding. Are you still sure you want me to squash the changes? Kind regards Uffe