Re: [PATCH] Fix for broken kexec on panic

From: Dave Hansen
Date: Thu Feb 24 2005 - 10:45:27 EST


On Thu, 2005-02-24 at 14:43 +0530, Vivek Goyal wrote:
> Kexec on panic is broken on i386 in 2.6.11-rc3-mm2 because of
> re-organization of boot memory allocator initialization code. Primary
> kernel does not boot if kexec is enabled and crashkernel=X@Y command
> line parameter is passed. After re-organization, kexec is trying to call
> reserve_bootmem before boot memory allocator has initialized.
>
> This patch fixes the problem. I have moved the call to
> reserved_bootmem() for kexec for both discontig and contig memory into
> new setup_bootmem_allocator().
>
> This patch has been generated against 2.6.11-rc4-mm1

Looks like a good change, especially since it reduces the total amount
of code (and the size of your patch).

Although, to make any potential merging easier, it is almost always
better to put those kinds of things in functions #ifdef'd in a header.
The fact that there are other #ifdefs in setup_bootmem_allocator() is a
partial excuse, but not a very good one. :)

-- Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/