From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1806C4332F for ; Tue, 12 Oct 2021 05:34:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D50BF61076 for ; Tue, 12 Oct 2021 05:34:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232437AbhJLFga (ORCPT ); Tue, 12 Oct 2021 01:36:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbhJLFgW (ORCPT ); Tue, 12 Oct 2021 01:36:22 -0400 Received: from mail.marcansoft.com (marcansoft.com [IPv6:2a01:298:fe:f::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF9ABC061570; Mon, 11 Oct 2021 22:34:20 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id 681F2423B9; Tue, 12 Oct 2021 05:34:12 +0000 (UTC) Subject: Re: [RFC PATCH 4/9] opp: core: Don't warn if required OPP device does not exist To: Viresh Kumar Cc: 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 , Ulf Hansson , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20211011165707.138157-1-marcan@marcan.st> <20211011165707.138157-5-marcan@marcan.st> <20211012032144.2ltlpat7orrsyr6k@vireshk-i7> From: Hector Martin Message-ID: Date: Tue, 12 Oct 2021 14:34:09 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211012032144.2ltlpat7orrsyr6k@vireshk-i7> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: es-ES Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/10/2021 12.21, Viresh Kumar wrote: > I am not sure why you need this, since _set_required_opps() has this check: > > if (unlikely(!required_opp_tables[0]->is_genpd)) { > dev_err(dev, "required-opps don't belong to a genpd\n"); > return -ENOENT; > } > The table *is* assigned to a genpd (the memory controller), it's just that that genpd isn't actually a parent of the CPU device. Without the patch you end up with: [ 3.040060] cpu cpu4: Failed to set performance rate of cpu4: 0 (-19) [ 3.042881] cpu cpu4: Failed to set required opps: -19 [ 3.045508] cpufreq: __target_index: Failed to change cpu frequency: -19 -- Hector Martin (marcan@marcan.st) Public Key: https://mrcn.st/pub