<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/of/fdt.c, branch v5.15.7</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.7</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-08-25T18:13:31+00:00</updated>
<entry>
<title>of: fdt: Rename reserve_elfcorehdr() to fdt_reserve_elfcorehdr()</title>
<updated>2021-08-25T18:13:31+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2021-08-25T09:40:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2fcf9a178ba1f2d4f2bf715312b84508850701d2'/>
<id>urn:sha1:2fcf9a178ba1f2d4f2bf715312b84508850701d2</id>
<content type='text'>
On ia64/allmodconfig:

    drivers/of/fdt.c:609:20: error: conflicting types for 'reserve_elfcorehdr'; have 'void(void)'
      609 | static void __init reserve_elfcorehdr(void)
	  |                    ^~~~~~~~~~~~~~~~~~
    arch/ia64/include/asm/meminit.h:43:12: note: previous declaration of 'reserve_elfcorehdr' with type 'int(u64 *, u64 *)' {aka 'int(long long unsigned int *, long long unsigned int *)'}
       43 | extern int reserve_elfcorehdr(u64 *start, u64 *end);
	  |            ^~~~~~~~~~~~~~~~~~

Fix this by prefixing the FDT function name with "fdt_".

Fixes: f7e7ce93aac13118 ("of: fdt: Add generic support for handling elf core headers property")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Link: https://lore.kernel.org/r/f6eabbbce0fba6da3da0264c1e1cf23c01173999.1629884393.git.geert+renesas@glider.be
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>of: fdt: Use IS_ENABLED(CONFIG_BLK_DEV_INITRD) instead of #ifdef</title>
<updated>2021-08-24T22:09:01+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2021-08-11T08:51:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bf2e8609734bd773610d414b72eb1cfe09b4c24d'/>
<id>urn:sha1:bf2e8609734bd773610d414b72eb1cfe09b4c24d</id>
<content type='text'>
Replace the conditional compilation using "#ifdef CONFIG_BLK_DEV_INITRD"
by a check for "IS_ENABLED(CONFIG_BLK_DEV_INITRD)", to increase compile
coverage and to simplify the code.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://lore.kernel.org/r/604c13747f09d800da6a7c12f661e1ec146f1dfd.1628670468.git.geert+renesas@glider.be
</content>
</entry>
<entry>
<title>of: fdt: Add generic support for handling usable memory range property</title>
<updated>2021-08-24T22:09:01+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2021-08-11T08:51:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2af2b50acf9b9c38080a45f32a9c162e2a0f2de2'/>
<id>urn:sha1:2af2b50acf9b9c38080a45f32a9c162e2a0f2de2</id>
<content type='text'>
Add support for handling the "linux,usable-memory-range" property in the
"/chosen" node to the FDT core code.  This can co-exist safely with the
architecture-specific handling, until the latter has been removed.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://lore.kernel.org/r/3bd69bada93ee59b7d23c38b3527fc1654e19343.1628670468.git.geert+renesas@glider.be
</content>
</entry>
<entry>
<title>of: fdt: Add generic support for handling elf core headers property</title>
<updated>2021-08-24T22:09:01+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2021-08-11T08:51:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f7e7ce93aac13118281bcef8407b5df1a6b16822'/>
<id>urn:sha1:f7e7ce93aac13118281bcef8407b5df1a6b16822</id>
<content type='text'>
There are two methods to specify the location of the elf core headers:
using the "elfcorehdr=" kernel parameter, as handled by generic code in
kernel/crash_dump.c, or using the "linux,elfcorehdr" property under the
"/chosen" node in the Device Tree, as handled by architecture-specific
code in arch/arm64/mm/init.c.

Extend support for "linux,elfcorehdr" to all platforms supporting DT by
adding platform-agnostic handling for handling this property to the FDT
core code.  This can co-exist safely with the architecture-specific
handling, until the latter has been removed.

This requires moving the call to of_scan_flat_dt() up, as the code
scanning the "/chosen" node now needs to be aware of the values of
"#address-cells" and "#size-cells".

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://lore.kernel.org/r/c7e46e50aaf87ef49bdaa61358d25b122f32b7df.1628670468.git.geert+renesas@glider.be
</content>
</entry>
<entry>
<title>of: fdt: Remove weak early_init_dt_mark_hotplug_memory_arch()</title>
<updated>2021-08-15T14:56:03+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2021-08-11T08:53:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=39c6b3a3dd118173c6da32daacd2eed8cfc5951d'/>
<id>urn:sha1:39c6b3a3dd118173c6da32daacd2eed8cfc5951d</id>
<content type='text'>
Commit 41a9ada3e6b4253f ("of/fdt: mark hotpluggable memory") introduced
two (for systems with and without memblock) weak versions of
early_init_dt_mark_hotplug_memory_arch(), that could be overridden by an
architecture-specific version.  However, no overrides ever emerged.
Later, commit aca52c3983891060 ("mm: remove CONFIG_HAVE_MEMBLOCK")
removed the non-memblock version.

