Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp477957ybl; Mon, 2 Dec 2019 13:41:59 -0800 (PST) X-Google-Smtp-Source: APXvYqxVc0BeM23tNs3TiITRDgmLptYT2ZJDb6nopjhw+sC9bB2vH216lL6DFbuQmJ25P2wr/+uy X-Received: by 2002:a50:89a4:: with SMTP id g33mr1467418edg.162.1575322919815; Mon, 02 Dec 2019 13:41:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575322919; cv=none; d=google.com; s=arc-20160816; b=aigfbKffNtUf88htHOsSesY1y5/WGU7Ckz92IJeDIn6LCG78HaY++0ORH01MnWJ0U6 +WWZRNbYBIfTLS5oBYyF7d0EKn2I7EXN+b2CTq2+V3iM7z9kW1ayA7u/UGWyoWyn13ia 6n9zvyzjLWqilnFHbMTT+P72asWQaJ6O+vkqeDG9vm68I++9dEvoRdeAx+I5uGpY+Lps U3Maxw7SJB9X6uQX0u75QCNVVxbdZiH9lsVyEgERyD0NgD4A8XryIa5Cta+vYk2utO0p KVL/8FsxzssRWrL9TEM2I3BZH8HPq7OTb8h5djs4q5yDJoi4YtCkC0YgdPlYdiUrXGpY /Bug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=RbqTPeFlpc5FPYiD5N+COmsuESPTZfXtwwjPbKRr/UQ=; b=RtjpF4g7R/KIa2J8Y+E3SyzGzb/GOnQGZR+WSdBIx9ZaKfMI+atIT7cruQ+eG92O6e YzSnAGyil1dn6jNGeGWUwopWCz/+bT3GrGvTVXvKwyfGb/pIPucNpZ/kq6K+XeOaK4IW LrM42nghhqEZZOi2k+B4hJPzg1VhZw8pGy3xP+99Vt3FrJOsH7P1C1Y7+fMqOWtf+AlS jLm+Hf7FQqusUx2Orx+zfzAx5IGqA170IU+xsA3h70OA5o3Pk4LARRT94e6v0nGOO+Fl wKH9Nh/HHpLBuDvNph3hQquqg9Xfsbl2AvCkBcQYYr+64MqNsebRFOkaxS3wqWMvpf6A P9JQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id np5si576848ejb.422.2019.12.02.13.41.36; Mon, 02 Dec 2019 13:41:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726086AbfLBVje (ORCPT + 99 others); Mon, 2 Dec 2019 16:39:34 -0500 Received: from muru.com ([72.249.23.125]:43968 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725775AbfLBVjd (ORCPT ); Mon, 2 Dec 2019 16:39:33 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 3E5C880FC; Mon, 2 Dec 2019 21:40:10 +0000 (UTC) Date: Mon, 2 Dec 2019 13:39:29 -0800 From: Tony Lindgren To: "H. Nikolaus Schaller" Cc: Linux-OMAP , arm-soc , Adam Ford , =?utf-8?B?QW5kcsOp?= Roth , Nishanth Menon , Tero Kristo , Linux Kernel Mailing List , Discussions about the Letux Kernel , Andreas Kemnade Subject: Re: [PATCH] ARM: OMAP2+: Fix warnings with broken omap2_set_init_voltage() Message-ID: <20191202213929.GB35479@atomide.com> References: <20190924233222.52757-1-tony@atomide.com> <8FFD44DB-73F8-4807-91E1-C97DA8F781BA@goldelico.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8FFD44DB-73F8-4807-91E1-C97DA8F781BA@goldelico.com> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, * H. Nikolaus Schaller [191202 21:10]: > > Am 25.09.2019 um 01:32 schrieb Tony Lindgren : > > Guys, please check and ack if we can really do this to get rid of some > > pointless dmesg -l3 errors without affecting the ongoing cpufreq and > > voltage work. > > unfortunately we did not yet test in combination with the 1GHz OPP > patches for omap3630 (queued for v5.5-rc1) and it appears that this > patch breaks the 1GHz OPP. > > The symptom is that it works fine on a dm3730 with 800MHz rating > but results in spurious kernel panics, stack corruption, virtual memory > failures, OneNAND DMA timeouts etc. on a dm3730 with 1GHz speed grade. Hmm yeah OK, I was a bit worried about this breaking something. > We can also re-add the "turbo-mode" tags in the omap36xx.dtsi (or > remove the 1GHz OPP) and can then boot with 800MHz max. clock. But > enabling boost (echo 1 >/sys/devices/system/cpu/cpufreq/boost) makes > the problem and its symptoms appear almost immediately. > > After some scratching our heads we found that v5.3.7 is still good and > v5.3.8 is bad. A bisect of our tree (which includes the 1GHz OPP) did > point to this patch whichwas apparently already backported to v5.3.8 and > v5.4. > > So I assume that the code removed here enabled or initialized something > we need for safe 1GHz transitions. Maybe the ABB-LDO. Or it looks up the > vdd regulator and initializes it earlier than without this code. Maybe > it also (pre-)initializes some clk which could now be left uninitialized > too long? It was just doing voltdm_lookup() and clk_get_rate() and then failed dev_pm_opp_find_freq_ceil(), but I don't see what these might affect.. > Note that seeing the log message indicates that voltdm_scale() and > dev_pm_opp_get_voltage() are not called, but all functions before could > be with side-effects. Yes that is strange. There's no clk_prepare() before we proceed to call clk_get_rate() either, not sure if that matter here though. > v5.5-rc1 will likely fail right from the beginning (only on 1GHz rated > omap36xx) because it makes the combination of this patch and 1GHz OPP > public (linux-next should already fail but it appears that nobody has > tested). OK > Any ideas how to fix? Before I try to do a revert and then add goto exit; > after each function call and see which ones are essential for 1GHz. If you have things reproducable, care to try to narrow the issue down a bit by trying see which parts of the old omap2_set_init_voltage() fix the issue? The issue should be there somewhere in the few lines of code before dev_pm_opp_find_freq_ceil(), right? It would be good to understand what's going on before reverting or fixing things condering that a revert would add back code that has it's own errors and fails to init :) Another thing to check is if the dev instance is actually the right one we had in omap2_set_init_voltage() vs the dts dev instance as we use that with dev_pm_opp_find_freq_ceil(). Regards, Tony