From patchwork Mon Aug 28 20:53:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dustin Brown X-Patchwork-Id: 9926155 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 503FE60380 for ; Mon, 28 Aug 2017 20:55:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43AE2287B9 for ; Mon, 28 Aug 2017 20:55:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3877F287C1; Mon, 28 Aug 2017 20:55:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C41EF287BF for ; Mon, 28 Aug 2017 20:55:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; 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:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=edgakFCrmhY5aZCwMSdiyrI9weKYF/2aocQRWOXN1mo=; b=KAfMxrsSO7mUfv B5FiKN5vFHCet7dm5U26JwgEBjnFzyKQstapUB3UaFLOn1ReIIvH0Z+CqYKnR/YDiMs7lCr2bPTGl o9gU0QTDgv/7YG+lKzF9T/z5m0eFoqSKhwGDWgtwA0O+KqUciLMa01VgjRFWqyDtwgVo0bIrZipZ3 8NYuTnxZEq4C5dYNM1ZvK3DV8Yqg+gvuB1GgXCuQkTl5PniIPbczbIbHh5nfmoPGkWbn2rvJwHhja Jb3JPT+36oegh3bSeJX2drMpbWdWEtEOMmYOw1ZxdPost6cxSYfnR9K6vxEKRnfCxPSe8+jhzs7XI Mj+mEFOBDPDnwh5ZfmiA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dmR31-0006UH-H5; Mon, 28 Aug 2017 20:54:15 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dmR2x-0006QZ-Mf for linux-arm-kernel@lists.infradead.org; Mon, 28 Aug 2017 20:54:13 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D1C0460731; Mon, 28 Aug 2017 20:53:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1503953630; bh=k3pCeVOodiP+QAGxxZPz99BRnxPjNyNr3qvrVgYux38=; h=From:To:Subject:Date:From; b=EeVvfHjHnIfDUSH5roJuZE8f1TTQLiQ5pKVV27wQBLdMUu3l35rYjS/fqMP3dqioG +5UKhNTBI0ANKIw+PW0c2rGc3C6uVlKQa826tJxjqnyF86ivfAm0qnSvYmtYgqKF0J KeMJS5FY++CQZXopKX8N1GZQ7A1ErHBuMpuLsAII= Received: from DUSTINB (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: dustinb@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 64ECD60724; Mon, 28 Aug 2017 20:53:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1503953630; bh=k3pCeVOodiP+QAGxxZPz99BRnxPjNyNr3qvrVgYux38=; h=From:To:Subject:Date:From; b=EeVvfHjHnIfDUSH5roJuZE8f1TTQLiQ5pKVV27wQBLdMUu3l35rYjS/fqMP3dqioG +5UKhNTBI0ANKIw+PW0c2rGc3C6uVlKQa826tJxjqnyF86ivfAm0qnSvYmtYgqKF0J KeMJS5FY++CQZXopKX8N1GZQ7A1ErHBuMpuLsAII= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 64ECD60724 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=dustinb@codeaurora.org From: "Dustin Brown" To: , Subject: arm: Export save_stack_trace_tsk() Date: Mon, 28 Aug 2017 13:53:49 -0700 Message-ID: <001b01d3203f$c04a4e40$40deeac0$@codeaurora.org> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdMgP68fgOn7gFjQRlyAKtZ3MMoJhQ== Content-Language: en-us X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170828_135411_775766_002AB687 X-CRM114-Status: UNSURE ( 9.76 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The kernel watchdog is a great debugging tool for finding tasks that consume a disproportionate amount of CPU time in contiguous chunks. One can imagine building a similar watchdog for arbitrary driver threads using save_stack_trace_tsk() and print_stack_trace(). However, this is not viable for dynamically loaded driver modules on ARM platforms because save_stack_trace_tsk() is not exported for those architectures. Export save_stack_trace_tsk() for the ARM architecture to align with x86 and support various debugging use cases such as arbitrary driver thread watchdog timers. Signed-off-by: Dustin Brown --- arch/arm/kernel/stacktrace.c | 1 + 1 file changed, 1 insertion(+) { diff --git a/arch/arm/kernel/stacktrace.c b/arch/arm/kernel/stacktrace.c index 3a2fa203637a..564bb468b7ba 100644 --- a/arch/arm/kernel/stacktrace.c +++ b/arch/arm/kernel/stacktrace.c @@ -171,6 +171,7 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) { __save_stack_trace(tsk, trace, 1); } +EXPORT_SYMBOL_GPL(save_stack_trace_tsk); void save_stack_trace(struct stack_trace *trace)