From patchwork Thu Nov 25 10:48:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Murzin X-Patchwork-Id: 12693628 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C4E2C433F5 for ; Thu, 25 Nov 2021 10:50:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=zjawolovoY58tFJZruaWQan3gABhOU/YxlepVX8BZc4=; b=i0gDQ0BdnJom2J HgM+DYbWTKXauWKdwBc/hE36yivppex1JGoFuQztsa1t2bpK3vmTmjSu09azjWvHXxE0lfEg6qqZM Q+TNqQ0Fx2ffGzfghXNvVuwVkmcenJop+4DLhmfDqjjkG1sdWGjA6BpVJd0lgbnggR/iydsCHLx2a 1NitVw/rV4SjxLBdA68w/3fHpzHFLh0X0i43TrMhlI/4BFTWcHZReNiV4Ta1Wa3fQCO0zWC6W3R5u +fDOSJnVzoQ08J8guan0tu+V5kiPZ8CXDv429LPJkKevlXlxSBZaxUQp49t9z2Jc6tOl2c8Xuo0k6 STikSv6Hom56uN7zoUBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqCJT-0077Vv-51; Thu, 25 Nov 2021 10:49:11 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqCJP-0077Ux-Gh for linux-arm-kernel@lists.infradead.org; Thu, 25 Nov 2021 10:49:08 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5A8161042; Thu, 25 Nov 2021 02:49:04 -0800 (PST) Received: from login2.euhpc.arm.com (login2.euhpc.arm.com [10.6.27.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D60713F66F; Thu, 25 Nov 2021 02:49:03 -0800 (PST) From: Vladimir Murzin To: linux-arm-kernel@lists.infradead.org Cc: ardb@kernel.org Subject: [PATCH] ARM: NOMMU: Reload __secondary_data after PROCINFO_INITFUNC Date: Thu, 25 Nov 2021 10:48:41 +0000 Message-Id: <20211125104841.46128-1-vladimir.murzin@arm.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211125_024907_649977_BA0321C4 X-CRM114-Status: UNSURE ( 7.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org __secondary_data used to reside in r7 around call to PROCINFO_INITFUNC. After commit 95731b8ee63e ("ARM: 9059/1: cache-v7: get rid of mini-stack") r7 is used as a scratch register, so we have to reload __secondary_data before we setup the stack pointer. Fixes: 95731b8ee63ec9419822a51cd9878fa32582fdd2 ("ARM: 9059/1: cache-v7: get rid of mini-stack") Signed-off-by: Vladimir Murzin --- arch/arm/kernel/head-nommu.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S index 0fc814b..8796a69 100644 --- a/arch/arm/kernel/head-nommu.S +++ b/arch/arm/kernel/head-nommu.S @@ -114,6 +114,7 @@ ENTRY(secondary_startup) add r12, r12, r10 ret r12 1: bl __after_proc_init + ldr r7, __secondary_data @ reload r7 ldr sp, [r7, #12] @ set up the stack pointer mov fp, #0 b secondary_start_kernel