<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/of, branch v4.9.43</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.43</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.43'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-07-27T22:08:08Z</updated>
<entry>
<title>of: device: Export of_device_{get_modalias, uvent_modalias} to modules</title>
<updated>2017-07-27T22:08:08Z</updated>
<author>
<name>Stephen Boyd</name>
<email>stephen.boyd@linaro.org</email>
</author>
<published>2016-12-28T22:56:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a18935b45e9700b5d21fce80ea82c1cb5efb4f9e'/>
<id>urn:sha1:a18935b45e9700b5d21fce80ea82c1cb5efb4f9e</id>
<content type='text'>
commit 7a3b7cd332db08546f3cdd984f11773e0d1999e7 upstream.

The ULPI bus can be built as a module, and it will soon be
calling these functions when it supports probing devices from DT.
Export them so they can be used by the ULPI module.

Acked-by: Rob Herring &lt;robh@kernel.org&gt;
Cc: &lt;devicetree@vger.kernel.org&gt;
Signed-off-by: Stephen Boyd &lt;stephen.boyd@linaro.org&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>of: Add check to of_scan_flat_dt() before accessing initial_boot_params</title>
<updated>2017-06-29T11:00:31Z</updated>
<author>
<name>Tobias Wolf</name>
<email>dev-NTEO@vplace.de</email>
</author>
<published>2016-11-23T09:40:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dcd015f733a74552eeefc5d70f55125c33eaa5d2'/>
<id>urn:sha1:dcd015f733a74552eeefc5d70f55125c33eaa5d2</id>
<content type='text'>
commit 3ec754410cb3e931a6c4920b1a150f21a94a2bf4 upstream.

An empty __dtb_start to __dtb_end section might result in
initial_boot_params being null for arch/mips/ralink. This showed that the
boot process hangs indefinitely in of_scan_flat_dt().

Signed-off-by: Tobias Wolf &lt;dev-NTEO@vplace.de&gt;
Cc: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14605/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Signed-off-by: Amit Pundir &lt;amit.pundir@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>of: fdt: add missing allocation-failure check</title>
<updated>2017-05-25T13:44:37Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-05-17T15:29:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9907c838fc0700de8a614587cc58490c54fd4551'/>
<id>urn:sha1:9907c838fc0700de8a614587cc58490c54fd4551</id>
<content type='text'>
commit 49e67dd17649b60b4d54966e18ec9c80198227f0 upstream.

The memory allocator passed to __unflatten_device_tree() (e.g. a wrapped
kzalloc) can fail so add the missing sanity check to avoid dereferencing
a NULL pointer.

Fixes: fe14042358fa ("of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree")
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>of: fix "/cpus" reference leak in of_numa_parse_cpu_nodes()</title>
<updated>2017-05-25T13:44:37Z</updated>
<author>
<name>Tyrel Datwyler</name>
<email>tyreld@linux.vnet.ibm.com</email>
</author>
<published>2017-04-18T00:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=80cdf2065bf0e10862b400715672555ef3e49a3e'/>
<id>urn:sha1:80cdf2065bf0e10862b400715672555ef3e49a3e</id>
<content type='text'>
commit b8475cbee5ab2eac05f9cd5dbcc94c453d3cbf10 upstream.

The call to of_find_node_by_path("/cpus") returns the cpus device_node
with its reference count incremented. There is no matching of_node_put()
call in of_numa_parse_cpu_nodes() which results in a leaked reference
to the "/cpus" node.

This patch adds an of_node_put() to release the reference.

fixes: 298535c00a2c ("of, numa: Add NUMA of binding implementation.")
Signed-off-by: Tyrel Datwyler &lt;tyreld@linux.vnet.ibm.com&gt;
Acked-by: David Daney &lt;david.daney@cavium.com&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>of: fix sparse warning in of_pci_range_parser_one</title>
<updated>2017-05-25T13:44:37Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2017-05-04T17:34:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ae5074ba9ef8043e17a13c32402e7a80ef7aafb4'/>
<id>urn:sha1:ae5074ba9ef8043e17a13c32402e7a80ef7aafb4</id>
<content type='text'>
commit eb3100365791b06242b8bb5c3c2854ba41dabfbc upstream.

sparse gives the following warning for 'pci_space':

../drivers/of/address.c:266:26: warning: incorrect type in assignment (different base types)
../drivers/of/address.c:266:26:    expected unsigned int [unsigned] [usertype] pci_space
../drivers/of/address.c:266:26:    got restricted __be32 const [usertype] &lt;noident&gt;

It appears that pci_space is only ever accessed on powerpc, so the endian
swap is often not needed.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>of, numa: Return NUMA_NO_NODE from disable of_node_to_nid() if nid not possible.</title>
<updated>2017-01-09T07:32:25Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2016-10-28T21:15:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6838ac125324b91eeab5ccaf99e4a9bd1f8a7895'/>
<id>urn:sha1:6838ac125324b91eeab5ccaf99e4a9bd1f8a7895</id>
<content type='text'>
commit b6cc9474e2dd9f0c19b694b40961d81117f1e918 upstream.

On arm64 NUMA kernels we can pass "numa=off" on the command line to
disable NUMA.  A side effect of this is that kmalloc_node() calls to
non-zero nodes will crash the system with an OOPS:

