Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1421662imj; Fri, 8 Feb 2019 00:56:39 -0800 (PST) X-Google-Smtp-Source: AHgI3Ib3UDwRd4AZbUzRg8zp8B9ZrRK15ZF3ge9cXMqKIRw2PT2VgNrcMv2GjhyZxXBwca/S5MT3 X-Received: by 2002:a17:902:7590:: with SMTP id j16mr20858321pll.231.1549616199427; Fri, 08 Feb 2019 00:56:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549616199; cv=none; d=google.com; s=arc-20160816; b=tyRqeF28zprzKWJe+wTeWqI8Smxq4I0FiK4bGYfBitIKjbJEMfmfdz6XcNQ2zrqczt i1jUHr1OR0DSVWiEHHKGVFa3WuYbnw+F+rGW3T2HtYGpAfmRtl/EnQmESfYiLfp+riFm jjwEIlxGTTwu7TYx8mNj3fN8UYQr0M8kMkBEqYONHqrF/OAbrnlqdcr8bKEXE2nK95hX 6uvCaSjFnjOob+zlsZnrydCK3VysHni5OZrfKHjQ2hKRyM10giTdiE3DyKcW6IufCDsi 3OSylhXyiBzMS7SScl1ajVNAIRwT/Y4qkS6MO3wvv7sEtNaZqkl+oYxnsM/bftmumHaT SJiA== 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:dkim-signature; bh=+IoXi6/wX3eVgVDyb+GtYCpOFNqboyDM2qzEvakKqDc=; b=SyK9fe3wIaHnZeBERyeRTbOLnO00lVTBOWHHS72bPrgPREL1vRITUooNT8lfatCuo0 khlMKQJn5DYdCQIpet7Ge7Pn/A9nD9sSn28Gx/Em5kjk/jecpHm88kH9vuPQRVELcKm/ cIwZ7WAyI1p05FHARzAJI35cbMKbZgs4sD9NX9WKjF1F6p8zZdb1DAvuJLLTeYoLqdXM D1gjCofNMq5UHTlljWaNy87RUxpcV3XnPpS1s/8721MEw7hvW0HIDlbk51NEGEtYfVfw 7ha+/NBSn+ypbPSK3aTF+3naz12+UNPEwBvS5xFrAerSCqGBR/Lyo4nhKLGMjME1sF6l AMLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jD7YDnew; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k4si1576993pgo.7.2019.02.08.00.56.23; Fri, 08 Feb 2019 00:56:39 -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; dkim=pass header.i=@linaro.org header.s=google header.b=jD7YDnew; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727401AbfBHIzt (ORCPT + 99 others); Fri, 8 Feb 2019 03:55:49 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:36700 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727203AbfBHIzt (ORCPT ); Fri, 8 Feb 2019 03:55:49 -0500 Received: by mail-pl1-f196.google.com with SMTP id g9so1393344plo.3 for ; Fri, 08 Feb 2019 00:55:48 -0800 (PST) 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=+IoXi6/wX3eVgVDyb+GtYCpOFNqboyDM2qzEvakKqDc=; b=jD7YDnewE84yBR8+OjQj3WntieAgH0DSnhLlZEU33qoq5wgtu5J2kWSlVNO2Ae3B68 8LELJPMbKb6kzi858SdWX2Wk2RLapCAl0hwKl5vd4TFt2D59Hob2s1PxomTvXkhBwPt7 gWSXh05FvJTH/6ibNd51Hhqk2r0brPTFwDbdZNNZ/ll9O8/VRilSE15u7OtaS/AnQzH+ oztz9vYIOwCvEs0zgnPpbEghhPmNZu2gFr7Q1L7Gunv8dNRlysbJmVc5dsBRi582cMMC OLjkemwOIqOnySOkhvi+uGdwGRDHEPXBPICq+Zgd0/QZ+FBj3OUdUwNVKLQcX1p6e0Jg miGA== 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=+IoXi6/wX3eVgVDyb+GtYCpOFNqboyDM2qzEvakKqDc=; b=BKmQ7WNwfhGhVzouQVfE+5ClNsvL+Xk/FUFAH2HA6ekWlV0BXx44A1M96/Tf6UwoXc H+cMnsuMyLrqtvs7BtmCJViiV01Op+uPMTQcXZTWVN0w1V7dd/qlQfkKH8KOuy4/tnk6 5yk3vuQLPaCfaohvw3cUKVxtZTkUqI65+Bsk0hp6RjWZ+Ps54ja1Vm52U+82wLhpOQRb Tz8LD3bNV/7qqsPAoK/NSQ/Y5IejsjlQhEJT4L8TGER9fLtvGd7iIaZuDILle/rqqMFf UvC2T/Ghuqaens7jBpDqjctKBpDzNnhoL8fhGK07F2aTs7Jsa1SNil9D2Y+4sKI4ekM4 GS+A== X-Gm-Message-State: AHQUAubzz00gDx4OTZAtfc4B++E9BXvH8JbCDpYTBH5ftn6Cg1DtGe0C W0EQJKowMdmSf6SKgvYpr3zEbw== X-Received: by 2002:a17:902:bccc:: with SMTP id o12mr10966470pls.273.1549616147936; Fri, 08 Feb 2019 00:55:47 -0800 (PST) Received: from localhost ([122.172.102.63]) by smtp.gmail.com with ESMTPSA id b68sm2368577pfg.160.2019.02.08.00.55.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Feb 2019 00:55:46 -0800 (PST) Date: Fri, 8 Feb 2019 14:25:44 +0530 From: Viresh Kumar To: Marek Szyprowski Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, "Rafael J . Wysocki" , Nishanth Menon , Stephen Boyd , Bartlomiej Zolnierkiewicz , Dave Gerlach , Wolfram Sang Subject: Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization Message-ID: <20190208085544.vqkebcgg7jpbv2a6@vireshk-i7> References: <20190207122227.19873-1-m.szyprowski@samsung.com> <20190208064957.zhyue42kpgaoslwm@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180323-120-3dd1ac Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08-02-19, 09:12, Marek Szyprowski wrote: > On 2019-02-08 07:49, Viresh Kumar wrote: > > Why don't you get similar problem during suspend? I think you can get > > it when the CPUs are offlined as I2C would have gone by then. The > > cpufreq or OPP core can try and run some regulator or genpd or clk > > calls to disable resources, etc. Even if doesn't happen, it certainly > > can. > > CPUfreq is suspended very early during system suspend and thus it does > nothing when CPUs are being offlined. > > Also at resume the cpufreq core may try to change the frequency right > > from ->init() on certain cases, though not everytime and so the > > problem can come despite of this series. > > cpufreq is still in suspended state (it is being 'resume' very late in > the system resume procedure), so if driver doesn't explicitly change any > opp in ->init(), then cpufreq core waits until everything is resumed. To > sum up, this seems to be fine, beside the issue with regulator > initialization I've addressed in this patchset. Yeah, the governors are suspended very soon, but any frequency change starting from cpufreq core can still happen. There are at least two points in cpufreq_online() where we may end up changing the frequency, but that is conditional and may not be getting hit. > > We guarantee that the resources are available during probe but not > > during resume, that's where the problem is. > > Yes, so I've changed cpufreq-dt to the common approach, in which the > driver keeps all needed resources for the whole lifetime of the device. That's not what I was saying actually. I was saying that it should be fine to do a I2C transfer during resume, else we will always have problems and have to fix them with hacks like the one you proposed where you acquire resources for all the possible CPUs. Maybe we can fix it once and for all. -- viresh