mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kevin Cernekee <cernekee@gmail.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: Machine check exception in kmap_coherent()
Date: Mon, 7 Sep 2009 11:28:05 -0700	[thread overview]
Message-ID: <347733d50909071128v63b2d8a1hd6a87a361c14017e@mail.gmail.com> (raw)
In-Reply-To: <20090907102613.GA25295@linux-mips.org>

On Mon, Sep 7, 2009 at 3:26 AM, Ralf Baechle<ralf@linux-mips.org> wrote:
> Too complicated.  The fault is happening because the non-SMTC code is trying
> to be terribly clever and pre-loading the TLB with a new wired entry.  On
> SMTC where multiple processors are sharing a single TLB are more careful
> approach is needed so the code does a TLB probe and carefully and re-uses
> an existing entry, if any.  Which happens to be just what we need.
>
> So how about below - only compile tested - patch?

That is an interesting idea.  However, I am not sure we want the IPI
ISR to overwrite copy_user_highpage()'s TLB entry.  That means that
when the interrupt returns, our coherent mapping will likely point to
a different page.  It will avoid the machine check exception, but it
will potentially cause silent, intermittent data corruption instead.

Taking another cue from the SMTC implementation, though - my v2 patch
adds an extra set of fixmap addresses for the in_interrupt() case,
avoiding the VA conflict entirely.  What do you think?

I tested this scheme on non-SMTC.  I suspect that the same change is
required for MT + MP cores like the 1004K, but probably not MT only
cores like 34K which don't use cacheop IPIs.

      parent reply	other threads:[~2009-09-07 18:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-05 21:38 Kevin Cernekee
2009-09-07 10:26 ` Ralf Baechle
2009-09-07 18:11   ` [PATCHv2] " Kevin Cernekee
2009-09-07 18:28   ` Kevin Cernekee [this message]

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=347733d50909071128v63b2d8a1hd6a87a361c14017e@mail.gmail.com \
    --to=cernekee@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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

all inboxes | Powered by JetHome®