diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-12-30 17:31:11 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-12-30 17:31:11 -0500 |
| commit | 71ce176ee6ed1735b9a1160a5704a915d13849b1 (patch) | |
| tree | b3c8765d428d0245593c576cb1b3d02900cf7157 | |
| parent | 6e4c61968beb641e8372733e4a0c0cdee720e675 (diff) | |
| parent | f0082e3cf70e19dce4e96494078ec3ddb89550d3 (diff) | |
Merge tag 'dt-fixes-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull devicetree fixes from Rob Herring:
- Fix 2 regressions found on PPC
- Allow NULL ptr in unflatten_and_copy_device_tree
- Update my email address
* tag 'dt-fixes-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
MAINTAINERS: Update Rob Herring's email address
of/irq: Fix device_node refcount in of_irq_parse_raw()
of/Kconfig: Spelling s/one/once/
Revert "of/address: Handle #address-cells > 2 specially"
of: Fix NULL dereference in unflatten_and_copy()
| -rw-r--r-- | MAINTAINERS | 6 | ||||
| -rw-r--r-- | drivers/of/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/of/address.c | 8 | ||||
| -rw-r--r-- | drivers/of/fdt.c | 12 | ||||
| -rw-r--r-- | drivers/of/irq.c | 5 |
5 files changed, 15 insertions, 18 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index d5e4ff328cc7..21c038f216e3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -783,7 +783,7 @@ F: arch/arm/boot/dts/sama*.dts | |||
| 783 | F: arch/arm/boot/dts/sama*.dtsi | 783 | F: arch/arm/boot/dts/sama*.dtsi |
| 784 | 784 | ||
| 785 | ARM/CALXEDA HIGHBANK ARCHITECTURE | 785 | ARM/CALXEDA HIGHBANK ARCHITECTURE |
| 786 | M: Rob Herring <rob.herring@calxeda.com> | 786 | M: Rob Herring <robh@kernel.org> |
| 787 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 787 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 788 | S: Maintained | 788 | S: Maintained |
| 789 | F: arch/arm/mach-highbank/ | 789 | F: arch/arm/mach-highbank/ |
| @@ -6256,7 +6256,7 @@ F: drivers/i2c/busses/i2c-ocores.c | |||
| 6256 | 6256 | ||
| 6257 | OPEN FIRMWARE AND FLATTENED DEVICE TREE | 6257 | OPEN FIRMWARE AND FLATTENED DEVICE TREE |
| 6258 | M: Grant Likely <grant.likely@linaro.org> | 6258 | M: Grant Likely <grant.likely@linaro.org> |
| 6259 | M: Rob Herring <rob.herring@calxeda.com> | 6259 | M: Rob Herring <robh+dt@kernel.org> |
| 6260 | L: devicetree@vger.kernel.org | 6260 | L: devicetree@vger.kernel.org |
| 6261 | W: http://fdt.secretlab.ca | 6261 | W: http://fdt.secretlab.ca |
| 6262 | T: git git://git.secretlab.ca/git/linux-2.6.git | 6262 | T: git git://git.secretlab.ca/git/linux-2.6.git |
| @@ -6268,7 +6268,7 @@ K: of_get_property | |||
| 6268 | K: of_match_table | 6268 | K: of_match_table |
| 6269 | 6269 | ||
| 6270 | OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS | 6270 | OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS |
| 6271 | M: Rob Herring <rob.herring@calxeda.com> | 6271 | M: Rob Herring <robh+dt@kernel.org> |
| 6272 | M: Pawel Moll <pawel.moll@arm.com> | 6272 | M: Pawel Moll <pawel.moll@arm.com> |
| 6273 | M: Mark Rutland <mark.rutland@arm.com> | 6273 | M: Mark Rutland <mark.rutland@arm.com> |
| 6274 | M: Ian Campbell <ijc+devicetree@hellion.org.uk> | 6274 | M: Ian Campbell <ijc+devicetree@hellion.org.uk> |
diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index de6f8990246f..c6973f101a3e 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig | |||
| @@ -20,7 +20,7 @@ config OF_SELFTEST | |||
| 20 | depends on OF_IRQ | 20 | depends on OF_IRQ |
| 21 | help | 21 | help |
| 22 | This option builds in test cases for the device tree infrastructure | 22 | This option builds in test cases for the device tree infrastructure |
| 23 | that are executed one at boot time, and the results dumped to the | 23 | that are executed once at boot time, and the results dumped to the |
| 24 | console. | 24 | console. |
| 25 | 25 | ||
| 26 | If unsure, say N here, but this option is safe to enable. | 26 | If unsure, say N here, but this option is safe to enable. |
diff --git a/drivers/of/address.c b/drivers/of/address.c index 4b9317bdb81c..d3dd41c840f1 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c | |||
| @@ -69,14 +69,6 @@ static u64 of_bus_default_map(__be32 *addr, const __be32 *range, | |||
| 69 | (unsigned long long)cp, (unsigned long long)s, | 69 | (unsigned long long)cp, (unsigned long long)s, |
| 70 | (unsigned long long)da); | 70 | (unsigned long long)da); |
| 71 | 71 | ||
| 72 | /* | ||
| 73 | * If the number of address cells is larger than 2 we assume the | ||
| 74 | * mapping doesn't specify a physical address. Rather, the address | ||
| 75 | * specifies an identifier that must match exactly. | ||
| 76 | */ | ||
| 77 | if (na > 2 && memcmp(range, addr, na * 4) != 0) | ||
| 78 | return OF_BAD_ADDR; | ||
| 79 | |||
| 80 | if (da < cp || da >= (cp + s)) | 72 | if (da < cp || da >= (cp + s)) |
| 81 | return OF_BAD_ADDR; | 73 | return OF_BAD_ADDR; |
| 82 | return da - cp; | 74 | return da - cp; |
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 2fa024b97c43..758b4f8b30b7 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
| @@ -922,8 +922,16 @@ void __init unflatten_device_tree(void) | |||
| 922 | */ | 922 | */ |
| 923 | void __init unflatten_and_copy_device_tree(void) | 923 | void __init unflatten_and_copy_device_tree(void) |
| 924 | { | 924 | { |
| 925 | int size = __be32_to_cpu(initial_boot_params->totalsize); | 925 | int size; |
| 926 | void *dt = early_init_dt_alloc_memory_arch(size, | 926 | void *dt; |
| 927 | |||
| 928 | if (!initial_boot_params) { | ||
| 929 | pr_warn("No valid device tree found, continuing without\n"); | ||
| 930 | return; | ||
| 931 | } | ||
| 932 | |||
| 933 | size = __be32_to_cpu(initial_boot_params->totalsize); | ||
| 934 | dt = early_init_dt_alloc_memory_arch(size, | ||
| 927 | __alignof__(struct boot_param_header)); | 935 | __alignof__(struct boot_param_header)); |
| 928 | 936 | ||
| 929 | if (dt) { | 937 | if (dt) { |
diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 786b0b47fae4..27212402c532 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c | |||
| @@ -165,7 +165,6 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq) | |||
| 165 | if (of_get_property(ipar, "interrupt-controller", NULL) != | 165 | if (of_get_property(ipar, "interrupt-controller", NULL) != |
| 166 | NULL) { | 166 | NULL) { |
| 167 | pr_debug(" -> got it !\n"); | 167 | pr_debug(" -> got it !\n"); |
| 168 | of_node_put(old); | ||
| 169 | return 0; | 168 | return 0; |
| 170 | } | 169 | } |
| 171 | 170 | ||
| @@ -250,8 +249,7 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq) | |||
| 250 | * Successfully parsed an interrrupt-map translation; copy new | 249 | * Successfully parsed an interrrupt-map translation; copy new |
| 251 | * interrupt specifier into the out_irq structure | 250 | * interrupt specifier into the out_irq structure |
| 252 | */ | 251 | */ |
| 253 | of_node_put(out_irq->np); | 252 | out_irq->np = newpar; |
| 254 | out_irq->np = of_node_get(newpar); | ||
| 255 | 253 | ||
| 256 | match_array = imap - newaddrsize - newintsize; | 254 | match_array = imap - newaddrsize - newintsize; |
| 257 | for (i = 0; i < newintsize; i++) | 255 | for (i = 0; i < newintsize; i++) |
| @@ -268,7 +266,6 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq) | |||
| 268 | } | 266 | } |
| 269 | fail: | 267 | fail: |
| 270 | of_node_put(ipar); | 268 | of_node_put(ipar); |
| 271 | of_node_put(out_irq->np); | ||
| 272 | of_node_put(newpar); | 269 | of_node_put(newpar); |
| 273 | 270 | ||
| 274 | return -EINVAL; | 271 | return -EINVAL; |
