linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* PIPT cache handling on s5pv210 chip
@ 2010-05-14  3:49 Kyungmin Park
  2010-05-14  9:11 ` Russell King - ARM Linux
  2010-05-14 10:36 ` Kukjin Kim
  0 siblings, 2 replies; 7+ messages in thread
From: Kyungmin Park @ 2010-05-14  3:49 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

In s5pv210 code, there's some strange comments. Does anyone who know
why does it required or more fancy way?

Thank you,
Kyungmin Park


/*
 * flush_cache_vmap() is used when creating mappings (eg, via vmap,
 * vmalloc, ioremap etc) in kernel space for pages.  On non-VIPT
 * caches, since the direct-mappings of these pages may contain cached
 * data, we need to do a full cache flush to ensure that writebacks
 * don't corrupt data placed into these pages via the new mappings.
 */
static inline void flush_cache_vmap(unsigned long start, unsigned long end)
{
#if defined(CONFIG_ARCH_S5PV210)
/*
 * SAMSUNG SoC(S5PV210) has a L2 cache. L2 cache type is
 * VIPT type but L2 is PIPT type cache. If disabling L2 cache, this
 * code works well. But enabling L2 cache, there is data corruption
 * problem. In case of S5PV210, just call flush_cache_all() function
 * like as 2.6.28 kernel.
 */
        flush_cache_all();
#else
        if (!cache_is_vipt_nonaliasing())
                flush_cache_all();
        else
                /*
                 * set_pte_at() called from vmap_pte_range() does not
                 * have a DSB after cleaning the cache line.
                 */
                dsb();
#endif
}

static inline void flush_cache_vunmap(unsigned long start, unsigned long end)
{
#if defined(CONFIG_ARCH_S5PV210)
        flush_cache_all();
#else
        if (!cache_is_vipt_nonaliasing())
                flush_cache_all();
#endif
}

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-05-17  4:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-14  3:49 PIPT cache handling on s5pv210 chip Kyungmin Park
2010-05-14  9:11 ` Russell King - ARM Linux
2010-05-14 10:36 ` Kukjin Kim
2010-05-14 10:48   ` Russell King - ARM Linux
2010-05-14 11:34     ` Kukjin Kim
2010-05-14 11:53       ` Russell King - ARM Linux
2010-05-17  4:03       ` Ben Dooks

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).