Remove early_init_dt_mark_hotplug_memory_arch(), and replace it by a
direct call to memblock_mark_hotplug().

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Link: https://lore.kernel.org/r/1a61f75ec50d3c2922fcdbe33337266a58a4125f.1628671960.git.geert+renesas@glider.be
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>of: fdt: Remove early_init_dt_reserve_memory_arch() override capability</title>
<updated>2021-08-15T14:56:03+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2021-08-11T08:52:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=18250b43f7b6d0085724bf6fc186f9a107066068'/>
<id>urn:sha1:18250b43f7b6d0085724bf6fc186f9a107066068</id>
<content type='text'>
Commit e7ae8d174eec0b3b ("MIPS: replace add_memory_region with
memblock") removed the last architecture-specific override of
early_init_dt_reserve_memory_arch().
Convert the common implementation from a weak global function to a
static function.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Link: https://lore.kernel.org/r/be0140a0183ecfd0a3afa4fe6d2d77ed418102f9.1628671897.git.geert+renesas@glider.be
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>of: fdt: do not update local variable after use</title>
<updated>2021-08-03T20:20:00+00:00</updated>
<author>
<name>Ohhoon Kwon</name>
<email>ohoono.kwon@samsung.com</email>
</author>
<published>2021-08-03T10:13:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4409273b818cfcbb2f64718d9438629398ac3ae5'/>
<id>urn:sha1:4409273b818cfcbb2f64718d9438629398ac3ae5</id>
<content type='text'>
Fix the below warning:
drivers/of/fdt.c:196:4: warning: Value stored to 'pprev' is never read
[clang-analyzer-deadcode.DeadStores]
             pprev      = &amp;pp-&gt;next;
             ^            ~~~~~~~~~

Signed-off-by: Ohhoon Kwon &lt;ohoono.kwon@samsung.com&gt;
Link: https://lore.kernel.org/r/20210803101309.904-1-ohoono.kwon@samsung.com
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>of: fdt: remove unnecessary codes</title>
<updated>2021-07-15T13:35:49+00:00</updated>
<author>
<name>권오훈</name>
<email>ohoono.kwon@samsung.com</email>
</author>
<published>2021-07-01T14:04:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eb7173988caf6fc68ef00065b9defb5ac3467f21'/>
<id>urn:sha1:eb7173988caf6fc68ef00065b9defb5ac3467f21</id>
<content type='text'>
While unflattening the device tree, we try to populate dt nodes and
properties into tree-shaped data structure.

In populate_properties function, pprev is initially set to
&amp;np-&gt;properties, and then updated to &amp;pp-&gt;next.

In both scenarios *pprev is NULL, since the memory area that we are
allocating from is initially zeroed.

I tested the code as below, and it showed that BUG was never called.

-       if (!dryrun)
+       if (!dryrun) {
+               if (*pprev)
+                       BUG();
                *pprev = NULL;
+       }

Let's remove unnecessary code.

Signed-off-by: Ohhoon Kwon &lt;ohoono.kwon@samsung.com&gt;
Link: https://lore.kernel.org/r/20210701140457epcms1p2cc43a7c62150f012619feab913f017af@epcms1p2
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>of: Remove superfluous casts when printing u64 values</title>
<updated>2021-06-16T19:55:05+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2021-06-16T09:27:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0e407a9a29ff0471a57e88006897d5e7d5cd9505'/>
<id>urn:sha1:0e407a9a29ff0471a57e88006897d5e7d5cd9505</id>
<content type='text'>
"u64" is "unsigned long long" on all architectures now.  Hence there is
no longer a need to use casts when formatting using the "ll" length
modifier.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Link: https://lore.kernel.org/r/ef3f4f78385b43230695ba0855d078290c958192.1623835273.git.geert+renesas@glider.be
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>of: Fix truncation of memory sizes on 32-bit platforms</title>
<updated>2021-06-16T19:55:05+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2021-06-16T09:27:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2892d8a00d23d511a0591ac4b2ff3f050ae1f004'/>
<id>urn:sha1:2892d8a00d23d511a0591ac4b2ff3f050ae1f004</id>
<content type='text'>
Variable "size" has type "phys_addr_t", which can be either 32-bit or
64-bit on 32-bit systems, while "unsigned long" is always 32-bit on
32-bit systems.  Hence the cast in

    (unsigned long)size / SZ_1M

may truncate a 64-bit size to 32-bit, as casts have a higher operator
precedence than divisions.

Fix this by inverting the order of the cast and division, which should
be safe for memory blocks smaller than 4 PiB.  Note that the division is
actually a shift, as SZ_1M is a power-of-two constant, hence there is no
need to use div_u64().

While at it, use "%lu" to format "unsigned long".

Fixes: e8d9d1f5485b52ec ("drivers: of: add initialization code for static reserved memory")
Fixes: 3f0c8206644836e4 ("drivers: of: add initialization code for dynamic reserved memory")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Acked-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Link: https://lore.kernel.org/r/4a1117e72d13d26126f57be034c20dac02f1e915.1623835273.git.geert+renesas@glider.be
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
</feed>
