Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp970707ybl; Fri, 24 Jan 2020 12:57:30 -0800 (PST) X-Google-Smtp-Source: APXvYqzkkp3p30OeAcms09GyDomHj9kWmc9WGJI81ljelNry08VQD4ulqhRoLR9xw2m8w9C90meJ X-Received: by 2002:aca:b7c5:: with SMTP id h188mr534898oif.100.1579899450814; Fri, 24 Jan 2020 12:57:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579899450; cv=none; d=google.com; s=arc-20160816; b=XeH98XDHFmVTxOp7AK+XFBrgjt07T93imOaFmmbj6VB8BLhbtcy0MpVcol/CbfRyb7 /EQSW7TZYzdkNH4SKLHx9i3+JykNfqYR67lgKUsk07jh0rrochRUi/CT8CGpP23ZPU++ vqAqEk1xckvQgNHEFYwd4xw+FP2MYmhWR09Y4FGYQauHJiBNi1cTrkHWi0x4NLnBO9cT zGMpkdlyuZ7ESxri2diGIZ/QS2Lz5IkxrEcT19V5MtvjI9HVkKbREWmFoc31XCpeca9j aRaGK6sx4TS8zc2EBqwli7L3SMmeRTxZAw8R2sdcWEfkhvvDmKaIjkwaoC+A+80alCAr fO3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id :dkim-signature; bh=mrhcIGGf29wPqKelAuVacdgsgYagP0iavvcKEGj+5FI=; b=xT6GvBJ5rkFuG+KrNwNt30hjFC+L+qYJ/LcdZCGZfW5LgkKbwAaIxTIbQ82Z8SgJBK 8+1k0CE3tLaAtqXnRwpKgd9t/ytK8TvyI54oaSrA04U2BjWhRFjA/u/Pbmi99wJz3eYp ZhMZH2Yh/SpZ6/fdoBz6rMVNvOD/eNInEbXIRooAgfg4l8d1KaEN4YBdX0YIlfdfCGR+ P+9DY5p1yNcEgO9mRyN/0Czw2JMC8+vDZ4jj8KQxFE6Ffit26wH87QEcE0Nih0fjmw5Y PrJ15HlICLQ7tiREVqjZcHwb9mmi822ZIH9QuOMOcE1FQkuViX5vdkwWd1IRblG7+F+A 5kWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=A3qsmNly; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p26si3291058oto.240.2020.01.24.12.57.19; Fri, 24 Jan 2020 12:57:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=A3qsmNly; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389850AbgAXRD5 (ORCPT + 99 others); Fri, 24 Jan 2020 12:03:57 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:7227 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387710AbgAXRD5 (ORCPT ); Fri, 24 Jan 2020 12:03:57 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 48458B3zJfz9v0MC; Fri, 24 Jan 2020 18:03:54 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=A3qsmNly; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id PlrBI8ncfS8t; Fri, 24 Jan 2020 18:03:54 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 48458B1zkFz9v0M8; Fri, 24 Jan 2020 18:03:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1579885434; bh=mrhcIGGf29wPqKelAuVacdgsgYagP0iavvcKEGj+5FI=; h=From:Subject:To:Cc:Date:From; b=A3qsmNlyynmqC5scs6xaMpM8BusLtOt/41xLmy7BykDfEOf4zxA3bllbpVQoyOXhk Eb+sQYh0jfA/rV3WrY5uwNVoadrNFv5HZHgZrvhPd65yfhokdfuNAydFR/8nJkP5cf KZZHCT1tLe8KSp+agMP7XVYhGic0VJP3i5gNbmpI= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 680488B86A; Fri, 24 Jan 2020 18:03:54 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id FQF1SzBxpfT8; Fri, 24 Jan 2020 18:03:54 +0100 (CET) Received: from po14934vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 46D5E8B86B; Fri, 24 Jan 2020 18:03:49 +0100 (CET) Received: by po14934vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 3C582651F6; Fri, 24 Jan 2020 17:03:48 +0000 (UTC) Message-Id: <872477f7c7552d3bb7baf0b302398fcd42c5fcfd.1579885334.git.christophe.leroy@c-s.fr> From: Christophe Leroy Subject: [PATCH] powerpc/32: Add missing context synchronisation with CONFIG_VMAP_STACK To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Fri, 24 Jan 2020 17:03:48 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After reactivation of data translation by modifying MSR[DR], a isync is required to ensure the translation is effective. Signed-off-by: Christophe Leroy --- Rebased on powerpc/merge-test @mpe: If not too late: - change to head_32.h should be squashed into "powerpc/32: prepare for CONFIG_VMAP_STACK" - change to head_32.S should be squashed into "powerpc/32s: Enable CONFIG_VMAP_STACK" Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.S | 1 + arch/powerpc/kernel/head_32.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index cb7864091641..0493fcac6409 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S @@ -277,6 +277,7 @@ MachineCheck: #ifdef CONFIG_VMAP_STACK li r11, MSR_KERNEL & ~(MSR_IR | MSR_RI) /* can take DTLB miss */ mtmsr r11 + isync #endif #ifdef CONFIG_PPC_CHRP mfspr r11, SPRN_SPRG_THREAD diff --git a/arch/powerpc/kernel/head_32.h b/arch/powerpc/kernel/head_32.h index 73a035b40dbf..a6a5fbbf8504 100644 --- a/arch/powerpc/kernel/head_32.h +++ b/arch/powerpc/kernel/head_32.h @@ -43,6 +43,7 @@ .ifeq \for_rtas li r11, MSR_KERNEL & ~(MSR_IR | MSR_RI) /* can take DTLB miss */ mtmsr r11 + isync .endif subi r11, r1, INT_FRAME_SIZE /* use r1 if kernel */ #else @@ -123,6 +124,7 @@ #ifdef CONFIG_VMAP_STACK li r9, MSR_KERNEL & ~(MSR_IR | MSR_RI) /* can take DTLB miss */ mtmsr r9 + isync #endif tovirt_vmstack r12, r12 tophys_novmstack r11, r11 -- 2.25.0