diff for duplicates of <11180976062000@foobar.com> diff --git a/a/1.txt b/N1/1.txt index d6a9fe0..7066835 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -16,31 +16,30 @@ Signed-off-by: Matt Porter <mporter@kernel.crashing.org> diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile -@@ -10,7 +10,7 @@ DOCBOOKS :=3D wanbook.xml z8530book.xml mc +@@ -10,7 +10,7 @@ DOCBOOKS := wanbook.xml z8530book.xml mc kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ procfs-guide.xml writing_usb_driver.xml scsidrivers.xml \ sis900.xml kernel-api.xml journal-api.xml lsm.xml usb.xml \ - gadget.xml libata.xml mtdnand.xml librs.xml + gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml -=20 + ### # The build process is as follows (targets): -diff --git a/Documentation/DocBook/rapidio.tmpl b/Documentation/DocBook/rap= -idio.tmpl +diff --git a/Documentation/DocBook/rapidio.tmpl b/Documentation/DocBook/rapidio.tmpl new file mode 100644 --- /dev/null +++ b/Documentation/DocBook/rapidio.tmpl @@ -0,0 +1,160 @@ -+<?xml version=3D"1.0" encoding=3D"UTF-8"?> ++<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ + <!ENTITY rapidio SYSTEM "rapidio.xml"> + ]> + -+<book id=3D"RapidIO-Guide"> ++<book id="RapidIO-Guide"> + <bookinfo> + <title>RapidIO Subsystem Guide</title> -+=20=20 ++ + <authorgroup> + <author> + <firstname>Matt</firstname> @@ -65,21 +64,21 @@ new file mode 100644 + it and/or modify it under the terms of the GNU General Public + License version 2 as published by the Free Software Foundation. + </para> -+=20=20=20=20=20=20 ++ + <para> + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + </para> -+=20=20=20=20=20=20 ++ + <para> + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, + MA 02111-1307 USA + </para> -+=20=20=20=20=20=20 ++ + <para> + For more details see the file COPYING in the source + distribution of Linux. @@ -89,7 +88,7 @@ new file mode 100644 + +<toc></toc> + -+ <chapter id=3D"intro"> ++ <chapter id="intro"> + <title>Introduction</title> + <para> + RapidIO is a high speed switched fabric interconnect with @@ -106,8 +105,8 @@ new file mode 100644 + or to understand the subsystem internals. + </para> + </chapter> -+=20=20 -+ <chapter id=3D"bugs"> ++ ++ <chapter id="bugs"> + <title>Known Bugs and Limitations</title> + + <sect1> @@ -118,16 +117,14 @@ new file mode 100644 + <title>Limitations</title> + <para> + <orderedlist> -+ <listitem><para>Access/management of RapidIO memory regions is not = -supported</para></listitem> -+ <listitem><para>Multiple host enumeration is not supported</para></= -listitem> ++ <listitem><para>Access/management of RapidIO memory regions is not supported</para></listitem> ++ <listitem><para>Multiple host enumeration is not supported</para></listitem> + </orderedlist> + </para> + </sect1> + </chapter> + -+ <chapter id=3D"drivers"> ++ <chapter id="drivers"> + <title>RapidIO driver interface</title> + <para> + Drivers are provided a set of calls in order @@ -141,9 +138,9 @@ listitem> +!Edrivers/rio/rio-driver.c +!Edrivers/rio/rio.c + </sect1> -+ </chapter>=09 ++ </chapter> + -+ <chapter id=3D"internals"> ++ <chapter id="internals"> + <title>Internals</title> + + <para> @@ -174,25 +171,21 @@ listitem> + </sect1> + </chapter> + -+ <chapter id=3D"credits"> ++ <chapter id="credits"> + <title>Credits</title> + <para> + The following people have contributed to the RapidIO + subsystem directly or indirectly: + <orderedlist> -+ <listitem><para>Matt Porter<email>mporter@kernel.crashing.org</email></= -para></listitem> -+ <listitem><para>Randy Vinson<email>rvinson@mvista.com</email></para></l= -istitem> -+ <listitem><para>Dan Malek<email>dan@embeddedalley.com</email></para></l= -istitem> ++ <listitem><para>Matt Porter<email>mporter@kernel.crashing.org</email></para></listitem> ++ <listitem><para>Randy Vinson<email>rvinson@mvista.com</email></para></listitem> ++ <listitem><para>Dan Malek<email>dan@embeddedalley.com</email></para></listitem> + </orderedlist> + </para> + <para> + The following people have contributed to this document: + <orderedlist> -+ <listitem><para>Matt Porter<email>mporter@kernel.crashing.org</email></= -para></listitem> ++ <listitem><para>Matt Porter<email>mporter@kernel.crashing.org</email></para></listitem> + </orderedlist> + </para> + </chapter> @@ -201,12 +194,12 @@ diff --git a/drivers/Makefile b/drivers/Makefile --- a/drivers/Makefile +++ b/drivers/Makefile @@ -7,6 +7,7 @@ -=20 - obj-$(CONFIG_PCI) +=3D pci/ - obj-$(CONFIG_PARISC) +=3D parisc/ -+obj-$(CONFIG_RAPIDIO) +=3D rio/ - obj-y +=3D video/ - obj-$(CONFIG_ACPI_BOOT) +=3D acpi/ + + obj-$(CONFIG_PCI) += pci/ + obj-$(CONFIG_PARISC) += parisc/ ++obj-$(CONFIG_RAPIDIO) += rio/ + obj-y += video/ + obj-$(CONFIG_ACPI_BOOT) += acpi/ # PnP must come after ACPI since it will eventually need to check if acpi diff --git a/drivers/rio/Kconfig b/drivers/rio/Kconfig new file mode 100644 @@ -239,9 +232,9 @@ new file mode 100644 +# +# Makefile for RapidIO interconnect services +# -+obj-y +=3D rio.o rio-access.o rio-driver.o rio-scan.o rio-sysfs.o ++obj-y += rio.o rio-access.o rio-driver.o rio-scan.o rio-sysfs.o + -+obj-$(CONFIG_RAPIDIO) +=3D switches/ ++obj-$(CONFIG_RAPIDIO) += switches/ diff --git a/drivers/rio/rio-access.c b/drivers/rio/rio-access.c new file mode 100644 --- /dev/null @@ -266,8 +259,8 @@ new file mode 100644 + * These interrupt-safe spinlocks protect all accesses to RIO + * configuration space and doorbell access. + */ -+static spinlock_t rio_config_lock =3D SPIN_LOCK_UNLOCKED; -+static spinlock_t rio_doorbell_lock =3D SPIN_LOCK_UNLOCKED; ++static spinlock_t rio_config_lock = SPIN_LOCK_UNLOCKED; ++static spinlock_t rio_doorbell_lock = SPIN_LOCK_UNLOCKED; + +/* + * Wrappers for all RIO configuration access functions. They just check @@ -294,11 +287,11 @@ new file mode 100644 +{ \ + int res; \ + unsigned long flags; \ -+ u32 data =3D 0; \ ++ u32 data = 0; \ + if (RIO_##size##_BAD) return RIO_BAD_SIZE; \ + spin_lock_irqsave(&rio_config_lock, flags); \ -+ res =3D mport->ops->lcread(mport->id, offset, len, &data); \ -+ *value =3D (type)data; \ ++ res = mport->ops->lcread(mport->id, offset, len, &data); \ ++ *value = (type)data; \ + spin_unlock_irqrestore(&rio_config_lock, flags); \ + return res; \ +} @@ -320,7 +313,7 @@ new file mode 100644 + unsigned long flags; \ + if (RIO_##size##_BAD) return RIO_BAD_SIZE; \ + spin_lock_irqsave(&rio_config_lock, flags); \ -+ res =3D mport->ops->lcwrite(mport->id, offset, len, value); \ ++ res = mport->ops->lcwrite(mport->id, offset, len, value); \ + spin_unlock_irqrestore(&rio_config_lock, flags); \ + return res; \ +} @@ -350,17 +343,15 @@ new file mode 100644 + */ +#define RIO_OP_READ(size,type,len) \ +int rio_mport_read_config_##size \ -+ (struct rio_mport *mport, u16 destid, u8 hopcount, u32 offset, type *valu= -e) \ ++ (struct rio_mport *mport, u16 destid, u8 hopcount, u32 offset, type *value) \ +{ \ + int res; \ + unsigned long flags; \ -+ u32 data =3D 0; \ ++ u32 data = 0; \ + if (RIO_##size##_BAD) return RIO_BAD_SIZE; \ + spin_lock_irqsave(&rio_config_lock, flags); \ -+ res =3D mport->ops->cread(mport->id, destid, hopcount, offset, len, &data= -); \ -+ *value =3D (type)data; \ ++ res = mport->ops->cread(mport->id, destid, hopcount, offset, len, &data); \ ++ *value = (type)data; \ + spin_unlock_irqrestore(&rio_config_lock, flags); \ + return res; \ +} @@ -376,15 +367,13 @@ e) \ + */ +#define RIO_OP_WRITE(size,type,len) \ +int rio_mport_write_config_##size \ -+ (struct rio_mport *mport, u16 destid, u8 hopcount, u32 offset, type value= -) \ ++ (struct rio_mport *mport, u16 destid, u8 hopcount, u32 offset, type value) \ +{ \ + int res; \ + unsigned long flags; \ + if (RIO_##size##_BAD) return RIO_BAD_SIZE; \ + spin_lock_irqsave(&rio_config_lock, flags); \ -+ res =3D mport->ops->cwrite(mport->id, destid, hopcount, offset, len, valu= -e); \ ++ res = mport->ops->cwrite(mport->id, destid, hopcount, offset, len, value); \ + spin_unlock_irqrestore(&rio_config_lock, flags); \ + return res; \ +} @@ -419,7 +408,7 @@ e); \ + unsigned long flags; + + spin_lock_irqsave(&rio_doorbell_lock, flags); -+ res =3D mport->ops->dsend(mport->id, destid, data); ++ res = mport->ops->dsend(mport->id, destid, data); + spin_unlock_irqrestore(&rio_doorbell_lock, flags); + + return res; @@ -451,8 +440,7 @@ new file mode 100644 +#include "rio.h" + +/** -+ * rio_match_device - Tell if a RIO device has a matching RIO device id s= -tructure ++ * rio_match_device - Tell if a RIO device has a matching RIO device id structure + * @id: the RIO device id structure to match against + * @rdev: the RIO device structure to match against + * @@ -460,18 +448,17 @@ tructure + * matches a device id structure provided by a RIO driver. Returns the + * matching &struct rio_device_id or %NULL if there is no match. + */ -+static const struct rio_device_id *rio_match_device(const struct rio_devic= -e_id ++static const struct rio_device_id *rio_match_device(const struct rio_device_id + *id, + const struct rio_dev *rdev) +{ + while (id->vid || id->asm_vid) { -+ if (((id->vid =3D=3D RIO_ANY_ID) || (id->vid =3D=3D rdev->vid)) && -+ ((id->did =3D=3D RIO_ANY_ID) || (id->did =3D=3D rdev->did)) && -+ ((id->asm_vid =3D=3D RIO_ANY_ID) -+ || (id->asm_vid =3D=3D rdev->asm_vid)) -+ && ((id->asm_did =3D=3D RIO_ANY_ID) -+ || (id->asm_did =3D=3D rdev->asm_did))) ++ if (((id->vid == RIO_ANY_ID) || (id->vid == rdev->vid)) && ++ ((id->did == RIO_ANY_ID) || (id->did == rdev->did)) && ++ ((id->asm_vid == RIO_ANY_ID) ++ || (id->asm_vid == rdev->asm_vid)) ++ && ((id->asm_did == RIO_ANY_ID) ++ || (id->asm_did == rdev->asm_did))) + return id; + id++; + } @@ -522,21 +509,21 @@ e_id + */ +static int rio_device_probe(struct device *dev) +{ -+ struct rio_driver *rdrv =3D to_rio_driver(dev->driver); -+ struct rio_dev *rdev =3D to_rio_dev(dev); -+ int error =3D -ENODEV; ++ struct rio_driver *rdrv = to_rio_driver(dev->driver); ++ struct rio_dev *rdev = to_rio_dev(dev); ++ int error = -ENODEV; + const struct rio_device_id *id; + + if (!rdev->driver && rdrv->probe) { + if (!rdrv->id_table) + return error; -+ id =3D rio_match_device(rdrv->id_table, rdev); ++ id = rio_match_device(rdrv->id_table, rdev); + rio_dev_get(rdev); + if (id) -+ error =3D rdrv->probe(rdev, id); -+ if (error >=3D 0) { -+ rdev->driver =3D rdrv; -+ error =3D 0; ++ error = rdrv->probe(rdev, id); ++ if (error >= 0) { ++ rdev->driver = rdrv; ++ error = 0; + rio_dev_put(rdev); + } + } @@ -554,13 +541,13 @@ e_id + */ +static int rio_device_remove(struct device *dev) +{ -+ struct rio_dev *rdev =3D to_rio_dev(dev); -+ struct rio_driver *rdrv =3D rdev->driver; ++ struct rio_dev *rdev = to_rio_dev(dev); ++ struct rio_driver *rdrv = rdev->driver; + + if (rdrv) { + if (rdrv->remove) + rdrv->remove(rdev); -+ rdev->driver =3D NULL; ++ rdev->driver = NULL; + } + + rio_dev_put(rdev); @@ -580,10 +567,10 @@ e_id +int rio_register_driver(struct rio_driver *rdrv) +{ + /* initialize common driver fields */ -+ rdrv->driver.name =3D rdrv->name; -+ rdrv->driver.bus =3D &rio_bus_type; -+ rdrv->driver.probe =3D rio_device_probe; -+ rdrv->driver.remove =3D rio_device_remove; ++ rdrv->driver.name = rdrv->name; ++ rdrv->driver.bus = &rio_bus_type; ++ rdrv->driver.probe = rio_device_probe; ++ rdrv->driver.remove = rio_device_remove; + + /* register with core */ + return driver_register(&rdrv->driver); @@ -616,15 +603,15 @@ e_id + */ +static int rio_match_bus(struct device *dev, struct device_driver *drv) +{ -+ struct rio_dev *rdev =3D to_rio_dev(dev); -+ struct rio_driver *rdrv =3D to_rio_driver(drv); -+ const struct rio_device_id *id =3D rdrv->id_table; ++ struct rio_dev *rdev = to_rio_dev(dev); ++ struct rio_driver *rdrv = to_rio_driver(drv); ++ const struct rio_device_id *id = rdrv->id_table; + const struct rio_device_id *found_id; + + if (!id) + goto out; + -+ found_id =3D rio_match_device(id, rdev); ++ found_id = rio_match_device(id, rdev); + + if (found_id) + return 1; @@ -632,14 +619,14 @@ e_id + out:return 0; +} + -+static struct device rio_bus =3D { -+ .bus_id =3D "rapidio", ++static struct device rio_bus = { ++ .bus_id = "rapidio", +}; + -+struct bus_type rio_bus_type =3D { -+ .name =3D "rapidio", -+ .match =3D rio_match_bus, -+ .dev_attrs =3D rio_dev_attrs ++struct bus_type rio_bus_type = { ++ .name = "rapidio", ++ .match = rio_match_bus, ++ .dev_attrs = rio_dev_attrs +}; + +/** @@ -692,7 +679,7 @@ new file mode 100644 +static ssize_t \ + field##_show(struct device *dev, char *buf) \ +{ \ -+ struct rio_dev *rdev =3D to_rio_dev(dev); \ ++ struct rio_dev *rdev = to_rio_dev(dev); \ + \ + return sprintf(buf, format_string, rdev->field); \ +} \ @@ -706,17 +693,17 @@ new file mode 100644 + +static ssize_t routes_show(struct device *dev, char *buf) +{ -+ struct rio_dev *rdev =3D to_rio_dev(dev); -+ char *str =3D buf; ++ struct rio_dev *rdev = to_rio_dev(dev); ++ char *str = buf; + int i; + + if (!rdev->rswitch) + goto out; + -+ for (i =3D 0; i < RIO_MAX_ROUTE_ENTRIES; i++) { -+ if (rdev->rswitch->route_table[i] =3D=3D RIO_INVALID_ROUTE) ++ for (i = 0; i < RIO_MAX_ROUTE_ENTRIES; i++) { ++ if (rdev->rswitch->route_table[i] == RIO_INVALID_ROUTE) + continue; -+ str +=3D ++ str += + sprintf(str, "%04x %02x\n", i, + rdev->rswitch->route_table[i]); + } @@ -725,7 +712,7 @@ new file mode 100644 + return (str - buf); +} + -+struct device_attribute rio_dev_attrs[] =3D { ++struct device_attribute rio_dev_attrs[] = { + __ATTR_RO(did), + __ATTR_RO(vid), + __ATTR_RO(device_rev), @@ -739,29 +726,29 @@ new file mode 100644 +static ssize_t +rio_read_config(struct kobject *kobj, char *buf, loff_t off, size_t count) +{ -+ struct rio_dev *dev =3D ++ struct rio_dev *dev = + to_rio_dev(container_of(kobj, struct device, kobj)); -+ unsigned int size =3D 0x100; -+ loff_t init_off =3D off; -+ u8 *data =3D (u8 *) buf; ++ unsigned int size = 0x100; ++ loff_t init_off = off; ++ u8 *data = (u8 *) buf; + + /* Several chips lock up trying to read undefined config space */ + if (capable(CAP_SYS_ADMIN)) -+ size =3D 0x200000; ++ size = 0x200000; + + if (off > size) + return 0; + if (off + count > size) { -+ size -=3D off; -+ count =3D size; ++ size -= off; ++ count = size; + } else { -+ size =3D count; ++ size = count; + } + + if ((off & 1) && size) { + u8 val; + rio_read_config_8(dev, off, &val); -+ data[off - init_off] =3D val; ++ data[off - init_off] = val; + off++; + size--; + } @@ -769,36 +756,36 @@ new file mode 100644 + if ((off & 3) && size > 2) { + u16 val; + rio_read_config_16(dev, off, &val); -+ data[off - init_off] =3D (val >> 8) & 0xff; -+ data[off - init_off + 1] =3D val & 0xff; -+ off +=3D 2; -+ size -=3D 2; ++ data[off - init_off] = (val >> 8) & 0xff; ++ data[off - init_off + 1] = val & 0xff; ++ off += 2; ++ size -= 2; + } + + while (size > 3) { + u32 val; + rio_read_config_32(dev, off, &val); -+ data[off - init_off] =3D (val >> 24) & 0xff; -+ data[off - init_off + 1] =3D (val >> 16) & 0xff; -+ data[off - init_off + 2] =3D (val >> 8) & 0xff; -+ data[off - init_off + 3] =3D val & 0xff; -+ off +=3D 4; -+ size -=3D 4; ++ data[off - init_off] = (val >> 24) & 0xff; ++ data[off - init_off + 1] = (val >> 16) & 0xff; ++ data[off - init_off + 2] = (val >> 8) & 0xff; ++ data[off - init_off + 3] = val & 0xff; ++ off += 4; ++ size -= 4; + } + -+ if (size >=3D 2) { ++ if (size >= 2) { + u16 val; + rio_read_config_16(dev, off, &val); -+ data[off - init_off] =3D (val >> 8) & 0xff; -+ data[off - init_off + 1] =3D val & 0xff; -+ off +=3D 2; -+ size -=3D 2; ++ data[off - init_off] = (val >> 8) & 0xff; ++ data[off - init_off + 1] = val & 0xff; ++ off += 2; ++ size -= 2; + } + + if (size > 0) { + u8 val; + rio_read_config_8(dev, off, &val); -+ data[off - init_off] =3D val; ++ data[off - init_off] = val; + off++; + --size; + } @@ -809,17 +796,17 @@ new file mode 100644 +static ssize_t +rio_write_config(struct kobject *kobj, char *buf, loff_t off, size_t count) +{ -+ struct rio_dev *dev =3D ++ struct rio_dev *dev = + to_rio_dev(container_of(kobj, struct device, kobj)); -+ unsigned int size =3D count; -+ loff_t init_off =3D off; -+ u8 *data =3D (u8 *) buf; ++ unsigned int size = count; ++ loff_t init_off = off; ++ u8 *data = (u8 *) buf; + + if (off > 0x200000) + return 0; + if (off + count > 0x200000) { -+ size =3D 0x200000 - off; -+ count =3D size; ++ size = 0x200000 - off; ++ count = size; + } + + if ((off & 1) && size) { @@ -829,29 +816,29 @@ new file mode 100644 + } + + if ((off & 3) && (size > 2)) { -+ u16 val =3D data[off - init_off + 1]; -+ val |=3D (u16) data[off - init_off] << 8; ++ u16 val = data[off - init_off + 1]; ++ val |= (u16) data[off - init_off] << 8; + rio_write_config_16(dev, off, val); -+ off +=3D 2; -+ size -=3D 2; ++ off += 2; ++ size -= 2; + } + + while (size > 3) { -+ u32 val =3D data[off - init_off + 3]; -+ val |=3D (u32) data[off - init_off + 2] << 8; -+ val |=3D (u32) data[off - init_off + 1] << 16; -+ val |=3D (u32) data[off - init_off] << 24; ++ u32 val = data[off - init_off + 3]; ++ val |= (u32) data[off - init_off + 2] << 8; ++ val |= (u32) data[off - init_off + 1] << 16; ++ val |= (u32) data[off - init_off] << 24; + rio_write_config_32(dev, off, val); -+ off +=3D 4; -+ size -=3D 4; ++ off += 4; ++ size -= 4; + } + -+ if (size >=3D 2) { -+ u16 val =3D data[off - init_off + 1]; -+ val |=3D (u16) data[off - init_off] << 8; ++ if (size >= 2) { ++ u16 val = data[off - init_off + 1]; ++ val |= (u16) data[off - init_off] << 8; + rio_write_config_16(dev, off, val); -+ off +=3D 2; -+ size -=3D 2; ++ off += 2; ++ size -= 2; + } + + if (size) { @@ -863,15 +850,15 @@ new file mode 100644 + return count; +} + -+static struct bin_attribute rio_config_attr =3D { -+ .attr =3D { -+ .name =3D "config", -+ .mode =3D S_IRUGO | S_IWUSR, -+ .owner =3D THIS_MODULE, ++static struct bin_attribute rio_config_attr = { ++ .attr = { ++ .name = "config", ++ .mode = S_IRUGO | S_IWUSR, ++ .owner = THIS_MODULE, + }, -+ .size =3D 0x200000, -+ .read =3D rio_read_config, -+ .write =3D rio_write_config, ++ .size = 0x200000, ++ .read = rio_read_config, ++ .write = rio_write_config, +}; + +/** @@ -953,7 +940,7 @@ new file mode 100644 + * rio_request_inb_mbox - request inbound mailbox service + * @mport: RIO master port from which to allocate the mailbox resource + * @mbox: Mailbox number to claim -+ * @entries: Number of entries in inbound mailbox queue=20 ++ * @entries: Number of entries in inbound mailbox queue + * @minb: Callback to execute when inbound message is received + * + * Requests ownership of an inbound mailbox resource and binds @@ -965,29 +952,29 @@ new file mode 100644 + void (*minb) (struct rio_mport * mport, int mbox, + int slot)) +{ -+ int rc =3D 0; ++ int rc = 0; + -+ struct resource *res =3D kmalloc(sizeof(struct resource), GFP_KERNEL); ++ struct resource *res = kmalloc(sizeof(struct resource), GFP_KERNEL); + + if (res) { + rio_init_mbox_res(res, mbox, mbox); + + /* Make sure this mailbox isn't in use */ -+ if ((rc =3D ++ if ((rc = + request_resource(&mport->riores[RIO_INB_MBOX_RESOURCE], + res)) < 0) { + kfree(res); + goto out; + } + -+ mport->inb_msg[mbox].res =3D res; ++ mport->inb_msg[mbox].res = res; + + /* Hook the inbound message callback */ -+ mport->inb_msg[mbox].mcback =3D minb; ++ mport->inb_msg[mbox].mcback = minb; + -+ rc =3D rio_open_inb_mbox(mport, mbox, entries); ++ rc = rio_open_inb_mbox(mport, mbox, entries); + } else -+ rc =3D -ENOMEM; ++ rc = -ENOMEM; + + out: + return rc; @@ -1013,7 +1000,7 @@ new file mode 100644 + * rio_request_outb_mbox - request outbound mailbox service + * @mport: RIO master port from which to allocate the mailbox resource + * @mbox: Mailbox number to claim -+ * @entries: Number of entries in outbound mailbox queue=20 ++ * @entries: Number of entries in outbound mailbox queue + * @moutb: Callback to execute when outbound message is sent + * + * Requests ownership of an outbound mailbox resource and binds @@ -1025,29 +1012,29 @@ new file mode 100644 + void (*moutb) (struct rio_mport * mport, int mbox, + int slot)) +{ -+ int rc =3D 0; ++ int rc = 0; + -+ struct resource *res =3D kmalloc(sizeof(struct resource), GFP_KERNEL); ++ struct resource *res = kmalloc(sizeof(struct resource), GFP_KERNEL); + + if (res) { + rio_init_mbox_res(res, mbox, mbox); + + /* Make sure this outbound mailbox isn't in use */ -+ if ((rc =3D ++ if ((rc = + request_resource(&mport->riores[RIO_OUTB_MBOX_RESOURCE], + res)) < 0) { + kfree(res); + goto out; + } + -+ mport->outb_msg[mbox].res =3D res; ++ mport->outb_msg[mbox].res = res; + + /* Hook the inbound message callback */ -+ mport->outb_msg[mbox].mcback =3D moutb; ++ mport->outb_msg[mbox].mcback = moutb; + -+ rc =3D rio_open_outb_mbox(mport, mbox, entries); ++ rc = rio_open_outb_mbox(mport, mbox, entries); + } else -+ rc =3D -ENOMEM; ++ rc = -ENOMEM; + + out: + return rc; @@ -1084,16 +1071,16 @@ new file mode 100644 + void (*dinb) (struct rio_mport * mport, u16 src, u16 dst, + u16 info)) +{ -+ int rc =3D 0; ++ int rc = 0; + struct rio_dbell *dbell; + -+ if (!(dbell =3D kmalloc(sizeof(struct rio_dbell), GFP_KERNEL))) { -+ rc =3D -ENOMEM; ++ if (!(dbell = kmalloc(sizeof(struct rio_dbell), GFP_KERNEL))) { ++ rc = -ENOMEM; + goto out; + } + -+ dbell->res =3D res; -+ dbell->dinb =3D dinb; ++ dbell->res = res; ++ dbell->dinb = dinb; + + list_add_tail(&dbell->node, &mport->dbells); + @@ -1118,15 +1105,15 @@ new file mode 100644 + void (*dinb) (struct rio_mport * mport, u16 src, + u16 dst, u16 info)) +{ -+ int rc =3D 0; ++ int rc = 0; + -+ struct resource *res =3D kmalloc(sizeof(struct resource), GFP_KERNEL); ++ struct resource *res = kmalloc(sizeof(struct resource), GFP_KERNEL); + + if (res) { + rio_init_dbell_res(res, start, end); + + /* Make sure these doorbells aren't in use */ -+ if ((rc =3D ++ if ((rc = + request_resource(&mport->riores[RIO_DOORBELL_RESOURCE], + res)) < 0) { + kfree(res); @@ -1134,9 +1121,9 @@ new file mode 100644 + } + + /* Hook the doorbell callback */ -+ rc =3D rio_setup_inb_dbell(mport, res, dinb); ++ rc = rio_setup_inb_dbell(mport, res, dinb); + } else -+ rc =3D -ENOMEM; ++ rc = -ENOMEM; + + out: + return rc; @@ -1154,19 +1141,19 @@ new file mode 100644 + */ +int rio_release_inb_dbell(struct rio_mport *mport, u16 start, u16 end) +{ -+ int rc =3D 0, found =3D 0; ++ int rc = 0, found = 0; + struct rio_dbell *dbell; + + list_for_each_entry(dbell, &mport->dbells, node) { -+ if ((dbell->res->start =3D=3D start) && (dbell->res->end =3D=3D end)) { -+ found =3D 1; ++ if ((dbell->res->start == start) && (dbell->res->end == end)) { ++ found = 1; + break; + } + } + + /* If we can't find an exact match, fail */ + if (!found) { -+ rc =3D -EINVAL; ++ rc = -EINVAL; + goto out; + } + @@ -1174,7 +1161,7 @@ new file mode 100644 + list_del(&dbell->node); + + /* Release the doorbell resource */ -+ rc =3D release_resource(dbell->res); ++ rc = release_resource(dbell->res); + + /* Free the doorbell event */ + kfree(dbell); @@ -1195,7 +1182,7 @@ new file mode 100644 +struct resource *rio_request_outb_dbell(struct rio_dev *rdev, u16 start, + u16 end) +{ -+ struct resource *res =3D kmalloc(sizeof(struct resource), GFP_KERNEL); ++ struct resource *res = kmalloc(sizeof(struct resource), GFP_KERNEL); + + if (res) { + rio_init_dbell_res(res, start, end); @@ -1204,7 +1191,7 @@ new file mode 100644 + if (request_resource(&rdev->riores[RIO_DOORBELL_RESOURCE], res) + < 0) { + kfree(res); -+ res =3D NULL; ++ res = NULL; + } + } + @@ -1221,7 +1208,7 @@ new file mode 100644 + */ +int rio_release_outb_dbell(struct rio_dev *rdev, struct resource *res) +{ -+ int rc =3D release_resource(res); ++ int rc = release_resource(res); + + kfree(res); + @@ -1266,7 +1253,7 @@ new file mode 100644 + rio_mport_read_config_32(port, destid, hopcount, + RIO_ASM_INFO_CAR, &asm_info); + -+ ext_ftr_ptr =3D asm_info & RIO_EXT_FTR_PTR_MASK; ++ ext_ftr_ptr = asm_info & RIO_EXT_FTR_PTR_MASK; + + while (ext_ftr_ptr) { + if (local) @@ -1275,9 +1262,9 @@ new file mode 100644 + else + rio_mport_read_config_32(port, destid, hopcount, + ext_ftr_ptr, &ftr_header); -+ if (RIO_GET_BLOCK_ID(ftr_header) =3D=3D ftr) ++ if (RIO_GET_BLOCK_ID(ftr_header) == ftr) + return ext_ftr_ptr; -+ if (!(ext_ftr_ptr =3D RIO_GET_BLOCK_PTR(ftr_header))) ++ if (!(ext_ftr_ptr = RIO_GET_BLOCK_PTR(ftr_header))) + break; + } + @@ -1285,8 +1272,7 @@ new file mode 100644 +} + +/** -+ * rio_get_asm - Begin or continue searching for a RIO device by vid/did/a= -sm_vid/asm_did ++ * rio_get_asm - Begin or continue searching for a RIO device by vid/did/asm_vid/asm_did + * @vid: RIO vid to match or %RIO_ANY_ID to match all vids + * @did: RIO did to match or %RIO_ANY_ID to match all dids + * @asm_vid: RIO asm_vid to match or %RIO_ANY_ID to match all asm_vids @@ -1310,21 +1296,21 @@ sm_vid/asm_did + + WARN_ON(in_interrupt()); + spin_lock(&rio_global_list_lock); -+ n =3D from ? from->global_list.next : rio_devices.next; -+ -+ while (n && (n !=3D &rio_devices)) { -+ rdev =3D rio_dev_g(n); -+ if ((vid =3D=3D RIO_ANY_ID || rdev->vid =3D=3D vid) && -+ (did =3D=3D RIO_ANY_ID || rdev->did =3D=3D did) && -+ (asm_vid =3D=3D RIO_ANY_ID || rdev->asm_vid =3D=3D asm_vid) && -+ (asm_did =3D=3D RIO_ANY_ID || rdev->asm_did =3D=3D asm_did)) ++ n = from ? from->global_list.next : rio_devices.next; ++ ++ while (n && (n != &rio_devices)) { ++ rdev = rio_dev_g(n); ++ if ((vid == RIO_ANY_ID || rdev->vid == vid) && ++ (did == RIO_ANY_ID || rdev->did == did) && ++ (asm_vid == RIO_ANY_ID || rdev->asm_vid == asm_vid) && ++ (asm_did == RIO_ANY_ID || rdev->asm_did == asm_did)) + goto exit; -+ n =3D n->next; ++ n = n->next; + } -+ rdev =3D NULL; ++ rdev = NULL; + exit: + rio_dev_put(from); -+ rdev =3D rio_dev_get(rdev); ++ rdev = rio_dev_get(rdev); + spin_unlock(&rio_global_list_lock); + return rdev; +} @@ -1354,9 +1340,9 @@ sm_vid/asm_did + +static int __devinit rio_init(void) +{ -+ struct rio_dev *dev =3D NULL; ++ struct rio_dev *dev = NULL; + -+ while ((dev =3D rio_get_device(RIO_ANY_ID, RIO_ANY_ID, dev)) !=3D NULL) { ++ while ((dev = rio_get_device(RIO_ANY_ID, RIO_ANY_ID, dev)) != NULL) { + rio_fixup_device(dev); + } + return 0; @@ -1366,7 +1352,7 @@ sm_vid/asm_did + +int rio_init_mports(void) +{ -+ int rc =3D 0; ++ int rc = 0; + struct rio_mport *port; + + list_for_each_entry(port, &rio_mports, node) { @@ -1376,11 +1362,11 @@ sm_vid/asm_did + printk(KERN_ERR + "RIO: Error requesting master port region %8.8lx-%8.8lx\n", + port->iores.start, port->iores.end - 1); -+ rc =3D -ENOMEM; ++ rc = -ENOMEM; + goto out; + } + -+ if (port->host_deviceid >=3D 0) ++ if (port->host_deviceid >= 0) + rio_enum_mport(port); + else + rio_disc_mport(port); @@ -1429,8 +1415,7 @@ new file mode 100644 + +/* Functions internal to the RIO core code */ + -+extern u32 rio_mport_get_feature(struct rio_mport *mport, int local, u16 d= -estid, ++extern u32 rio_mport_get_feature(struct rio_mport *mport, int local, u16 destid, + u8 hopcount, int ftr); +extern int rio_create_sysfs_dev_files(struct rio_dev *rdev); +extern int rio_enum_mport(struct rio_mport *mport); @@ -1443,8 +1428,7 @@ estid, +/* Helpers internal to the RIO core code */ +#define DECLARE_RIO_ROUTE_SECTION(section, vid, did, add_hook, get_hook) \ + static struct rio_route_ops __rio_route_ops __attribute_used__ \ -+ __attribute__((__section__(#section))) =3D { vid, did, add_hook, = -get_hook }; ++ __attribute__((__section__(#section))) = { vid, did, add_hook, get_hook }; + +/** + * DECLARE_RIO_ROUTE_OPS - Registers switch routing operations @@ -1470,21 +1454,20 @@ get_hook }; +#define RIO_GET_DID(x) (x & 0xffff) +#define RIO_SET_DID(x) (x & 0xffff) +#endif -diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinu= -x.lds.h +diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -32,6 +32,13 @@ - VMLINUX_SYMBOL(__end_pci_fixups_enable) =3D .; \ + VMLINUX_SYMBOL(__end_pci_fixups_enable) = .; \ } \ \ + /* RapidIO route ops */ \ + .rio_route : AT(ADDR(.rio_route) - LOAD_OFFSET) { \ -+ VMLINUX_SYMBOL(__start_rio_route_ops) =3D .; \ ++ VMLINUX_SYMBOL(__start_rio_route_ops) = .; \ + *(.rio_route_ops) \ -+ VMLINUX_SYMBOL(__end_rio_route_ops) =3D .; \ ++ VMLINUX_SYMBOL(__end_rio_route_ops) = .; \ + } \ + \ /* Kernel symbol table: Normal symbols */ \ __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \ - VMLINUX_SYMBOL(__start___ksymtab) =3D .; \ + VMLINUX_SYMBOL(__start___ksymtab) = .; \ diff --git a/a/content_digest b/N1/content_digest index 7fb4c67..a2f11be 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -24,31 +24,30 @@ "diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile\n" "--- a/Documentation/DocBook/Makefile\n" "+++ b/Documentation/DocBook/Makefile\n" - "@@ -10,7 +10,7 @@ DOCBOOKS :=3D wanbook.xml z8530book.xml mc\n" + "@@ -10,7 +10,7 @@ DOCBOOKS := wanbook.xml z8530book.xml mc\n" " \t kernel-hacking.xml kernel-locking.xml deviceiobook.xml \\\n" " \t procfs-guide.xml writing_usb_driver.xml scsidrivers.xml \\\n" " \t sis900.xml kernel-api.xml journal-api.xml lsm.xml usb.xml \\\n" "-\t gadget.xml libata.xml mtdnand.xml librs.xml\n" "+\t gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml\n" - "=20\n" + " \n" " ###\n" " # The build process is as follows (targets):\n" - "diff --git a/Documentation/DocBook/rapidio.tmpl b/Documentation/DocBook/rap=\n" - "idio.tmpl\n" + "diff --git a/Documentation/DocBook/rapidio.tmpl b/Documentation/DocBook/rapidio.tmpl\n" "new file mode 100644\n" "--- /dev/null\n" "+++ b/Documentation/DocBook/rapidio.tmpl\n" "@@ -0,0 +1,160 @@\n" - "+<?xml version=3D\"1.0\" encoding=3D\"UTF-8\"?>\n" + "+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" "+<!DOCTYPE book PUBLIC \"-//OASIS//DTD DocBook XML V4.1.2//EN\"\n" "+ \"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd\" [\n" "+\t<!ENTITY rapidio SYSTEM \"rapidio.xml\">\n" "+\t]>\n" "+\n" - "+<book id=3D\"RapidIO-Guide\">\n" + "+<book id=\"RapidIO-Guide\">\n" "+ <bookinfo>\n" "+ <title>RapidIO Subsystem Guide</title>\n" - "+=20=20\n" + "+ \n" "+ <authorgroup>\n" "+ <author>\n" "+ <firstname>Matt</firstname>\n" @@ -73,21 +72,21 @@ "+ it and/or modify it under the terms of the GNU General Public\n" "+ License version 2 as published by the Free Software Foundation.\n" "+ </para>\n" - "+=20=20=20=20=20=20\n" + "+ \n" "+ <para>\n" "+ This program is distributed in the hope that it will be\n" "+ useful, but WITHOUT ANY WARRANTY; without even the implied\n" "+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" "+ See the GNU General Public License for more details.\n" "+ </para>\n" - "+=20=20=20=20=20=20\n" + "+ \n" "+ <para>\n" "+ You should have received a copy of the GNU General Public\n" "+ License along with this program; if not, write to the Free\n" "+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,\n" "+ MA 02111-1307 USA\n" "+ </para>\n" - "+=20=20=20=20=20=20\n" + "+ \n" "+ <para>\n" "+ For more details see the file COPYING in the source\n" "+ distribution of Linux.\n" @@ -97,7 +96,7 @@ "+\n" "+<toc></toc>\n" "+\n" - "+ <chapter id=3D\"intro\">\n" + "+ <chapter id=\"intro\">\n" "+ <title>Introduction</title>\n" "+ <para>\n" "+\tRapidIO is a high speed switched fabric interconnect with\n" @@ -114,8 +113,8 @@ "+\tor to understand the subsystem internals.\n" "+ </para>\n" "+ </chapter>\n" - "+=20=20\n" - "+ <chapter id=3D\"bugs\">\n" + "+ \n" + "+ <chapter id=\"bugs\">\n" "+ <title>Known Bugs and Limitations</title>\n" "+\n" "+ <sect1>\n" @@ -126,16 +125,14 @@ "+ \t<title>Limitations</title>\n" "+\t <para>\n" "+\t <orderedlist>\n" - "+\t <listitem><para>Access/management of RapidIO memory regions is not =\n" - "supported</para></listitem>\n" - "+\t <listitem><para>Multiple host enumeration is not supported</para></=\n" - "listitem>\n" + "+\t <listitem><para>Access/management of RapidIO memory regions is not supported</para></listitem>\n" + "+\t <listitem><para>Multiple host enumeration is not supported</para></listitem>\n" "+\t </orderedlist>\n" "+\t </para>\n" "+ </sect1>\n" "+ </chapter>\n" "+\n" - "+ <chapter id=3D\"drivers\">\n" + "+ <chapter id=\"drivers\">\n" "+ \t<title>RapidIO driver interface</title>\n" "+\t<para>\n" "+\t\tDrivers are provided a set of calls in order\n" @@ -149,9 +146,9 @@ "+!Edrivers/rio/rio-driver.c\n" "+!Edrivers/rio/rio.c\n" "+\t</sect1>\n" - "+ </chapter>=09\n" + "+ </chapter>\t\n" "+\n" - "+ <chapter id=3D\"internals\">\n" + "+ <chapter id=\"internals\">\n" "+ <title>Internals</title>\n" "+\n" "+ <para>\n" @@ -182,25 +179,21 @@ "+ </sect1>\n" "+ </chapter>\n" "+\n" - "+ <chapter id=3D\"credits\">\n" + "+ <chapter id=\"credits\">\n" "+ <title>Credits</title>\n" "+\t<para>\n" "+\t\tThe following people have contributed to the RapidIO\n" "+\t\tsubsystem directly or indirectly:\n" "+\t\t<orderedlist>\n" - "+\t\t\t<listitem><para>Matt Porter<email>mporter@kernel.crashing.org</email></=\n" - "para></listitem>\n" - "+\t\t\t<listitem><para>Randy Vinson<email>rvinson@mvista.com</email></para></l=\n" - "istitem>\n" - "+\t\t\t<listitem><para>Dan Malek<email>dan@embeddedalley.com</email></para></l=\n" - "istitem>\n" + "+\t\t\t<listitem><para>Matt Porter<email>mporter@kernel.crashing.org</email></para></listitem>\n" + "+\t\t\t<listitem><para>Randy Vinson<email>rvinson@mvista.com</email></para></listitem>\n" + "+\t\t\t<listitem><para>Dan Malek<email>dan@embeddedalley.com</email></para></listitem>\n" "+\t\t</orderedlist>\n" "+\t</para>\n" "+\t<para>\n" "+\t\tThe following people have contributed to this document:\n" "+\t\t<orderedlist>\n" - "+\t\t\t<listitem><para>Matt Porter<email>mporter@kernel.crashing.org</email></=\n" - "para></listitem>\n" + "+\t\t\t<listitem><para>Matt Porter<email>mporter@kernel.crashing.org</email></para></listitem>\n" "+\t\t</orderedlist>\n" "+\t</para>\n" "+ </chapter>\n" @@ -209,12 +202,12 @@ "--- a/drivers/Makefile\n" "+++ b/drivers/Makefile\n" "@@ -7,6 +7,7 @@\n" - "=20\n" - " obj-$(CONFIG_PCI)\t\t+=3D pci/\n" - " obj-$(CONFIG_PARISC)\t\t+=3D parisc/\n" - "+obj-$(CONFIG_RAPIDIO)\t\t+=3D rio/\n" - " obj-y\t\t\t\t+=3D video/\n" - " obj-$(CONFIG_ACPI_BOOT)\t\t+=3D acpi/\n" + " \n" + " obj-$(CONFIG_PCI)\t\t+= pci/\n" + " obj-$(CONFIG_PARISC)\t\t+= parisc/\n" + "+obj-$(CONFIG_RAPIDIO)\t\t+= rio/\n" + " obj-y\t\t\t\t+= video/\n" + " obj-$(CONFIG_ACPI_BOOT)\t\t+= acpi/\n" " # PnP must come after ACPI since it will eventually need to check if acpi\n" "diff --git a/drivers/rio/Kconfig b/drivers/rio/Kconfig\n" "new file mode 100644\n" @@ -247,9 +240,9 @@ "+#\n" "+# Makefile for RapidIO interconnect services\n" "+#\n" - "+obj-y +=3D rio.o rio-access.o rio-driver.o rio-scan.o rio-sysfs.o\n" + "+obj-y += rio.o rio-access.o rio-driver.o rio-scan.o rio-sysfs.o\n" "+\n" - "+obj-$(CONFIG_RAPIDIO)\t\t+=3D switches/\n" + "+obj-$(CONFIG_RAPIDIO)\t\t+= switches/\n" "diff --git a/drivers/rio/rio-access.c b/drivers/rio/rio-access.c\n" "new file mode 100644\n" "--- /dev/null\n" @@ -274,8 +267,8 @@ "+ * These interrupt-safe spinlocks protect all accesses to RIO\n" "+ * configuration space and doorbell access.\n" "+ */\n" - "+static spinlock_t rio_config_lock =3D SPIN_LOCK_UNLOCKED;\n" - "+static spinlock_t rio_doorbell_lock =3D SPIN_LOCK_UNLOCKED;\n" + "+static spinlock_t rio_config_lock = SPIN_LOCK_UNLOCKED;\n" + "+static spinlock_t rio_doorbell_lock = SPIN_LOCK_UNLOCKED;\n" "+\n" "+/*\n" "+ * Wrappers for all RIO configuration access functions. They just check\n" @@ -302,11 +295,11 @@ "+{\t\t\t\t\t\t\t\t\t\\\n" "+\tint res;\t\t\t\t\t\t\t\\\n" "+\tunsigned long flags;\t\t\t\t\t\t\\\n" - "+\tu32 data =3D 0;\t\t\t\t\t\t\t\\\n" + "+\tu32 data = 0;\t\t\t\t\t\t\t\\\n" "+\tif (RIO_##size##_BAD) return RIO_BAD_SIZE;\t\t\t\\\n" "+\tspin_lock_irqsave(&rio_config_lock, flags);\t\t\t\\\n" - "+\tres =3D mport->ops->lcread(mport->id, offset, len, &data);\t\\\n" - "+\t*value =3D (type)data;\t\t\t\t\t\t\\\n" + "+\tres = mport->ops->lcread(mport->id, offset, len, &data);\t\\\n" + "+\t*value = (type)data;\t\t\t\t\t\t\\\n" "+\tspin_unlock_irqrestore(&rio_config_lock, flags);\t\t\\\n" "+\treturn res;\t\t\t\t\t\t\t\\\n" "+}\n" @@ -328,7 +321,7 @@ "+\tunsigned long flags;\t\t\t\t\t\t\\\n" "+\tif (RIO_##size##_BAD) return RIO_BAD_SIZE;\t\t\t\\\n" "+\tspin_lock_irqsave(&rio_config_lock, flags);\t\t\t\\\n" - "+\tres =3D mport->ops->lcwrite(mport->id, offset, len, value);\t\\\n" + "+\tres = mport->ops->lcwrite(mport->id, offset, len, value);\t\\\n" "+\tspin_unlock_irqrestore(&rio_config_lock, flags);\t\t\\\n" "+\treturn res;\t\t\t\t\t\t\t\\\n" "+}\n" @@ -358,17 +351,15 @@ "+ */\n" "+#define RIO_OP_READ(size,type,len) \\\n" "+int rio_mport_read_config_##size \\\n" - "+\t(struct rio_mport *mport, u16 destid, u8 hopcount, u32 offset, type *valu=\n" - "e)\t\\\n" + "+\t(struct rio_mport *mport, u16 destid, u8 hopcount, u32 offset, type *value)\t\\\n" "+{\t\t\t\t\t\t\t\t\t\\\n" "+\tint res;\t\t\t\t\t\t\t\\\n" "+\tunsigned long flags;\t\t\t\t\t\t\\\n" - "+\tu32 data =3D 0;\t\t\t\t\t\t\t\\\n" + "+\tu32 data = 0;\t\t\t\t\t\t\t\\\n" "+\tif (RIO_##size##_BAD) return RIO_BAD_SIZE;\t\t\t\\\n" "+\tspin_lock_irqsave(&rio_config_lock, flags);\t\t\t\\\n" - "+\tres =3D mport->ops->cread(mport->id, destid, hopcount, offset, len, &data=\n" - "); \\\n" - "+\t*value =3D (type)data;\t\t\t\t\t\t\\\n" + "+\tres = mport->ops->cread(mport->id, destid, hopcount, offset, len, &data); \\\n" + "+\t*value = (type)data;\t\t\t\t\t\t\\\n" "+\tspin_unlock_irqrestore(&rio_config_lock, flags);\t\t\\\n" "+\treturn res;\t\t\t\t\t\t\t\\\n" "+}\n" @@ -384,15 +375,13 @@ "+ */\n" "+#define RIO_OP_WRITE(size,type,len) \\\n" "+int rio_mport_write_config_##size \\\n" - "+\t(struct rio_mport *mport, u16 destid, u8 hopcount, u32 offset, type value=\n" - ")\t\\\n" + "+\t(struct rio_mport *mport, u16 destid, u8 hopcount, u32 offset, type value)\t\\\n" "+{\t\t\t\t\t\t\t\t\t\\\n" "+\tint res;\t\t\t\t\t\t\t\\\n" "+\tunsigned long flags;\t\t\t\t\t\t\\\n" "+\tif (RIO_##size##_BAD) return RIO_BAD_SIZE;\t\t\t\\\n" "+\tspin_lock_irqsave(&rio_config_lock, flags);\t\t\t\\\n" - "+\tres =3D mport->ops->cwrite(mport->id, destid, hopcount, offset, len, valu=\n" - "e); \\\n" + "+\tres = mport->ops->cwrite(mport->id, destid, hopcount, offset, len, value); \\\n" "+\tspin_unlock_irqrestore(&rio_config_lock, flags);\t\t\\\n" "+\treturn res;\t\t\t\t\t\t\t\\\n" "+}\n" @@ -427,7 +416,7 @@ "+\tunsigned long flags;\n" "+\n" "+\tspin_lock_irqsave(&rio_doorbell_lock, flags);\n" - "+\tres =3D mport->ops->dsend(mport->id, destid, data);\n" + "+\tres = mport->ops->dsend(mport->id, destid, data);\n" "+\tspin_unlock_irqrestore(&rio_doorbell_lock, flags);\n" "+\n" "+\treturn res;\n" @@ -459,8 +448,7 @@ "+#include \"rio.h\"\n" "+\n" "+/**\n" - "+ * rio_match_device - Tell if a RIO device has a matching RIO device id s=\n" - "tructure\n" + "+ * rio_match_device - Tell if a RIO device has a matching RIO device id structure\n" "+ * @id: the RIO device id structure to match against\n" "+ * @rdev: the RIO device structure to match against\n" "+ *\n" @@ -468,18 +456,17 @@ "+ * matches a device id structure provided by a RIO driver. Returns the\n" "+ * matching &struct rio_device_id or %NULL if there is no match.\n" "+ */\n" - "+static const struct rio_device_id *rio_match_device(const struct rio_devic=\n" - "e_id\n" + "+static const struct rio_device_id *rio_match_device(const struct rio_device_id\n" "+\t\t\t\t\t\t *id,\n" "+\t\t\t\t\t\t const struct rio_dev *rdev)\n" "+{\n" "+\twhile (id->vid || id->asm_vid) {\n" - "+\t\tif (((id->vid =3D=3D RIO_ANY_ID) || (id->vid =3D=3D rdev->vid)) &&\n" - "+\t\t ((id->did =3D=3D RIO_ANY_ID) || (id->did =3D=3D rdev->did)) &&\n" - "+\t\t ((id->asm_vid =3D=3D RIO_ANY_ID)\n" - "+\t\t || (id->asm_vid =3D=3D rdev->asm_vid))\n" - "+\t\t && ((id->asm_did =3D=3D RIO_ANY_ID)\n" - "+\t\t\t|| (id->asm_did =3D=3D rdev->asm_did)))\n" + "+\t\tif (((id->vid == RIO_ANY_ID) || (id->vid == rdev->vid)) &&\n" + "+\t\t ((id->did == RIO_ANY_ID) || (id->did == rdev->did)) &&\n" + "+\t\t ((id->asm_vid == RIO_ANY_ID)\n" + "+\t\t || (id->asm_vid == rdev->asm_vid))\n" + "+\t\t && ((id->asm_did == RIO_ANY_ID)\n" + "+\t\t\t|| (id->asm_did == rdev->asm_did)))\n" "+\t\t\treturn id;\n" "+\t\tid++;\n" "+\t}\n" @@ -530,21 +517,21 @@ "+ */\n" "+static int rio_device_probe(struct device *dev)\n" "+{\n" - "+\tstruct rio_driver *rdrv =3D to_rio_driver(dev->driver);\n" - "+\tstruct rio_dev *rdev =3D to_rio_dev(dev);\n" - "+\tint error =3D -ENODEV;\n" + "+\tstruct rio_driver *rdrv = to_rio_driver(dev->driver);\n" + "+\tstruct rio_dev *rdev = to_rio_dev(dev);\n" + "+\tint error = -ENODEV;\n" "+\tconst struct rio_device_id *id;\n" "+\n" "+\tif (!rdev->driver && rdrv->probe) {\n" "+\t\tif (!rdrv->id_table)\n" "+\t\t\treturn error;\n" - "+\t\tid =3D rio_match_device(rdrv->id_table, rdev);\n" + "+\t\tid = rio_match_device(rdrv->id_table, rdev);\n" "+\t\trio_dev_get(rdev);\n" "+\t\tif (id)\n" - "+\t\t\terror =3D rdrv->probe(rdev, id);\n" - "+\t\tif (error >=3D 0) {\n" - "+\t\t\trdev->driver =3D rdrv;\n" - "+\t\t\terror =3D 0;\n" + "+\t\t\terror = rdrv->probe(rdev, id);\n" + "+\t\tif (error >= 0) {\n" + "+\t\t\trdev->driver = rdrv;\n" + "+\t\t\terror = 0;\n" "+\t\t\trio_dev_put(rdev);\n" "+\t\t}\n" "+\t}\n" @@ -562,13 +549,13 @@ "+ */\n" "+static int rio_device_remove(struct device *dev)\n" "+{\n" - "+\tstruct rio_dev *rdev =3D to_rio_dev(dev);\n" - "+\tstruct rio_driver *rdrv =3D rdev->driver;\n" + "+\tstruct rio_dev *rdev = to_rio_dev(dev);\n" + "+\tstruct rio_driver *rdrv = rdev->driver;\n" "+\n" "+\tif (rdrv) {\n" "+\t\tif (rdrv->remove)\n" "+\t\t\trdrv->remove(rdev);\n" - "+\t\trdev->driver =3D NULL;\n" + "+\t\trdev->driver = NULL;\n" "+\t}\n" "+\n" "+\trio_dev_put(rdev);\n" @@ -588,10 +575,10 @@ "+int rio_register_driver(struct rio_driver *rdrv)\n" "+{\n" "+\t/* initialize common driver fields */\n" - "+\trdrv->driver.name =3D rdrv->name;\n" - "+\trdrv->driver.bus =3D &rio_bus_type;\n" - "+\trdrv->driver.probe =3D rio_device_probe;\n" - "+\trdrv->driver.remove =3D rio_device_remove;\n" + "+\trdrv->driver.name = rdrv->name;\n" + "+\trdrv->driver.bus = &rio_bus_type;\n" + "+\trdrv->driver.probe = rio_device_probe;\n" + "+\trdrv->driver.remove = rio_device_remove;\n" "+\n" "+\t/* register with core */\n" "+\treturn driver_register(&rdrv->driver);\n" @@ -624,15 +611,15 @@ "+ */\n" "+static int rio_match_bus(struct device *dev, struct device_driver *drv)\n" "+{\n" - "+\tstruct rio_dev *rdev =3D to_rio_dev(dev);\n" - "+\tstruct rio_driver *rdrv =3D to_rio_driver(drv);\n" - "+\tconst struct rio_device_id *id =3D rdrv->id_table;\n" + "+\tstruct rio_dev *rdev = to_rio_dev(dev);\n" + "+\tstruct rio_driver *rdrv = to_rio_driver(drv);\n" + "+\tconst struct rio_device_id *id = rdrv->id_table;\n" "+\tconst struct rio_device_id *found_id;\n" "+\n" "+\tif (!id)\n" "+\t\tgoto out;\n" "+\n" - "+\tfound_id =3D rio_match_device(id, rdev);\n" + "+\tfound_id = rio_match_device(id, rdev);\n" "+\n" "+\tif (found_id)\n" "+\t\treturn 1;\n" @@ -640,14 +627,14 @@ "+ out:return 0;\n" "+}\n" "+\n" - "+static struct device rio_bus =3D {\n" - "+\t.bus_id =3D \"rapidio\",\n" + "+static struct device rio_bus = {\n" + "+\t.bus_id = \"rapidio\",\n" "+};\n" "+\n" - "+struct bus_type rio_bus_type =3D {\n" - "+\t.name =3D \"rapidio\",\n" - "+\t.match =3D rio_match_bus,\n" - "+\t.dev_attrs =3D rio_dev_attrs\n" + "+struct bus_type rio_bus_type = {\n" + "+\t.name = \"rapidio\",\n" + "+\t.match = rio_match_bus,\n" + "+\t.dev_attrs = rio_dev_attrs\n" "+};\n" "+\n" "+/**\n" @@ -700,7 +687,7 @@ "+static ssize_t\t\t\t\t\t\t\t\t\\\n" "+\tfield##_show(struct device *dev, char *buf)\t\t\t\\\n" "+{\t\t\t\t\t\t\t\t\t\\\n" - "+\tstruct rio_dev *rdev =3D to_rio_dev(dev);\t\t\t\t\\\n" + "+\tstruct rio_dev *rdev = to_rio_dev(dev);\t\t\t\t\\\n" "+\t\t\t\t\t\t\t\t\t\\\n" "+\treturn sprintf(buf, format_string, rdev->field);\t\t\\\n" "+}\t\t\t\t\t\t\t\t\t\\\n" @@ -714,17 +701,17 @@ "+\n" "+static ssize_t routes_show(struct device *dev, char *buf)\n" "+{\n" - "+\tstruct rio_dev *rdev =3D to_rio_dev(dev);\n" - "+\tchar *str =3D buf;\n" + "+\tstruct rio_dev *rdev = to_rio_dev(dev);\n" + "+\tchar *str = buf;\n" "+\tint i;\n" "+\n" "+\tif (!rdev->rswitch)\n" "+\t\tgoto out;\n" "+\n" - "+\tfor (i =3D 0; i < RIO_MAX_ROUTE_ENTRIES; i++) {\n" - "+\t\tif (rdev->rswitch->route_table[i] =3D=3D RIO_INVALID_ROUTE)\n" + "+\tfor (i = 0; i < RIO_MAX_ROUTE_ENTRIES; i++) {\n" + "+\t\tif (rdev->rswitch->route_table[i] == RIO_INVALID_ROUTE)\n" "+\t\t\tcontinue;\n" - "+\t\tstr +=3D\n" + "+\t\tstr +=\n" "+\t\t sprintf(str, \"%04x %02x\\n\", i,\n" "+\t\t\t rdev->rswitch->route_table[i]);\n" "+\t}\n" @@ -733,7 +720,7 @@ "+\treturn (str - buf);\n" "+}\n" "+\n" - "+struct device_attribute rio_dev_attrs[] =3D {\n" + "+struct device_attribute rio_dev_attrs[] = {\n" "+\t__ATTR_RO(did),\n" "+\t__ATTR_RO(vid),\n" "+\t__ATTR_RO(device_rev),\n" @@ -747,29 +734,29 @@ "+static ssize_t\n" "+rio_read_config(struct kobject *kobj, char *buf, loff_t off, size_t count)\n" "+{\n" - "+\tstruct rio_dev *dev =3D\n" + "+\tstruct rio_dev *dev =\n" "+\t to_rio_dev(container_of(kobj, struct device, kobj));\n" - "+\tunsigned int size =3D 0x100;\n" - "+\tloff_t init_off =3D off;\n" - "+\tu8 *data =3D (u8 *) buf;\n" + "+\tunsigned int size = 0x100;\n" + "+\tloff_t init_off = off;\n" + "+\tu8 *data = (u8 *) buf;\n" "+\n" "+\t/* Several chips lock up trying to read undefined config space */\n" "+\tif (capable(CAP_SYS_ADMIN))\n" - "+\t\tsize =3D 0x200000;\n" + "+\t\tsize = 0x200000;\n" "+\n" "+\tif (off > size)\n" "+\t\treturn 0;\n" "+\tif (off + count > size) {\n" - "+\t\tsize -=3D off;\n" - "+\t\tcount =3D size;\n" + "+\t\tsize -= off;\n" + "+\t\tcount = size;\n" "+\t} else {\n" - "+\t\tsize =3D count;\n" + "+\t\tsize = count;\n" "+\t}\n" "+\n" "+\tif ((off & 1) && size) {\n" "+\t\tu8 val;\n" "+\t\trio_read_config_8(dev, off, &val);\n" - "+\t\tdata[off - init_off] =3D val;\n" + "+\t\tdata[off - init_off] = val;\n" "+\t\toff++;\n" "+\t\tsize--;\n" "+\t}\n" @@ -777,36 +764,36 @@ "+\tif ((off & 3) && size > 2) {\n" "+\t\tu16 val;\n" "+\t\trio_read_config_16(dev, off, &val);\n" - "+\t\tdata[off - init_off] =3D (val >> 8) & 0xff;\n" - "+\t\tdata[off - init_off + 1] =3D val & 0xff;\n" - "+\t\toff +=3D 2;\n" - "+\t\tsize -=3D 2;\n" + "+\t\tdata[off - init_off] = (val >> 8) & 0xff;\n" + "+\t\tdata[off - init_off + 1] = val & 0xff;\n" + "+\t\toff += 2;\n" + "+\t\tsize -= 2;\n" "+\t}\n" "+\n" "+\twhile (size > 3) {\n" "+\t\tu32 val;\n" "+\t\trio_read_config_32(dev, off, &val);\n" - "+\t\tdata[off - init_off] =3D (val >> 24) & 0xff;\n" - "+\t\tdata[off - init_off + 1] =3D (val >> 16) & 0xff;\n" - "+\t\tdata[off - init_off + 2] =3D (val >> 8) & 0xff;\n" - "+\t\tdata[off - init_off + 3] =3D val & 0xff;\n" - "+\t\toff +=3D 4;\n" - "+\t\tsize -=3D 4;\n" + "+\t\tdata[off - init_off] = (val >> 24) & 0xff;\n" + "+\t\tdata[off - init_off + 1] = (val >> 16) & 0xff;\n" + "+\t\tdata[off - init_off + 2] = (val >> 8) & 0xff;\n" + "+\t\tdata[off - init_off + 3] = val & 0xff;\n" + "+\t\toff += 4;\n" + "+\t\tsize -= 4;\n" "+\t}\n" "+\n" - "+\tif (size >=3D 2) {\n" + "+\tif (size >= 2) {\n" "+\t\tu16 val;\n" "+\t\trio_read_config_16(dev, off, &val);\n" - "+\t\tdata[off - init_off] =3D (val >> 8) & 0xff;\n" - "+\t\tdata[off - init_off + 1] =3D val & 0xff;\n" - "+\t\toff +=3D 2;\n" - "+\t\tsize -=3D 2;\n" + "+\t\tdata[off - init_off] = (val >> 8) & 0xff;\n" + "+\t\tdata[off - init_off + 1] = val & 0xff;\n" + "+\t\toff += 2;\n" + "+\t\tsize -= 2;\n" "+\t}\n" "+\n" "+\tif (size > 0) {\n" "+\t\tu8 val;\n" "+\t\trio_read_config_8(dev, off, &val);\n" - "+\t\tdata[off - init_off] =3D val;\n" + "+\t\tdata[off - init_off] = val;\n" "+\t\toff++;\n" "+\t\t--size;\n" "+\t}\n" @@ -817,17 +804,17 @@ "+static ssize_t\n" "+rio_write_config(struct kobject *kobj, char *buf, loff_t off, size_t count)\n" "+{\n" - "+\tstruct rio_dev *dev =3D\n" + "+\tstruct rio_dev *dev =\n" "+\t to_rio_dev(container_of(kobj, struct device, kobj));\n" - "+\tunsigned int size =3D count;\n" - "+\tloff_t init_off =3D off;\n" - "+\tu8 *data =3D (u8 *) buf;\n" + "+\tunsigned int size = count;\n" + "+\tloff_t init_off = off;\n" + "+\tu8 *data = (u8 *) buf;\n" "+\n" "+\tif (off > 0x200000)\n" "+\t\treturn 0;\n" "+\tif (off + count > 0x200000) {\n" - "+\t\tsize =3D 0x200000 - off;\n" - "+\t\tcount =3D size;\n" + "+\t\tsize = 0x200000 - off;\n" + "+\t\tcount = size;\n" "+\t}\n" "+\n" "+\tif ((off & 1) && size) {\n" @@ -837,29 +824,29 @@ "+\t}\n" "+\n" "+\tif ((off & 3) && (size > 2)) {\n" - "+\t\tu16 val =3D data[off - init_off + 1];\n" - "+\t\tval |=3D (u16) data[off - init_off] << 8;\n" + "+\t\tu16 val = data[off - init_off + 1];\n" + "+\t\tval |= (u16) data[off - init_off] << 8;\n" "+\t\trio_write_config_16(dev, off, val);\n" - "+\t\toff +=3D 2;\n" - "+\t\tsize -=3D 2;\n" + "+\t\toff += 2;\n" + "+\t\tsize -= 2;\n" "+\t}\n" "+\n" "+\twhile (size > 3) {\n" - "+\t\tu32 val =3D data[off - init_off + 3];\n" - "+\t\tval |=3D (u32) data[off - init_off + 2] << 8;\n" - "+\t\tval |=3D (u32) data[off - init_off + 1] << 16;\n" - "+\t\tval |=3D (u32) data[off - init_off] << 24;\n" + "+\t\tu32 val = data[off - init_off + 3];\n" + "+\t\tval |= (u32) data[off - init_off + 2] << 8;\n" + "+\t\tval |= (u32) data[off - init_off + 1] << 16;\n" + "+\t\tval |= (u32) data[off - init_off] << 24;\n" "+\t\trio_write_config_32(dev, off, val);\n" - "+\t\toff +=3D 4;\n" - "+\t\tsize -=3D 4;\n" + "+\t\toff += 4;\n" + "+\t\tsize -= 4;\n" "+\t}\n" "+\n" - "+\tif (size >=3D 2) {\n" - "+\t\tu16 val =3D data[off - init_off + 1];\n" - "+\t\tval |=3D (u16) data[off - init_off] << 8;\n" + "+\tif (size >= 2) {\n" + "+\t\tu16 val = data[off - init_off + 1];\n" + "+\t\tval |= (u16) data[off - init_off] << 8;\n" "+\t\trio_write_config_16(dev, off, val);\n" - "+\t\toff +=3D 2;\n" - "+\t\tsize -=3D 2;\n" + "+\t\toff += 2;\n" + "+\t\tsize -= 2;\n" "+\t}\n" "+\n" "+\tif (size) {\n" @@ -871,15 +858,15 @@ "+\treturn count;\n" "+}\n" "+\n" - "+static struct bin_attribute rio_config_attr =3D {\n" - "+\t.attr =3D {\n" - "+\t\t .name =3D \"config\",\n" - "+\t\t .mode =3D S_IRUGO | S_IWUSR,\n" - "+\t\t .owner =3D THIS_MODULE,\n" + "+static struct bin_attribute rio_config_attr = {\n" + "+\t.attr = {\n" + "+\t\t .name = \"config\",\n" + "+\t\t .mode = S_IRUGO | S_IWUSR,\n" + "+\t\t .owner = THIS_MODULE,\n" "+\t\t },\n" - "+\t.size =3D 0x200000,\n" - "+\t.read =3D rio_read_config,\n" - "+\t.write =3D rio_write_config,\n" + "+\t.size = 0x200000,\n" + "+\t.read = rio_read_config,\n" + "+\t.write = rio_write_config,\n" "+};\n" "+\n" "+/**\n" @@ -961,7 +948,7 @@ "+ * rio_request_inb_mbox - request inbound mailbox service\n" "+ * @mport: RIO master port from which to allocate the mailbox resource\n" "+ * @mbox: Mailbox number to claim\n" - "+ * @entries: Number of entries in inbound mailbox queue=20\n" + "+ * @entries: Number of entries in inbound mailbox queue \n" "+ * @minb: Callback to execute when inbound message is received\n" "+ *\n" "+ * Requests ownership of an inbound mailbox resource and binds\n" @@ -973,29 +960,29 @@ "+\t\t\t void (*minb) (struct rio_mport * mport, int mbox,\n" "+\t\t\t\t int slot))\n" "+{\n" - "+\tint rc =3D 0;\n" + "+\tint rc = 0;\n" "+\n" - "+\tstruct resource *res =3D kmalloc(sizeof(struct resource), GFP_KERNEL);\n" + "+\tstruct resource *res = kmalloc(sizeof(struct resource), GFP_KERNEL);\n" "+\n" "+\tif (res) {\n" "+\t\trio_init_mbox_res(res, mbox, mbox);\n" "+\n" "+\t\t/* Make sure this mailbox isn't in use */\n" - "+\t\tif ((rc =3D\n" + "+\t\tif ((rc =\n" "+\t\t request_resource(&mport->riores[RIO_INB_MBOX_RESOURCE],\n" "+\t\t\t\t res)) < 0) {\n" "+\t\t\tkfree(res);\n" "+\t\t\tgoto out;\n" "+\t\t}\n" "+\n" - "+\t\tmport->inb_msg[mbox].res =3D res;\n" + "+\t\tmport->inb_msg[mbox].res = res;\n" "+\n" "+\t\t/* Hook the inbound message callback */\n" - "+\t\tmport->inb_msg[mbox].mcback =3D minb;\n" + "+\t\tmport->inb_msg[mbox].mcback = minb;\n" "+\n" - "+\t\trc =3D rio_open_inb_mbox(mport, mbox, entries);\n" + "+\t\trc = rio_open_inb_mbox(mport, mbox, entries);\n" "+\t} else\n" - "+\t\trc =3D -ENOMEM;\n" + "+\t\trc = -ENOMEM;\n" "+\n" "+ out:\n" "+\treturn rc;\n" @@ -1021,7 +1008,7 @@ "+ * rio_request_outb_mbox - request outbound mailbox service\n" "+ * @mport: RIO master port from which to allocate the mailbox resource\n" "+ * @mbox: Mailbox number to claim\n" - "+ * @entries: Number of entries in outbound mailbox queue=20\n" + "+ * @entries: Number of entries in outbound mailbox queue \n" "+ * @moutb: Callback to execute when outbound message is sent\n" "+ *\n" "+ * Requests ownership of an outbound mailbox resource and binds\n" @@ -1033,29 +1020,29 @@ "+\t\t\t void (*moutb) (struct rio_mport * mport, int mbox,\n" "+\t\t\t\t\t int slot))\n" "+{\n" - "+\tint rc =3D 0;\n" + "+\tint rc = 0;\n" "+\n" - "+\tstruct resource *res =3D kmalloc(sizeof(struct resource), GFP_KERNEL);\n" + "+\tstruct resource *res = kmalloc(sizeof(struct resource), GFP_KERNEL);\n" "+\n" "+\tif (res) {\n" "+\t\trio_init_mbox_res(res, mbox, mbox);\n" "+\n" "+\t\t/* Make sure this outbound mailbox isn't in use */\n" - "+\t\tif ((rc =3D\n" + "+\t\tif ((rc =\n" "+\t\t request_resource(&mport->riores[RIO_OUTB_MBOX_RESOURCE],\n" "+\t\t\t\t res)) < 0) {\n" "+\t\t\tkfree(res);\n" "+\t\t\tgoto out;\n" "+\t\t}\n" "+\n" - "+\t\tmport->outb_msg[mbox].res =3D res;\n" + "+\t\tmport->outb_msg[mbox].res = res;\n" "+\n" "+\t\t/* Hook the inbound message callback */\n" - "+\t\tmport->outb_msg[mbox].mcback =3D moutb;\n" + "+\t\tmport->outb_msg[mbox].mcback = moutb;\n" "+\n" - "+\t\trc =3D rio_open_outb_mbox(mport, mbox, entries);\n" + "+\t\trc = rio_open_outb_mbox(mport, mbox, entries);\n" "+\t} else\n" - "+\t\trc =3D -ENOMEM;\n" + "+\t\trc = -ENOMEM;\n" "+\n" "+ out:\n" "+\treturn rc;\n" @@ -1092,16 +1079,16 @@ "+\t\t void (*dinb) (struct rio_mport * mport, u16 src, u16 dst,\n" "+\t\t\t\t u16 info))\n" "+{\n" - "+\tint rc =3D 0;\n" + "+\tint rc = 0;\n" "+\tstruct rio_dbell *dbell;\n" "+\n" - "+\tif (!(dbell =3D kmalloc(sizeof(struct rio_dbell), GFP_KERNEL))) {\n" - "+\t\trc =3D -ENOMEM;\n" + "+\tif (!(dbell = kmalloc(sizeof(struct rio_dbell), GFP_KERNEL))) {\n" + "+\t\trc = -ENOMEM;\n" "+\t\tgoto out;\n" "+\t}\n" "+\n" - "+\tdbell->res =3D res;\n" - "+\tdbell->dinb =3D dinb;\n" + "+\tdbell->res = res;\n" + "+\tdbell->dinb = dinb;\n" "+\n" "+\tlist_add_tail(&dbell->node, &mport->dbells);\n" "+\n" @@ -1126,15 +1113,15 @@ "+\t\t\t void (*dinb) (struct rio_mport * mport, u16 src,\n" "+\t\t\t\t\tu16 dst, u16 info))\n" "+{\n" - "+\tint rc =3D 0;\n" + "+\tint rc = 0;\n" "+\n" - "+\tstruct resource *res =3D kmalloc(sizeof(struct resource), GFP_KERNEL);\n" + "+\tstruct resource *res = kmalloc(sizeof(struct resource), GFP_KERNEL);\n" "+\n" "+\tif (res) {\n" "+\t\trio_init_dbell_res(res, start, end);\n" "+\n" "+\t\t/* Make sure these doorbells aren't in use */\n" - "+\t\tif ((rc =3D\n" + "+\t\tif ((rc =\n" "+\t\t request_resource(&mport->riores[RIO_DOORBELL_RESOURCE],\n" "+\t\t\t\t res)) < 0) {\n" "+\t\t\tkfree(res);\n" @@ -1142,9 +1129,9 @@ "+\t\t}\n" "+\n" "+\t\t/* Hook the doorbell callback */\n" - "+\t\trc =3D rio_setup_inb_dbell(mport, res, dinb);\n" + "+\t\trc = rio_setup_inb_dbell(mport, res, dinb);\n" "+\t} else\n" - "+\t\trc =3D -ENOMEM;\n" + "+\t\trc = -ENOMEM;\n" "+\n" "+ out:\n" "+\treturn rc;\n" @@ -1162,19 +1149,19 @@ "+ */\n" "+int rio_release_inb_dbell(struct rio_mport *mport, u16 start, u16 end)\n" "+{\n" - "+\tint rc =3D 0, found =3D 0;\n" + "+\tint rc = 0, found = 0;\n" "+\tstruct rio_dbell *dbell;\n" "+\n" "+\tlist_for_each_entry(dbell, &mport->dbells, node) {\n" - "+\t\tif ((dbell->res->start =3D=3D start) && (dbell->res->end =3D=3D end)) {\n" - "+\t\t\tfound =3D 1;\n" + "+\t\tif ((dbell->res->start == start) && (dbell->res->end == end)) {\n" + "+\t\t\tfound = 1;\n" "+\t\t\tbreak;\n" "+\t\t}\n" "+\t}\n" "+\n" "+\t/* If we can't find an exact match, fail */\n" "+\tif (!found) {\n" - "+\t\trc =3D -EINVAL;\n" + "+\t\trc = -EINVAL;\n" "+\t\tgoto out;\n" "+\t}\n" "+\n" @@ -1182,7 +1169,7 @@ "+\tlist_del(&dbell->node);\n" "+\n" "+\t/* Release the doorbell resource */\n" - "+\trc =3D release_resource(dbell->res);\n" + "+\trc = release_resource(dbell->res);\n" "+\n" "+\t/* Free the doorbell event */\n" "+\tkfree(dbell);\n" @@ -1203,7 +1190,7 @@ "+struct resource *rio_request_outb_dbell(struct rio_dev *rdev, u16 start,\n" "+\t\t\t\t\tu16 end)\n" "+{\n" - "+\tstruct resource *res =3D kmalloc(sizeof(struct resource), GFP_KERNEL);\n" + "+\tstruct resource *res = kmalloc(sizeof(struct resource), GFP_KERNEL);\n" "+\n" "+\tif (res) {\n" "+\t\trio_init_dbell_res(res, start, end);\n" @@ -1212,7 +1199,7 @@ "+\t\tif (request_resource(&rdev->riores[RIO_DOORBELL_RESOURCE], res)\n" "+\t\t < 0) {\n" "+\t\t\tkfree(res);\n" - "+\t\t\tres =3D NULL;\n" + "+\t\t\tres = NULL;\n" "+\t\t}\n" "+\t}\n" "+\n" @@ -1229,7 +1216,7 @@ "+ */\n" "+int rio_release_outb_dbell(struct rio_dev *rdev, struct resource *res)\n" "+{\n" - "+\tint rc =3D release_resource(res);\n" + "+\tint rc = release_resource(res);\n" "+\n" "+\tkfree(res);\n" "+\n" @@ -1274,7 +1261,7 @@ "+\t\trio_mport_read_config_32(port, destid, hopcount,\n" "+\t\t\t\t\t RIO_ASM_INFO_CAR, &asm_info);\n" "+\n" - "+\text_ftr_ptr =3D asm_info & RIO_EXT_FTR_PTR_MASK;\n" + "+\text_ftr_ptr = asm_info & RIO_EXT_FTR_PTR_MASK;\n" "+\n" "+\twhile (ext_ftr_ptr) {\n" "+\t\tif (local)\n" @@ -1283,9 +1270,9 @@ "+\t\telse\n" "+\t\t\trio_mport_read_config_32(port, destid, hopcount,\n" "+\t\t\t\t\t\t ext_ftr_ptr, &ftr_header);\n" - "+\t\tif (RIO_GET_BLOCK_ID(ftr_header) =3D=3D ftr)\n" + "+\t\tif (RIO_GET_BLOCK_ID(ftr_header) == ftr)\n" "+\t\t\treturn ext_ftr_ptr;\n" - "+\t\tif (!(ext_ftr_ptr =3D RIO_GET_BLOCK_PTR(ftr_header)))\n" + "+\t\tif (!(ext_ftr_ptr = RIO_GET_BLOCK_PTR(ftr_header)))\n" "+\t\t\tbreak;\n" "+\t}\n" "+\n" @@ -1293,8 +1280,7 @@ "+}\n" "+\n" "+/**\n" - "+ * rio_get_asm - Begin or continue searching for a RIO device by vid/did/a=\n" - "sm_vid/asm_did\n" + "+ * rio_get_asm - Begin or continue searching for a RIO device by vid/did/asm_vid/asm_did\n" "+ * @vid: RIO vid to match or %RIO_ANY_ID to match all vids\n" "+ * @did: RIO did to match or %RIO_ANY_ID to match all dids\n" "+ * @asm_vid: RIO asm_vid to match or %RIO_ANY_ID to match all asm_vids\n" @@ -1318,21 +1304,21 @@ "+\n" "+\tWARN_ON(in_interrupt());\n" "+\tspin_lock(&rio_global_list_lock);\n" - "+\tn =3D from ? from->global_list.next : rio_devices.next;\n" - "+\n" - "+\twhile (n && (n !=3D &rio_devices)) {\n" - "+\t\trdev =3D rio_dev_g(n);\n" - "+\t\tif ((vid =3D=3D RIO_ANY_ID || rdev->vid =3D=3D vid) &&\n" - "+\t\t (did =3D=3D RIO_ANY_ID || rdev->did =3D=3D did) &&\n" - "+\t\t (asm_vid =3D=3D RIO_ANY_ID || rdev->asm_vid =3D=3D asm_vid) &&\n" - "+\t\t (asm_did =3D=3D RIO_ANY_ID || rdev->asm_did =3D=3D asm_did))\n" + "+\tn = from ? from->global_list.next : rio_devices.next;\n" + "+\n" + "+\twhile (n && (n != &rio_devices)) {\n" + "+\t\trdev = rio_dev_g(n);\n" + "+\t\tif ((vid == RIO_ANY_ID || rdev->vid == vid) &&\n" + "+\t\t (did == RIO_ANY_ID || rdev->did == did) &&\n" + "+\t\t (asm_vid == RIO_ANY_ID || rdev->asm_vid == asm_vid) &&\n" + "+\t\t (asm_did == RIO_ANY_ID || rdev->asm_did == asm_did))\n" "+\t\t\tgoto exit;\n" - "+\t\tn =3D n->next;\n" + "+\t\tn = n->next;\n" "+\t}\n" - "+\trdev =3D NULL;\n" + "+\trdev = NULL;\n" "+ exit:\n" "+\trio_dev_put(from);\n" - "+\trdev =3D rio_dev_get(rdev);\n" + "+\trdev = rio_dev_get(rdev);\n" "+\tspin_unlock(&rio_global_list_lock);\n" "+\treturn rdev;\n" "+}\n" @@ -1362,9 +1348,9 @@ "+\n" "+static int __devinit rio_init(void)\n" "+{\n" - "+\tstruct rio_dev *dev =3D NULL;\n" + "+\tstruct rio_dev *dev = NULL;\n" "+\n" - "+\twhile ((dev =3D rio_get_device(RIO_ANY_ID, RIO_ANY_ID, dev)) !=3D NULL) {\n" + "+\twhile ((dev = rio_get_device(RIO_ANY_ID, RIO_ANY_ID, dev)) != NULL) {\n" "+\t\trio_fixup_device(dev);\n" "+\t}\n" "+\treturn 0;\n" @@ -1374,7 +1360,7 @@ "+\n" "+int rio_init_mports(void)\n" "+{\n" - "+\tint rc =3D 0;\n" + "+\tint rc = 0;\n" "+\tstruct rio_mport *port;\n" "+\n" "+\tlist_for_each_entry(port, &rio_mports, node) {\n" @@ -1384,11 +1370,11 @@ "+\t\t\tprintk(KERN_ERR\n" "+\t\t\t \"RIO: Error requesting master port region %8.8lx-%8.8lx\\n\",\n" "+\t\t\t port->iores.start, port->iores.end - 1);\n" - "+\t\t\trc =3D -ENOMEM;\n" + "+\t\t\trc = -ENOMEM;\n" "+\t\t\tgoto out;\n" "+\t\t}\n" "+\n" - "+\t\tif (port->host_deviceid >=3D 0)\n" + "+\t\tif (port->host_deviceid >= 0)\n" "+\t\t\trio_enum_mport(port);\n" "+\t\telse\n" "+\t\t\trio_disc_mport(port);\n" @@ -1437,8 +1423,7 @@ "+\n" "+/* Functions internal to the RIO core code */\n" "+\n" - "+extern u32 rio_mport_get_feature(struct rio_mport *mport, int local, u16 d=\n" - "estid,\n" + "+extern u32 rio_mport_get_feature(struct rio_mport *mport, int local, u16 destid,\n" "+\t\t\t\t u8 hopcount, int ftr);\n" "+extern int rio_create_sysfs_dev_files(struct rio_dev *rdev);\n" "+extern int rio_enum_mport(struct rio_mport *mport);\n" @@ -1451,8 +1436,7 @@ "+/* Helpers internal to the RIO core code */\n" "+#define DECLARE_RIO_ROUTE_SECTION(section, vid, did, add_hook, get_hook) \\\n" "+ static struct rio_route_ops __rio_route_ops __attribute_used__ \\\n" - "+\t __attribute__((__section__(#section))) =3D { vid, did, add_hook, =\n" - "get_hook };\n" + "+\t __attribute__((__section__(#section))) = { vid, did, add_hook, get_hook };\n" "+\n" "+/**\n" "+ * DECLARE_RIO_ROUTE_OPS - Registers switch routing operations\n" @@ -1478,23 +1462,22 @@ "+#define RIO_GET_DID(x)\t(x & 0xffff)\n" "+#define RIO_SET_DID(x)\t(x & 0xffff)\n" "+#endif\n" - "diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinu=\n" - "x.lds.h\n" + "diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h\n" "--- a/include/asm-generic/vmlinux.lds.h\n" "+++ b/include/asm-generic/vmlinux.lds.h\n" "@@ -32,6 +32,13 @@\n" - " \t\tVMLINUX_SYMBOL(__end_pci_fixups_enable) =3D .;\t\t\\\n" + " \t\tVMLINUX_SYMBOL(__end_pci_fixups_enable) = .;\t\t\\\n" " \t}\t\t\t\t\t\t\t\t\\\n" " \t\t\t\t\t\t\t\t\t\\\n" "+\t/* RapidIO route ops */\t\t\t\t\t\t\\\n" "+\t.rio_route : AT(ADDR(.rio_route) - LOAD_OFFSET) {\t\\\n" - "+\t\tVMLINUX_SYMBOL(__start_rio_route_ops) =3D .;\t\t\\\n" + "+\t\tVMLINUX_SYMBOL(__start_rio_route_ops) = .;\t\t\\\n" "+\t\t*(.rio_route_ops)\t\t\t\t\t\\\n" - "+\t\tVMLINUX_SYMBOL(__end_rio_route_ops) =3D .;\t\t\\\n" + "+\t\tVMLINUX_SYMBOL(__end_rio_route_ops) = .;\t\t\\\n" "+\t}\t\t\t\t\t\t\t\t\\\n" "+\t\t\t\t\t\t\t\t\t\\\n" " \t/* Kernel symbol table: Normal symbols */\t\t\t\\\n" " \t__ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) {\t\t\\\n" - " \t\tVMLINUX_SYMBOL(__start___ksymtab) =3D .;\t\t\t\\" + " \t\tVMLINUX_SYMBOL(__start___ksymtab) = .;\t\t\t\\" -c28129f71a7140d06efa0dd449ee4a4bb5046967aed466f9a4bbefb044305ccc +8ea43ad0272eab8cc053dfa2ee332a9fe04889886e58b9ca4e0259373f169977
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.