linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: David Gibson <david@gibson.dropbear.id.au>, paulus@samba.org
Cc: jasowang@redhat.com, linuxppc-dev@lists.ozlabs.org,
	thuth@redhat.com, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [RFC] arch/powerpc: Turn off irqs in switch_mm()
Date: Tue, 25 Apr 2017 08:47:35 +1000 (AEST)	[thread overview]
Message-ID: <3wBhLc21L4z9s8Y@ozlabs.org> (raw)
In-Reply-To: <20170419063826.1678-1-david@gibson.dropbear.id.au>

On Wed, 2017-04-19 at 06:38:26 UTC, David Gibson wrote:
> There seems to be a mismatch in expectations between the powerpc arch code
> and the generic (and x86) code in terms of the irq state when switch_mm()
> is called.
> 
> powerpc expects irqs to already be (soft) disabled when switch_mm() is
> called, as made clear in the commit message of 9c1e105 "powerpc: Allow
> perf_counters to access user memory at interrupt time".
> 
> That seems to be true when it's called from the schedule, but not for
> use_mm().  This becomes clear when looking at the x86 code paths for
> switch_mm().  There, switch_mm() itself disable irqs, with a
> switch_mm_irqs_off() variant which expects that to be already done.
> 
> This patch addresses the problem, making the powerpc code mirror the x86
> code.
> 
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/9765ad134a00a01cbcc69c78ff6def

cheers

      reply	other threads:[~2017-04-24 22:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19  6:38 [RFC] arch/powerpc: Turn off irqs in switch_mm() David Gibson
2017-04-24 22:47 ` Michael Ellerman [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=3wBhLc21L4z9s8Y@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=david@gibson.dropbear.id.au \
    --cc=jasowang@redhat.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    --cc=thuth@redhat.com \
    /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).