Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp926284pxu; Thu, 15 Oct 2020 22:05:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6ypC6eWUO0UYzHsk06/LFoAmVpO5qw+G8HGCp/zgE0wLbSuC9xn82MYytmqlcV8a7quKL X-Received: by 2002:a17:907:2079:: with SMTP id qp25mr1936645ejb.347.1602824712410; Thu, 15 Oct 2020 22:05:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602824712; cv=none; d=google.com; s=arc-20160816; b=TbINjbqnh+YUsAL9hLoNmGTNhvWVfCLPlcL7p3f2gmaBiaTmQNyMtsKBXQOZkRTpKQ kTOZUdrZJMvO3Z9LtzQlDGO7eqpBhrd2RFPZ1hgfhNJQCqKO5Rdz3yRTtnsOVPnYqNCk rkd2C8Q54twp+CWSo/tNzuS8JNCrV+7X8lYK8rCa9uD8yiil3L7WihNu532aYLvev88b Mp26xVsZqYLcU3J5Jm9xV22dn3vxg+IbvW31HmiXTJqlnLTW/V5+TwaQV8iU0QfinzuZ RSYn5+eSqpXTWKNgbVF7+sAs7nqbmuL4UD+26ZujpY3adTZzMbUBnW3ZPuBa00WL/H/D 04Ag== 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=qtvV026HLCzz5NoDCyozzqnf4hHRYfc35Oyit81StQ4=; b=hr8ghDjzBA3Yf4IH8rPIXx5KQTZUf58WGrNeOtlqih6dQmW+rB3xZDVX+5uJJ19PAG Iyw0ybOk+SPTPFvNxPIqEnKdmbz7Iw1Ghcq0+U8yrb0Vc8pdmGG6BQ8Knd7sUiFW1mMQ A3oUJ465waxFvd3aejGXY3DfqWZQ5G7Yl1exo16O8CH3GVO6aQ7OywNkRWm+HwHyEhgp 0rp5gjG9/6sysRVrSw9VP37mnzHkULL4FzvArrSnLC3FaULM34mrGDxogYMFJcdl8nSg FjlWVriAxW/H4r/oU4liBpa1iy7vUiu78YRRsqxGIkKG3nKuMso71BO3n/r4G9vHkFum aAcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ite6O0sC; 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 i21si874257edg.487.2020.10.15.22.04.48; Thu, 15 Oct 2020 22:05:12 -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=Ite6O0sC; 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 S1729462AbgJPFDv (ORCPT + 99 others); Fri, 16 Oct 2020 01:03:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728261AbgJPFDv (ORCPT ); Fri, 16 Oct 2020 01:03:51 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 605EEC0613D2 for ; Thu, 15 Oct 2020 22:03:51 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id p21so716522pju.0 for ; Thu, 15 Oct 2020 22:03:51 -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=qtvV026HLCzz5NoDCyozzqnf4hHRYfc35Oyit81StQ4=; b=Ite6O0sCdHz/TgSDObsypuRJ50z5WPXZKhRbHh9UISq6lAfUuYiP2/fxTwDz6y5Ybl FzmVDWhO8+7+s2AonNYSGfsZpkyHMN+ZMH1DpakymkuZQ40z2PCL6ii3HREtm5QOkOe7 wUX1yTeE1uQKl9WSquqWA6niHRpgmmDLMngi0LALRWW/dMqvWdDcOEY7GgsyCy3Ck5S0 Xdas5bG2RjXOEXQh60p7Jn+86jyRQ6rkeNwGudEH1KCJew9Qu9t4snMdGkBrFXPgINeF OAcPYABU9h8FTwtiUSsGsr7wIeaUyVzD7ppPGgkOUBACYyJyZk6vuk3380wzeTwDLdMX RP2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qtvV026HLCzz5NoDCyozzqnf4hHRYfc35Oyit81StQ4=; b=HZv0nIYprwxkNbgaB8GgDLoihAgyYheGPTkUYqg/oU6XClrPWfQ2/5J7jL6wn/VXpi MGRdf3tRrHpoOUN+E+7pv2puIqTYqZEf6jLqI7v/KKaYdBEET2oOG0JEn8eAylmJhqKr rtDfGcJjV070WOlSUUbLO5uPG26GkDskPji4JHsQQS0SNh6fxCsm7T76nltyVMbOW697 VY8a8NMoe5VX6lC6GcaQwkD3QkSO3RWjK2kaZkOQN7y1tIHFIYksJaQmnpapMQAEubo+ PpMHoaPSkDa/XJzPst+0Ar8uxHPOyPb0zRRsct7eD8m/RoWDyDH77KoWRTm8jP6JMptG E+ZA== X-Gm-Message-State: AOAM533OBmWOD6E7/UdH/FQ+XWb2zjeHnDEoq5yuV2fjtsaEMadL5Gdu uIntFxtEqLpHuMZYfkBqQ4aurQ== X-Received: by 2002:a17:902:930c:b029:d3:b362:7939 with SMTP id bc12-20020a170902930cb02900d3b3627939mr2277168plb.54.1602824630725; Thu, 15 Oct 2020 22:03:50 -0700 (PDT) Received: from localhost ([122.181.54.133]) by smtp.gmail.com with ESMTPSA id e4sm1097611pgg.37.2020.10.15.22.03.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2020 22:03:49 -0700 (PDT) Date: Fri, 16 Oct 2020 10:33:47 +0530 From: Viresh Kumar To: Geert Uytterhoeven Cc: Stephan Gerhold , Ulf Hansson , "Rafael J. Wysocki" , Liam Girdwood , Mark Brown , Linux PM list , Vincent Guittot , Stephen Boyd , Nishanth Menon , nks@flawful.org, Georgi Djakov , Linux Kernel Mailing List , Wolfram Sang , Linux I2C , Linux-Renesas Subject: Re: [PATCH V2 2/2] cpufreq: dt: Refactor initialization to handle probe deferral properly Message-ID: <20201016050347.ers54itzmxgijzsy@vireshk-i7> References: <24ff92dd1b0ee1b802b45698520f2937418f8094.1598260050.git.viresh.kumar@linaro.org> <20201013095613.mbgmjwzojg5wxmau@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14-10-20, 18:40, Geert Uytterhoeven wrote: > On this platform (r8a7791-koelsch.dts), there is no opp table in DT. > > Before: I assume this means before this patchset came in.. > boot: > cpufreq-dt cpufreq-dt: dt_cpufreq_probe:362 > cpu cpu0: resources_available:95 > cpu cpu0: resources_available:102: clk_get() returned z > cpu cpu0: resources_available:120: > dev_pm_opp_of_find_icc_paths() returned 0 > cpu cpu0: resources_available:125: find_supply_name() returned cpu0 > cpu cpu0: resources_available:132: regulator_get_optional() > returned -EPROBE_DEFER > cpu cpu0: cpu0 regulator not ready, retry > cpufreq-dt cpufreq-dt: dt_cpufreq_probe:371: > resources_available() returned -517 we deferred probe once. > ... > cpufreq-dt cpufreq-dt: dt_cpufreq_probe:362 > cpu cpu0: resources_available:95 > cpu cpu0: resources_available:102: clk_get() returned z > cpu cpu0: resources_available:120: > dev_pm_opp_of_find_icc_paths() returned 0 > cpu cpu0: resources_available:125: find_supply_name() returned cpu0 > cpu cpu0: resources_available:132: regulator_get_optional() > returned (ptrval) found regulator next time. > cpufreq-dt cpufreq-dt: dt_cpufreq_probe:371: > resources_available() returned 0 > cpufreq-dt cpufreq-dt: dt_cpufreq_probe:375 > cpufreq_dt: cpufreq_init:162 > cpu cpu0: cpufreq_init:170: clk_get() returned z > cpu cpu0: cpufreq_init:179: dev_pm_opp_of_get_sharing_cpus() returned -2 > cpu cpu0: cpufreq_init:198: find_supply_name() returned cpu0 > > cpu cpu0: cpufreq_init:201: dev_pm_opp_set_regulators() returned (ptrval) > > cpu cpu0: cpufreq_init:230: dev_pm_opp_of_cpumask_add_table() returned 0 > cpu cpu0: cpufreq_init:239: dev_pm_opp_get_opp_count() returned 0 > cpu cpu0: OPP table is not ready, deferring probe This failed, as we couldn't have deferred probe from cpufreq_init. Which means that cpufreq didn't work here. > cpufreq_dt: cpufreq_init:162 > cpu cpu1: cpufreq_init:170: clk_get() returned z > cpu cpu1: cpufreq_init:179: dev_pm_opp_of_get_sharing_cpus() returned -2 > cpu cpu1: no regulator for cpu1 > cpu cpu1: cpufreq_init:198: find_supply_name() returned (null) > cpu cpu1: cpufreq_init:230: dev_pm_opp_of_cpumask_add_table() returned 0 > cpu cpu1: cpufreq_init:239: dev_pm_opp_get_opp_count() returned 0 > cpu cpu1: OPP table is not ready, deferring probe Same for CPU1. > > s2ram: > cpufreq_dt: cpufreq_init:162 > cpu cpu1: cpufreq_init:170: clk_get() returned z > cpu cpu1: cpufreq_init:179: dev_pm_opp_of_get_sharing_cpus() returned -2 > cpu cpu1: no regulator for cpu1 > cpu cpu1: cpufreq_init:198: find_supply_name() returned (null) > cpu cpu1: cpufreq_init:230: dev_pm_opp_of_cpumask_add_table() returned 0 > cpu cpu1: cpufreq_init:239: dev_pm_opp_get_opp_count() returned 0 > cpu cpu1: OPP table is not ready, deferring probe And same here. > CPU1 is up > > After: > boot: > cpufreq-dt cpufreq-dt: dt_cpufreq_probe:356 > cpufreq_dt: dt_cpufreq_early_init:251 > cpu cpu0: dt_cpufreq_early_init:256 > cpu cpu0: dt_cpufreq_early_init:271: dev_pm_opp_get_opp_table() > returned (ptrval) > cpu cpu0: dt_cpufreq_early_init:284: find_supply_name() returned cpu0 > cpu cpu0: dt_cpufreq_early_init:288: dev_pm_opp_set_regulators() > returned -EPROBE_DEFER > cpufreq-dt cpufreq-dt: dt_cpufreq_probe:360: > dt_cpufreq_early_init() returned -517 > ... > cpufreq-dt cpufreq-dt: dt_cpufreq_probe:356 > cpufreq_dt: dt_cpufreq_early_init:251 > cpu cpu0: dt_cpufreq_early_init:256 > cpu cpu0: dt_cpufreq_early_init:271: dev_pm_opp_get_opp_table() > returned (ptrval) > cpu cpu0: dt_cpufreq_early_init:284: find_supply_name() returned cpu0 > cpu cpu0: dt_cpufreq_early_init:288: dev_pm_opp_set_regulators() > returned (ptrval) > cpu cpu0: dt_cpufreq_early_init:301: > dev_pm_opp_of_get_sharing_cpus() returned -2 > cpufreq-dt cpufreq-dt: dt_cpufreq_probe:360: > dt_cpufreq_early_init() returned 0 > cpufreq_dt: dt_cpufreq_early_init:251 > cpufreq-dt cpufreq-dt: dt_cpufreq_probe:360: > dt_cpufreq_early_init() returned 0 > cpufreq-dt cpufreq-dt: dt_cpufreq_probe:365 > cpufreq_dt: cpufreq_init:114 > cpu cpu0: cpufreq_init:124: clk_get() returned z > cpu cpu0: cpufreq_init:142: dev_pm_opp_of_cpumask_add_table() returned 0 > cpu cpu0: cpufreq_init:151: dev_pm_opp_get_opp_count() returned 0 > cpu cpu0: OPP table can't be empty Same issue here. > cpufreq_dt: cpufreq_init:114 > cpu cpu0: cpufreq_init:124: clk_get() returned z > > cpu cpu0: cpufreq_init:142: dev_pm_opp_of_cpumask_add_table() returned 0 > cpu cpu0: cpufreq_init:151: dev_pm_opp_get_opp_count() returned 0 > > s2ram: > > cpufreq_dt: cpufreq_init:114 > cpu cpu0: cpufreq_init:124: clk_get() returned z > WARNING: CPU: 1 PID: 14 at drivers/i2c/i2c-core.h:54 > __i2c_transfer+0x2d8/0x310 > i2c i2c-6: Transfer while suspended > cpu cpu0: cpufreq_init:142: dev_pm_opp_of_cpumask_add_table() returned 0 > cpu cpu0: cpufreq_init:151: dev_pm_opp_get_opp_count() returned 0 > cpu cpu0: OPP table can't be empty > CPU1 is up > > I hope this helps. Unfortunately it raised more questions than what it answered :( -- viresh