linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Yuri Tikhonov <yur@emcraft.com>
To: Olof Johansson <olof@lixom.net>
Cc: linuxppc-dev@ozlabs.org
Subject: Re[2]: [PATCH 1/2] [PPC 4xx] invalidate_l2cache_range() implementation for ppc44x
Date: Thu, 8 Nov 2007 02:10:03 +0300	[thread overview]
Message-ID: <936845819.20071108021003@emcraft.com> (raw)
In-Reply-To: <20071107040428.GA22637@lixom.net>


 Hi Olof,

 Thanks a lot for the feedbacks. Comments below.

On 07.11.2007, 7:04:28 you wrote:

> Hi,

> Some comments below. In general this patch adds #ifdefs in common code,
> that's normally frowned upon.
> It would maybe be better to add a new call to ppc_machdeps and call it
> if set.

 Agree; this looks better indeed. 

> On Wed, Nov 07, 2007 at 01:40:28AM +0300, Yuri Tikhonov wrote:

...

>> +
>>  /*
>>   * Write any modified data cache blocks out to memory.
>>   * Does not invalidate the corresponding cache lines (especially for
>> diff --git a/include/asm-powerpc/cache.h b/include/asm-powerpc/cache.h
>> index 5350704..8a2f9e6 100644
>> --- a/include/asm-powerpc/cache.h
>> +++ b/include/asm-powerpc/cache.h
>> @@ -10,12 +10,14 @@
>>  #define MAX_COPY_PREFETCH      1
>>  #elif defined(CONFIG_PPC32)
>>  #define L1_CACHE_SHIFT         5
>> +#define L2_CACHE_SHIFT         5
>>  #define MAX_COPY_PREFETCH      4
>>  #else /* CONFIG_PPC64 */
>>  #define L1_CACHE_SHIFT         7
>>  #endif
>>  
>>  #define        L1_CACHE_BYTES          (1 << L1_CACHE_SHIFT)
>> +#define        L2_CACHE_BYTES          (1 << L2_CACHE_SHIFT)

> The above looks highly system dependent to me. Should maybe be a part
> of the cache info structures instead, and filled in from the device tree?

 This is the Level-2 cache line parameter. I'll see what can be made here. For now I've just renamed these definitions and moved them into the PPC44x-specific header.


 Regards,
  Yuri 

-- 
Yuri Tikhonov, Senior Software Engineer
Emcraft Systems, www.emcraft.com

      reply	other threads:[~2007-11-07 23:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-06 22:40 [PATCH 1/2] [PPC 4xx] invalidate_l2cache_range() implementation for ppc44x Yuri Tikhonov
2007-11-07  4:04 ` Olof Johansson
2007-11-07 23:10   ` Yuri Tikhonov [this message]

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=936845819.20071108021003@emcraft.com \
    --to=yur@emcraft.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=olof@lixom.net \
    /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).