linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Cousson, Benoit" <b-cousson@ti.com>
To: "Nayak, Rajendra" <rnayak@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>,
	"Shilimkar, Santosh" <santosh.shilimkar@ti.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	Paul Walmsley <paul@pwsan.com>
Subject: Re: [PATCH] OMAP: hmwod: Update the sysc_cache in case module context is lost
Date: Thu, 21 Oct 2010 17:00:55 +0200	[thread overview]
Message-ID: <4CC055A7.8040805@ti.com> (raw)
In-Reply-To: <0680EC522D0CC943BC586913CF3768C003FF2DAF83@dbde02.ent.ti.com>

On 10/21/2010 12:13 PM, Nayak, Rajendra wrote:

<snip>

> Hi Kevin,
>
> What the patch does is reprogram's the sysc value (from the cache)
> whenever its lost. So its infact saved in the cache and restored when
> needed.
>
>>
>> Otherwise, all this patch does is refresh the _sysc_cache with
>> completely unknown contents.  It also somewhat defeats the purpose of
>> having a cache.  If you're going to read SYSC in order to determine
>> whether or not you can avoid a write, you might as well just blindly
>> write.
>
> I thought of this and dismissed it thinking I would end up with a read/or/write
> and instead a read always to avoid write is better.
> But now looking back again, it does make sense to still keep the cache to avoid
> a read (since a read has significantly more latency than write) and do a blind write
> always. Does that make sense?

That seems indeed better. The point is that cache is already a location 
for the "save" part.
So writing blindly will do the restore with always the good value.
It is anyway faster than trying to check if we lost context or not 
through PRM registers.

Benoit

  reply	other threads:[~2010-10-21 15:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-14 18:22 [PATCH] OMAP: hmwod: Update the sysc_cache in case module context is lost Rajendra Nayak
2010-10-14 22:13 ` Kevin Hilman
2010-10-15  5:48   ` Shilimkar, Santosh
2010-10-15  7:01     ` Cousson, Benoit
2010-10-15 15:40     ` Kevin Hilman
2010-10-21 10:13       ` Nayak, Rajendra
2010-10-21 15:00         ` Cousson, Benoit [this message]
2010-10-21 17:31         ` Kevin Hilman

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=4CC055A7.8040805@ti.com \
    --to=b-cousson@ti.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=rnayak@ti.com \
    --cc=santosh.shilimkar@ti.com \
    /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).