From: Jarkko Nikula <jhnikula@gmail.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>,
linux-omap@vger.kernel.org,
Peter Ujfalusi <peter.ujfalusi@nokia.com>
Subject: Re: [RFC][RFT][PATCH 3/4 v5b] OMAP: McBSP: Introduce caching in register write operations
Date: Tue, 8 Dec 2009 09:35:21 +0200 [thread overview]
Message-ID: <20091208093521.3905241c.jhnikula@gmail.com> (raw)
In-Reply-To: <20091207210631.GG24013@atomide.com>
Hi, sorry not commenting for few days.
On Mon, 7 Dec 2009 13:06:31 -0800
Tony Lindgren <tony@atomide.com> wrote:
> > For me, the fact that more than one processor type can be configured side by
> > side it not enough reason here. With your code, if more then one processor
> > type is configured, twice or tripple as much memory space will be devoted to
> > two or three cache tables instead of one that can be reused easily, as it is
> > with mine. Since you cannot run the same instance of the kernel on several
> > machines simultaneously, only one of those two or three tables is required at
> > runtime for storing data, so this looks like a waste of expensive memory
> > unless some kind of runtime optimization that I am not familiar with can
> > happen here. I was even affraid before that one of objections against my idea
> > of using the cache could be unnecessary waste of memory space.
>
> Well if you want to optimize it out further, how about just kzalloc it
> during init? Then you have just one copy that gets set the right size
> depending on what you boot.
>
> > Nevertheless, I'll do it your way. Maybe there are still some other reasons
> > not explicitly expressed yet.
> >
> > I guess that omap2 part should follow the same pattern, shouldn't it?
>
How about declaring the reg_cache as a void pointer in struct
omap_mcbsp and allocate the cache and its size in omap_mcbsp_request
according to omap type? Read and write functions would access the
*reg_cache either as 16-bit or 32-bit table depending on omap.
No ifdefs, no unused cache tables in multi-omap binary and cache tables
are allocated only for used ports. I don't think there is need to
preserve cache content over omap_mcbsp_free and new omap_mcbsp_request?
--
Jarkko
next prev parent reply other threads:[~2009-12-08 7:34 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-01 3:10 [PATCH v3 0/4] OMAP: McBSP: Use register cache Janusz Krzysztofik
2009-12-01 3:12 ` [PATCH v3 1/4] OMAP: McBSP: Use macros for all register read/write operations Janusz Krzysztofik
2009-12-01 3:26 ` [Resend] " Janusz Krzysztofik
2009-12-01 3:14 ` [PATCH v3 2/4] OMAP: McBSP: Prepare register read/write macros API for caching Janusz Krzysztofik
2009-12-01 3:15 ` [PATCH v3 3/4] OMAP: McBSP: Introduce caching in register write operations Janusz Krzysztofik
2009-12-03 7:49 ` Jarkko Nikula
2009-12-03 12:30 ` [PATCH 3/4 v4] " Janusz Krzysztofik
2009-12-03 20:03 ` Tony Lindgren
2009-12-03 23:18 ` Janusz Krzysztofik
2009-12-04 12:57 ` Janusz Krzysztofik
2009-12-04 19:17 ` Tony Lindgren
2009-12-05 13:46 ` [PATCH 3/4 v5a] " Janusz Krzysztofik
2009-12-05 13:47 ` [RFC][RFT][PATCH 3/4 v5b] " Janusz Krzysztofik
2009-12-07 17:55 ` Tony Lindgren
2009-12-07 19:39 ` Janusz Krzysztofik
2009-12-07 21:06 ` Tony Lindgren
2009-12-08 7:35 ` Jarkko Nikula [this message]
2009-12-08 16:07 ` [RFC][RFT][PATCH 3/4 v6] " Janusz Krzysztofik
2009-12-08 16:40 ` Tony Lindgren
2009-12-08 16:59 ` Tony Lindgren
2009-12-08 19:46 ` Janusz Krzysztofik
2009-12-08 23:32 ` Tony Lindgren
2009-12-08 23:39 ` Tony Lindgren
2009-12-01 3:17 ` [PATCH v3 4/4] OMAP: McBSP: Use cache when modifying individual register bits Janusz Krzysztofik
2009-12-03 12:31 ` [PATCH 4/4 v4] " Janusz Krzysztofik
2009-12-03 7:49 ` [PATCH v3 0/4] OMAP: McBSP: Use register cache Jarkko Nikula
2009-12-03 9:35 ` Peter Ujfalusi
2009-12-03 12:31 ` Janusz Krzysztofik
2009-12-04 6:58 ` Peter Ujfalusi
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=20091208093521.3905241c.jhnikula@gmail.com \
--to=jhnikula@gmail.com \
--cc=jkrzyszt@tis.icnet.pl \
--cc=linux-omap@vger.kernel.org \
--cc=peter.ujfalusi@nokia.com \
--cc=tony@atomide.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