<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/of, branch v6.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.2</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-02-13T22:09:20Z</updated>
<entry>
<title>Merge tag 'mm-hotfixes-stable-2023-02-13-13-50' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm</title>
<updated>2023-02-13T22:09:20Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-02-13T22:09:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f6feea56f66d34259c4222fa02e8171c4f2673d1'/>
<id>urn:sha1:f6feea56f66d34259c4222fa02e8171c4f2673d1</id>
<content type='text'>
Pull misc fixes from Andrew Morton:
 "Twelve hotfixes, mostly against mm/.

  Five of these fixes are cc:stable"

* tag 'mm-hotfixes-stable-2023-02-13-13-50' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  of: reserved_mem: Have kmemleak ignore dynamically allocated reserved mem
  scripts/gdb: fix 'lx-current' for x86
  lib: parser: optimize match_NUMBER apis to use local array
  mm: shrinkers: fix deadlock in shrinker debugfs
  mm: hwpoison: support recovery from ksm_might_need_to_copy()
  kasan: fix Oops due to missing calls to kasan_arch_is_ready()
  revert "squashfs: harden sanity check in squashfs_read_xattr_id_table"
  fsdax: dax_unshare_iter() should return a valid length
  mm/gup: add folio to list when folio_isolate_lru() succeed
  aio: fix mremap after fork null-deref
  mailmap: add entry for Alexander Mikhalitsyn
  mm: extend max struct page size for kmsan
</content>
</entry>
<entry>
<title>of: reserved_mem: Have kmemleak ignore dynamically allocated reserved mem</title>
<updated>2023-02-09T23:56:51Z</updated>
<author>
<name>Isaac J. Manjarres</name>
<email>isaacmanjarres@google.com</email>
</author>
<published>2023-02-08T23:20:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ce4d9a1ea35ac5429e822c4106cb2859d5c71f3e'/>
<id>urn:sha1:ce4d9a1ea35ac5429e822c4106cb2859d5c71f3e</id>
<content type='text'>
Patch series "Fix kmemleak crashes when scanning CMA regions", v2.

When trying to boot a device with an ARM64 kernel with the following
config options enabled:

CONFIG_DEBUG_PAGEALLOC=y
CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT=y
CONFIG_DEBUG_KMEMLEAK=y

a crash is encountered when kmemleak starts to scan the list of gray
or allocated objects that it maintains. Upon closer inspection, it was
observed that these page-faults always occurred when kmemleak attempted
to scan a CMA region.

At the moment, kmemleak is made aware of CMA regions that are specified
through the devicetree to be dynamically allocated within a range of
addresses. However, kmemleak should not need to scan CMA regions or any
reserved memory region, as those regions can be used for DMA transfers
between drivers and peripherals, and thus wouldn't contain anything
useful for kmemleak.

Additionally, since CMA regions are unmapped from the kernel's address
space when they are freed to the buddy allocator at boot when
CONFIG_DEBUG_PAGEALLOC is enabled, kmemleak shouldn't attempt to access
those memory regions, as that will trigger a crash. Thus, kmemleak
should ignore all dynamically allocated reserved memory regions.


This patch (of 1):

Currently, kmemleak ignores dynamically allocated reserved memory regions
that don't have a kernel mapping.  However, regions that do retain a
kernel mapping (e.g.  CMA regions) do get scanned by kmemleak.

This is not ideal for two reasons:

1  kmemleak works by scanning memory regions for pointers to allocated
   objects to determine if those objects have been leaked or not. 
   However, reserved memory regions can be used between drivers and
   peripherals for DMA transfers, and thus, would not contain pointers to
   allocated objects, making it unnecessary for kmemleak to scan these
   reserved memory regions.

2  When CONFIG_DEBUG_PAGEALLOC is enabled, along with kmemleak, the
   CMA reserved memory regions are unmapped from the kernel's address
   space when they are freed to buddy at boot.  These CMA reserved regions
   are still tracked by kmemleak, however, and when kmemleak attempts to
   scan them, a crash will happen, as accessing the CMA region will result
   in a page-fault, since the regions are unmapped.

Thus, use kmemleak_ignore_phys() for all dynamically allocated reserved
memory regions, instead of those that do not have a kernel mapping
associated with them.

