From: Hervé Fache Date: Tue, 13 Mar 2012 15:07:53 +0000 (+0100) Subject: mtd: phram: dot not crash when built-in and passing boot param X-Git-Tag: v3.4-rc1~16^2~26 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2a2a84d35e0f42ad26e326ec4258f6a8b8eecbe;p=pandora-kernel.git mtd: phram: dot not crash when built-in and passing boot param This patch is based on Ville Herva's similar patch to block2mtd. Trying to pass a parameter through the kernel command line when built-in would crash the kernel, as phram_setup() was called so early that kmalloc() was not functional yet. This patch only saves the parameter string at the early boot stage, and parses it later when init_phram() is called. The same happens in both module and built-in cases. With this patch, I can boot with a statically-compiled phram, and mount a ext2 root fs from physical RAM, without the need for a initrd. This has been tested in built-in and module cases, with and without a parameter string. Artem: amended comments a bit Signed-off-by: Hervé Fache Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- Reading git-diff-tree failed