From: Josh Wu <josh.wu@atmel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/3] ARM: cache: add an empty stub function for invalidate/flush dcache
Date: Thu, 11 Jun 2015 13:03:06 +0800 [thread overview]
Message-ID: <5579168A.2080700@atmel.com> (raw)
In-Reply-To: <201506101158.42684.marex@denx.de>
On 6/10/2015 5:58 PM, Marek Vasut wrote:
> On Wednesday, June 10, 2015 at 11:49:54 AM, Josh Wu wrote:
>> On 6/9/2015 9:11 PM, Tom Rini wrote:
>>> On Tue, Jun 09, 2015 at 11:54:14AM +0800, Josh Wu wrote:
>>>> Hi, Tom
>>>>
>>>> On 6/8/2015 9:20 PM, Tom Rini wrote:
>>>>> On Mon, Jun 08, 2015 at 10:26:29AM +0200, Marek Vasut wrote:
>>>>>> On Monday, June 08, 2015 at 04:05:04 AM, Josh Wu wrote:
>>>>>>> Hi, Marek
>>>>>>>
>>>>>>> On 6/5/2015 9:18 PM, Marek Vasut wrote:
>>>>>>>> On Friday, June 05, 2015 at 09:47:30 AM, Josh Wu wrote:
>>>>>>>>> Since some driver like ohci, lcd used dcache functions. But some
>>>>>>>>> ARM cpu don't implement the
>>>>>>>>> invalidate_dcache_range()/flush_dcache_range() functions.
>>>>>>>>>
>>>>>>>>> To avoid compiling errors this patch adds an weak empty stub
>>>>>>>>> function for all ARM cpu.
>>>>>>>>>
>>>>>>>>> And each cpu can implement its own implementation. If not
>>>>>>>>> implemented by default it will use an empty function.
>>>>>>>>>
>>>>>>>>> Signed-off-by: Josh Wu <josh.wu@atmel.com>
>>>>>>>>> ---
>>>>>>>>>
>>>>>>>>> Changes in v2: new added
>>>>>>>>>
>>>>>>>>> arch/arm/lib/cache.c | 9 +++++++++
>>>>>>>>> 1 file changed, 9 insertions(+)
>>>>>>>> So, why exactly can't this be entirely common code , but a
>>>>>>>> CPU-specific code ? :)
>>>>>>> Do you mean to make those empty functions as common code for all arch
>>>>>>> cpu to use?
>>>>>> Yes.
>>>>>>
>>>>>>> It seems there is no place to put common code for all arch cpu.
>>>>>> Isn't that what the common/ directory is for ? ;-)
>>>>> No, this is making something common for the sake of making it common
>>>>> rather than good architecutre of the code I think. We aren't going to
>>>>> share real cache functions just these dummy ones.
>>>> So it is the right place: arch/arm/lib/cache.c to put the dummy
>>>> cache function.
>>> Yes.
>>>
>>>>> We may re-evaluate
>>>>> our dummy ones at some point in the future when people try and use some
>>>>> particular combination harder, see for example the PowerPC dummy cache
>>>>> functions we just recently dropped. Thanks!
>>>> If this patch set are ok for you. I will sent more patches to drop
>>>> the dummy cache functions in <arch>/cpu/ folders.
>>> Right, that's the best palce I think, baring an existing arch having a
>>> location for weak cache functions already (like arm does).
>>>
>>>> Also the flush_cache() in arch/arm/lib/cache.c can be dropped and
>>>> just call flush_dcache_range() as the ARM1136, ARM926ejs alreay
>>>> implemented their own flush_cache().
>>> Nope, other things fail if you do that (vpac270_nor_256 and 24 others at
>>> least so far in my test build).
>> Does it fail to compile or on running? As I don't have the board to test
>> the binary, but I don't find any compile error when I apply such a patch.
>> Maybe it is better to sent out my patch for you to check.
> VPAC is PXA270 and to my knowledge, PXA has no cache support in place at all.
ok, so use a empty function is reasonable for pxa.
Marek, Tom
I just sent out another two patches:
first one is drop the invalidate_dcache_range()/flush_dcache_range().
second one is drop the flush_cache() function.
Could you check those two patches? thank you.
Best Regards,
Josh Wu
next prev parent reply other threads:[~2015-06-11 5:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-05 7:47 [U-Boot] [PATCH v2 1/3] ARM: cache: add an empty stub function for invalidate/flush dcache Josh Wu
2015-06-05 7:47 ` [U-Boot] [PATCH v2 2/3] m68k: cache: add an empty stub functions " Josh Wu
2015-06-05 21:29 ` Angelo Dureghello
2015-06-05 7:47 ` [U-Boot] [PATCH v2 3/3] usb: ohci: enable cache support Josh Wu
2015-06-05 13:18 ` [U-Boot] [PATCH v2 1/3] ARM: cache: add an empty stub function for invalidate/flush dcache Marek Vasut
2015-06-08 2:05 ` Josh Wu
2015-06-08 8:26 ` Marek Vasut
2015-06-08 9:15 ` Josh Wu
2015-06-08 13:20 ` Tom Rini
2015-06-09 3:54 ` Josh Wu
2015-06-09 13:11 ` Tom Rini
2015-06-10 9:49 ` Josh Wu
2015-06-10 9:58 ` Marek Vasut
2015-06-11 5:03 ` Josh Wu [this message]
2015-06-10 18:20 ` Tom Rini
2015-06-11 5:21 ` [U-Boot] [resend][PATCH 0/2] ARM: cache: clean up the code to drop the empty stub functions Josh Wu
2015-06-11 5:21 ` [U-Boot] [PATCH 1/2] ARM: cache: drop the empty dcache functions as we have it in lib/cache.c Josh Wu
2015-09-12 9:14 ` Albert ARIBAUD
2015-09-12 13:17 ` Tom Rini
2015-06-11 5:21 ` [U-Boot] [PATCH 2/2] ARM: cache: implement a default flush_cache() function Josh Wu
2015-07-01 2:01 ` [U-Boot] [resend][PATCH 0/2] ARM: cache: clean up the code to drop the empty stub functions Josh Wu
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=5579168A.2080700@atmel.com \
--to=josh.wu@atmel.com \
--cc=u-boot@lists.denx.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