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 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 0DB17C433EF for ; Wed, 13 Apr 2022 15:04:57 +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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8R3J3e8380X5xtHjqzTvhq/bmXCSNQYGqStCJrjfatk=; b=e6JCgAnATTFWtg rsHz4XkcTQ//OE/TFJIcU9cRXY69hKtW0huGZmpBQ2iEEfOr0pgX2GiyDNIeRUYE7oBBupLxKqukP QzcsiMG0GDEBC3Ge1Rw8SF8fsDoKtECfA8PqQIDn8QQgnXxUhFjpfV1kboMA4B59eqQuzuhQHShfk I6XOBL9ACZcq4LcoZhy9NPpI2+a7B25ZdhpqKclvgBLmmLmeI5hIhFNMusIutd5Iez1CGNOxRw9x7 CA2FYww3uBYdyLzWNSur+ewoLRcEcPBPz/frV8dFWlAxvdg6bp41ligYOCZ2GXSTFmQ2e1vv/A1dt cleB/51SuEkKnPNFgnzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1neeXD-001Wgy-3g; Wed, 13 Apr 2022 15:03:55 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1neeX9-001WfU-7M for linux-arm-kernel@lists.infradead.org; Wed, 13 Apr 2022 15:03:52 +0000 Received: from [192.168.254.32] (unknown [47.189.24.195]) by linux.microsoft.com (Postfix) with ESMTPSA id 479EA20C34B9; Wed, 13 Apr 2022 08:03:50 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 479EA20C34B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1649862230; bh=f9yolefv+mF3gwAgZd+KpO/gBKkB5jK2BIw2ngQ20/w=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Ch/lUrU+t+BMXAi/MaG1QaCf+QxYY9sc+2lWHSuM0aAG5nE8xCSj2Us/hiqOwT9jx yHOId81EBiOx93ys///EXmrzqK/7DLJvJrLnt3G4LbBDITWUncbgjQWebeSrL53g9t XRHz8t4iAuL2xkchRLOFvsgwl3rbfcYvEGO6CeZw= Message-ID: Date: Wed, 13 Apr 2022 10:03:49 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH 3/6] arm64: stacktrace: make struct stackframe private to stacktrace.c Content-Language: en-US To: Mark Rutland , linux-arm-kernel@lists.infradead.org Cc: broonie@kernel.org, catalin.marinas@arm.com, kaleshsingh@google.com, will@kernel.org References: <20220413145910.3060139-1-mark.rutland@arm.com> <20220413145910.3060139-4-mark.rutland@arm.com> From: "Madhavan T. Venkataraman" In-Reply-To: <20220413145910.3060139-4-mark.rutland@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220413_080351_360913_17146D42 X-CRM114-Status: GOOD ( 22.53 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 4/13/22 09:59, Mark Rutland wrote: > Now that arm64 uses arch_stack_walk() consistently, struct stackframe is > only used within stacktrace.c. To make it easier to read and maintain > this code, it would be nicer if the definition were there too. > > Move the definition into stacktrace.c. > > There should be no functional change as a result of this patch. > > Signed-off-by: Mark Rutland > Cc: Catalin Marinas > Cc: Madhavan T. Venkataraman > Cc: Mark Brown > Cc: Will Deacon > --- > arch/arm64/include/asm/stacktrace.h | 32 ----------------------------- > arch/arm64/kernel/stacktrace.c | 32 +++++++++++++++++++++++++++++ > 2 files changed, 32 insertions(+), 32 deletions(-) > > diff --git a/arch/arm64/include/asm/stacktrace.h b/arch/arm64/include/asm/stacktrace.h > index e77cdef9ca29..aec9315bf156 100644 > --- a/arch/arm64/include/asm/stacktrace.h > +++ b/arch/arm64/include/asm/stacktrace.h > @@ -31,38 +31,6 @@ struct stack_info { > enum stack_type type; > }; > > -/* > - * A snapshot of a frame record or fp/lr register values, along with some > - * accounting information necessary for robust unwinding. > - * > - * @fp: The fp value in the frame record (or the real fp) > - * @pc: The lr value in the frame record (or the real lr) > - * > - * @stacks_done: Stacks which have been entirely unwound, for which it is no > - * longer valid to unwind to. > - * > - * @prev_fp: The fp that pointed to this frame record, or a synthetic value > - * of 0. This is used to ensure that within a stack, each > - * subsequent frame record is at an increasing address. > - * @prev_type: The type of stack this frame record was on, or a synthetic > - * value of STACK_TYPE_UNKNOWN. This is used to detect a > - * transition from one stack to another. > - * > - * @kr_cur: When KRETPROBES is selected, holds the kretprobe instance > - * associated with the most recently encountered replacement lr > - * value. > - */ > -struct stackframe { > - unsigned long fp; > - unsigned long pc; > - DECLARE_BITMAP(stacks_done, __NR_STACK_TYPES); > - unsigned long prev_fp; > - enum stack_type prev_type; > -#ifdef CONFIG_KRETPROBES > - struct llist_node *kr_cur; > -#endif > -}; > - > extern void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk, > const char *loglvl); > > diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c > index 08af9ca9a845..073d0941a5b6 100644 > --- a/arch/arm64/kernel/stacktrace.c > +++ b/arch/arm64/kernel/stacktrace.c > @@ -18,6 +18,38 @@ > #include > #include > > +/* > + * A snapshot of a frame record or fp/lr register values, along with some > + * accounting information necessary for robust unwinding. > + * > + * @fp: The fp value in the frame record (or the real fp) > + * @pc: The lr value in the frame record (or the real lr) > + * > + * @stacks_done: Stacks which have been entirely unwound, for which it is no > + * longer valid to unwind to. > + * > + * @prev_fp: The fp that pointed to this frame record, or a synthetic value > + * of 0. This is used to ensure that within a stack, each > + * subsequent frame record is at an increasing address. > + * @prev_type: The type of stack this frame record was on, or a synthetic > + * value of STACK_TYPE_UNKNOWN. This is used to detect a > + * transition from one stack to another. > + * > + * @kr_cur: When KRETPROBES is selected, holds the kretprobe instance > + * associated with the most recently encountered replacement lr > + * value. > + */ > +struct stackframe { > + unsigned long fp; > + unsigned long pc; > + DECLARE_BITMAP(stacks_done, __NR_STACK_TYPES); > + unsigned long prev_fp; > + enum stack_type prev_type; > +#ifdef CONFIG_KRETPROBES > + struct llist_node *kr_cur; > +#endif > +}; > + > static notrace void start_backtrace(struct stackframe *frame, unsigned long fp, > unsigned long pc) > { Reviewed-by: Madhavan T. Venkataraman _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel