[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080727234529.GM6175@verge.net.au>
Date: Mon, 28 Jul 2008 09:45:31 +1000
From: Simon Horman <horms@...ge.net.au>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Ingo Molnar <mingo@...e.hu>, Muli Ben-Yehuda <muli@...ibm.com>,
Chandru <chandru@...ibm.com>, kexec@...ts.infradead.org,
linux-kernel@...r.kernel.org, Vivek Goyal <vgoyal@...ibm.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [patch] crashdump: fix undefined reference to `elfcorehdr_addr'
On Sat, Jul 26, 2008 at 03:10:34AM -0700, Andrew Morton wrote:
> On Sat, 26 Jul 2008 11:25:19 +0200 Ingo Molnar <mingo@...e.hu> wrote:
>
> >
> > please apply before -rc1.
> >
> > Ingo
> >
> > ----------->
> > >From 72db7cba50b6a05825f8a287f74002cc38f04fb7 Mon Sep 17 00:00:00 2001
> > From: Ingo Molnar <mingo@...e.hu>
> > Date: Sat, 26 Jul 2008 11:22:33 +0200
> > Subject: [PATCH] crashdump: fix undefined reference to `elfcorehdr_addr'
> >
> > fix build bug introduced by 95b68dec0d5 "calgary iommu: use the first
> > kernels TCE tables in kdump":
> >
> > arch/x86/kernel/built-in.o: In function `calgary_iommu_init':
> > (.init.text+0x8399): undefined reference to `elfcorehdr_addr'
> > arch/x86/kernel/built-in.o: In function `calgary_iommu_init':
> > (.init.text+0x856c): undefined reference to `elfcorehdr_addr'
> > arch/x86/kernel/built-in.o: In function `detect_calgary':
> > (.init.text+0x8c68): undefined reference to `elfcorehdr_addr'
> > arch/x86/kernel/built-in.o: In function `detect_calgary':
> > (.init.text+0x8d0c): undefined reference to `elfcorehdr_addr'
> >
> > make elfcorehdr_addr a generally available symbol.
> >
> > Signed-off-by: Ingo Molnar <mingo@...e.hu>
> > ---
> > include/linux/crash_dump.h | 6 ++++++
> > 1 files changed, 6 insertions(+), 0 deletions(-)
> >
> > diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h
> > index 6cd39a9..025e4f5 100644
> > --- a/include/linux/crash_dump.h
> > +++ b/include/linux/crash_dump.h
> > @@ -8,7 +8,13 @@
> > #include <linux/proc_fs.h>
> >
> > #define ELFCORE_ADDR_MAX (-1ULL)
> > +
> > +#ifdef CONFIG_PROC_VMCORE
> > extern unsigned long long elfcorehdr_addr;
> > +#else
> > +static const unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
> > +#endif
> > +
> > extern ssize_t copy_oldmem_page(unsigned long, char *, size_t,
> > unsigned long, int);
> > extern const struct file_operations proc_vmcore_operations;
>
> spose that'll fix it. But it seems odd that is_kdump_kernel() will
> return false if CONFIG_PROC_VMCORE=n, CONFIG_CRASH_DUMP=y. I mean,
> it's still a crashdump kernel, is it not?
Perhaps is_kdump_kernel() ought to be renamed kernel_has_vmcore().
To my mind, is_kdump_kernel() should really look something like this:
#ifdef CONFIG_CRASH_DUMP
static inline int is_kdump_kernel(void) { return 1; }
#else
static inline int is_kdump_kernel(void) { return 0; }
#endif
But that can probably just be handled by any relevant code
using CONFIG_CRASH_DUMP as necessary.
--
Horms
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists