linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sekhar Nori <nsekhar@ti.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>,
	Kevin Hilman <khilman@kernel.org>,
	Wolfram Sang <wsa@the-dreams.de>,
	David Lechner <david@lechnology.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: davinci: fix the cpufreq transition
Date: Tue, 23 Jan 2018 18:08:57 +0530	[thread overview]
Message-ID: <8323a87f-93fb-c1fd-4098-e47f0fcf5859@ti.com> (raw)
In-Reply-To: <20180122144258.13627-1-brgl@bgdev.pl>

On Monday 22 January 2018 08:12 PM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> i2c_davinci_cpufreq_transition() is implemented in a way that will
> block if it ever gets called while no transfer is in progress.

true!

> 
> Not only that, but reinit_completion() is never called for xfr_complete.

reinit_completion() use is must only with complete_all(). At least that
bug is not obvious so needs more detail to be added here.

> Use the fact that cpufreq uses an srcu_notifier (running in process
> context) for transitions and that the bus_lock is taken during the call
> to master_xfer() and simplify the code by removing the transfer
> completion entirely and protecting i2c_davinci_cpufreq_transition()
> with i2c_lock/unlock_adapter().
> 
> Reported-by: David Lechner <david@lechnology.com>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>

I assume you tested this on a board where I2C-controlled PMIC changes
voltage during CPUfreq (DA850 LogicPD EVM should have this hardware
support).

Perhaps also add:

Fixes: 82c0de11b734 ("i2c: davinci: Add cpufreq support")

Apart from that:

Reviewed-by: Sekhar Nori <nsekhar@ti.com>

Thanks,
Sekhar

  reply	other threads:[~2018-01-23 12:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22 14:42 [PATCH] i2c: davinci: fix the cpufreq transition Bartosz Golaszewski
2018-01-23 12:38 ` Sekhar Nori [this message]
2018-01-24  3:01 ` David Lechner
2018-01-24  6:15 ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8323a87f-93fb-c1fd-4098-e47f0fcf5859@ti.com \
    --to=nsekhar@ti.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=brgl@bgdev.pl \
    --cc=david@lechnology.com \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).