Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp508123pxv; Thu, 1 Jul 2021 03:17:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQsYsR9FGmhmn3WIlMeuEA5Vf1B60xqpWBfDOX8g7RmQTrwPXs58B2axBXe1IcvnkYXrbA X-Received: by 2002:a5d:83c4:: with SMTP id u4mr11913513ior.21.1625134635850; Thu, 01 Jul 2021 03:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625134635; cv=none; d=google.com; s=arc-20160816; b=mZK7Edwp/SXGxra0d86VwIIZySbadblb7w+T5n028SKyNz/K7z1j0V1gSmg4rdz9iT s3jTiMb4OReWgpwZnd8G5vv8rRG3fSmn9YPhS+KaAYuCIOKdK1hdXQHSXA6n+5PYNUc9 Q05dH0KQnsIPSMK2yQHwn365G8V7ToPZDPKuh7/haQV1mMQ0jKG8MAHLxTZtECbEgwNR ziGy6yU05xHHvt+y6wYH4uNiQiPtZUqL4KgFhwvWbSJemPZgZv8js0GqUUfNcSr4/sON F31qVSogYE7ZWquIn2GYWkSX9hGDXECA17KIkkXDM4oqLREgzykWEn7b2nXnvHnU/45q U8fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Fsy59JmCVg9wIRw553TU269kL3+xAeRU1nsYXjldgz4=; b=I+hwoxVMT0AT/dE/79xIGi5lDQm9vu11KdAq1nU8QaAjbSOz3s3bJ9vMK6MdE3JM3G crQ6AejsMtJoL/TQLSaJWky2LWD+fLn2cyttem1X8NhTq5OiQdZ3ShQsiq8Yjgtye14U qiOKPf1Utyajm+scV7bcJ9vTuOBXxiZuFObXd3QSopx6qVaVo4bk3+onoYx6FjwCSxkI Alucc1urZGMjN8FV5GkAolJx0s9Co7TsEEzjgDnOSASz5YW+8iqVdKwY1Vbk35uXWiPx HqSy3tnP83o//OKxGyaNAbqtb/4oRs0L/O0Zv5rX7tjRwC6TWCWvquS4xY8kff136Lkp 98Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JnRpdDxD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id o9si26564171jap.86.2021.07.01.03.17.00; Thu, 01 Jul 2021 03:17:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JnRpdDxD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S235992AbhGAKKG (ORCPT + 99 others); Thu, 1 Jul 2021 06:10:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234907AbhGAKKG (ORCPT ); Thu, 1 Jul 2021 06:10:06 -0400 Received: from mail-vs1-xe2c.google.com (mail-vs1-xe2c.google.com [IPv6:2607:f8b0:4864:20::e2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C45B4C0617A8 for ; Thu, 1 Jul 2021 03:07:35 -0700 (PDT) Received: by mail-vs1-xe2c.google.com with SMTP id o7so3483742vss.5 for ; Thu, 01 Jul 2021 03:07:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Fsy59JmCVg9wIRw553TU269kL3+xAeRU1nsYXjldgz4=; b=JnRpdDxD1A2yN+SDzUAogsCY8SQBxlyvdSAo58DVfzL48Mb/U4nEBE2JBiBdd37kXi GVgaPPMNSaYcu+WOoBCDJeBByUqEhXzTiN8upY9/5SIL4VFgFrTDS9ZIKPw5eOjOJ+ay rq9z4CQ8nuiNHfhWGhL3BUO3P28Q0nuXTv1KCZC/PMeh6GrCfXWNg1V3tEPTpL4tum+/ 41dLUHQRR09RSoLOfTOVxpX9S75pxC3kqiUoKjBIkQDGvJYci5TUxQrhHJbk+/0GDWYB Bn+MovDBNvRMARAE7Aws6ixtJCAjFMxHMOFBKGHuTySMjqnhLBX7mmd6T4VQCqE9xaHk c0tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Fsy59JmCVg9wIRw553TU269kL3+xAeRU1nsYXjldgz4=; b=HezZscZKzuPETuY13J46QlTIF4vr7cxuSuG0Kkd6pTjSgg/01QNaLgrakLcR+cJ9rU s5IA5jLbMO/QYooOh2xOeaoZ7PX7FH/TqZXroRcWME98SbcRGN/BWpYZJouuuwItzd+p r16AdqsOvxd5VQDDK1U8AklYRrfDc5re2Uvx4du8IDAt35IecrktQa5rTSiu+ukThcE7 kIJrnX23J57gDlzBjlOPfV71XVsJ94vnOrnhG5XJNvkAScbEWLa+hnTBCb2ULyilusMl YN+JhPA1IGWfKSPJ4YEGzBQIcF7Vt45mkc1a7Dt8stl4J2ljjqpknTmpqH66Nxtq6ogD D1DQ== X-Gm-Message-State: AOAM533c/IvRVACZTTOg/d07KGIEFD55vfEaVYnNCCxFGmEashILcUoM meKfH7OVB7cWtX62jpjfMQ3mdt67h7m8LwfFeRLawg== X-Received: by 2002:a05:6102:502:: with SMTP id l2mr36934693vsa.19.1625134054938; Thu, 01 Jul 2021 03:07:34 -0700 (PDT) MIME-Version: 1.0 References: <20210611101540.3379937-1-dmitry.baryshkov@linaro.org> <20210611101540.3379937-3-dmitry.baryshkov@linaro.org> In-Reply-To: From: Ulf Hansson Date: Thu, 1 Jul 2021 12:06:58 +0200 Message-ID: Subject: Re: [PATCH 2/2] PM: domain: use per-genpd lockdep class To: Bjorn Andersson Cc: Dmitry Baryshkov , Mark Brown , Stephen Boyd , "Rafael J. Wysocki" , Kevin Hilman , Greg Kroah-Hartman , Linux PM , Linux Kernel Mailing List , Rajendra Nayak Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 29 Jun 2021 at 17:09, Bjorn Andersson wrote: > > On Mon 28 Jun 14:55 CDT 2021, Dmitry Baryshkov wrote: > > > Hi, > > > > On 17/06/2021 12:07, Ulf Hansson wrote: > > > + Rajendra > > > > > > On Tue, 15 Jun 2021 at 17:55, Bjorn Andersson > > > wrote: > [..] > > > > But I am unable to find a way for the gdsc driver to get hold of the > > > > struct generic_pm_domain of the resources exposed by the rpmhpd driver. > > > > > > You don't need a handle to the struct generic_pm_domain, to assign a > > > parent/child domain. Instead you can use of_genpd_add_subdomain(), > > > which takes two "struct of_phandle_args*" corresponding to the > > > parent/child device nodes of the genpd providers and then let genpd > > > internally do the look up. > > > [..] > > > > I think I'd need this function anyway for the gdsc code. During gdsc_init() > > we check gdsc status and this requires register access (and thus powering on > > the parent domain) before the gdsc is registered itself as a power domain. > > > > But this is a register access in the dispcc block, which is the context > that our gdsc_init() operates. So describing that MMCX is the > power-domain for dispcc should ensure that the power-domain is enabled. Right. As a note, when we assign a child domain to a parent domain, via of_genpd_add_subdomain() for example - and the child domain has been powered on, this requires the parent domain to be turned on as well. > > We do however need to make sure that dispcc doesn't hog its > power-domain, and that any register accesses in runtime is done with the > parenting power-domain enabled. E.g. the clock framework wraps all > operations in pm_runtime_get/put(), but I don't see anything in the > gnepd code for this. > > > And for gcc I'm worried that we might have some GDSCs that are parented > by CX and some by MX, but I do still think that the register accesses > are only related to one of these. > > But this seems like a continuation of the special case in dispcc, so I > think we should be able to focus on getting that right before we attempt > the general case (and I don't know if we have a need for this today). > > Regards, > Bjorn Unfortunately, I didn't understand all the above things. In any case, please tell me if there is anything else that blocks you from moving forward with the power domain conversion? I am happy to help. Kind regards Uffe