Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4198586pxb; Wed, 13 Oct 2021 23:58:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/yds9oGEAmhO5tAZto1QP7XrvcAV3Jpf6jqB1v+PmeCY+8oWCG9SNrviqm8Ids3qW/Puw X-Received: by 2002:a63:cf10:: with SMTP id j16mr2973398pgg.257.1634194688324; Wed, 13 Oct 2021 23:58:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634194688; cv=none; d=google.com; s=arc-20160816; b=zFA00TTaaGItZPTTwEhc58dA/8pxT39Jkul0ZoQTfyiomLUdDkzBAYk6fljpd9iMvg QK5kWLoH3zoDtdBQN6x14heZaqX3A6GKgcb9H4BfPQh9fXlnQRT8P8X4gP9LGLd3xu/b gsEJUB5ZP9JYBW6c/3ZGVWZ8frWfU0xM6aP0poPnQByHI9//qe9Q42tQ97hZ+MfCFZ74 dFF0pk9IQE62KtNqkowDe4q7MdU++uvxJN3CYwjBkj17205KIfWJQkSptOXyj15hCVum whcQb7U9yYYEqrO77Dvek+Xx205FDKUJt5WHp6jPxG4XGajMe2QOtY4u4/C4ABwdlllJ RZ1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ElQNmzsxcV0CPmY8lvOg8SstMmCe+niXLKtqIMPRzlc=; b=W3K6goYN/zJXWWGlnz+9jpKIQUW+KdQua03N0rkC5b0/OMZe/uaHNaGgCPB9LQUir2 KLIZRoTRUHJNbSD2WR0gw1GPLeb3jt065Fr+7FgLYmGDsLMxgKn/mGb5TscC8MUlXLYB betzhU/yfVVW2oIvGYG4hxHJen/2rt4f7usNuAllAH0jzkyOjKd4VrgyXx/GWVM9DtmA 6Hj1MhhQWBHBWi9T4r+wc9tdZqYpHvFc5nG6RnXnCDMOc0YV/dNv/VIhIqnU8moAtdXw kbqnaQKvbJ+JN/jjC6N8dXGLJK/Wur/T7NbPIBKg9u7BGKYVru6MBDuYLrvB8y+kT2RE 7Cxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xp5UvWAI; 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 k186si2361712pgd.504.2021.10.13.23.57.52; Wed, 13 Oct 2021 23:58:08 -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=Xp5UvWAI; 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 S229613AbhJNG6o (ORCPT + 99 others); Thu, 14 Oct 2021 02:58:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbhJNG6n (ORCPT ); Thu, 14 Oct 2021 02:58:43 -0400 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E3E8C06174E for ; Wed, 13 Oct 2021 23:56:39 -0700 (PDT) Received: by mail-pg1-x535.google.com with SMTP id q5so4621880pgr.7 for ; Wed, 13 Oct 2021 23:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ElQNmzsxcV0CPmY8lvOg8SstMmCe+niXLKtqIMPRzlc=; b=Xp5UvWAIJv0+50PGfjRILQj/4/m2mfb9EUgCxvcD+M7fvKZBW3ScvNqMtwYsIBUolx amwkMgIcTtK444A6G5yuXtwsK0LfRQaiW8On3gx2OrterEklOFlmopltMMiLERqADDeP YodOx0s0JroK/EqhGJxBmfIhAc/Dsrs2dDmo6+RGW1HWNO+NtZd5dhw056LK+ZDA4BUo aexhlv7+hP84yByZj4zkeDEzgJPYOkjmJA5VDaYpIztTS/5AkoWO8af4x80fBBYTMbSA q1kvSHyhxw+2NQizDfbXkDoWawxzEr0v42mukXgU8EEAunkIDOjMXYOp4fAqAo0ZaaVP gkvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ElQNmzsxcV0CPmY8lvOg8SstMmCe+niXLKtqIMPRzlc=; b=dmzovz04AQ3Q5aklnxPro3K+Tcs2cyniKFNSLM3pluS9Z4OE/609Vd/Z2ZKWvc3VL0 byirc8CZGo6nhiXPfvsNayqbP0ZziUBxjaS5uDDEuzpDCOPRkFcB6tZfB9/U10Naa37s 9XkdOnM2vRFsCx/2xyhVG4TF+yZmiJiwBJoCM3PY4H/YA2z3Ge86oeIQZUs0K6TeOqv0 i/iI8gbK2SH9sp4KG3fN2bmBJcFulc8lKXAjeIv41uFY+CFtY6bnxleeEU48KGe2cRmK +qhPB9bvDkgdZXIWf+gm3KSs5uJPgHb4c2GmXLk7B3rG6yIsSbBJ5PZ72BilduCV3QDB 1I8Q== X-Gm-Message-State: AOAM532lvtAzBDg8frwlf6pkqECMI92wvVs+VRlTkNZHtWxGP/OX7oHK BAZS/LiJVDJkxkrmoPpMN1DznQ== X-Received: by 2002:a65:6187:: with SMTP id c7mr2918324pgv.317.1634194598786; Wed, 13 Oct 2021 23:56:38 -0700 (PDT) Received: from localhost ([106.201.113.61]) by smtp.gmail.com with ESMTPSA id j12sm1427294pff.127.2021.10.13.23.56.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 23:56:38 -0700 (PDT) Date: Thu, 14 Oct 2021 12:26:36 +0530 From: Viresh Kumar To: Ulf Hansson , Hector Martin Cc: Sibi Sankar , Saravana Kannan , linux-arm-kernel@lists.infradead.org, Alyssa Rosenzweig , Sven Peter , Marc Zyngier , Mark Kettenis , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Viresh Kumar , Nishanth Menon , Catalin Marinas , "Rafael J. Wysocki" , Kevin Hilman , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 4/9] opp: core: Don't warn if required OPP device does not exist Message-ID: <20211014065636.lkv77aqbugp3qhif@vireshk-i7> References: <20211011165707.138157-1-marcan@marcan.st> <20211011165707.138157-5-marcan@marcan.st> <20211012032144.2ltlpat7orrsyr6k@vireshk-i7> <20211012055143.xmkbvhbnolspgjin@vireshk-i7> <20211012092603.lkmhhjoo5v67wh44@vireshk-i7> <049FC437-EC38-4FE5-891E-5E25960892CF@marcan.st> <20211012093252.hb6rlcpxv5bmk7n3@vireshk-i7> <0db8e994-ac2c-8fad-55d0-1b5a9e2e21f2@marcan.st> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0db8e994-ac2c-8fad-55d0-1b5a9e2e21f2@marcan.st> User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14-10-21, 15:52, Hector Martin wrote: > The CPU devices aren't attached to their genpd, so the required OPP > transition fails with the same error. > > However, this was easier to fix than I expected. With this patch to > cpufreq-dt, it all works properly, and I can drop the parent genpd > from the clock node and related handling. Thoughts? > > commit c4f88743374c1f4678ee7f17fb6cae30ded9ed59 > Author: Hector Martin > Date: Thu Oct 14 15:47:45 2021 +0900 > > cpufreq: dt: Attach CPU devices to power domains > This allows the required-opps mechanism to work for CPU OPP tables, > triggering specific OPP levels in a parent power domain. > Signed-off-by: Hector Martin > > diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c > index 8fcaba541539..5b22846b557d 100644 > --- a/drivers/cpufreq/cpufreq-dt.c > +++ b/drivers/cpufreq/cpufreq-dt.c > @@ -16,6 +16,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -264,6 +265,16 @@ static int dt_cpufreq_early_init(struct device *dev, int cpu) > goto out; > } > + /* > + * Attach the CPU device to its genpd domain (if any), to allow OPP > + * dependencies to be satisfied. > + */ > + ret = genpd_dev_pm_attach(cpu_dev); > + if (ret <= 0) { > + dev_err(cpu_dev, "Failed to attach CPU device to genpd\n"); > + goto out; > + } > + Other platform do this from some other place I think. Ulf, where should this code be moved ? cpu-clk driver ? -- viresh