<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/of, branch v3.18.66</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.66</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.66'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-07-27T22:03:29Z</updated>
<entry>
<title>of: device: Export of_device_{get_modalias, uvent_modalias} to modules</title>
<updated>2017-07-27T22:03:29Z</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=6da382401782821c4df728c9ee42966583339188'/>
<id>urn:sha1:6da382401782821c4df728c9ee42966583339188</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-29T07:12:24Z</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=db89d5c72d4181407c8a0e7720aa7c353bcab8c4'/>
<id>urn:sha1:db89d5c72d4181407c8a0e7720aa7c353bcab8c4</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-25T12:17:58Z</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=8f7f956d12ac150e69a3fd645b6e01507f3ec343'/>
<id>urn:sha1:8f7f956d12ac150e69a3fd645b6e01507f3ec343</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 sparse warning in of_pci_range_parser_one</title>
<updated>2017-05-25T12:17:57Z</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=3829ab9ff69fb78713addc58e642d40d5c28ba56'/>
<id>urn:sha1:3829ab9ff69fb78713addc58e642d40d5c28ba56</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: fix memory leak related to safe_name()</title>
<updated>2016-08-22T16:23:00Z</updated>
<author>
<name>Frank Rowand</name>
<email>frank.rowand@am.sony.com</email>
</author>
<published>2016-06-16T17:51:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b4d9416d6388fb450b397484e0ab85a154471723'/>
<id>urn:sha1:b4d9416d6388fb450b397484e0ab85a154471723</id>
<content type='text'>
[ Upstream commit d9fc880723321dbf16b2981e3f3e916b73942210 ]

Fix a memory leak resulting from memory allocation in safe_name().
This patch fixes all call sites of safe_name().

Mathieu Malaterre reported the memory leak on boot:

On my PowerMac device-tree would generate a duplicate name:

[    0.023043] device-tree: Duplicate name in PowerPC,G4@0, renamed to "l2-cache#1"

in this case a newly allocated name is generated by `safe_name`. However
in this case it is never deallocated.

The bug was found using kmemleak reported as:

unreferenced object 0xdf532e60 (size 32):
  comm "swapper", pid 1, jiffies 4294892300 (age 1993.532s)
  hex dump (first 32 bytes):
    6c 32 2d 63 61 63 68 65 23 31 00 dd e4 dd 1e c2  l2-cache#1......
    ec d4 ba ce 04 ec cc de 8e 85 e9 ca c4 ec cc 9e  ................
  backtrace:
    [&lt;c02d3350&gt;] kvasprintf+0x64/0xc8
    [&lt;c02d3400&gt;] kasprintf+0x4c/0x5c
    [&lt;c0453814&gt;] safe_name.isra.1+0x80/0xc4
    [&lt;c04545d8&gt;] __of_attach_node_sysfs+0x6c/0x11c
    [&lt;c075f21c&gt;] of_core_init+0x8c/0xf8
    [&lt;c0729594&gt;] kernel_init_freeable+0xd4/0x208
    [&lt;c00047e8&gt;] kernel_init+0x24/0x11c
    [&lt;c00158ec&gt;] ret_from_kernel_thread+0x5c/0x64

Link: https://bugzilla.kernel.org/show_bug.cgi?id=120331

Signed-off-by: Frank Rowand &lt;frank.rowand@am.sony.com&gt;
Reported-by: mathieu.malaterre@gmail.com
Tested-by: Mathieu Malaterre &lt;mathieu.malaterre@gmail.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>of: irq: fix of_irq_get[_byname]() kernel-doc</title>
<updated>2016-06-20T03:47:44Z</updated>
<author>
<name>Sergei Shtylyov</name>
<email>sergei.shtylyov@cogentembedded.com</email>
</author>
<published>2016-05-28T20:02:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=014694d9879ab5a571f72477fb84cffee9deb968'/>
<id>urn:sha1:014694d9879ab5a571f72477fb84cffee9deb968</id>
<content type='text'>
[ Upstream commit 3993546646baf1dab5f5c4f7d9bb58f2046fd1c1 ]

The kernel-doc for the of_irq_get[_byname]()  is clearly inadequate in
describing the return values -- of_irq_get_byname() is documented better
than of_irq_get() but it  still doesn't mention that 0 is returned iff
irq_create_of_mapping() fails (it doesn't return an error code in this
case). Document all possible return value variants, making the writing
of the word "IRQ" consistent, while at it...

Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")
Fixes: ad69674e73a1 ("of/irq: do irq resolution in platform_get_irq_byname()")
Signed-off-by: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
CC: stable@vger.kernel.org
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>of: alloc anywhere from memblock if range not specified</title>
<updated>2016-04-18T12:49:23Z</updated>
<author>
<name>Vinayak Menon</name>
<email>vinmenon@codeaurora.org</email>
</author>
<published>2016-02-22T13:45:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c0fd92c4a0cac1f210b5868cec69df5ccb4a3146'/>
<id>urn:sha1:c0fd92c4a0cac1f210b5868cec69df5ccb4a3146</id>
<content type='text'>
[ Upstream commit e53b50c0cbe392c946807abf7d07615a3c588642 ]

