Re: flush_icache_range

From: David Mosberger <davidm_at_napali.hpl.hp.com>
Date: 2005-06-03 09:07:55
>>>>> On Fri, 03 Jun 2005 00:55:42 +0200, "Menyhart, Zoltan" <Zoltan.Menyhart@free.fr> said:

  Zoltan> I mean:

  Zoltan> - if the cache of a given level is split, then we need to
  Zoltan> take the stride size of the i-cache:
  Zoltan> pal_cache_config_info(level, /* cache_type = */ 1,...)

  Zoltan> - if the cache of a given level is unified, then we need to
  Zoltan> take the stride size of the unified/data cache:
  Zoltan> pal_cache_config_info(level, /* cache_type = */ 2,...)

  Zoltan> In my example I know only that some (but not all) the levels
  Zoltan> are split.  Guessing the existence of a split cache by not
  Zoltan> obtaining an "Invalid argument" error form
  Zoltan> "pal_cache_config_info()" is a bit weak method...

Ah, I misremembered: I thought a cache_type value of 1 means
"instruction-cache or unified", but no, it means _only_
instruction-cache.  So the safe sequence seems to be:

   pal_cache_config_info(level, 2, &info)
   if (!info.pcci_unified)
	pal_cache_config_info(level, 1, &info)

While I omitted the failure checks, of course, this doesn't look too
bad.

	--david
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Jun 2 19:13:50 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:39 EST