Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp217387imw; Fri, 8 Jul 2022 01:24:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tVCpn0W31VM7SSGmN4Pvkx3i1NDGhxJ0KnFrdHoHrWe4QVCMfhQvpe3SZLAtXc5DJX2LRa X-Received: by 2002:a63:4b03:0:b0:40d:9515:2863 with SMTP id y3-20020a634b03000000b0040d95152863mr2129167pga.341.1657268666377; Fri, 08 Jul 2022 01:24:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657268666; cv=none; d=google.com; s=arc-20160816; b=dzAZChLHWITl2tbPFPEMtAkMkp1lExb3ujJNUVU5TCWywg828NIV/fmAMPXFkG1aZr hedSwu4Z24kSs7cDbJyV8yyDTvObvAoLYlacRSP630rZRlIhZVPUpm71uL1oRBwbugKh pwbQbFv4sxh+kSrb9FctMAahmjUfvRFDLlIy6rE2d9UHk7G5EyFH50dL9GTbLN/l19BC WMwVaphEniJHXdWh7rWuDE/oh0lHe6zV6AqctWLZMqNyYNO0wLTT6TpfHUWwUPOnUkTt BXUWZFy72KFtxnWoM170aqfqPKCM9CNGEDBhxBQM7wLYn2XfeHhCgKRvEgvTAfIGR+B7 7u9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=2ZM3njRukr6oZWtroZKEdqEx/H83cnFweqwWqFPHl5M=; b=ILxxCDibelqR308N1TDbM1Qv8PzKwOMpHlRBU4z2z2YJ87nytNwF2lfpXXQNRywftM 5gp4mlFjJ/QykNmTEXTd92cBXOv0sEmeffK58hB3pYJtu2IePeaSuOf9WrYI6TCmeFBj YA4edcppebpGkX6wL0RIURjF6RfJRYau/jIPUnMIBvAj3ArGTBBv7tSHwYC/n2Q8Aov1 0y3EE0x9mJ8j2fVpM8B8vb1OsIwb3ZLU+51jhSAvIY7JwHyUmtDDT/q4bxdkgjkxtI4z Icf118686kjrQeJ29BzgH+vELn95Rt0q9p1EHaVLuk/BPEfhDXCEXbkcEECntMZAS8Jt j9gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ASA7nMID; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a13-20020a170902b58d00b0016c20ceec07si2554357pls.490.2022.07.08.01.24.12; Fri, 08 Jul 2022 01:24:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ASA7nMID; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237426AbiGHH04 (ORCPT + 99 others); Fri, 8 Jul 2022 03:26:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237571AbiGHH0t (ORCPT ); Fri, 8 Jul 2022 03:26:49 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9EF97D1CC; Fri, 8 Jul 2022 00:26:46 -0700 (PDT) Received: from [192.168.2.145] (unknown [109.252.119.232]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id BD66166019C5; Fri, 8 Jul 2022 08:26:43 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1657265205; bh=3UW1BZZx+0gVRM3Zkg56i+K3sZq4zS9Tzxasaob0LAE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ASA7nMIDiWDv/ejeK0zgmd16Zf+Q1IOtCFu4xdTH4MLLIgpZSSo/wjADlaiDbrrE2 uHeh9xR3yGKahayPkylS9JJ15+X4wDVPR1x/TBbIHVIStRyfrmrjsLD9hQPwWqDdoX aQVgCM2QQ8hVVLNHF0fWZf6G+rH0TCwfkjuX/Ze3a9Db/u5VmaObbLhBpA/EqycblU 4QzeMQqxt0wgwrgfslarMXYV9kkh0if9R2x74hsG84itLTGP9NdFFA32aPddiNmT7q YKlFgHMYNbqfXYJvr+ZAxiqKJeWELRwWR2wWKAFcXycCU0OsED+HwaGf+FiRz2yDQ2 fVKndaxgkPdgA== Message-ID: <8c52e1d2-6c6d-9a09-e426-e5292f68a3f0@collabora.com> Date: Fri, 8 Jul 2022 10:26:40 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH V2 00/13] OPP: Add support for multiple clocks* Content-Language: en-US To: Viresh Kumar Cc: Chanwoo Choi , Dmitry Osipenko , Jonathan Hunter , Kyungmin Park , MyungJoo Ham , Nishanth Menon , "Rafael J. Wysocki" , Stephen Boyd , Thierry Reding , Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Krzysztof Kozlowski , Bjorn Andersson , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, Manivannan Sadhasivam , Rob Herring References: <20220708071926.zehurtbcf35s5tv6@vireshk-i7> From: Dmitry Osipenko In-Reply-To: <20220708071926.zehurtbcf35s5tv6@vireshk-i7> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/8/22 10:19, Viresh Kumar wrote: > On 07-07-22, 22:43, Dmitry Osipenko wrote: >> This patch breaks Tegra again, please take a look: > > Damn, not again :( > >> OPP: Remove dev{m}_pm_opp_of_add_table_noclk() > > Why did you mention this patch ? This just removed an unused API, > Tegra should have broke because of something else, isn't it ? This patch is the cause. >> 8<--- cut here --- >> Unable to handle kernel paging request at virtual address ffffffff >> [ffffffff] *pgd=9effd861, *pte=00000000, *ppte=00000000 >> Internal error: Oops: 37 [#1] PREEMPT SMP ARM >> Modules linked in: >> CPU: 3 PID: 8 Comm: kworker/u8:0 Not tainted >> 5.19.0-rc1-00040-g30b62d123f4f #82 >> Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) >> Workqueue: events_unbound deferred_probe_work_func >> PC is at _opp_compare_key+0x40/0xc4 >> LR is at 0xfffffffb > > How is LR set to such an address ? > >> pc : [] lr : [] psr: 20000113 >> sp : df831b08 ip : c33cd4d0 fp : df831b24 >> r10: c2586078 r9 : c258606c r8 : 00000000 >> r7 : 00000000 r6 : 00000001 r5 : c33cd480 r4 : c2586000 >> r3 : 00000000 r2 : c33cd480 r1 : c258606c r0 : c2586000 >> Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none >> Control: 10c5387d Table: 8000404a DAC: 00000051 >> ... >> Backtrace: >> _opp_compare_key from _set_opp+0x80/0x408 > > Whatever happened, happened from _opp_compare_key() and I tried to > look at it many times, couldn't figure out what's wrong there. > > For the device in question, pmc I think, we don't have any "opp-hz" > property in the DT, but still the OPP core will fetch its clock and > set clk_count to 1. But this was working earlier too, we were > comparing the rate anyways. I think one of _opp_compare_rate() or > _opp_compare_bw() is broken here, but I just couldn't figure out. The > rate one should run one loop and bw one should just return. I don't > see why a crash should come out eventually. > > Can you help debug this a bit ? Also see what are the values of > opp_table->path_count and opp_table->clk_count, should be 0 and 1 > AFAICT. I see that previously dev_pm_opp_set_config() had "_add_opp_table(dev, false)", now it's "_add_opp_table(dev, true)". Will take a closer look later on. > Sorry about this Dmitry, I think we are all settled and again went > into crap. No problems :) -- Best regards, Dmitry