From patchwork Fri Jul 15 06:10:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalesh Singh X-Patchwork-Id: 12918766 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 E8A09C43334 for ; Fri, 15 Jul 2022 06:13:23 +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:Cc:To:From:Subject:References: Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=LFKwOje2/EbpIb/lQf9I1YnqL8OHAlKH562WVDmYp7U=; b=4Q++aI+9gcakI5MF56zHBq0yfj iqG2fQFNiirf1uTz0R7F8DFSH0dZs6oVrmjQmMWUAtNW/8q4WEyOAFoIg2hmeN29fTFSchVL2ZiTY M2MKOp4S9m3e3c6e6IqgJDJOGjV5EdM2jg1eVhq24bUa3gmrRXotFY2IY5d7o9WF+NGSkTnFzeMWK bueROp5py6ux6wT5D0oncVTE/hUA4ZllGEzIcCvGfj6xhLrstldGW7v6cAu1w20rCVMfDzhWKmwkH 0N6csTrVA9mU/2HUQIljq80igRYoCHh2Tff5nxme1pI+1RM6yF47uCIfidO8yDuitQpL9U5Poi3jL H60c0btw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCEYn-004Wmm-Ds; Fri, 15 Jul 2022 06:12:22 +0000 Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCEXl-004WJF-LS for linux-arm-kernel@lists.infradead.org; Fri, 15 Jul 2022 06:11:19 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-31c88e36c0bso34046827b3.20 for ; Thu, 14 Jul 2022 23:11:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=SVXMXCA9EUcm/U2NL9bFju/llGCppObF5hU8u8qx8a0=; b=KmS2wN930EG2IxdxCnUBJhmowSVq6hfGSEB+wly2itZQ8X0cteyEWcAfiVvdqRbU42 yYenX7Dwez5VU+bNvMLNDm0ctaQ8BCMSiSb//Vn6c9oX9+SeTSiSZ36Uppd4JnBxxR78 znl5dMF7OcbOnChFRV8zbNqv7wgOjwrgyxDU7Zpy0l4ynJg4HhJ/jccQUGXF4i2S8cNB pmV7nKb0B8X7Ula4KBpHNLEaM8aGRY3TVfgMp+m21+vceYD9GUOqJg6gPXDD2fptehJA kKrsWzYrZSbpOf11gT0kv72fBfdnYXt/tvhluVpxYNQ4o6shoPvFr2NEyL983QhMwnAC Jx5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=SVXMXCA9EUcm/U2NL9bFju/llGCppObF5hU8u8qx8a0=; b=M+OyzkLlV4lz2GWInkPYENxHhu2FjesF7QxMYJB9IubIKIRippRlhCpAXraCiwvkc7 UaAigF1Vv3RyHW4tPU9zqql7nKQZHDie9czYEteusL0+lta3G83CBRZtrVOT6vfyVNRm dxIuc+roYLWU7Bq2a4pWVsow1bMDVjY9lnuCS/4NTk8fggfgzCgNzIG9jpAD3D7acDw5 kFHPyCkVo1+udVCK7SzDQXD6G8YKKjVdA2zK0pkW0YZH+pmlPGHXlbxIIer1ZGOlHxxC lvWBkSIUuHEiWySbYZdjsR5FaPV2RGa8YBOUeOY/j1D7l0+MFZbFWjMvqw8ZDL3LLz8m loxw== X-Gm-Message-State: AJIora+sTSXiniQHgMJMTwOg0Hcc615i9AQ+OVD9a2VdIwQv9UQZ2YwO 9Q25T+vWxPJBX9/hmCCt5P7ISejF69z8U/Avdg== X-Google-Smtp-Source: AGRyM1s7bBaJTn0X9XWOnvyD6RIVfSqUuJ1lmnLuGoAg+cY+w4t8dDFpOLAfqJACW8rVgQZNFvvWoSacW1dpR4y6cQ== X-Received: from kaleshsingh.mtv.corp.google.com ([2620:15c:211:200:f010:455b:62ce:19e]) (user=kaleshsingh job=sendgmr) by 2002:a81:6fc3:0:b0:31c:8c75:3eb8 with SMTP id k186-20020a816fc3000000b0031c8c753eb8mr14112217ywc.225.1657865476241; Thu, 14 Jul 2022 23:11:16 -0700 (PDT) Date: Thu, 14 Jul 2022 23:10:15 -0700 In-Reply-To: <20220715061027.1612149-1-kaleshsingh@google.com> Message-Id: <20220715061027.1612149-7-kaleshsingh@google.com> Mime-Version: 1.0 References: <20220715061027.1612149-1-kaleshsingh@google.com> X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog Subject: [PATCH v4 06/18] arm64: stacktrace: Add description of stacktrace/common.h From: Kalesh Singh To: maz@kernel.org, mark.rutland@arm.com, broonie@kernel.org, madvenka@linux.microsoft.com Cc: will@kernel.org, qperret@google.com, tabba@google.com, kaleshsingh@google.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, andreyknvl@gmail.com, russell.king@oracle.com, vincenzo.frascino@arm.com, mhiramat@kernel.org, ast@kernel.org, drjones@redhat.com, wangkefeng.wang@huawei.com, elver@google.com, keirf@google.com, yuzenghui@huawei.com, ardb@kernel.org, oupton@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, android-mm@google.com, kernel-team@android.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220714_231117_749361_3180DC04 X-CRM114-Status: UNSURE ( 9.03 ) 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 Add brief description on how to use stacktrace/common.h to implement a stack unwinder. Signed-off-by: Kalesh Singh Reviewed-by: Fuad Tabba --- arch/arm64/include/asm/stacktrace/common.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/include/asm/stacktrace/common.h b/arch/arm64/include/asm/stacktrace/common.h index f86efe71479d..b362086f4c70 100644 --- a/arch/arm64/include/asm/stacktrace/common.h +++ b/arch/arm64/include/asm/stacktrace/common.h @@ -2,6 +2,14 @@ /* * Common arm64 stack unwinder code. * + * To implement a new arm64 stack unwinder: + * 1) Include this header + * + * 2) Provide implementations for the following functions: + * - on_overflow_stack() + * - on_accessible_stack() + * - unwind_next() + * * Copyright (C) 2012 ARM Ltd. */ #ifndef __ASM_STACKTRACE_COMMON_H