diff options
author | 2021-03-11 08:19:46 +0200 | |
---|---|---|
committer | 2021-03-11 08:52:53 +0200 | |
commit | 35bb28ece90dfb7f72b77ba529f25f79323d9581 (patch) | |
tree | 4ae931a45b83b5701214952066bb6fa6d839d7ff /drivers/of/fdt.c | |
parent | drm/i915: Extend icl_sanitize_encoder_pll_mapping() to all DDI platforms (diff) | |
parent | Linux 5.12-rc2 (diff) | |
download | linux-dev-35bb28ece90dfb7f72b77ba529f25f79323d9581.tar.xz linux-dev-35bb28ece90dfb7f72b77ba529f25f79323d9581.zip |
Merge drm/drm-next into drm-intel-next
Sync up with upstream.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/of/fdt.c')
-rw-r--r-- | drivers/of/fdt.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index feb0f2d67fc5..dcc1dd96911a 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -1146,8 +1146,16 @@ int __init __weak early_init_dt_mark_hotplug_memory_arch(u64 base, u64 size) int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size, bool nomap) { - if (nomap) - return memblock_remove(base, size); + if (nomap) { + /* + * If the memory is already reserved (by another region), we + * should not allow it to be marked nomap. + */ + if (memblock_is_region_reserved(base, size)) + return -EBUSY; + + return memblock_mark_nomap(base, size); + } return memblock_reserve(base, size); } |