[    0.000000] ITS@0x0000901000020000: allocated 2097152 Devices @10002000000 (flat, esz 8, psz 64K, shr 1)
[    0.000000] Unable to handle kernel NULL pointer dereference at virtual address 00001680
[    0.000000] pgd = fffffc0009470000
[    0.000000] [00001680] *pgd=0000010ffff90003, *pud=0000010ffff90003, *pmd=0000010ffff90003, *pte=0000000000000000
[    0.000000] Internal error: Oops: 96000006 [#1] SMP
.
.
.
[    0.000000] [&lt;fffffc00081c8950&gt;] __alloc_pages_nodemask+0xa4/0xe68
[    0.000000] [&lt;fffffc000821fa70&gt;] new_slab+0xd0/0x564
[    0.000000] [&lt;fffffc0008221e24&gt;] ___slab_alloc+0x2e4/0x514
[    0.000000] [&lt;fffffc0008239498&gt;] __slab_alloc+0x48/0x58
[    0.000000] [&lt;fffffc0008222c20&gt;] __kmalloc_node+0xd0/0x2dc
[    0.000000] [&lt;fffffc0008115374&gt;] __irq_domain_add+0x7c/0x164
[    0.000000] [&lt;fffffc0008b461dc&gt;] its_probe+0x784/0x81c
[    0.000000] [&lt;fffffc0008b462bc&gt;] its_init+0x48/0x1b0
[    0.000000] [&lt;fffffc0008b4543c&gt;] gic_init_bases+0x228/0x360
[    0.000000] [&lt;fffffc0008b456bc&gt;] gic_of_init+0x148/0x1cc
[    0.000000] [&lt;fffffc0008b5aec8&gt;] of_irq_init+0x184/0x298
[    0.000000] [&lt;fffffc0008b43f9c&gt;] irqchip_init+0x14/0x38
[    0.000000] [&lt;fffffc0008b12d60&gt;] init_IRQ+0xc/0x30
[    0.000000] [&lt;fffffc0008b10a3c&gt;] start_kernel+0x240/0x3b8
[    0.000000] [&lt;fffffc0008b101c4&gt;] __primary_switched+0x30/0x6c
[    0.000000] Code: 912ec2a0 b9403809 0a0902fb 37b007db (f9400300)
.
.
.

This is caused by code like this in kernel/irq/irqdomain.c

    domain = kzalloc_node(sizeof(*domain) + (sizeof(unsigned int) * size),
                  GFP_KERNEL, of_node_to_nid(of_node));

When NUMA is disabled, the concept of a node is really undefined, so
of_node_to_nid() should unconditionally return NUMA_NO_NODE.

Fix by returning NUMA_NO_NODE when the nid is not in the set of
possible nodes.

Reported-by: Gilbert Netzer &lt;noname@pdc.kth.se&gt;
Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>of_mdio: add helper to deregister fixed-link PHYs</title>
<updated>2016-11-30T04:17:02Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2016-11-28T18:24:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3f65047c853a2a5abcd8ac1984af3452b5df4ada'/>
<id>urn:sha1:3f65047c853a2a5abcd8ac1984af3452b5df4ada</id>
<content type='text'>
Add helper to deregister fixed-link PHYs registered using
of_phy_register_fixed_link().

Convert the two drivers that care to deregister their fixed-link PHYs to
use the new helper, but note that most drivers currently fail to do so.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>of_mdio: fix device reference leak in of_phy_find_device</title>
<updated>2016-11-17T17:05:04Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2016-11-16T14:20:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3ae30f4ce65e9d4de274b1472169ab3c27f5c666'/>
<id>urn:sha1:3ae30f4ce65e9d4de274b1472169ab3c27f5c666</id>
<content type='text'>
Make sure to drop the reference taken by bus_find_device() before
returning NULL from of_phy_find_device() when the found device is not a
PHY.

Fixes: 6ed742363b9c ("of: of_mdio: Ensure mdio device is a PHY")
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>of_mdio: fix node leak in of_phy_register_fixed_link error path</title>
<updated>2016-11-17T17:05:04Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2016-11-16T14:20:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=48c1699d5335bc045b50989a06b1c526b17a25ff'/>
<id>urn:sha1:48c1699d5335bc045b50989a06b1c526b17a25ff</id>
<content type='text'>
Make sure to drop the of_node reference also on failure to parse the
speed property in of_phy_register_fixed_link().

Fixes: 3be2a49e5c08 ("of: provide a binding for fixed link PHYs")
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Revert "console: don't prefer first registered if DT specifies stdout-path"</title>
<updated>2016-11-11T16:12:37Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2016-11-10T18:46:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c6c7d83b9c9e6a8b3e6d84c820ac61fbffc9e396'/>
<id>urn:sha1:c6c7d83b9c9e6a8b3e6d84c820ac61fbffc9e396</id>
<content type='text'>
This reverts commit 05fd007e4629 ("console: don't prefer first
registered if DT specifies stdout-path").

The reverted commit changes existing behavior on which many ARM boards
rely.  Many ARM small-board-computers, like e.g.  the Raspberry Pi have
both a video output and a serial console.  Depending on whether the user
is using the device as a more regular computer; or as a headless device
we need to have the console on either one or the other.

Many users rely on the kernel behavior of the console being present on
both outputs, before the reverted commit the console setup with no
console= kernel arguments on an ARM board which sets stdout-path in dt
would look like this:

  [root@localhost ~]# cat /proc/consoles
  ttyS0                -W- (EC p a)    4:64
  tty0                 -WU (E  p  )    4:1

Where as after the reverted commit, it looks like this:

  [root@localhost ~]# cat /proc/consoles
  ttyS0                -W- (EC p a)    4:64

This commit reverts commit 05fd007e4629 ("console: don't prefer first
registered if DT specifies stdout-path") restoring the original
behavior.

Fixes: 05fd007e4629 ("console: don't prefer first registered if DT specifies stdout-path")
Link: http://lkml.kernel.org/r/20161104121135.4780-2-hdegoede@redhat.com
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Cc: Paul Burton &lt;paul.burton@imgtec.com&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Frank Rowand &lt;frowand.list@gmail.com&gt;
Cc: Thorsten Leemhuis &lt;regressions@leemhuis.info&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
