Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751859AbeAEMXl (ORCPT + 1 other); Fri, 5 Jan 2018 07:23:41 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:35018 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750907AbeAEMXj (ORCPT ); Fri, 5 Jan 2018 07:23:39 -0500 X-Google-Smtp-Source: ACJfBoub1110c5/Fb57j5fgmutZjXwJtlf3qCVC32rTh5aahNZzsjk+2gUX5mxUv3ZttIUeHx//DkQ== Date: Fri, 5 Jan 2018 21:23:34 +0900 From: Sergey Senozhatsky To: Sergey Senozhatsky Cc: Petr Mladek , 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 , Steven Rostedt , 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 Subject: Re: [PATCH 00/13] replace print_symbol() with printk()-s Message-ID: <20180105122334.GB417@jagdpanzerIV> References: <20171211125025.2270-1-sergey.senozhatsky@gmail.com> <20180105100300.j3svmcvvpfe2iows@pathway.suse.cz> <20180105102105.GB471@jagdpanzerIV> <20180105120131.GA417@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180105120131.GA417@jagdpanzerIV> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On (01/05/18 21:01), Sergey Senozhatsky wrote: [..] > but, print_symbol() is compiled out on !CONFIG_KALLSYMS systems. so, > basically, we compile out some of errors print outs; even more, on ia64 > ia64_do_show_stack() does nothing when there is no CONFIG_KALLSYMS [all > ia64 defconfigs have KALLSYMS_ALL enabled]. printk(%pS), unlike > print_symbol(), is not compiled out and prints the function address > when symbolic name is not available. but, at a glance, print_symbol() > in most of the cases has printk(registers) next to it or before it, so > it doesn't look like we are introducing a regression here by switching > to printk(%pS). well, if this is a problem, then we can have static inline void print_symbol(const char *fmt, unsigned long addr) { printk(fmt, addr); } for CONFIG_KALLSYMS builds, and an empty print_symbol() for !CONFIG_KALLSYMS builds. but we still have tons printk(%pS) in the kernel and even print_ip_sym() (which is not compiled out on !CONFIG_KALLSYMS). so it seems to me that we can drop print_symbol()/__print_symbol() and switch to printk(%pS) after all. -ss