linux/drivers/of
Andrea della Porta b222816f9c of: address: Preserve the flags portion on 1:1 dma-ranges mapping
[ Upstream commit 7f05e20b98 ]

A missing or empty dma-ranges in a DT node implies a 1:1 mapping for dma
translations. In this specific case, the current behaviour is to zero out
the entire specifier so that the translation could be carried on as an
offset from zero. This includes address specifier that has flags (e.g.
PCI ranges).

Once the flags portion has been zeroed, the translation chain is broken
since the mapping functions will check the upcoming address specifier
against mismatching flags, always failing the 1:1 mapping and its entire
purpose of always succeeding.

Set to zero only the address portion while passing the flags through.

Fixes: dbbdee9473 ("of/address: Merge all of the bus translation code")
Cc: stable@vger.kernel.org
Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
Tested-by: Herve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/e51ae57874e58a9b349c35e2e877425ebc075d7a.1732441813.git.andrea.porta@suse.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-01-09 13:31:49 +01:00
..
unittest-data of: Fix double free in of_parse_phandle_with_args_map 2024-01-25 15:35:40 -08:00
address.c of: address: Preserve the flags portion on 1:1 dma-ranges mapping 2025-01-09 13:31:49 +01:00
base.c of: Fix error path in of_parse_phandle_with_args_map() 2024-12-27 13:58:56 +01:00
cpu.c of: Move CPU node related functions to their own file 2023-04-13 17:46:34 -05:00
device.c Devicetree updates for v6.6: 2023-08-30 16:59:03 -07:00
dynamic.c of: dynamic: Synchronize of_changeset_destroy() with the devlink removals 2024-04-10 16:36:03 +02:00
fdt.c of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify 2024-12-09 10:31:56 +01:00
fdt_address.c of: Use SPDX license tag for DT files 2018-01-08 08:22:45 -06:00
irq.c of/irq: Fix using uninitialized variable @addr_len in API of_irq_parse_one() 2024-12-27 13:58:55 +01:00
Kconfig of: make OF_EARLY_FLATTREE depend on HAS_IOMEM 2023-07-10 08:48:35 -06:00
kexec.c of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify 2024-12-09 10:31:56 +01:00
kobj.c of: make of_node_ktype constant 2023-02-06 11:03:00 -06:00
Makefile Char/Misc drivers for 6.4-rc1 2023-04-27 12:07:50 -07:00
module.c of: module: add buffer overflow check in of_modalias() 2024-06-12 11:12:10 +02:00
of_numa.c of, numa: Fetch empty NUMA node ID from distance map 2021-10-04 13:13:44 -05:00
of_private.h of/irq: Factor out parsing of interrupt-map parent phandle+args from of_irq_parse_raw() 2024-07-25 09:50:43 +02:00
of_reserved_mem.c of: reserved_mem: Use stable allocation order 2023-06-20 09:34:58 -06:00
overlay.c of: overlay: Reorder struct fragment fields kerneldoc 2023-10-02 11:34:23 -05:00
pdt.c of: Remove struct device_node.type pointer 2019-01-10 16:24:44 -06:00
platform.c of: Move of_skipped_node_table within #ifdef CONFIG_OF_ADDRESS 2023-08-22 12:53:11 -05:00
property.c of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing 2024-03-06 14:48:39 +00:00
resolver.c of: overlay: log the error cause on resolver failure 2020-03-02 11:32:44 -06:00
unittest.c um: Unconditionally call unflatten_device_tree() 2024-12-09 10:31:55 +01:00