From: Benjamin Herrenschmidt Date: Mon, 24 Jul 2017 04:28:00 +0000 (+1000) Subject: powerpc/mm: Ensure cpumask update is ordered X-Git-Tag: v4.13~51^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=1a92a80ad386a1a6e3b36d576d52a1a456394b70;hp=1a92a80ad386a1a6e3b36d576d52a1a456394b70;p=mirror_ubuntu-artful-kernel.git powerpc/mm: Ensure cpumask update is ordered There is no guarantee that the various isync's involved with the context switch will order the update of the CPU mask with the first TLB entry for the new context being loaded by the HW. Be safe here and add a memory barrier to order any subsequent load/store which may bring entries into the TLB. The corresponding barrier on the other side already exists as pte updates use pte_xchg() which uses __cmpxchg_u64 which has a sync after the atomic operation. Cc: stable@vger.kernel.org Signed-off-by: Benjamin Herrenschmidt Reviewed-by: Nicholas Piggin [mpe: Add comments in the code] Signed-off-by: Michael Ellerman ---