[PATCH] ARM: move memory layout sanity checking before meminfo initialization

Colin Cross ccross at google.com
Fri Jul 15 18:13:57 EDT 2011


On Fri, Jul 15, 2011 at 2:58 PM, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Fri, Jul 15, 2011 at 02:18:59PM -0700, Colin Cross wrote:
>> The thread has devolved into a generic command line problem - how to
>> pass completely unrelated options from the bootloader to the kernel
>> without also having to pass in every other option that the kernel
>> requires to boot.  I have a solution that works for my case
>> (CMDLINE_EXTEND), I was trying to offer a solution that would work for
>> me while also working for multi-board kernels, but I'm happy to drop
>> it.
>
> You miss the point.
<snip>

You cut out the relevant part of my email where I didn't miss your point:
>> My initial offer was a patch that makes an incorrect overlapping mem=
>> command line print a warning and ignore it, instead of doing something
>> that is guaranteed to crash the kernel in an obscure way.  I'll post a
>> patch.

I don't care about making overlapping mem= work, I'm just trying to
make it easier to debug when someone screws up and passes conflicting
mem= arguments, by printing a big warning.  When the warning is
printed, the kernel might as well take a stab at picking which of the
two mem= arguments might let it boot far enough to get the console up
- taking the smaller of any two overlapping regions seems most likely
to work.  If not, DEBUG_LL will show the warning.

The multiple command lines issue is irrelevant - I happened to hit
this using CMDLINE_EXTEND, I could just as well have put both mem=
options in ATAG_CMDLINE, and the problem would have been just as hard
to debug.



More information about the linux-arm-kernel mailing list