Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2969823ybd; Fri, 28 Jun 2019 00:14:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqySjkjEXBP/qLxXDZgL+dqiv+v38jn07J7VOiPg2hlTIWg9y0yqGmOwE0l7b5UXGo8WoNqf X-Received: by 2002:a65:5c0a:: with SMTP id u10mr7357023pgr.410.1561706052594; Fri, 28 Jun 2019 00:14:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561706052; cv=none; d=google.com; s=arc-20160816; b=e/I5hFBsu3eoXX+8XwtgWd9+eMrRo4mnyRBHoLJe3p5odEgKl6yieRyoXqyM20AX5Y uDML2CBFJoHu8/CDpnCt1hBQRBsMZ02MEEhP1fAtl+/qW2oifmRfPCn3b6xgf2fe01yV 8YvTuWm7et6ihpxsNEMn5h8UYlFG63YBxJOOk3FB//55rDfzM/hXRZJzeQ8QbD4JTGxF iUM8P0j70jJQZyfp8ysq7RLz/CD+dY7naluKSHpsnSSyNHLt/Tm/Tqm6T/N1EWCgwlUY X2LkhXYLBOucmksPHXBwZlC2HtEjD1gXoC2FF1W0BEBYV1to9WaIgRjK1KGsFSCoL4qx OCZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=/Cnt58VZhnbwSwijmz21auc9Yvj4p4PpT3m36ds3sv8=; b=vE3A3TChIaliXWD8pqHodPuPQTEtoKol6EAg+T459qRrtzuTvV04kkN7cY7klmuYLJ T8PG3LGH3wCemHHvOfHPpD8jk9HSHto3iXIq7Ef/UhSfSpJMZEJG7tLXLaBjPpDIGTfq jrpGuX+5K9wSR1cBeIV/yR6ekkxOyJ5TqKFByxd7O8QKwviBC0plHfqH8MtDcCaPhAhX cVTXhGoGTo2vVY/T/hZYSKq6W2hGQpqIdBPMjH/f460hQG8AB2eP5npOriChZexARDeg E0wZ88dOS4BTt8VQQgYT4UOOqQfcyGYM5suPdTvRiFmi+JORkuBzXjKBQGmg2LpL76Rr fM8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RrGS2HZm; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d21si1291189pll.369.2019.06.28.00.13.56; Fri, 28 Jun 2019 00:14:12 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=RrGS2HZm; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727267AbfF1HMe (ORCPT + 99 others); Fri, 28 Jun 2019 03:12:34 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:43656 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726574AbfF1HMd (ORCPT ); Fri, 28 Jun 2019 03:12:33 -0400 Received: by mail-lj1-f196.google.com with SMTP id 16so4887475ljv.10; Fri, 28 Jun 2019 00:12:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/Cnt58VZhnbwSwijmz21auc9Yvj4p4PpT3m36ds3sv8=; b=RrGS2HZmYNW9Ve83uiayxQophGE2uHC1aW4PDfa9c5x47p2qEWlqVH6UxPRCJpS/ne 6KcEizG2I2gHxL7QqRM6H9yvQF2/blA0KZ5aO70FtU27Zun5S3ilMHk70QMpqbLpI/ly uUbq54hToRVCcgo6vY1P4Ubv6J5n5pUhsAC1R9AIMTReADwYhf7nWMqLuTtV5JIxEz1K QdCfKSggPQoB135iMe/d2DPhvVMm7rH6U17BQndqPplv9grygtm11YYftN/0P0JARFSs hMbKFPHQ3woMemiMs6cM958UNgTR2VsgnxM7R6jd58aQOpxEqx2X3rC8jNgVy6898kEl uN+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/Cnt58VZhnbwSwijmz21auc9Yvj4p4PpT3m36ds3sv8=; b=TPccTSZOavxue/ShZ5Y/DOjYu3cQlLCD1TcP32KW1l/Z/rDNIsYFQZK6WJk9X7GHHK 1tG6bbg9vhz6SGqtuOO9pVAO8AxyYr1E8jUF5tAIgypUxxmQSanvqneGKCN6yj3JfWjI 6BTWps0Q6Gzf++NWsW+fPC5G36yzvrGKzrdJchmQpNk0SHDGT018jvVAgZ8QFePmny3C rnAsDgvEs6RBZDNE4SlYQf6D/0xyzHvHtdiGcVRYzMdozRVI1MNwjUAlyV/Yz1ECMWsz h01dgfvMMH2bLEefwd31pWH8J+wEv6/DPzLSqjYR2t5b8uNakVDnrUdHgbu/48hnvejK Mxug== X-Gm-Message-State: APjAAAWXCTmJhKhtmtevKzbbCZ9Cht0NDOR+nWC2NSk6EjDs+c58zJaN b94F5u3tEVp+maaZsVPbac7TAwuh X-Received: by 2002:a2e:2c07:: with SMTP id s7mr5210551ljs.44.1561705951312; Fri, 28 Jun 2019 00:12:31 -0700 (PDT) Received: from [192.168.2.145] (ppp79-139-233-208.pppoe.spdop.ru. [79.139.233.208]) by smtp.googlemail.com with ESMTPSA id v7sm459505ljj.3.2019.06.28.00.12.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jun 2019 00:12:30 -0700 (PDT) Subject: Re: [PATCH v3 02/22] PM / devfreq: tegra30: Keep interrupt disabled while governor is stopped To: myungjoo.ham@samsung.com, Thierry Reding , Kyungmin Park , Chanwoo Choi , Jonathan Hunter , Tomeu Vizoso Cc: "linux-pm@vger.kernel.org" , "linux-tegra@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20190627211115.21138-3-digetx@gmail.com> <20190627211115.21138-1-digetx@gmail.com> <20190628064842epcms1p37e66e5fa52885ef7461b439bd336e60f@epcms1p3> From: Dmitry Osipenko Message-ID: <17fe0599-b36e-31bc-4964-4b7cb77e1d64@gmail.com> Date: Fri, 28 Jun 2019 10:12:29 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: <20190628064842epcms1p37e66e5fa52885ef7461b439bd336e60f@epcms1p3> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 28.06.2019 9:48, MyungJoo Ham пишет: >> There is no real need to keep interrupt always-enabled, will be nicer >> to keep it disabled while governor is inactive. >> >> Suggested-by: Thierry Reding >> Signed-off-by: Dmitry Osipenko >> --- >> drivers/devfreq/tegra30-devfreq.c | 43 ++++++++++++++++--------------- >> 1 file changed, 22 insertions(+), 21 deletions(-) >> >> diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c >> index a27300f40b0b..5e2b133babdd 100644 >> --- a/drivers/devfreq/tegra30-devfreq.c >> +++ b/drivers/devfreq/tegra30-devfreq.c > [] >> @@ -416,8 +417,6 @@ static void tegra_actmon_start(struct tegra_devfreq *tegra) >> { >> unsigned int i; >> >> - disable_irq(tegra->irq); >> - >> actmon_writel(tegra, ACTMON_SAMPLING_PERIOD - 1, >> ACTMON_GLB_PERIOD_CTRL); >> > > I think this has nothing to do with > "keep it disabled while governor is inactive." > > And this looks dangerous because it disables the safety measure > of disabling interrupt while you touch some looking-critical registers. > Anyway, as I do not know the internals of Tegra SoC, I cannot sure. Sorry, I'm not sure what do you mean .. Before this patch we were disabling the interrupt on a start of programming hardware configuration, now we don't needed to disable the interrupt because it is already in the disabled state at that moment since we're now requesting interrupt in the *disabled* state during of the driver's probe using IRQ_NOAUTOEN flag.