Link: https://lkml.kernel.org/r/20230208232001.2052777-1-isaacmanjarres@google.com
Link: https://lkml.kernel.org/r/20230208232001.2052777-2-isaacmanjarres@google.com
Fixes: a7259df76702 ("memblock: make memblock_find_in_range method private")
Signed-off-by: Isaac J. Manjarres &lt;isaacmanjarres@google.com&gt;
Acked-by: Mike Rapoport (IBM) &lt;rppt@kernel.org&gt;
Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Frank Rowand &lt;frowand.list@gmail.com&gt;
Cc: Kirill A. Shutemov &lt;kirill.shtuemov@linux.intel.com&gt;
Cc: Nick Kossifidis &lt;mick@ics.forth.gr&gt;
Cc: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
Cc: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Cc: Saravana Kannan &lt;saravanak@google.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;	[5.15+]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'devicetree-fixes-for-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux</title>
<updated>2023-02-07T22:17:12Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-02-07T22:17:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0983f6bf2bfc0789b51ddf7315f644ff4da50acb'/>
<id>urn:sha1:0983f6bf2bfc0789b51ddf7315f644ff4da50acb</id>
<content type='text'>
Pull devicetree fixes from Rob Herring:

 - Fix handling of multiple OF framebuffer devices

 - Fix booting on Socionext Synquacer with bad 'dma-ranges' entries

 - Add DT binding .yamllint to .gitignore

* tag 'devicetree-fixes-for-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  dt-bindings: interrupt-controller: arm,gic-v3: Fix typo in description of msi-controller property
  dt-bindings: Fix .gitignore
  of/address: Return an error when no valid dma-ranges are found
  of: Make OF framebuffer device names unique
</content>
</entry>
<entry>
<title>of/address: Return an error when no valid dma-ranges are found</title>
<updated>2023-02-02T23:10:58Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2023-01-28T17:47:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f6933c01e42d2fc83b9133ed755609e4aac6eadd'/>
<id>urn:sha1:f6933c01e42d2fc83b9133ed755609e4aac6eadd</id>
<content type='text'>
Commit 7a8b64d17e35 ("of/address: use range parser for of_dma_get_range")
converted the parsing of dma-range properties to use code shared with the
PCI range parser. The intent was to introduce no functional changes however
in the case where we fail to translate the first resource instead of
returning -EINVAL the new code we return 0. Restore the previous behaviour
by returning an error if we find no valid ranges, the original code only
handled the first range but subsequently support for parsing all supplied
ranges was added.

This avoids confusing code using the parsed ranges which doesn't expect to
successfully parse ranges but have only a list terminator returned, this
fixes breakage with so far as I can tell all DMA for on SoC devices on the
Socionext Synquacer platform which has a firmware supplied DT. A bisect
identified the original conversion as triggering the issues there.

Fixes: 7a8b64d17e35 ("of/address: use range parser for of_dma_get_range")
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: Luca Di Stefano &lt;luca.distefano@linaro.org&gt;
Cc: 993612@bugs.debian.org
Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20230126-synquacer-boot-v2-1-cb80fd23c4e2@kernel.org
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>of: Make OF framebuffer device names unique</title>
<updated>2023-02-02T23:10:33Z</updated>
<author>
<name>Michal Suchanek</name>
<email>msuchanek@suse.de</email>
</author>
<published>2023-02-01T16:22:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=241d2fb56a18473af5f2ff0d512992a996eb64dd'/>
<id>urn:sha1:241d2fb56a18473af5f2ff0d512992a996eb64dd</id>
<content type='text'>
Since Linux 5.19 this error is observed:

sysfs: cannot create duplicate filename '/devices/platform/of-display'

This is because multiple devices with the same name 'of-display' are
created on the same bus. Update the code to create numbered device names
for the displays.

Also, fix a node refcounting issue when exiting the boot display loop.

