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=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 1FCA4C282C4 for ; Wed, 13 Feb 2019 03:02:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D404C2190A for ; Wed, 13 Feb 2019 03:02:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550026925; bh=PAh9v9Y+8U4QDfjmor9mETtMhMST8EQwLv/B/xeWvog=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=jmU4xS+Tq16AQOyIw41MQR5WZGNUHnjRRjmTdLGU1i1XhDEgtR85xT2CGk1ehKkRU PION1Vt5hpHDAn44rlBbGwXqJH6VkezWj6ZhFECwh4iWtynzRGpmZek7pP6bRpxLOk gLHWxxKLLbuC3L6g016pNHKRNe5p0j5E9yAAk0rI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387877AbfBMCfB (ORCPT ); Tue, 12 Feb 2019 21:35:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:38528 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732034AbfBMCe4 (ORCPT ); Tue, 12 Feb 2019 21:34:56 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0819F222CC; Wed, 13 Feb 2019 02:34:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550025295; bh=PAh9v9Y+8U4QDfjmor9mETtMhMST8EQwLv/B/xeWvog=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CA7vJHlDTJ+PPvt9hy49aOcvGt8LlS7VuBtGrK33gfE8CCbwDfvxccWTiSrw7UrAe yUsbBiy3Y7UDBbo3sUXlZkb6+tBrhdC6EvZ4WVQPxUMhuZXpxXZsTvlq8voHpQ2Woj qALM0yPLMfUDjM70mtXZUcLKzSjjYReUSnwpFs3g= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Christophe Leroy , Michael Ellerman , Sasha Levin , linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 4.20 051/105] powerpc/8xx: fix setting of pagetable for Abatron BDI debug tool. Date: Tue, 12 Feb 2019 21:32:42 -0500 Message-Id: <20190213023336.19019-51-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190213023336.19019-1-sashal@kernel.org> References: <20190213023336.19019-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe Leroy [ Upstream commit fb0bdec51a4901b7dd088de0a1e365e1b9f5cd21 ] Commit 8c8c10b90d88 ("powerpc/8xx: fix handling of early NULL pointer dereference") moved the loading of r6 earlier in the code. As some functions are called inbetween, r6 needs to be loaded again with the address of swapper_pg_dir in order to set PTE pointers for the Abatron BDI. Fixes: 8c8c10b90d88 ("powerpc/8xx: fix handling of early NULL pointer dereference") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/kernel/head_8xx.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 3b67b9533c82..438512759e82 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S @@ -927,11 +927,12 @@ start_here: /* set up the PTE pointers for the Abatron bdiGDB. */ - tovirt(r6,r6) lis r5, abatron_pteptrs@h ori r5, r5, abatron_pteptrs@l stw r5, 0xf0(0) /* Must match your Abatron config file */ tophys(r5,r5) + lis r6, swapper_pg_dir@h + ori r6, r6, swapper_pg_dir@l stw r6, 0(r5) /* Now turn on the MMU for real! */ -- 2.19.1