diff options
author | Luka Perkov <luka@openwrt.org> | 2014-02-11 02:07:44 +0000 |
---|---|---|
committer | Luka Perkov <luka@openwrt.org> | 2014-02-11 02:07:44 +0000 |
commit | 5b5ad5ba01cebe6a749bcf5c9fc9637876fe0b1f (patch) | |
tree | 8b031a68c4ff6c7457830843adc41d49f0ab2d5f /target/linux/mvebu/patches-3.10/0181-of-Fix-dereferencing-node-name-in-debug-output-to-be.patch | |
parent | 608ad4b6932f72995144bc72a31b1e0843a5bb28 (diff) | |
download | upstream-5b5ad5ba01cebe6a749bcf5c9fc9637876fe0b1f.tar.gz upstream-5b5ad5ba01cebe6a749bcf5c9fc9637876fe0b1f.tar.bz2 upstream-5b5ad5ba01cebe6a749bcf5c9fc9637876fe0b1f.zip |
mvebu: backport mainline patches from kernel 3.13
This is a backport of the patches accepted to the Linux mainline related to
mvebu SoC (Armada XP and Armada 370) between Linux v3.12, and Linux v3.13.
This work mainly covers:
* Finishes work for sharing the pxa nand driver(drivers/mtd/nand/pxa3xx_nand.c)
between the PXA family, and the Armada family.
* timer initialization update, and access function for the Armada family.
* Generic IRQ handling backporting.
* Some bug fixes.
Signed-off-by: Seif Mazareeb <seif.mazareeb@gmail.com>
CC: Luka Perkov <luka@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39566 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/mvebu/patches-3.10/0181-of-Fix-dereferencing-node-name-in-debug-output-to-be.patch')
-rw-r--r-- | target/linux/mvebu/patches-3.10/0181-of-Fix-dereferencing-node-name-in-debug-output-to-be.patch | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-3.10/0181-of-Fix-dereferencing-node-name-in-debug-output-to-be.patch b/target/linux/mvebu/patches-3.10/0181-of-Fix-dereferencing-node-name-in-debug-output-to-be.patch new file mode 100644 index 0000000000..ce62d531c2 --- /dev/null +++ b/target/linux/mvebu/patches-3.10/0181-of-Fix-dereferencing-node-name-in-debug-output-to-be.patch @@ -0,0 +1,82 @@ +From 02abb20a226a5a1e5c6dfaaf765dd71a90200cf9 Mon Sep 17 00:00:00 2001 +From: Grant Likely <grant.likely@linaro.org> +Date: Thu, 19 Dec 2013 09:30:52 -0300 +Subject: [PATCH 181/203] of: Fix dereferencing node name in debug output to be + safe + +Several locations in the of_address and of_irq code dereference the +full_name parameter from a device_node pointer without checking if the +pointer is valid. This patch switches to use of_node_full_name() which +always checks the pointer. + +Signed-off-by: Grant Likely <grant.likely@linaro.org> +--- + drivers/of/address.c | 6 +++--- + drivers/of/irq.c | 8 ++++---- + 2 files changed, 7 insertions(+), 7 deletions(-) + +--- a/drivers/of/address.c ++++ b/drivers/of/address.c +@@ -481,7 +481,7 @@ static u64 __of_translate_address(struct + int na, ns, pna, pns; + u64 result = OF_BAD_ADDR; + +- pr_debug("OF: ** translation for device %s **\n", dev->full_name); ++ pr_debug("OF: ** translation for device %s **\n", of_node_full_name(dev)); + + /* Increase refcount at current level */ + of_node_get(dev); +@@ -496,13 +496,13 @@ static u64 __of_translate_address(struct + bus->count_cells(dev, &na, &ns); + if (!OF_CHECK_COUNTS(na, ns)) { + printk(KERN_ERR "prom_parse: Bad cell count for %s\n", +- dev->full_name); ++ of_node_full_name(dev)); + goto bail; + } + memcpy(addr, in_addr, na * 4); + + pr_debug("OF: bus is %s (na=%d, ns=%d) on %s\n", +- bus->name, na, ns, parent->full_name); ++ bus->name, na, ns, of_node_full_name(parent)); + of_dump_addr("OF: translating address:", addr, na); + + /* Translate */ +--- a/drivers/of/irq.c ++++ b/drivers/of/irq.c +@@ -102,7 +102,7 @@ int of_irq_map_raw(struct device_node *p + int imaplen, match, i; + + pr_debug("of_irq_map_raw: par=%s,intspec=[0x%08x 0x%08x...],ointsize=%d\n", +- parent->full_name, be32_to_cpup(intspec), ++ of_node_full_name(parent), be32_to_cpup(intspec), + be32_to_cpup(intspec + 1), ointsize); + + ipar = of_node_get(parent); +@@ -126,7 +126,7 @@ int of_irq_map_raw(struct device_node *p + goto fail; + } + +- pr_debug("of_irq_map_raw: ipar=%s, size=%d\n", ipar->full_name, intsize); ++ pr_debug("of_irq_map_raw: ipar=%s, size=%d\n", of_node_full_name(ipar), intsize); + + if (ointsize != intsize) + return -EINVAL; +@@ -287,7 +287,7 @@ int of_irq_map_one(struct device_node *d + u32 intsize, intlen; + int res = -EINVAL; + +- pr_debug("of_irq_map_one: dev=%s, index=%d\n", device->full_name, index); ++ pr_debug("of_irq_map_one: dev=%s, index=%d\n", of_node_full_name(device), index); + + /* OldWorld mac stuff is "special", handle out of line */ + if (of_irq_workarounds & OF_IMAP_OLDWORLD_MAC) +@@ -361,7 +361,7 @@ int of_irq_to_resource(struct device_nod + + r->start = r->end = irq; + r->flags = IORESOURCE_IRQ; +- r->name = name ? name : dev->full_name; ++ r->name = name ? name : of_node_full_name(dev); + } + + return irq; |