From patchwork Mon Dec 11 12:50:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 10105029 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 BC25160360 for ; Mon, 11 Dec 2017 13:08:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 836192958C for ; Mon, 11 Dec 2017 13:08:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77ED92958F; Mon, 11 Dec 2017 13:08:19 +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=unavailable 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 11D732958C for ; Mon, 11 Dec 2017 13:08:19 +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=3AuPMxBSL0mBNO1BTrtMg+hNTZbSWkP2COgV7f6gk+U=; b=syxLa6yn+loHCWkESakS43iNc+ n7ZM/WcCKVKR2UzJI7Vbgmq3m0JxMYHwspI498KwYc9EjIE6+azr7mvD56dp8MKWJIXB0mGpL128X JF1yDvDo4uZDuEmMmkte2JWTsAxd2j1w1H+zcdykXrMSXMsbcvEJzJAb5bzdGASDpuNHYqyvUjPOZ 6xZbhsbEsb84MOY1aYckRehlb+m/HOcRsmugWKht5UnZXJ8q/LdfO+HTEeelfO68wXwGPaw6tlNGW OwhpJdatHIypcJu9HIxpubFk4Dm2dRxtye/1PTJImqTDn7mqdmw7EW6s9gr8yAEH9HV6xv5sNTeaX wzTOG0RA==; 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 1eONog-0008RQ-6L; Mon, 11 Dec 2017 13:08:18 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eONns-0007Rb-NX; Mon, 11 Dec 2017 13:07:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=TN4g8HWAbYM+mHgchr9hE28hhDHAqrO4CBf5M7hSqn4=; b=VGWkDCjJ2stNFAA5h/AEzpk47 rt/noCFAtf1Ov/lWHzSpfhiITgYlum6ws71WPRTgFLu9aJLdNBx97/vQoByvX+XYgMJb0XmDJOVpx PgL6i+h0HGpJb2GxnEgFQGGPRCTLCAhjKJFF8LLfibtaiWDnaGYO+EbgGTCK0Vx+s1Fgqe7px7zhu eWTjAvS8XewwQcbEJ/6WgI817Ta9gQFAK7uR3SFGdngpSnKCnfiaZH2XYSauxOXPZLsf7PNgEQPPr 0WXsHe3AhVPXZd11npGC1s29GgY2Xlkec34xMNf9DPt1siVbGjbIvDU4himlkaqyzmJXfNUDaew8l V8aacoA1w==; Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eONZY-00012h-Mw; Mon, 11 Dec 2017 12:52:42 +0000 Received: by mail-pg0-x242.google.com with SMTP id y6so10853764pgp.4; Mon, 11 Dec 2017 04:52:20 -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=TN4g8HWAbYM+mHgchr9hE28hhDHAqrO4CBf5M7hSqn4=; b=Ga8OIa15h+bPjPK4cqmPPGhvJ8YE6v4TJA74B8lyKlcsf4eXaFqKJ0JS7E90m8goUm cxjKHCRAHTPRGzEiU6UrDrDeDn05x42XgwtYuUWORSavOfSJXIMstufPjU+4Ejl0Vyjx iokoi6S/isbRVFuHYIEjFKk2fuhtXV9awY93MRA+EQmkjaE7GGIDe3227/VMj4K9Xffu 89xOcPAF2pf8Nu5XIKF5QtNka/eC/3whPT2xQGtuvbaJSwpmRlkMJV9Dn2rhb+Zks39P 08B7ijkD9Va0ArVlFicXuzLe4OG8cRrMqz4wnhTLJ4BOMp4/wcxN3W3eQFsJXH8v7oDp 2OOQ== 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=TN4g8HWAbYM+mHgchr9hE28hhDHAqrO4CBf5M7hSqn4=; b=W0r6PxKjW7dKksvyRXT8cuX66XOYltgBjKn2hv+AQQEkK+hWuAdv8J7QhUlXjrYZR+ /0SECmI/MkGmF+iR14ixK9rSztl0t5UCgZ03RAWR2yjoP4Owot/7PC+0eeGNRTuc1Kdc uQzrtVyoucv22ulv7UwzNCtixXyhywYCWYGyFUDsJ4jIJb+IGcPNjre1KKUosbFDpqMo x7/0MSlGr5J76gH3RtQcZZ8mJaFiBQbyszaykwg5QqKzNv5JDpbU7/TJn9pBfG09vbU8 9ifU6B6DM2JW7u/40IWiOf86Tn1Wu0gveI2xOzeXDLBugjjZ9nN8FWm5HHjKtZozVQAt UhMQ== X-Gm-Message-State: AKGB3mJFrdJ+JVwdrFWB7zm3IofnULdQlUt+Ij7AMOVeXz8N2XnS2aBm 2dNbvpLi9b3z+KVNpRewY6M= X-Google-Smtp-Source: ACJfBothzCd2F0ApMZUNaBATDQTYSmzeGW9icOAs7v32kt/bp5k7iU3S1m0fyuFVhCFsm89PWJA/fg== X-Received: by 10.99.3.195 with SMTP id 186mr252046pgd.103.1512996739316; Mon, 11 Dec 2017 04:52:19 -0800 (PST) Received: from localhost.localdomain ([110.70.53.61]) by smtp.gmail.com with ESMTPSA id j13sm23374380pff.131.2017.12.11.04.52.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 04:52:18 -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 08/13] x86: do not use print_symbol() Date: Mon, 11 Dec 2017 21:50:20 +0900 Message-Id: <20171211125025.2270-9-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_125240_894599_E94146E3 X-CRM114-Status: GOOD ( 11.21 ) 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: Tony Luck Cc: Borislav Petkov Cc: Thomas Gleixner Acked-by: Borislav Petkov --- arch/x86/kernel/cpu/mcheck/mce.c | 3 +-- arch/x86/mm/mmio-mod.c | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index b1d616d08eee..8ca8f6eb32db 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -235,7 +234,7 @@ static void __print_mce(struct mce *m) m->cs, m->ip); if (m->cs == __KERNEL_CS) - print_symbol("{%s}", m->ip); + pr_cont("{%pS}", (void *)m->ip); pr_cont("\n"); } diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c index 4d434ddb75db..2c1ecf4763c4 100644 --- a/arch/x86/mm/mmio-mod.c +++ b/arch/x86/mm/mmio-mod.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include /* for ISA_START_ADDRESS */ @@ -123,8 +122,8 @@ static void die_kmmio_nesting_error(struct pt_regs *regs, unsigned long addr) pr_emerg("unexpected fault for address: 0x%08lx, last fault for address: 0x%08lx\n", addr, my_reason->addr); print_pte(addr); - print_symbol(KERN_EMERG "faulting IP is at %s\n", regs->ip); - print_symbol(KERN_EMERG "last faulting IP was at %s\n", my_reason->ip); + pr_emerg("faulting IP is at %pS\n", (void *)regs->ip); + pr_emerg("last faulting IP was at %pS\n", (void *)my_reason->ip); #ifdef __i386__ pr_emerg("eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n", regs->ax, regs->bx, regs->cx, regs->dx);