[OpenWrt-Devel] [PATCH v4 5/5] kernel: virtio: initialize earlier

Stijn Tintel stijn at linux-ipv6.be
Sat Apr 17 14:23:59 CEST 2010


Initialize virtio earlier, so that block2mtd can be used on virtio based
block devices (virtio_blk). This fixes the ability to run squashfs
images inside a KVM guest.

Upstream bug report: https://bugzilla.kernel.org/show_bug.cgi?id=15644

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 .../010-virtio-initialize_earlier.patch            |   31 ++++++++++++++++++++
 .../010-virtio-initialize_earlier.patch            |   31 ++++++++++++++++++++
 .../010-virtio-initialize_earlier.patch            |   31 ++++++++++++++++++++
 3 files changed, 93 insertions(+), 0 deletions(-)
 create mode 100644 target/linux/generic-2.6/patches-2.6.32/010-virtio-initialize_earlier.patch
 create mode 100644 target/linux/generic-2.6/patches-2.6.33/010-virtio-initialize_earlier.patch
 create mode 100644 target/linux/generic-2.6/patches-2.6.34/010-virtio-initialize_earlier.patch

diff --git a/target/linux/generic-2.6/patches-2.6.32/010-virtio-initialize_earlier.patch b/target/linux/generic-2.6/patches-2.6.32/010-virtio-initialize_earlier.patch
new file mode 100644
index 0000000..b730890
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.32/010-virtio-initialize_earlier.patch
@@ -0,0 +1,31 @@
+commit e66fe454d03b57c0e421ea6e11af9325d206d3a3
+Author: Stijn Tintel <stijn at linux-ipv6.be>
+Date:   Mon Mar 29 03:44:16 2010 +0200
+
+    virtio: initialize earlier
+    
+    Move initialization of virtio stuff before the initialization of mtd,
+    so that block2mtd can be used on virtio-based block devices.
+    
+    Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
+
+diff --git a/drivers/Makefile b/drivers/Makefile
+index 34f1e10..f42a030 100644
+--- a/drivers/Makefile
++++ b/drivers/Makefile
+@@ -17,6 +17,7 @@ obj-$(CONFIG_SFI)		+= sfi/
+ obj-$(CONFIG_PNP)		+= pnp/
+ obj-$(CONFIG_ARM_AMBA)		+= amba/
+ 
++obj-$(CONFIG_VIRTIO)		+= virtio/
+ obj-$(CONFIG_XEN)		+= xen/
+ 
+ # regulators early, since some subsystems rely on them to initialize
+@@ -108,7 +109,6 @@ obj-$(CONFIG_PPC_PS3)		+= ps3/
+ obj-$(CONFIG_OF)		+= of/
+ obj-$(CONFIG_SSB)		+= ssb/
+ obj-$(CONFIG_VHOST_NET)		+= vhost/
+-obj-$(CONFIG_VIRTIO)		+= virtio/
+ obj-$(CONFIG_VLYNQ)		+= vlynq/
+ obj-$(CONFIG_STAGING)		+= staging/
+ obj-y				+= platform/
diff --git a/target/linux/generic-2.6/patches-2.6.33/010-virtio-initialize_earlier.patch b/target/linux/generic-2.6/patches-2.6.33/010-virtio-initialize_earlier.patch
new file mode 100644
index 0000000..b730890
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.33/010-virtio-initialize_earlier.patch
@@ -0,0 +1,31 @@
+commit e66fe454d03b57c0e421ea6e11af9325d206d3a3
+Author: Stijn Tintel <stijn at linux-ipv6.be>
+Date:   Mon Mar 29 03:44:16 2010 +0200
+
+    virtio: initialize earlier
+    
+    Move initialization of virtio stuff before the initialization of mtd,
+    so that block2mtd can be used on virtio-based block devices.
+    
+    Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
+
+diff --git a/drivers/Makefile b/drivers/Makefile
+index 34f1e10..f42a030 100644
+--- a/drivers/Makefile
++++ b/drivers/Makefile
+@@ -17,6 +17,7 @@ obj-$(CONFIG_SFI)		+= sfi/
+ obj-$(CONFIG_PNP)		+= pnp/
+ obj-$(CONFIG_ARM_AMBA)		+= amba/
+ 
++obj-$(CONFIG_VIRTIO)		+= virtio/
+ obj-$(CONFIG_XEN)		+= xen/
+ 
+ # regulators early, since some subsystems rely on them to initialize
+@@ -108,7 +109,6 @@ obj-$(CONFIG_PPC_PS3)		+= ps3/
+ obj-$(CONFIG_OF)		+= of/
+ obj-$(CONFIG_SSB)		+= ssb/
+ obj-$(CONFIG_VHOST_NET)		+= vhost/
+-obj-$(CONFIG_VIRTIO)		+= virtio/
+ obj-$(CONFIG_VLYNQ)		+= vlynq/
+ obj-$(CONFIG_STAGING)		+= staging/
+ obj-y				+= platform/
diff --git a/target/linux/generic-2.6/patches-2.6.34/010-virtio-initialize_earlier.patch b/target/linux/generic-2.6/patches-2.6.34/010-virtio-initialize_earlier.patch
new file mode 100644
index 0000000..b730890
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.34/010-virtio-initialize_earlier.patch
@@ -0,0 +1,31 @@
+commit e66fe454d03b57c0e421ea6e11af9325d206d3a3
+Author: Stijn Tintel <stijn at linux-ipv6.be>
+Date:   Mon Mar 29 03:44:16 2010 +0200
+
+    virtio: initialize earlier
+    
+    Move initialization of virtio stuff before the initialization of mtd,
+    so that block2mtd can be used on virtio-based block devices.
+    
+    Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
+
+diff --git a/drivers/Makefile b/drivers/Makefile
+index 34f1e10..f42a030 100644
+--- a/drivers/Makefile
++++ b/drivers/Makefile
+@@ -17,6 +17,7 @@ obj-$(CONFIG_SFI)		+= sfi/
+ obj-$(CONFIG_PNP)		+= pnp/
+ obj-$(CONFIG_ARM_AMBA)		+= amba/
+ 
++obj-$(CONFIG_VIRTIO)		+= virtio/
+ obj-$(CONFIG_XEN)		+= xen/
+ 
+ # regulators early, since some subsystems rely on them to initialize
+@@ -108,7 +109,6 @@ obj-$(CONFIG_PPC_PS3)		+= ps3/
+ obj-$(CONFIG_OF)		+= of/
+ obj-$(CONFIG_SSB)		+= ssb/
+ obj-$(CONFIG_VHOST_NET)		+= vhost/
+-obj-$(CONFIG_VIRTIO)		+= virtio/
+ obj-$(CONFIG_VLYNQ)		+= vlynq/
+ obj-$(CONFIG_STAGING)		+= staging/
+ obj-y				+= platform/
-- 
1.6.4.4



More information about the openwrt-devel mailing list