cc: linuxppc-dev@lists.ozlabs.org
References: https://bugzilla.kernel.org/show_bug.cgi?id=216095
Fixes: 52b1b46c39ae ("of: Create platform devices for OF framebuffers")
Reported-by: Erhard F. &lt;erhard_f@mailbox.org&gt;
Suggested-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Michal Suchanek &lt;msuchanek@suse.de&gt;
Link: https://lore.kernel.org/r/20230201162247.3575506-1-robh@kernel.org
[robh: Rework to avoid node refcount leaks]
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>Revert "mm: kmemleak: alloc gray object for reserved region with direct map"</title>
<updated>2023-02-01T00:44:09Z</updated>
<author>
<name>Isaac J. Manjarres</name>
<email>isaacmanjarres@google.com</email>
</author>
<published>2023-01-24T23:02:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8ef852f1cb426a5812aee700d3b4297aaa426acc'/>
<id>urn:sha1:8ef852f1cb426a5812aee700d3b4297aaa426acc</id>
<content type='text'>
This reverts commit 972fa3a7c17c9d60212e32ecc0205dc585b1e769.

Kmemleak operates by periodically scanning memory regions for pointers to
allocated memory blocks to determine if they are leaked or not.  However,
reserved memory regions can be used for DMA transactions between a device
and a CPU, and thus, wouldn't contain pointers to allocated memory blocks,
making them inappropriate for kmemleak to scan.  Thus, revert this commit.

Link: https://lkml.kernel.org/r/20230124230254.295589-1-isaacmanjarres@google.com
Fixes: 972fa3a7c17c9 ("mm: kmemleak: alloc gray object for reserved region with direct map")
Signed-off-by: Isaac J. Manjarres &lt;isaacmanjarres@google.com&gt;
Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Calvin Zhang &lt;calvinzhang.cool@gmail.com&gt;
Cc: Frank Rowand &lt;frowand.list@gmail.com&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Saravana Kannan &lt;saravanak@google.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;	[5.17+]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>of: fdt: Honor CONFIG_CMDLINE* even without /chosen node, take 2</title>
<updated>2023-01-05T03:31:59Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-01-03T18:00:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=064e32dc5b03114d0767893fecdaf7b5dfd8c286'/>
<id>urn:sha1:064e32dc5b03114d0767893fecdaf7b5dfd8c286</id>
<content type='text'>
I do not read a strict requirement on /chosen node in either ePAPR or in
Documentation/devicetree. Help text for CONFIG_CMDLINE and
CONFIG_CMDLINE_EXTEND doesn't make their behavior explicitly dependent on
the presence of /chosen or the presense of /chosen/bootargs.

However the early check for /chosen and bailing out in
early_init_dt_scan_chosen() skips CONFIG_CMDLINE handling which is not
really related to /chosen node or the particular method of passing cmdline
from bootloader.

This leads to counterintuitive combinations (assuming
CONFIG_CMDLINE_EXTEND=y):

a) bootargs="foo", CONFIG_CMDLINE="bar" =&gt; cmdline=="foo bar"
b) /chosen missing, CONFIG_CMDLINE="bar" =&gt; cmdline==""
c) bootargs="", CONFIG_CMDLINE="bar" =&gt; cmdline==" bar"

Rework early_init_dt_scan_chosen() so that the cmdline config options are
always handled.

[commit msg written by Alexander Sverdlin]

Cc: Alexander Sverdlin &lt;alexander.sverdlin@gmail.com&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Tested-by: Geoff Levand &lt;geoff@infradead.org&gt;
Reviewed-by: Alexander Sverdlin &lt;alexander.sverdlin@gmail.com&gt;
Link: https://lore.kernel.org/r/20230103-dt-cmdline-fix-v1-2-7038e88b18b6@kernel.org
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>Revert "of: fdt: Honor CONFIG_CMDLINE* even without /chosen node"</title>
<updated>2023-01-05T03:31:59Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-01-03T18:00:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bd0ddcfc83d85bc30c868f2c3457312c7f1ccee2'/>
<id>urn:sha1:bd0ddcfc83d85bc30c868f2c3457312c7f1ccee2</id>
<content type='text'>
This reverts commit a7d550f82b445cf218b47a2c1a9c56e97ecb8c7a.

Some arches (PPC at least) don't call early_init_dt_scan_nodes(), so
moving the cmdline processing there breaks them.

