From patchwork Tue Dec 12 07:34:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 10106403 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 8C622602C2 for ; Tue, 12 Dec 2017 07:35:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F016298DB for ; Tue, 12 Dec 2017 07:35:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7147729AA3; Tue, 12 Dec 2017 07:35:51 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3E70298DB for ; Tue, 12 Dec 2017 07:35:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752379AbdLLHfh (ORCPT ); Tue, 12 Dec 2017 02:35:37 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33611 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752373AbdLLHfg (ORCPT ); Tue, 12 Dec 2017 02:35:36 -0500 Received: by mail-pf0-f193.google.com with SMTP id y89so13608720pfk.0; Mon, 11 Dec 2017 23:35:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Yd1A3IEmxtEOAr1phqe4QhRut/XggTJ8naDq5lA1DXg=; b=EzhnJoxV5wecF9O537uJMLWLcNv4kBg7RHC2uSO+mbfj9Mzco5j+nX2F+IsA1MXJ1h aE6boE36mbfVtclt7XbTVkxoSSWtalqYBwnn9VdUx+3TwVTm507Yscq3nHusuFgaDIjp b0gdXW+uEbQLIEKaNN23s1ue74o27aW4tgtxK2hU2xxlKXfa7LCc9WolNmOBetv6hGyR L7lSOMP6LMr/V+CYxQ4XQHYdc55KYN3yVJfiSJsecPfslHiTc60CG6mIrPCZir8gm9+K nRAKkh/0sCb/L51ov/2RmQElCCtii5cQXX0jON2ONBeqm3A9Aj3bY6s0bxXUDEIILRwB aQJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Yd1A3IEmxtEOAr1phqe4QhRut/XggTJ8naDq5lA1DXg=; b=pUKC2EBeak83Js/9rUU/SUh6mUMJa2H1AU1QcwS36e1ShKRXNkLzWQTP1ThohY0Y+x 9NbDYKKuTF6lQdeR1vinHAykiCNtxpKBXGQsk9p0hoUuTWN3IEQFcuekQPONZ0TBde9e g0IHgBHEqfXOhAUmLUUwPFOhyomvFXLO4wkt77oLvHfVMVR58QLWw57BR8VcddWefgkA fnQqE9Jv9atVQIiB+yNsDVMQWhTWnnNt35Ds1jaO/1hyJlOdb/aja8zDZ8h3gECpAmLV WLyxtWs2M6FHtxK4hkfQHt+0LjGy0EQTNvktokcPYgQCZgbP+UD9WNHeHSCvzy0XEA+j slsg== X-Gm-Message-State: AKGB3mK5lfwZYViON/mgyISMuVU7tWpK/96iCBq2Q9YUUNLx9q7ax3iZ 3KwKBrLYqUewDsdgli4myZg= X-Google-Smtp-Source: ACJfBosyL14FcnHwfC4JEBvsBkXvD0aUXl6EbrD1u1ZVpYjHmhmyttFD1eRKYVoIvkvMxL2BsnxtYg== X-Received: by 10.84.218.204 with SMTP id g12mr1368150plm.213.1513064135638; Mon, 11 Dec 2017 23:35:35 -0800 (PST) Received: from localhost.localdomain ([110.70.52.222]) by smtp.gmail.com with ESMTPSA id 68sm28174687pfx.186.2017.12.11.23.35.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 23:35:34 -0800 (PST) From: Sergey Senozhatsky X-Google-Original-From: Sergey Senozhatsky To: Andrew Morton , Russell King , Catalin Marinas , Mark Salter , Tony Luck , David Howells , Yoshinori Sato , Guan Xuetao , Borislav Petkov , Greg Kroah-Hartman , Thomas Gleixner , Peter Zijlstra , Vineet Gupta , Fengguang Wu , David Laight Cc: Steven Rostedt , Petr Mladek , LKML , linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-am33-list@redhat.com, linux-sh@vger.kernel.org, linux-edac@vger.kernel.org, x86@kernel.org, linux-snps-arc@lists.infradead.org, Sergey Senozhatsky , Sergey Senozhatsky Subject: [PATCHv2 11/13] irq debug: do not use print_symbol() Date: Tue, 12 Dec 2017 16:34:53 +0900 Message-Id: <20171212073453.21455-1-sergey.senozhatsky@gmail.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171211125025.2270-12-sergey.senozhatsky@gmail.com> References: <20171211125025.2270-12-sergey.senozhatsky@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP print_symbol() uses extra stack space to sprintf() symbol information and then to feed that buffer to printk() char buffer[KSYM_SYMBOL_LEN]; sprint_symbol(buffer, address); printk(fmt, buffer); Replace print_symbol() with a direct printk("%pS") call. Signed-off-by: Sergey Senozhatsky Cc: Thomas Gleixner --- kernel/irq/debug.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/kernel/irq/debug.h b/kernel/irq/debug.h index 17f05ef8f575..7e06dd275c17 100644 --- a/kernel/irq/debug.h +++ b/kernel/irq/debug.h @@ -3,8 +3,6 @@ * Debugging printout: */ -#include - #define ___P(f) if (desc->status_use_accessors & f) printk("%14s set\n", #f) #define ___PS(f) if (desc->istate & f) printk("%14s set\n", #f) /* FIXME */ @@ -14,14 +12,14 @@ static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc) { printk("irq %d, desc: %p, depth: %d, count: %d, unhandled: %d\n", irq, desc, desc->depth, desc->irq_count, desc->irqs_unhandled); - printk("->handle_irq(): %p, ", desc->handle_irq); - print_symbol("%s\n", (unsigned long)desc->handle_irq); - printk("->irq_data.chip(): %p, ", desc->irq_data.chip); - print_symbol("%s\n", (unsigned long)desc->irq_data.chip); + printk("->handle_irq(): %p, %pS\n", + desc->handle_irq, desc->handle_irq); + printk("->irq_data.chip(): %p, %pS\n", + desc->irq_data.chip, desc->irq_data.chip); printk("->action(): %p\n", desc->action); if (desc->action) { - printk("->action->handler(): %p, ", desc->action->handler); - print_symbol("%s\n", (unsigned long)desc->action->handler); + printk("->action->handler(): %p, %pS\n", + desc->action->handler, desc->action->handler); } ___P(IRQ_LEVEL);