module.viomap support for ppc64

Paul Mackerras paulus at samba.org
Thu Oct 28 14:44:59 EST 2004


Olaf Hering writes:

> A hack for 2.6.8-rc4 is below. Can I read the alias file via 
> while read a b c ; do : done < modules.alias ?
> Is b supposed to contain not spaces? What special delimiter chars are
> allowed? The 'name' and 'compat' property can contain almost any char.
> I used '^' for the time being.

Olaf, do you still want these changes made?  I rebased your patch on
current BK (see below).

Dave, any comments on this patch?

Paul.

diff -urN linux-2.5/arch/ppc64/kernel/vio.c test/arch/ppc64/kernel/vio.c
--- linux-2.5/arch/ppc64/kernel/vio.c	2004-09-24 15:23:06.000000000 +1000
+++ test/arch/ppc64/kernel/vio.c	2004-10-28 14:22:59.791014944 +1000
@@ -143,7 +143,7 @@
 {
 	DBGENTER();
 
-	while (ids->type) {
+	while (ids->type[0]) {
 		if ((strncmp(dev->type, ids->type, strlen(ids->type)) == 0) &&
 			device_is_compatible(dev->dev.platform_data, ids->compat))
 			return ids;
diff -urN linux-2.5/drivers/block/viodasd.c test/drivers/block/viodasd.c
--- linux-2.5/drivers/block/viodasd.c	2004-06-30 15:40:03.000000000 +1000
+++ test/drivers/block/viodasd.c	2004-10-28 14:21:06.962994664 +1000
@@ -778,7 +778,7 @@
  */
 static struct vio_device_id viodasd_device_table[] __devinitdata = {
 	{ "viodasd", "" },
-	{ 0, }
+	{ "", "" }
 };
 
 MODULE_DEVICE_TABLE(vio, viodasd_device_table);
diff -urN linux-2.5/drivers/cdrom/viocd.c test/drivers/cdrom/viocd.c
--- linux-2.5/drivers/cdrom/viocd.c	2004-08-24 07:22:47.000000000 +1000
+++ test/drivers/cdrom/viocd.c	2004-10-28 14:21:27.959005552 +1000
@@ -693,7 +693,7 @@
  */
 static struct vio_device_id viocd_device_table[] __devinitdata = {
 	{ "viocd", "" },
-	{ 0, }
+	{ "", "" }
 };
 
 MODULE_DEVICE_TABLE(vio, viocd_device_table);
diff -urN linux-2.5/drivers/char/hvc_console.c test/drivers/char/hvc_console.c
--- linux-2.5/drivers/char/hvc_console.c	2004-10-22 07:00:21.000000000 +1000
+++ test/drivers/char/hvc_console.c	2004-10-28 14:21:36.504029776 +1000
@@ -581,7 +581,7 @@
 
 static struct vio_device_id hvc_driver_table[] __devinitdata= {
 	{"serial", "hvterm1"},
-	{ NULL, }
+	{ "", "" }
 };
 MODULE_DEVICE_TABLE(vio, hvc_driver_table);
 
diff -urN linux-2.5/drivers/char/hvcs.c test/drivers/char/hvcs.c
--- linux-2.5/drivers/char/hvcs.c	2004-10-22 07:00:21.000000000 +1000
+++ test/drivers/char/hvcs.c	2004-10-28 14:17:51.265058720 +1000
@@ -527,7 +527,7 @@
 
 static struct vio_device_id hvcs_driver_table[] __devinitdata= {
 	{"serial-server", "hvterm2"},
-	{ NULL, }
+	{ "", "" }
 };
 MODULE_DEVICE_TABLE(vio, hvcs_driver_table);
 
diff -urN linux-2.5/drivers/char/viotape.c test/drivers/char/viotape.c
--- linux-2.5/drivers/char/viotape.c	2004-06-30 15:40:03.000000000 +1000
+++ test/drivers/char/viotape.c	2004-10-28 14:22:59.446934232 +1000
@@ -991,7 +991,7 @@
  */
 static struct vio_device_id viotape_device_table[] __devinitdata = {
 	{ "viotape", "" },
-	{ 0, }
+	{ "", "" }
 };
 
 MODULE_DEVICE_TABLE(vio, viotape_device_table);
diff -urN linux-2.5/drivers/net/ibmveth.c test/drivers/net/ibmveth.c
--- linux-2.5/drivers/net/ibmveth.c	2004-09-16 21:51:58.000000000 +1000
+++ test/drivers/net/ibmveth.c	2004-10-28 14:16:32.795007496 +1000
@@ -1125,7 +1125,7 @@
 
 static struct vio_device_id ibmveth_device_table[] __devinitdata= {
 	{ "network", "IBM,l-lan"},
-	{ 0,}
+	{ "",""}
 };
 
 MODULE_DEVICE_TABLE(vio, ibmveth_device_table);
diff -urN linux-2.5/drivers/net/iseries_veth.c test/drivers/net/iseries_veth.c
--- linux-2.5/drivers/net/iseries_veth.c	2004-10-20 21:20:19.000000000 +1000
+++ test/drivers/net/iseries_veth.c	2004-10-28 14:22:59.046995032 +1000
@@ -1353,7 +1353,7 @@
  */
 static struct vio_device_id veth_device_table[] __devinitdata = {
 	{ "vlan", "" },
-	{ NULL, NULL }
+	{ "", "" }
 };
 MODULE_DEVICE_TABLE(vio, veth_device_table);
 
diff -urN linux-2.5/drivers/scsi/ibmvscsi/ibmvscsi.c test/drivers/scsi/ibmvscsi/ibmvscsi.c
--- linux-2.5/drivers/scsi/ibmvscsi/ibmvscsi.c	2004-07-29 07:33:14.000000000 +1000
+++ test/drivers/scsi/ibmvscsi/ibmvscsi.c	2004-10-28 14:22:45.765019224 +1000
@@ -1368,7 +1368,7 @@
  */
 static struct vio_device_id ibmvscsi_device_table[] __devinitdata = {
 	{"vscsi", "IBM,v-scsi"},
-	{0,}
+	{ "", "" }
 };
 
 MODULE_DEVICE_TABLE(vio, ibmvscsi_device_table);
diff -urN linux-2.5/include/asm-ppc64/vio.h test/include/asm-ppc64/vio.h
--- linux-2.5/include/asm-ppc64/vio.h	2004-06-30 15:40:04.000000000 +1000
+++ test/include/asm-ppc64/vio.h	2004-10-28 14:16:32.797007192 +1000
@@ -86,9 +86,10 @@
 
 extern struct bus_type vio_bus_type;
 
+#define VIO_DEVTABLE_PROPERTY_LENGTH 32
 struct vio_device_id {
-	char *type;
-	char *compat;
+	char type[VIO_DEVTABLE_PROPERTY_LENGTH];
+	char compat[VIO_DEVTABLE_PROPERTY_LENGTH];
 };
 
 struct vio_driver {
diff -urN linux-2.5/include/linux/mod_devicetable.h test/include/linux/mod_devicetable.h
--- linux-2.5/include/linux/mod_devicetable.h	2004-02-09 18:25:16.000000000 +1100
+++ test/include/linux/mod_devicetable.h	2004-10-28 14:16:32.798007040 +1000
@@ -164,5 +164,10 @@
 	} devs[PNP_MAX_DEVICES];
 };
 
+#define VIO_DEVTABLE_PROPERTY_LENGTH 32
+struct VIO_device_id {
+	char name[VIO_DEVTABLE_PROPERTY_LENGTH];
+	char compat[VIO_DEVTABLE_PROPERTY_LENGTH];
+};
 
 #endif /* LINUX_MOD_DEVICETABLE_H */



More information about the Linuxppc64-dev mailing list