From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: benh@kernel.crashing.org, paulus@samba.org
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH powerpc 1/2] powerpc: protect per-CPU access with preempt_disable
Date: Thu, 10 Feb 2011 13:57:26 -0800 [thread overview]
Message-ID: <1297375047-18608-1-git-send-email-paulmck@linux.vnet.ibm.com> (raw)
In-Reply-To: <20110210215710.GA18429@linux.vnet.ibm.com>
The hpte_need_flush() function accesses the ppc64_tlb_batch per-CPU
variable with preemption enabled, a bug that this patch fixes. Perhaps
crudely.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/pgtable-ppc64.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h
index 2b09cd5..6ed08ab 100644
--- a/arch/powerpc/include/asm/pgtable-ppc64.h
+++ b/arch/powerpc/include/asm/pgtable-ppc64.h
@@ -228,8 +228,11 @@ static inline unsigned long pte_update(struct mm_struct *mm,
assert_pte_locked(mm, addr);
#ifdef CONFIG_PPC_STD_MMU_64
- if (old & _PAGE_HASHPTE)
+ if (old & _PAGE_HASHPTE) {
+ preempt_disable();
hpte_need_flush(mm, addr, ptep, old, huge);
+ preempt_enable();
+ }
#endif
return old;
--
1.7.3.2
next prev parent reply other threads:[~2011-02-10 21:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-10 21:57 [PATCH powerpc 0/2] powerpc CONFIG_PREEMPT fixes Paul E. McKenney
2011-02-10 21:57 ` Paul E. McKenney [this message]
2011-02-10 21:57 ` [PATCH powerpc 2/2] powerpc: mask smp_processor_id() false positive Paul E. McKenney
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=1297375047-18608-1-git-send-email-paulmck@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.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).