Reported-by: Geoff Levand &lt;geoff@infradead.org&gt;
Cc: Alexander Sverdlin &lt;alexander.sverdlin@gmail.com&gt;
Tested-by: Geoff Levand &lt;geoff@infradead.org&gt;
Reviewed-by: Alexander Sverdlin &lt;alexander.sverdlin@gmail.com&gt;
Link: https://lore.kernel.org/r/20230103-dt-cmdline-fix-v1-1-7038e88b18b6@kernel.org
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>of/fdt: run soc memory setup when early_init_dt_scan_memory fails</title>
<updated>2023-01-04T00:41:01Z</updated>
<author>
<name>Andreas Rammhold</name>
<email>andreas@rammhold.de</email>
</author>
<published>2022-12-23T11:27:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2a12187d5853d9fd5102278cecef7dac7c8ce7ea'/>
<id>urn:sha1:2a12187d5853d9fd5102278cecef7dac7c8ce7ea</id>
<content type='text'>
If memory has been found early_init_dt_scan_memory now returns 1. If
it hasn't found any memory it will return 0, allowing other memory
setup mechanisms to carry on.

Previously early_init_dt_scan_memory always returned 0 without
distinguishing between any kind of memory setup being done or not. Any
code path after the early_init_dt_scan memory call in the ramips
plat_mem_setup code wouldn't be executed anymore. Making
early_init_dt_scan_memory the only way to initialize the memory.

Some boards, including my mt7621 based Cudy X6 board, depend on memory
initialization being done via the soc_info.mem_detect function
pointer. Those wouldn't be able to obtain memory and panic the kernel
during early bootup with the message "early_init_dt_alloc_memory_arch:
Failed to allocate 12416 bytes align=0x40".

Fixes: 1f012283e936 ("of/fdt: Rework early_init_dt_scan_memory() to call directly")
Cc: stable@vger.kernel.org
Signed-off-by: Andreas Rammhold &lt;andreas@rammhold.de&gt;
Link: https://lore.kernel.org/r/20221223112748.2935235-1-andreas@rammhold.de
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'devicetree-for-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux</title>
<updated>2022-12-20T14:48:24Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2022-12-20T14:48:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e0caea7545430a530bec19bb0de6c1c56c04924'/>
<id>urn:sha1:3e0caea7545430a530bec19bb0de6c1c56c04924</id>
<content type='text'>
Pull more devicetree updates from Rob Herring:
 "This is mostly a treewide clean-up from Krzysztof. There's also a
  couple of fixes and things that fell thru the cracks.

  I must say this has been a nice merge window without bindings dumped
  in at the last minute introducing warnings.

  Summary:

   - Treewide dropping of redundant 'binding' or 'schema' from schema
     titles. This will be followed up with a automated check to catch
     these.

   - Re-sort vendor-prefies

   - Convert GPIO based watchdog to schema

   - Handle all the variations for clocks, resets, power domains in i.MX
     PCIe binding

   - Document missing 'power-domains' property in mxsfb

   - Fix error with path references in Tegra XUSB example

   - Honor CONFIG_CMDLINE* even without /chosen node"

* tag 'devicetree-for-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  dt-bindings: drop redundant part of title (manual)
  dt-bindings: clock: drop redundant part of title
  dt-bindings: drop redundant part of title (beginning)
  dt-bindings: drop redundant part of title (end, part three)
  dt-bindings: drop redundant part of title (end, part two)
  dt-bindings: drop redundant part of title (end)
  dt-bindings: clock: st,stm32mp1-rcc: add proper title
  dt-bindings: memory-controllers: ti,gpmc-child: drop redundant part of title
  dt-bindings: drop redundant part of title of shared bindings
  dt-bindings: watchdog: gpio: Convert bindings to YAML
  dt-bindings: imx6q-pcie: Handle more resets on legacy platforms
  dt-bindings: imx6q-pcie: Handle various PD configurations
  dt-bindings: imx6q-pcie: Handle various clock configurations
  dt-bindings: hwmon: ntc-thermistor: drop Naveen Krishna Chatradhi from maintainers
  dt-bindings: mxsfb: Document i.MX8M/i.MX6SX/i.MX6SL power-domains property
  dt-bindings: vendor-prefixes: sort entries alphabetically
  dt-bindings: usb: tegra-xusb: Remove path references
  of: fdt: Honor CONFIG_CMDLINE* even without /chosen node
</content>
</entry>
</feed>
