Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1596187ybl; Sat, 25 Jan 2020 04:16:43 -0800 (PST) X-Google-Smtp-Source: APXvYqx1V1XqLqCsptqhcdJP6FV8R14LuMoVQGG/IvBnnqzqJs899asQade4DgTwJ1PyR/07TVzP X-Received: by 2002:aca:5fc6:: with SMTP id t189mr2309539oib.166.1579954603377; Sat, 25 Jan 2020 04:16:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579954603; cv=none; d=google.com; s=arc-20160816; b=Mt9dJl4nlFKxcRspcVqEwcE5rpo6s0okX2sOoe+QX14v5OapMbWf8VHKvEP7LNTfBx 11za6Ri6HnOT3f0OBDYGM8yHw5g5WvAP1NaTSYjce8rgbeWXGAGWaW49aanjblQX+NqI /i3TYjqsqxkd3/W6MkqmRap9VLH6KT9g+NzUtI4RATKbsU64UwSbL4Faf6BqmbqqSbgj z31XRe6korSNKB7W4n3yZ5N1dyzOa5EM9UVBiMTflJOwDTyZs69Ahb7WQED/+XoA/JS4 TrMqhZ3fZuk+w0bAX/2J6bzG8VJ7HCc4nkka9UMsHk6fO16UT4GTbjtfwYGUz4kVsi8/ rF5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=RjvOLaJ/lDYMswVAFqgol4bbrBJgIEJdmpVDfRmqSIg=; b=Qe4i3QRHqylGLXzr7r2HlXGNlKdYBfFkKx0i6OLBK9hfCqKNZEIjN5z0ZxtibzHe0E aSQfDDf3geUbRfXgESyfHdhZ1Ng+XJkDGYpjCNhaPSqPsznMu6tdzr4VDdd5eGSnRBK0 xIj38xS8B1srUuZkUKyREQzpVWMrJ1/zR93EUareHMbX7fLJIPLS3c2I6vk62e1NspG3 V+j9nBP8bguRcYuP2jEFVIclNQlD1z1GLHa74efwS73Gzg9WOMRioov6S2/zSbBhIKIB S04QXSs+tnYUHaziZ/y76j/sJ/69C1D5qp/FcD01LH5xhpwP8otRe62lgQdNYptPjSng ZnZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=RTA4AbD4; 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 h7si4500552otk.86.2020.01.25.04.16.31; Sat, 25 Jan 2020 04:16:43 -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=@ellerman.id.au header.s=201909 header.b=RTA4AbD4; 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 S1729186AbgAYMPR (ORCPT + 99 others); Sat, 25 Jan 2020 07:15:17 -0500 Received: from bilbo.ozlabs.org ([203.11.71.1]:41985 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726565AbgAYMPR (ORCPT ); Sat, 25 Jan 2020 07:15:17 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 484Zhf2j3Nz9sRs; Sat, 25 Jan 2020 23:15:14 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1579954515; bh=nB61mmKQ3P/Bh6P9qi8s5DC02swBkMgHUM4/AJusMZ0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=RTA4AbD4gSDN2H4g+4/4hKN9q4ND6fzXneYsmv0V7O9TwgYfiz4CgSEvYkJiJXGVV 5yk/MoCHxdaw+5MoNK7ad3IRaDNr9m5/gmdTo/Jeqzg5vnGjFWTJI1TUYPWQVedCUz c4aDuHNiy8pv7qjQMH/NbYtNxDHjFL5JZ3SpgM5B4whskGXRCJsFSqHBoW+SrIzb5n FnW5MG/CpoiPmR5H8SIJtR4THSKA0cW30US+zJoA4fFKEoo/huJgXj0hh43ZVUmYD/ g/LZXgd1PhHBwYLUMkxJuALzBkCOjS1TxJf8vq+XHnJJhhrNwPI/nHXXyXYszBPZ5u 53MHQnIy+EQvA== From: Michael Ellerman To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] powerpc/32: Add missing context synchronisation with CONFIG_VMAP_STACK In-Reply-To: <872477f7c7552d3bb7baf0b302398fcd42c5fcfd.1579885334.git.christophe.leroy@c-s.fr> References: <872477f7c7552d3bb7baf0b302398fcd42c5fcfd.1579885334.git.christophe.leroy@c-s.fr> Date: Sat, 25 Jan 2020 23:15:13 +1100 Message-ID: <87r1znhgvi.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christophe Leroy writes: > 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.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 Actually this one leads to: /home/michael/linux/arch/powerpc/kernel/head_8xx.S: Assembler messages: /home/michael/linux/arch/powerpc/kernel/head_8xx.S:151: Error: attempt to move .org backwards make[3]: *** [/home/michael/linux/scripts/Makefile.build:348: arch/powerpc/kernel/head_8xx.o] Error 1 For mpc885_ads_defconfig. That's the alignment exception overflowing into the program check handler: /* Alignment exception */ . = 0x600 Alignment: EXCEPTION_PROLOG handle_dar_dsisr=1 save_dar_dsisr_on_stack r4, r5, r11 li r6, RPN_PATTERN mtspr SPRN_DAR, r6 /* Tag DAR, to be used in DTLB Error */ addi r3,r1,STACK_FRAME_OVERHEAD EXC_XFER_STD(0x600, alignment_exception) /* Program check exception */ EXCEPTION(0x700, ProgramCheck, program_check_exception, EXC_XFER_STD) Can't see an obvious/easy way to fix it. cheers > .endif > subi r11, r1, INT_FRAME_SIZE /* use r1 if kernel */ > #else