<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/of/address.c, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-11-18T17:25:00Z</updated>
<entry>
<title>of/address: Fix of_node memory leak in of_dma_is_coherent</title>
<updated>2020-11-18T17:25:00Z</updated>
<author>
<name>Evan Nimmo</name>
</author>
<published>2020-11-10T02:28:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2e4d9fac404b2674532c363ce203dc30372c7f7a'/>
<id>urn:sha1:2e4d9fac404b2674532c363ce203dc30372c7f7a</id>
<content type='text'>
[ Upstream commit a5bea04fcc0b3c0aec71ee1fd58fd4ff7ee36177 ]

Commit dabf6b36b83a ("of: Add OF_DMA_DEFAULT_COHERENT &amp; select it on
powerpc") added a check to of_dma_is_coherent which returns early
if OF_DMA_DEFAULT_COHERENT is enabled. This results in the of_node_put()
being skipped causing a memory leak. Moved the of_node_get() below this
check so we now we only get the node if OF_DMA_DEFAULT_COHERENT is not
enabled.

Fixes: dabf6b36b83a ("of: Add OF_DMA_DEFAULT_COHERENT &amp; select it on powerpc")
Signed-off-by: Evan Nimmo &lt;evan.nimmo@alliedtelesis.co.nz&gt;
Link: https://lore.kernel.org/r/20201110022825.30895-1-evan.nimmo@alliedtelesis.co.nz
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>of: Add OF_DMA_DEFAULT_COHERENT &amp; select it on powerpc</title>
<updated>2020-02-14T21:29:56Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2020-01-26T11:52:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=809f1863e83e31e3c3cc259fd2cc1470fc772aa5'/>
<id>urn:sha1:809f1863e83e31e3c3cc259fd2cc1470fc772aa5</id>
<content type='text'>
commit dabf6b36b83a18d57e3d4b9d50544ed040d86255 upstream.

There's an OF helper called of_dma_is_coherent(), which checks if a
device has a "dma-coherent" property to see if the device is coherent
for DMA.

But on some platforms devices are coherent by default, and on some
platforms it's not possible to update existing device trees to add the
"dma-coherent" property.

So add a Kconfig symbol to allow arch code to tell
of_dma_is_coherent() that devices are coherent by default, regardless
of the presence of the property.

Select that symbol on powerpc when NOT_COHERENT_CACHE is not set, ie.
when the system has a coherent cache.

Fixes: 92ea637edea3 ("of: introduce of_dma_is_coherent() helper")
Cc: stable@vger.kernel.org # v3.16+
Reported-by: Christian Zigotzky &lt;chzigotzky@xenosoft.de&gt;
Tested-by: Christian Zigotzky &lt;chzigotzky@xenosoft.de&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Reviewed-by: Ulf Hansson &lt;ulf.hansson@linaro.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:30:10Z</updated>
<author>
<name>Rob Herring</name>
</author>
<published>2017-05-04T17:34:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=14323b731072b09a375e7b53aba6d0d68f603fcb'/>
<id>urn:sha1:14323b731072b09a375e7b53aba6d0d68f603fcb</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/address: fix typo in comment block of of_translate_one()</title>
<updated>2015-11-30T23:57:01Z</updated>
<author>
<name>Masahiro Yamada</name>
</author>
<published>2015-11-30T06:22:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ba85edbe0d39710dc74a2a9c6f90929b5722a53b'/>
<id>urn:sha1:ba85edbe0d39710dc74a2a9c6f90929b5722a53b</id>
<content type='text'>
Remove the "not" before "cannot".

I am fixing the comment block style while I am here.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>PCI: of: Add 64-bit address recognition without LPAE support</title>
<updated>2015-10-13T18:30:37Z</updated>
<author>
<name>Pavel Fedin</name>
</author>
<published>2015-10-08T07:24:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4af971064977b00a437c1ed8ead8876db4e3b58a'/>
<id>urn:sha1:4af971064977b00a437c1ed8ead8876db4e3b58a</id>
<content type='text'>
If non-LPAE kernel is booted up on a machine with 64-bit PCI resources,
PCI controller probe fails with:

PCI host bridge /pcie@10000000 ranges:
   IO 0x3eff0000..0x3effffff -&gt; 0x00000000
  MEM 0x10000000..0x3efeffff -&gt; 0x10000000
  MEM 0x8000000000..0xffffffffff -&gt; 0x8000000000
pci-host-generic 3f000000.pcie: resource collision: [mem 0x00000000-0xffffffff] conflicts with /pl011@9000000 [mem 0x09000000-0x09000fff]
pci-host-generic: probe of 3f000000.pcie failed with error -16

This happens because res-&gt;start assignment in of_pci_range_to_resource()
truncates the upper part of the address, because res-&gt;start is of
phys_addr_t type, which is 32-bit on non-LPAE kernels.

This patch adds explicit recognition of 64-bit resources, preventing from
potential problems when e. g. 0x8000001234 would be converted to
0x00001234.

Signed-off-by: Pavel Fedin &lt;p.fedin@samsung.com&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>of/address: Don't loop forever in of_find_matching_node_by_address().</title>
<updated>2015-08-25T16:29:56Z</updated>
<author>
<name>David Daney</name>
</author>
<published>2015-08-19T20:17:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a496b00b6f90c41bd21a410871dfc97d4f3c7ab'/>
<id>urn:sha1:3a496b00b6f90c41bd21a410871dfc97d4f3c7ab</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>Merge tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux</title>
<updated>2015-07-02T02:40:18Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2015-07-02T02:40:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4da3064d1775810f10f7ddc1c34c3f1ff502a654'/>
<id>urn:sha1:4da3064d1775810f10f7ddc1c34c3f1ff502a654</id>
<content type='text'>
Pull devicetree updates from Grant Likely:
 "A whole lot of bug fixes.

  Nothing stands out here except the ability to enable CONFIG_OF on
  every architecture, and an import of a newer version of dtc"

* tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux: (22 commits)
  of/irq: Rename "intc_desc" to "of_intc_desc" to fix OF on sh
  of/irq: Fix pSeries boot failure
  Documentation: DT: Fix a typo in the filename "lantiq,&lt;chip&gt;-pinumx.txt"
  of: define of_find_node_by_phandle for !CONFIG_OF
  of/address: use atomic allocation in pci_register_io_range()
  of: Add vendor prefix for Zodiac Inflight Innovations
  dt/fdt: add empty versions of early_init_dt_*_memory_arch
  of: clean-up unnecessary libfdt include paths
  of: make unittest select OF_EARLY_FLATTREE instead of depend on it
  of: make CONFIG_OF user selectable
  MIPS: prepare for user enabling of CONFIG_OF
  of/fdt: fix argument name and add comments of unflatten_dt_node()
  of: return NUMA_NO_NODE from fallback of_node_to_nid()
  tps6507x.txt: Remove executable permission
  of/overlay: Grammar s/an negative/a negative/
  of/fdt: Make fdt blob input parameters of unflatten functions const
  of: add helper function to retrive match data
  of: Grammar s/property exist/property exists/
  of: Move OF flags to be visible even when !CONFIG_OF
  scripts/dtc: Update to upstream version 9d3649bd3be245c9
  ...
</content>
</entry>
<entry>
<title>of/address: use atomic allocation in pci_register_io_range()</title>
<updated>2015-06-23T15:17:40Z</updated>
<author>
<name>Jingoo Han</name>
</author>
<published>2015-06-17T15:12:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=294240ffe784e951dc2ef070da04fa31ef6db3a0'/>
<id>urn:sha1:294240ffe784e951dc2ef070da04fa31ef6db3a0</id>
<content type='text'>
When kzalloc() is called under spin_lock(), GFP_ATOMIC should be
used to avoid sleeping allocation.
The call tree is:
  of_pci_range_to_resource()
    --&gt; pci_register_io_range() &lt;-- takes spin_lock(&amp;io_range_lock);
       --&gt; kzalloc()

Signed-off-by: Jingoo Han &lt;jingoohan1@gmail.com&gt;
Cc: stable@vger.kernel.org # 3.18+
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>of/pci: Fix pci_address_to_pio() conversion of CPU address to I/O port</title>
<updated>2015-05-16T15:38:39Z</updated>
<author>
<name>Zhichang Yuan</name>
</author>
<published>2015-04-24T09:05:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5dbb4c6167229c8d4f528e8ec26699a7305000a3'/>
<id>urn:sha1:5dbb4c6167229c8d4f528e8ec26699a7305000a3</id>
<content type='text'>
41f8bba7f555 ("of/pci: Add pci_register_io_range() and
pci_pio_to_address()") added support for systems with several I/O ranges
described by OF bindings.  It modified pci_address_to_pio() look up the
io_range for a given CPU physical address, but the conversion was wrong.

Fix the conversion of address to I/O port.

[bhelgaas: changelog]
Fixes: 41f8bba7f555 ("of/pci: Add pci_register_io_range() and pci_pio_to_address()")
Signed-off-by: Zhichang Yuan &lt;yuanzhichang@hisilicon.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;
CC: stable@vger.kernel.org	# v3.18+</content>
</entry>
<entry>
<title>drivers/of: Add empty ranges quirk for PA-Semi</title>
<updated>2015-03-28T02:31:16Z</updated>
<author>
<name>Benjamin Herrenschmidt</name>
</author>
<published>2015-03-23T03:16:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=41d9489319f28f06cf51731131bc353d5a6bce59'/>
<id>urn:sha1:41d9489319f28f06cf51731131bc353d5a6bce59</id>
<content type='text'>
The "sdc" node is missing the ranges property, it needs to be treated
as having an empty one otherwise translation fails for its children.

Fixes 746c9e9f92dd, "of/base: Fix PowerPC address parsing hack"

Tested-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Stable &lt;stable@vger.kernel.org&gt; # v3.18+
</content>
</entry>
</feed>
