Home Home > GIT Browse > SLE11-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2018-06-07 20:06:13 +0200
committerMichal Suchanek <msuchanek@suse.de>2018-06-08 15:56:25 +0200
commita9491ad75f71a99442dd997fe235def25937b628 (patch)
tree8ecec90b9ca4567c1368116431822e5baa22f99e
parentcc6c08cc53b1318104d4d21d8e871c50908cd1b7 (diff)
powerpc/64s: Fix compiler store ordering to SLB shadow area
(bsc#1094244). suse-commit: d988150fe846b460d95cd1908a6900ae9c1e70de
-rw-r--r--arch/powerpc/mm/slb.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c
index e22276cb67a4..0b914e8e3e83 100644
--- a/arch/powerpc/mm/slb.c
+++ b/arch/powerpc/mm/slb.c
@@ -61,19 +61,21 @@ static inline void slb_shadow_update(unsigned long ea, int ssize,
unsigned long flags,
unsigned long entry)
{
+ struct slb_shadow *p = get_slb_shadow();
+
/*
* Clear the ESID first so the entry is not valid while we are
* updating it. No write barriers are needed here, provided
* we only update the current CPU's SLB shadow buffer.
*/
- get_slb_shadow()->save_area[entry].esid = 0;
- get_slb_shadow()->save_area[entry].vsid = mk_vsid_data(ea, ssize, flags);
- get_slb_shadow()->save_area[entry].esid = mk_esid_data(ea, ssize, entry);
+ ACCESS_ONCE(p->save_area[entry].esid) = 0;
+ ACCESS_ONCE(p->save_area[entry].vsid) = mk_vsid_data(ea, ssize, flags);
+ ACCESS_ONCE(p->save_area[entry].esid) = mk_esid_data(ea, ssize, entry);
}
static inline void slb_shadow_clear(unsigned long entry)
{
- get_slb_shadow()->save_area[entry].esid = 0;
+ ACCESS_ONCE(get_slb_shadow()->save_area[entry].esid) = 0;
}
static inline void create_shadowed_slbe(unsigned long ea, int ssize,