From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756667AbZA2Tuc (ORCPT ); Thu, 29 Jan 2009 14:50:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753050AbZA2TuM (ORCPT ); Thu, 29 Jan 2009 14:50:12 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:46563 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751787AbZA2TuK (ORCPT ); Thu, 29 Jan 2009 14:50:10 -0500 Date: Thu, 29 Jan 2009 11:48:59 -0800 From: Andrew Morton To: Neil Horman Cc: horms@verge.net.au, randy.dunlap@oracle.com, linux-kernel@vger.kernel.org, miaox@cn.fujitsu.com, vgoyal@redhat.com Subject: Re: mmotm 2009-01-28-02-17 uploaded (i386 build errors: cpusets & kexec) Message-Id: <20090129114859.ed963b2f.akpm@linux-foundation.org> In-Reply-To: <20090129192734.GA10037@hmsreliant.think-freely.org> References: <200901281019.n0SAJ9C6013727@imap1.linux-foundation.org> <49808E3F.1090805@oracle.com> <20090128163040.88b05b3d.akpm@linux-foundation.org> <20090129022846.GA1319@verge.net.au> <20090129120935.GB9221@hmsreliant.think-freely.org> <20090129100157.965bd396.akpm@linux-foundation.org> <20090129192734.GA10037@hmsreliant.think-freely.org> X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.20; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 29 Jan 2009 14:27:34 -0500 Neil Horman wrote: > On Thu, Jan 29, 2009 at 10:01:57AM -0800, Andrew Morton wrote: > > On Thu, 29 Jan 2009 07:09:35 -0500 Neil Horman wrote: > > > > > > > So does that. > > > > > > > > > > --- a/kernel/printk.c~kexec-add-dmesg-log-symbols-to-proc-vmcoreinfo-lists-fix-fix > > > > > +++ a/kernel/printk.c > > > > > @@ -137,11 +137,13 @@ static char *log_buf = __log_buf; > > > > > static int log_buf_len = __LOG_BUF_LEN; > > > > > static unsigned logged_chars; /* Number of chars produced since last read+clear operation */ > > > > > > > > > > +#ifdef CONFIG_KEXEC > > > > > void log_buf_kexec_setup(void) > > > > > { > > > > > VMCOREINFO_SYMBOL(log_buf); > > > > > VMCOREINFO_SYMBOL(log_end); > > > > > } > > > > > +#endif > > > > > > > > > > static int __init log_buf_len_setup(char *str) > > > > > { > > > > > _ > > > > > > > > Weird, I thought I checked that just now. In any case this email > > > > was already in my inbox. In any case, I can now produce the problem, > > > > and this patch resolves it. > > > > > > > > > > Sorry, i didn't think to check on conditions when CONFIG_KEXEC wasn't set. I > > > assumed we had a stub for all the VMCOREINFO defines. Why don't we fix it in > > > that manner? I mean we have serveral arch specific additions to vmcoreinfo, all > > > of which apparently must be ifdefd for this to work. Why not just fix it in > > > conditional definition? > > > > I didn't do that because then we'd have an empty function log_buf_kexec_setup() > > floating about in every vmlinux. > > > > Hardly a big issue, but a bit regrettable. > > > Won't the compiler just eliminate that symbol during final link, given that its > not an exported symbol? I don't think it's that smart. akpm:/home/akpm> cat t.c void foo(void) { } main() { } akpm:/home/akpm> gcc -O2 t.c akpm:/home/akpm> nm a.out|grep foo 08048300 T foo With -ffunction-sections or other fancy options, maybe. And it'll be version-dependent.