Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df2f5e72 authored by Russell King's avatar Russell King Committed by Russell King
Browse files

[ARM SMP] Disable lazy flush_dcache_page for SMP



Lazy flush_dcache_page() causes userspace instability on SMP
platforms, so disable it for now.

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent d2ef5ebb
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -155,14 +155,19 @@ static void __flush_dcache_aliases(struct address_space *mapping, struct page *p
 *  space mappings, we can be lazy and remember that we may have dirty
 *  space mappings, we can be lazy and remember that we may have dirty
 *  kernel cache lines for later.  Otherwise, we assume we have
 *  kernel cache lines for later.  Otherwise, we assume we have
 *  aliasing mappings.
 *  aliasing mappings.
 *
 * Note that we disable the lazy flush for SMP.
 */
 */
void flush_dcache_page(struct page *page)
void flush_dcache_page(struct page *page)
{
{
	struct address_space *mapping = page_mapping(page);
	struct address_space *mapping = page_mapping(page);


#ifndef CONFIG_SMP
	if (mapping && !mapping_mapped(mapping))
	if (mapping && !mapping_mapped(mapping))
		set_bit(PG_dcache_dirty, &page->flags);
		set_bit(PG_dcache_dirty, &page->flags);
	else {
	else
#endif
	{
		__flush_dcache_page(mapping, page);
		__flush_dcache_page(mapping, page);
		if (mapping && cache_is_vivt())
		if (mapping && cache_is_vivt())
			__flush_dcache_aliases(mapping, page);
			__flush_dcache_aliases(mapping, page);