From patchwork Fri Oct 28 16:48:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 13024059 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 24551ECAAA1 for ; Fri, 28 Oct 2022 16:52:10 +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:Date:Message-Id:MIME-Version:Subject:Cc :To:From:References:In-Reply-To:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pWG7CjW5eugSAgcQcMayDy216QRm91oBLXS3h1k2ngI=; b=lYNOQkatOvS4Ae 5gF+QMh5Ia0Waa7a7rzouttsVyGAQmVE3N+b6FkvXaZZJnHLpHNx+bsazSoWvpUEvFRCbcpdnibif 6bDgnS3VT2rBqmNbXt8yjCeUknooQ+dWeT2BAanGmehpAAVxFmXD2aFPpep4zoZvzKGladHXM2kgR tn/9iXnfVmgNTQ+KANrbi4SQ7TeGo6e9AdCvsyAreDS0iOcj/Eoi38q+qCjEFMuHdqhADiTF/FQOD tU0gEGXrGMfamF07h185NtlcppAM4Rsiz6FEX4K66Mlh1gKIYPanooyTk3VqxDFpZ5mlj0VDakOhZ bLhFQragfyt32fwdBchg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooSZU-00126c-50; Fri, 28 Oct 2022 16:51:04 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooSYk-00115u-9f for linux-arm-kernel@lists.infradead.org; Fri, 28 Oct 2022 16:50:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=OhpOuWjeen7QG1He6lXTiBfyZaGo2Ecqc0tyM0FhmYY=; b=v89NSJvDt4HVfbfHi/VcP+62QL Ofplk8KUS2qWPd42RjzNexz3DmjfBpg8PzD9c2v5GuTPyzMoFy44N3/Jv78HT3WE/uiilcEzYHUxQ o1oc4SaoCnGcCwSKBoeIw6NMgj5gLP3EJ5lWbz+FDcU8raSg+IWRv/Bziz+7+wfnXvw4TVpS0MdY1 dtIXLR7Od74TtK6+5kQwWuxtbmXh6HJQPaSWikgd4+0OgyQt0R6KNE0swC+qYMfsPZstYOk6ais83 WwVSMXbUj2Pn3UJaAtcO0IJKnUV+0HGqa9qnyzPNaC56T8Hyd/CkW2lWmXgE8Qn/KGoPmb7VL5vq7 q/JkKMIg==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:40014 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ooSWk-00007E-6D; Fri, 28 Oct 2022 17:48:14 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1ooSWj-000FEM-Jl; Fri, 28 Oct 2022 17:48:13 +0100 In-Reply-To: References: From: "Russell King (Oracle)" To: Yury Norov Cc: Catalin Marinas , Mark Rutland , Will Deacon , Linux Kernel Mailing List , Linus Torvalds , linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/5] ARM: findbit: add unwinder information MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Fri, 28 Oct 2022 17:48:13 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221028_095018_360620_A381EBC4 X-CRM114-Status: GOOD ( 10.96 ) 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 Add unwinder information so oops in the findbit functions can create a proper backtrace. Signed-off-by: Russell King (Oracle) --- arch/arm/lib/findbit.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/lib/findbit.S b/arch/arm/lib/findbit.S index 6ec584d16d46..b7ac2d3c0748 100644 --- a/arch/arm/lib/findbit.S +++ b/arch/arm/lib/findbit.S @@ -12,6 +12,7 @@ */ #include #include +#include .text #ifdef __ARMEB__ @@ -22,6 +23,7 @@ .macro find_first, endian, set, name ENTRY(_find_first_\name\()bit_\endian) + UNWIND( .fnstart) teq r1, #0 beq 3f mov r2, #0 @@ -41,11 +43,13 @@ ENTRY(_find_first_\name\()bit_\endian) blo 1b 3: mov r0, r1 @ no more bits ret lr + UNWIND( .fnend) ENDPROC(_find_first_\name\()bit_\endian) .endm .macro find_next, endian, set, name ENTRY(_find_next_\name\()bit_\endian) + UNWIND( .fnstart) cmp r2, r1 bhs 3b mov ip, r2, lsr #5 @ word index @@ -69,6 +73,7 @@ ENTRY(_find_next_\name\()bit_\endian) orr r2, r2, #31 @ no zero bits add r2, r2, #1 @ align bit pointer b 2b @ loop for next bit + UNWIND( .fnend) ENDPROC(_find_next_\name\()bit_\endian) .endm @@ -97,6 +102,7 @@ ENDPROC(_find_next_\name\()bit_\endian) * One or more bits in the LSB of r3 are assumed to be set. */ .L_found_swab: + UNWIND( .fnstart) rev_l r3, ip .L_found: #if __LINUX_ARM_ARCH__ >= 7 @@ -130,4 +136,4 @@ ENDPROC(_find_next_\name\()bit_\endian) cmp r1, r0 @ Clamp to maxbit movlo r0, r1 ret lr - + UNWIND( .fnend)