From patchwork Tue Oct 13 02:16:57 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Mundt X-Patchwork-Id: 53280 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9D2TJ7A032453 for ; Tue, 13 Oct 2009 02:29:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758740AbZJMCSh (ORCPT ); Mon, 12 Oct 2009 22:18:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758739AbZJMCSh (ORCPT ); Mon, 12 Oct 2009 22:18:37 -0400 Received: from 124x34x33x190.ap124.ftth.ucom.ne.jp ([124.34.33.190]:38971 "EHLO master.linux-sh.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758610AbZJMCSg (ORCPT ); Mon, 12 Oct 2009 22:18:36 -0400 Received: from localhost (unknown [127.0.0.1]) by master.linux-sh.org (Postfix) with ESMTP id EE9BF63758; Tue, 13 Oct 2009 02:16:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at linux-sh.org Received: from master.linux-sh.org ([127.0.0.1]) by localhost (master.linux-sh.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2WQThjKtseXr; Tue, 13 Oct 2009 11:16:57 +0900 (JST) Received: by master.linux-sh.org (Postfix, from userid 500) id 857286375A; Tue, 13 Oct 2009 11:16:57 +0900 (JST) Date: Tue, 13 Oct 2009 11:16:57 +0900 From: Paul Mundt To: Valentin R Sitsikov Cc: linux-sh@vger.kernel.org Subject: Re: Possibly icahe/dcache synchronization problem on sh7785lcr Message-ID: <20091013021657.GA28788@linux-sh.org> References: <4ACF32C2.9010501@siemens.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4ACF32C2.9010501@siemens.com> User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c index a98c7d8..74b44ab 100644 --- a/arch/sh/mm/cache-sh4.c +++ b/arch/sh/mm/cache-sh4.c @@ -115,9 +115,9 @@ static inline void flush_cache_4096(unsigned long start, static void sh4_flush_dcache_page(void *arg) { struct page *page = arg; -#ifndef CONFIG_SMP struct address_space *mapping = page_mapping(page); +#ifndef CONFIG_SMP if (mapping && !mapping_mapped(mapping)) set_bit(PG_dcache_dirty, &page->flags); else @@ -131,6 +131,8 @@ static void sh4_flush_dcache_page(void *arg) n = boot_cpu_data.dcache.n_aliases; for (i = 0; i < n; i++, addr += 4096) flush_cache_4096(addr, phys); + + flush_icache_all(); } wmb();