From patchwork Mon Dec 11 12:50:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 10104935 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 74410602B3 for ; Mon, 11 Dec 2017 12:51:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4984229584 for ; Mon, 11 Dec 2017 12:51:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E34B29586; Mon, 11 Dec 2017 12:51:45 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED 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 B5B2829584 for ; Mon, 11 Dec 2017 12:51:44 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=6WnXmWDZeKETBufGK7shHHCmnkVR1FUVDxFfqfyqCbI=; b=mqu6VSizap+AYvomBxmphilfYv xUpAdSlBPyU1IwXLHISdtHJ2v1hARRyN1O8ftk6EDDoGtyBymrL4EIOWn6wEnLESPf+swRpZxxn3j 9kORdXPzyVNgQ8EscUGsvsidM8pb94HdXwB1p5CYLfZVxHp+Ralm07FlRCkyEkb8xMJE1Kd61mwpb E5q13OddcSWnecGyWOAf1SRvsCRw9ne8xKkzc/t//ngf6HAT5WxAkoW8WDxjGJ9+6wptCB4nyLP+Y WJc4KDLYvN7zWFi25uALiMq04ruvZRsQH208h+TIswI/tGk2Yjqe0xFGRciLFTbznMFKS2yIGzIGG zbcUOo/g==; 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 1eONYd-0007yH-U8; Mon, 11 Dec 2017 12:51:43 +0000 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eONYB-0007NL-Pk; Mon, 11 Dec 2017 12:51:21 +0000 Received: by mail-pf0-x243.google.com with SMTP id j124so11465578pfc.2; Mon, 11 Dec 2017 04:50:55 -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=qEl0K9sqaOmfhtH32mtnqlXxAi4hxaJLTXG2CRK0DY0=; b=KARW7I08ycIQhr1K2lPpxqm4dglw+kUbRIGWu4j/wHfZi7ECw8Tz3VQ9Y9Zs4NNt1z BDgE8lfW43ibIKM/3y8U5ocF90h7MciUVwY/f8V+T/bNyDobtCVP3fxfL0fxxTm+T8XB 6ROKyUEgIjIDJ/OlvTqtZkkgs9qEnBevj2leypZiz+YF3vPTat2JcHu/ChWvfQENQrYI MOC4ZDfef8PerrALDJwlDB8z/zuNc0mzT8YPc2BHXBwOYJ5QqQo8Sl8EgbRh6+HhY38V BOCbg+S5+TU778nQ3H+Vj749GViIlRLPkRqTbWMgPEjlXoGcPEp8nqlRa2d3IH3EKhwV drtQ== 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=qEl0K9sqaOmfhtH32mtnqlXxAi4hxaJLTXG2CRK0DY0=; b=mcnRspNgHZFlUuziVD7YN4MAS/p14JA9gKi6p1oflSfXr6sla0mp2urEYfoDQkFoH1 9DYDPoSQ/CppvT5rQmtyd3Z1NKsIHJ8aVcsY7ydvlBPfK6KrsI2gSBs53BNs/eWObMnc 5cWJHQdmlX8uBZ41ZRzDI71+H+DQlGiA+4IM0WD8gMepfEVZeU9Sx6q7irMLlViJ9OIH pY1YE5N9XM9HTOy8HlN3cLXjmt1CePRnuHpJHtq8R3WRimc7CH7IhJpXp5HaTwIYO48h OuvikJrqe2FnFU9Y3x9yPrq1XexB/gx7G+B6JFg1/sCVcrcAnx9gpVNntX/VdjqVvD+7 K6wA== X-Gm-Message-State: AKGB3mJKHiuQzgHzFdXs8IzEVP8zFnJRbFaDnyXB6Nvssm6gVVU5CERl xmd388NlMNZaTKVKfana7Xc= X-Google-Smtp-Source: ACJfBoscWkyON9fHwn1GObZVuvq1trcTJ0uXrie25USGAN+GAOpoE54kcHdj86NwsGc2oILoaWt2pA== X-Received: by 10.84.231.1 with SMTP id f1mr282452plk.352.1512996654615; Mon, 11 Dec 2017 04:50:54 -0800 (PST) Received: from localhost.localdomain ([110.70.53.61]) by smtp.gmail.com with ESMTPSA id j13sm23374380pff.131.2017.12.11.04.50.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 04:50:53 -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 Subject: [PATCH 01/13] arm: do not use print_symbol() Date: Mon, 11 Dec 2017 21:50:13 +0900 Message-Id: <20171211125025.2270-2-sergey.senozhatsky@gmail.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171211125025.2270-1-sergey.senozhatsky@gmail.com> References: <20171211125025.2270-1-sergey.senozhatsky@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171211_045116_526943_63604A03 X-CRM114-Status: UNSURE ( 9.18 ) 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: , Cc: Petr Mladek , linux-am33-list@redhat.com, linux-ia64@vger.kernel.org, linux-c6x-dev@linux-c6x.org, linux-sh@vger.kernel.org, x86@kernel.org, Sergey Senozhatsky , LKML , Steven Rostedt , Sergey Senozhatsky , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org MIME-Version: 1.0 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 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: Russell King --- arch/arm/kernel/process.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index d96714e1858c..db004f6f547a 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -121,8 +120,8 @@ void __show_regs(struct pt_regs *regs) show_regs_print_info(KERN_DEFAULT); - print_symbol("PC is at %s\n", instruction_pointer(regs)); - print_symbol("LR is at %s\n", regs->ARM_lr); + printk("PC is at %pS\n", instruction_pointer(regs)); + printk("LR is at %pS\n", (void *)regs->ARM_lr); printk("pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n", regs->ARM_pc, regs->ARM_lr, regs->ARM_cpsr); printk("sp : %08lx ip : %08lx fp : %08lx\n",