From patchwork Mon Dec 11 12:50:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 10104985 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 D2893602B3 for ; Mon, 11 Dec 2017 12:54:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A750529587 for ; Mon, 11 Dec 2017 12:54:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B3E029589; Mon, 11 Dec 2017 12:54:04 +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 09E8629587 for ; Mon, 11 Dec 2017 12:54:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752927AbdLKMvL (ORCPT ); Mon, 11 Dec 2017 07:51:11 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:35011 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752842AbdLKMvH (ORCPT ); Mon, 11 Dec 2017 07:51:07 -0500 Received: by mail-pg0-f66.google.com with SMTP id q20so10858407pgv.2; Mon, 11 Dec 2017 04:51:06 -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=YINGigeq+G0CKD4Q/FvthKn95erLZlxG8uEGDxLjDds=; b=X34VSyjhH4tDttmpXUxvGnoQdH44kNa15Gsoxnuyfu3MGdh916olBQyxLWON/0sGFI 8QcxH3ZhNlDVcFMi0U59gAxRRfV6Y5CQrQa0pb4Vsh5by6L1SfATGE5XpTPP5wtfhkUk PUyxb8+8v6CBd8CtHbPp7N3HKjkULExT3ePtLzGITr8MUQRlwbtCGTudFDEpFifrOEpo o8F0U0c/+vjkPEcybIAcewEhjVXr32NXQ/MaeO7z5ljzJMyeokLPqHrHrnhbDR/0dGor zK76Xna5rH21YgQB4vx59tXT79JZCw4D8lbJSnGzrCcmRSWs/f7c7c+qUsOyfdG9Tw81 Tndg== 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=YINGigeq+G0CKD4Q/FvthKn95erLZlxG8uEGDxLjDds=; b=dChoIRbSmoGwFcodbQ6tEqaAeHyUopay+34Szzyd0jElDUDBbMHdIW2jE/7gtrU9CD uyAvlafEpMfu/3qhTA5p8O2h9csnLYmyfjBI+ZGsqxkpuu/3dsR8zVuuAABvDufxEUiu OY5HmZ+BoTZpoXkz837J6Wb5s3VfHZERB8IXMdS4NWVnPpNpDcbGjcu61lfVWcGvXXdO igyksat8eifrGGd6hvCg3/s7MCwhRn+swiqPpQg6f2jc799C4tFS5Tz8lw3eKMQgEt5+ kkDnoeSbOuTuGdGlrUDIA9ezodj2MnNogXM/Pgb/97j+s6CdwnaY2BKv4raI6HJGcEFS EdkQ== X-Gm-Message-State: AKGB3mK8MvcnW9QN/EvLiQGp34J8I5lGA5HXAUjH3D5q8AzTELRNbfpo lca3OJGtHUhFWOhZXKcs0bY= X-Google-Smtp-Source: ACJfBoslBIyh/m5LZH5Rd6r/y5iA4fy5b9DDYr5hvDYC2iAwwF53sxlFGwuGQvFmoEUMtG0NpPiGAA== X-Received: by 10.98.155.129 with SMTP id e1mr269843pfk.119.1512996666683; Mon, 11 Dec 2017 04:51:06 -0800 (PST) Received: from localhost.localdomain ([110.70.53.61]) by smtp.gmail.com with ESMTPSA id j13sm23374380pff.131.2017.12.11.04.50.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 04:51:05 -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 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 , Will Deacon Subject: [PATCH 02/13] arm64: do not use print_symbol() Date: Mon, 11 Dec 2017 21:50:14 +0900 Message-Id: <20171211125025.2270-3-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> 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: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/process.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 6b7dcf4310ac..44bed43814e2 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -221,8 +220,8 @@ void __show_regs(struct pt_regs *regs) show_regs_print_info(KERN_DEFAULT); print_pstate(regs); - print_symbol("pc : %s\n", regs->pc); - print_symbol("lr : %s\n", lr); + printk("pc : %pS\n", (void *)regs->pc); + printk("lr : %pS\n", (void *)lr); printk("sp : %016llx\n", sp); i = top_reg;