kernel-ark/drivers
Ville Herva c4e7fb3137 block2mtd.c: Make kernel boot command line arguments work (try 4)
Trying to pass kernel command line arguments to block2mtd at boot-time does
not work currently. block2mtd_setup() is called so early that kmalloc()
fails nevermind being able to do open_bdev_excl() (which requires rootfs to
be mounted. This patch only saves the option string at the early boot stage,
and parses them later when block2mtd_init() is called. If open_bdev_excl()
fails, open_by_devnum(name_to_dev_t()) is tried instead, which makes it
possible to initialize the driver before rootfs has been mounted. Also gets
rid of the superfluous parse_name() that only checks if name is longer than
80 chars and copies it to a string that is not kfreed.

With this patch, I can boot statically compiled block2mtd, and mount jffs2
as rootfs (without modules or initrd), with lilo config like this:

   root=/dev/mtdblock0
   append="rootfstype=jffs2 block2mtd.block2mtd=/dev/hdc2,65536"

(Note that rootfstype=jffs2 is required, since the kernel only tries
filesystems without "nodev" attribute by default, and jffs is "nodev").

Compared to first version of this patch, this one does not copy the
parameters to the global buffer if init has already been called, and the
global array is marked as __initdata.

Compared to the second version of this patch, module build is fixed.

Compared to the third version of this patch, statically compiled block2mtd
driver with no boot-time parameter no longer gives spurious error 'cannot
open device ""'

Signed-off-by: Ville Herva <vherva@vianova.fi>
Acked-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-07-15 13:39:10 +01:00
..
acorn [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
acpi Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2006-07-03 21:32:50 -07:00
amba
atm [ATM]: add+use poison defines 2006-07-03 19:48:25 -07:00
base Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-06-30 15:39:30 -07:00
block Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-07-03 15:28:34 -07:00
bluetooth [Bluetooth] Add platform device for virtual and serial devices 2006-07-03 19:54:00 -07:00
cdrom [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
char Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-07-03 15:28:34 -07:00
clocksource
connector
cpufreq Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq 2006-07-04 14:00:26 -07:00
crypto
dio
dma [IOAT]: fix kernel-doc in source files 2006-07-03 19:45:31 -07:00
edac [PATCH] EDAC: fix module names quoted in sysfs 2006-07-01 09:55:58 -07:00
eisa Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
fc4 [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
firmware Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
hwmon Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
i2c [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
ide [PATCH] lockdep: annotate on-stack completions 2006-07-03 15:27:09 -07:00
ieee1394 [PATCH] lockdep: annotate ieee1394 skb-queue-head locking 2006-07-03 15:27:08 -07:00
infiniband [PATCH] mthca: initialize send and receive queue locks separately 2006-07-04 10:24:57 -07:00
input [PATCH] lockdep: annotate serio 2006-07-03 15:27:07 -07:00
isdn [PATCH] irq-flags: isdn: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
leds Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
macintosh [POWERPC] Add new interrupt mapping core and change platforms to use it 2006-07-03 21:36:01 +10:00
mca
md [PATCH] lockdep: annotate blkdev nesting 2006-07-03 15:27:10 -07:00
media [PATCH] irq-flags: media: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
message Merge ../scsi-misc-2.6 2006-07-03 09:41:12 -05:00
mfd [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
misc [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
mmc [PATCH] lockdep: annotate on-stack completions, mmc 2006-07-03 15:27:10 -07:00
mtd block2mtd.c: Make kernel boot command line arguments work (try 4) 2006-07-15 13:39:10 +01:00
net Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2006-07-03 21:28:14 -07:00
nubus Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
oprofile
parisc [PATCH] irq-flags: PARISC: Use the new IRQF_ constants 2006-07-02 13:58:52 -07:00
parport [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
pci [PATCH] irq-flags: pci: Use the new IRQF_ constants 2006-07-02 13:58:52 -07:00
pcmcia Merge branch 'genirq' of master.kernel.org:/home/rmk/linux-2.6-arm 2006-07-02 15:07:45 -07:00
pnp [PATCH] PNPACPI: support shareable interrupts 2006-07-03 15:26:58 -07:00
rapidio Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
rtc [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
s390 [PATCH] zfcp: fix incorrect usage of fsf_req_list_lock 2006-07-03 21:25:20 -07:00
sbus [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2006-07-03 21:27:18 -07:00
serial Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-serial 2006-07-03 21:31:05 -07:00
sh
sn [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
spi [PATCH] lockdep: annotate on-stack completions 2006-07-03 15:27:09 -07:00
tc [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
telephony Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6 2006-06-29 14:19:21 -07:00
usb Merge master.kernel.org:/home/rmk/linux-2.6-arm 2006-07-03 21:30:03 -07:00
video Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-07-03 15:28:34 -07:00
w1
zorro Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
Kconfig
Makefile