Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1626679ybl; Sat, 25 Jan 2020 05:01:39 -0800 (PST) X-Google-Smtp-Source: APXvYqyFbMkmr4uh+Z7urSu0mb4UMFzfwoZrGAGNLHQ/Oj014gJmS0cRub4A90ubXihCj80bkEVB X-Received: by 2002:a9d:da2:: with SMTP id 31mr5985639ots.319.1579957299570; Sat, 25 Jan 2020 05:01:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579957299; cv=none; d=google.com; s=arc-20160816; b=vO/qc9qaIkjqoqdLYW80qQagIGtE/LicBwv56uvEG+LbaclNpluCfAozP7COlrSQpj F1sWRLfaylplVQh2++ukmzIF9tlV8l4c3Pn5wC5+T8AgQ7DMboZELgVv3R/rr8zMPKx3 gb1ZY3KHL/wnkIw1Qc6s5x+fQwNi22fr9s1vojkugcD4yqyd7s6S8cH4b8tI/Rh6eTMw SIJXA7rrpbxfbzx7xdZIQc+48G5oS09D9MRph0FPFRpsle5ZkJIfXU8qhEOJMjmIfZ6r si3G1Ze1cjgNvHXzCKbdnS8AraTz6ulAWjf+6X/G+vSCaWMQRnz+LqcZlLclk52sJLB9 NZtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-disposition:mime-version:user-agent:in-reply-to:references :subject:cc:to:from:message-id:date; bh=4gTYlGGUOBnYk4hvlr+ZcDfdT+MCkOqblRyvTe/k28I=; b=kiDFKgGV+ck77BAliXCNKQrDcLC+senB19sMYs4qRMzy29Ko0GqmNuao4QJwTH15CF UqlblpcmNue6KSFyY62TiRHc6/vbk8ilvFhqCD2fqRLeupZx0KNNcbiT6KjsL5JAbDXT uXBzrO5Rd38RZU53rsbXMnC34Iyg//6tFqndnNKJaP6i8le2CghuQ2y9pjvozH1mc6ys qM3HTCf07YFuK5ZhoxuwKCXcl5PgJbNDjYclCLOx2tOkZhr4xjzzzKB9Y/tx/lPazSrN x+Qsh+fAZEYBOz7do8mPPAqUBhvbFBDI1VlHKUhuJXsCz4L6qtGaPD2IWWLISeI2TBLh +t2A== ARC-Authentication-Results: i=1; mx.google.com; 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 30si4126692otr.75.2020.01.25.05.01.26; Sat, 25 Jan 2020 05:01:39 -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; 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 S1726191AbgAYNA3 convert rfc822-to-8bit (ORCPT + 99 others); Sat, 25 Jan 2020 08:00:29 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:13107 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725710AbgAYNA3 (ORCPT ); Sat, 25 Jan 2020 08:00:29 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 484bhp51jXz9vCR6; Sat, 25 Jan 2020 14:00:26 +0100 (CET) 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 EVhjlkEv73BO; Sat, 25 Jan 2020 14:00:26 +0100 (CET) Received: from vm-hermes.si.c-s.fr (vm-hermes.si.c-s.fr [192.168.25.253]) by pegase1.c-s.fr (Postfix) with ESMTP id 484bhp49Cmz9vCR0; Sat, 25 Jan 2020 14:00:26 +0100 (CET) Received: by vm-hermes.si.c-s.fr (Postfix, from userid 33) id B3A05660; Sat, 25 Jan 2020 14:00:52 +0100 (CET) Received: from 37.173.164.116 ([37.173.164.116]) by messagerie.si.c-s.fr (Horde Framework) with HTTP; Sat, 25 Jan 2020 14:00:52 +0100 Date: Sat, 25 Jan 2020 14:00:52 +0100 Message-ID: <20200125140052.Horde.0-n2_EcIdGahTxfDVj913w1@messagerie.si.c-s.fr> From: Christophe Leroy To: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Paul Mackerras , Benjamin Herrenschmidt Subject: Re: [PATCH] powerpc/32: Add missing context synchronisation with CONFIG_VMAP_STACK References: <872477f7c7552d3bb7baf0b302398fcd42c5fcfd.1579885334.git.christophe.leroy@c-s.fr> <87r1znhgvi.fsf@mpe.ellerman.id.au> In-Reply-To: <87r1znhgvi.fsf@mpe.ellerman.id.au> User-Agent: Internet Messaging Program (IMP) H5 (6.2.3) Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michael Ellerman a écrit : > 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. Argh ! I think the easiest is to move the EXC_XFER_STD(0x600, alignment_exception) somewhere else and branch to it. There is some space at .0xa00 Christophe PS: I'm afk until monday