linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Fleming <matt@console-pimps.org>
To: linux-sh@vger.kernel.org
Subject: Re: Probably cache synchronization issue on SH7723
Date: Wed, 23 Dec 2009 23:33:08 +0000	[thread overview]
Message-ID: <20091223233308.GA12843@console-pimps.org> (raw)
In-Reply-To: <4B17B0D6.6020105@emtrion.de>

On Wed, Dec 23, 2009 at 09:38:10AM +0100, Pietrek, Markus wrote:
> Hi Matt,
> 
> update_mmu_cache() is called with vma = NULL in
> arch/sh/mm/fault_32.c. If we then assume exec=1, the patch works
> fine.
> 
> diff --git a/arch/sh/mm/cache.c b/arch/sh/mm/cache.c
> index e9415d3..054bb8a 100644
> --- a/arch/sh/mm/cache.c
> +++ b/arch/sh/mm/cache.c
> @@ -126,8 +126,10 @@ void __update_cache(struct vm_area_struct *vma,
>  {
>         struct page *page;
>         unsigned long pfn = pte_pfn(pte);
> +       /* flush any dirty data page before using it as a code page */
> +       int exec = (vma != NULL) ? (vma->vm_flags & VM_EXEC) : 1;
> 

I'm assuming that if you set exec to 0 when vma = NULL then you still
see the cache issues? In which case, this patch probably works because
it's aggressively flushing the cache and unfortunately will be papering
over the real bug.

What sort of workload do you have that triggers this bug? Did you say it
was a graphics app? Is the app available anywhere? If I could reproduce
it on my board it would make it easier for me to diagnose the bug.

If we can't find the cause of this bug soon I imagine that Paul will
queue up some band-aid patch so that, whilst there will be a performance
loss, at least things will work correctly ;-)

  parent reply	other threads:[~2009-12-23 23:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-03 12:36 Probably cache synchronization issue on SH7723 Markus Pietrek
2009-12-03 12:45 ` Magnus Damm
2009-12-04  6:47 ` Paul Mundt
2009-12-22 16:18 ` AW: " Pietrek, Markus
2009-12-22 16:51 ` Matt Fleming
2009-12-23  8:38 ` AW: " Pietrek, Markus
2009-12-23 23:33 ` Matt Fleming [this message]
2009-12-24  5:28 ` Paul Mundt
2009-12-24  9:50 ` AW: " Pietrek, Markus
2009-12-24 10:12 ` Paul Mundt

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=20091223233308.GA12843@console-pimps.org \
    --to=matt@console-pimps.org \
    --cc=linux-sh@vger.kernel.org \
    /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).