From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0462FC43381 for ; Mon, 1 Apr 2019 11:14:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 95FEC20828 for ; Mon, 1 Apr 2019 11:14:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=c-s.fr header.i=@c-s.fr header.b="i0+z0gOY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726800AbfDALOS (ORCPT ); Mon, 1 Apr 2019 07:14:18 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:35978 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726409AbfDALOS (ORCPT ); Mon, 1 Apr 2019 07:14:18 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 44XqV96HgSz9tyfn; Mon, 1 Apr 2019 13:14:09 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=i0+z0gOY; 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 Xqopo6qslUS8; Mon, 1 Apr 2019 13:14:09 +0200 (CEST) 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 44XqV955Zlz9tyfB; Mon, 1 Apr 2019 13:14:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1554117249; bh=t8JxzHNnysGN5V5loKvGifZRjTCZPzfpZTeMykqXsHA=; h=Subject:From:To:Cc:References:Date:In-Reply-To:From; b=i0+z0gOYpUl3h8iC7LwW5M/BmSffYCp7liEXJ9anK06n2uppP8ZxTgKCXmGEHkATp sO+KZaldbOvvfoMkZ3R/thcBdiUOXInX04nECgKC+9Pga3JsTxA5RzuTY0Vqe0zTLW KY8fhRsa+Qmg6L3IFGR1DPIjd5PL2mTdAcXxomQs= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 716E08B8A7; Mon, 1 Apr 2019 13:14:14 +0200 (CEST) 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 cjT4FUAP7nAG; Mon, 1 Apr 2019 13:14:14 +0200 (CEST) Received: from PO15451 (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 4D5418B841; Mon, 1 Apr 2019 13:14:14 +0200 (CEST) Subject: Re: [PATCH] powerpc/rtas: fix early boot failure. From: Christophe Leroy To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Larry Finger Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: Message-ID: <558fbb7e-a454-055e-ca29-a2e4dfb6cf6a@c-s.fr> Date: Mon, 1 Apr 2019 13:14:13 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michael, Looks like you missed this fix for rc3. Christophe Le 25/03/2019 à 09:43, Christophe Leroy a écrit : > Commit 0df977eafc79 ("powerpc/6xx: Don't use SPRN_SPRG2 for storing > stack pointer while in RTAS") changes the code to use a field in > thread struct to store the stack pointer while in RTAS instead of > using SPRN_SPRG2. It therefore converts all places which were > manipulating SPRN_SPRG2 to use that field. During early startup, > the zeroing of SPRN_SPRG2 has been replaced by a zeroing of that > field in thread struct. But at least in start_here, that's done > wrongly because it used the physical address of the fields while > MMU is on at that time. > > So the virtual address of the field should be used instead, but in > the meantime, thread struct has already been zeroised and initialised > so we can just drop this initialisation. > > Reported-by: Larry Finger > Fixes: 0df977eafc79 ("powerpc/6xx: Don't use SPRN_SPRG2 for storing stack pointer while in RTAS") > Signed-off-by: Christophe Leroy > --- > arch/powerpc/kernel/head_32.S | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S > index 48051c8977c5..e25b615e9f9e 100644 > --- a/arch/powerpc/kernel/head_32.S > +++ b/arch/powerpc/kernel/head_32.S > @@ -851,10 +851,6 @@ __secondary_start: > tophys(r4,r2) > addi r4,r4,THREAD /* phys address of our thread_struct */ > mtspr SPRN_SPRG_THREAD,r4 > -#ifdef CONFIG_PPC_RTAS > - li r3,0 > - stw r3, RTAS_SP(r4) /* 0 => not in RTAS */ > -#endif > lis r4, (swapper_pg_dir - PAGE_OFFSET)@h > ori r4, r4, (swapper_pg_dir - PAGE_OFFSET)@l > mtspr SPRN_SPRG_PGDIR, r4 > @@ -941,10 +937,6 @@ start_here: > tophys(r4,r2) > addi r4,r4,THREAD /* init task's THREAD */ > mtspr SPRN_SPRG_THREAD,r4 > -#ifdef CONFIG_PPC_RTAS > - li r3,0 > - stw r3, RTAS_SP(r4) /* 0 => not in RTAS */ > -#endif > lis r4, (swapper_pg_dir - PAGE_OFFSET)@h > ori r4, r4, (swapper_pg_dir - PAGE_OFFSET)@l > mtspr SPRN_SPRG_PGDIR, r4 >