early_init_dt_alloc_reserved_memory_arch passes end as 0 to
__memblock_alloc_base, when limits are not specified. But
__memblock_alloc_base takes end value of 0 as MEMBLOCK_ALLOC_ACCESSIBLE
and limits the end to memblock.current_limit. This results in regions
never being placed in HIGHMEM area, for e.g. CMA.
Let __memblock_alloc_base allocate from anywhere in memory if limits are
not specified.

Acked-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Vinayak Menon &lt;vinmenon@codeaurora.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>of/address: Don't loop forever in of_find_matching_node_by_address().</title>
<updated>2015-10-28T02:14:51Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2015-08-19T20:17:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=be2a16239713fcaa5c0479c5cb0821cdba59fc81'/>
<id>urn:sha1:be2a16239713fcaa5c0479c5cb0821cdba59fc81</id>
<content type='text'>
[ Upstream commit 3a496b00b6f90c41bd21a410871dfc97d4f3c7ab ]

If the internal call to of_address_to_resource() fails, we end up
looping forever in of_find_matching_node_by_address().  This can be
caused by a defective device tree, or calling with an incorrect
matches argument.

Fix by calling of_find_matching_node() unconditionally at the end of
the loop.

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>of_mdio: add new DT property 'managed' to specify the PHY management type</title>
<updated>2015-10-27T13:33:12Z</updated>
<author>
<name>Stas Sergeev</name>
<email>stsp@list.ru</email>
</author>
<published>2015-07-21T00:49:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=71a386c7a6a1cf88c712f39e9e60fead672846c5'/>
<id>urn:sha1:71a386c7a6a1cf88c712f39e9e60fead672846c5</id>
<content type='text'>
[ Upstream commit 4cba5c2103657d43d0886e4cff8004d95a3d0def ]

Currently the PHY management type is selected by the MAC driver arbitrary.
The decision is based on the presence of the "fixed-link" node and on a
will of the driver's authors.
This caused a regression recently, when mvneta driver suddenly started
to use the in-band status for auto-negotiation on fixed links.
It appears the auto-negotiation may not work when expected by the MAC driver.
Sebastien Rannou explains:
&lt;&lt; Yes, I confirm that my HW does not generate an in-band status. AFAIK, it's
a PHY that aggregates 4xSGMIIs to 1xQSGMII ; the MAC side of the PHY (with
inband status) is connected to the switch through QSGMII, and in this context
we are on the media side of the PHY. &gt;&gt;
https://lkml.org/lkml/2015/7/10/206

This patch introduces the new string property 'managed' that allows
the user to set the management type explicitly.
The supported values are:
"auto" - default. Uses either MDIO or nothing, depending on the presence
of the fixed-link node
"in-band-status" - use in-band status

Signed-off-by: Stas Sergeev &lt;stsp@users.sourceforge.net&gt;

CC: Rob Herring &lt;robh+dt@kernel.org&gt;
CC: Pawel Moll &lt;pawel.moll@arm.com&gt;
CC: Mark Rutland &lt;mark.rutland@arm.com&gt;
CC: Ian Campbell &lt;ijc+devicetree@hellion.org.uk&gt;
CC: Kumar Gala &lt;galak@codeaurora.org&gt;
CC: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
CC: Grant Likely &lt;grant.likely@linaro.org&gt;
CC: devicetree@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: netdev@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>of: return NUMA_NO_NODE from fallback of_node_to_nid()</title>
<updated>2015-08-04T18:39:26Z</updated>
<author>
<name>Konstantin Khlebnikov</name>
<email>khlebnikov@yandex-team.ru</email>
</author>
<published>2015-04-08T16:59:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dd95eaaea493d74df5ae81c7e5846e6b33ee91b1'/>
<id>urn:sha1:dd95eaaea493d74df5ae81c7e5846e6b33ee91b1</id>
<content type='text'>
[ Upstream commit c8fff7bc5bba6bd59cad40441c189c4efe7190f6 ]

Node 0 might be offline as well as any other numa node,
in this case kernel cannot handle memory allocation and crashes.

Signed-off-by: Konstantin Khlebnikov &lt;khlebnikov@yandex-team.ru&gt;
Fixes: 0c3f061c195c ("of: implement of_node_to_nid as a weak function")
Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
</feed>
