Revert memblock backports with missing dependencies
Hi all,
A breakage in 5.4.102 has been reported [1] due to the backport of the two following upstream commits:
8a5a75e5e9e5 ("of/fdt: Make sure no-map does not remove already reserved regions") 86588296acbf ("fdt: Properly handle "no-map" field in the memory region")
As Alexandre noted in the original thread, the backport missed dependencies. But since these patches were not really fixes in the first place, it seems preferable to simply revert them from 5.4 and earlier.
Quentin Perret (2):
Revert "of/fdt: Make sure no-map does not remove already reserved
regions"
Revert "fdt: Properly handle "no-map" field in the memory region"
drivers/of/fdt.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
Signature · 1 line
2.31.1.607.g51e8a6a459-goog
PATCH 1/2 Revert "of/fdt: Make sure no-map does not remove already reserved regions"
This reverts commit 3cbd3038c9155038020560729cde50588311105d. It is not really a fix, and the backport misses dependencies, which breaks existing platforms.
--- drivers/of/fdt.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/of/fdt.c +1 -9
@@ -1153,16 +1153,8 @@ 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) { -/* -* 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 ; - +if (nomap)return memblock_mark_nomap (base, size); - }return memblock_reserve (base, size); }
Signature · 1 line
2.31.1.607.g51e8a6a459-goog
PATCH 1/2 Revert "of/fdt: Make sure no-map does not remove already reserved regions"
In reply to Quentin PerretThis reverts commit 74f2678aab60c9915daa83e6e23d31a896932d9d. It is not really a fix, and the backport misses dependencies, which breaks existing platforms.
--- drivers/of/fdt.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/of/fdt.c +1 -9
@@ -1172,16 +1172,8 @@ 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) { -/* -* 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 ; - +if (nomap)return memblock_mark_nomap (base, size); - }return memblock_reserve (base, size); }
Signature · 1 line
2.31.1.607.g51e8a6a459-goog
PATCH 2/2 Revert "fdt: Properly handle "no-map" field in the memory region"
This reverts commit 03972d6b1bbac1620455589e0367f6f69ff7b2df. It is not really a fix, and the backport misses dependencies, which breaks existing platforms.
--- drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/fdt.c +1 -1
@@ -1173,7 +1173,7 @@ int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size, bool nomap) { if (nomap) - return memblock_mark_nomap(base, size); + return memblock_remove(base, size);return memblock_reserve (base, size); }
Signature · 1 line
2.31.1.607.g51e8a6a459-goog
PATCH 1/2 Revert "of/fdt: Make sure no-map does not remove already reserved regions"
In reply to Quentin PerretThis reverts commit 6793433fc8f263eaba1621d3724b6aeba511c6c5. It is not really a fix, and the backport misses dependencies, which breaks existing platforms.
--- drivers/of/fdt.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/of/fdt.c +1 -9
@@ -1212,16 +1212,8 @@ 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) { -/* -* 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 ; - +if (nomap)return memblock_mark_nomap (base, size); - }return memblock_reserve (base, size); }
Signature · 1 line
2.31.1.607.g51e8a6a459-goog
PATCH 2/2 Revert "fdt: Properly handle "no-map" field in the memory region"
This reverts commit 71bc5d496725f7f923904d2f41cd39e32c647fdf. It is not really a fix, and the backport misses dependencies, which breaks existing platforms.
--- drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/fdt.c +1 -1
@@ -1213,7 +1213,7 @@ int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size, bool nomap) { if (nomap) - return memblock_mark_nomap(base, size); + return memblock_remove(base, size);return memblock_reserve (base, size); }
Signature · 1 line
2.31.1.607.g51e8a6a459-goog
PATCH 1/2 Revert "of/fdt: Make sure no-map does not remove already reserved regions"
In reply to Quentin PerretThis reverts commit 666ae7c255f9eb7a8fd8e55641542f3624a78b43. It is not really a fix, and the backport misses dependencies, which breaks existing platforms.
--- drivers/of/fdt.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/of/fdt.c +1 -9
@@ -1158,16 +1158,8 @@ void __init __weak early_init_dt_add_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) { -/* -* 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 ; - +if (nomap)return memblock_mark_nomap (base, size); - }return memblock_reserve (base, size); }
Signature · 1 line
2.31.1.607.g51e8a6a459-goog
PATCH 2/2 Revert "fdt: Properly handle "no-map" field in the memory region"
This reverts commit 86ac82a7c708acf4738c396228be7b8fdaae4d99. It is not really a fix, and the backport misses dependencies, which breaks existing platforms.
--- drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/fdt.c +1 -1
@@ -1159,7 +1159,7 @@ int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size, bool nomap) { if (nomap) - return memblock_mark_nomap(base, size); + return memblock_remove(base, size);return memblock_reserve (base, size); }
Signature · 1 line
2.31.1.607.g51e8a6a459-goog
PATCH 2/2 Revert "fdt: Properly handle "no-map" field in the memory region"
In reply to Quentin PerretThis reverts commit fb326c6ce0dcbb6273202c6e012759754ec8538d. It is not really a fix, and the backport misses dependencies, which breaks existing platforms.
--- drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/fdt.c +1 -1
@@ -1154,7 +1154,7 @@ int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size, bool nomap) { if (nomap) - return memblock_mark_nomap(base, size); + return memblock_remove(base, size);return memblock_reserve (base, size); }
Signature · 1 line
2.31.1.607.g51e8a6a459-goog
Ard Biesheuvel
Acked-byQuoted 15 lines · Quentin Perret
Hi all,
A breakage in 5.4.102 has been reported [1] due to the backport of the two following upstream commits:
8a5a75e5e9e5("of/fdt: Make sure no-map does not remove already reserved regions")86588296acbf("fdt: Properly handle "no-map" field in the memory region")As Alexandre noted in the original thread, the backport missed dependencies. But since these patches were not really fixes in the first place, it seems preferable to simply revert them from 5.4 and earlier.
Quoted 8 lines
Quentin Perret (2):
Revert "of/fdt: Make sure no-map does not remove already reserved
regions"
Revert "fdt: Properly handle "no-map" field in the memory region"drivers/of/fdt.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
Greg KH
maintainerQuoted 14 lines · Quentin Perret
Hi all,
A breakage in 5.4.102 has been reported [1] due to the backport of the two following upstream commits:
8a5a75e5e9e5("of/fdt: Make sure no-map does not remove already reserved regions")86588296acbf("fdt: Properly handle "no-map" field in the memory region")As Alexandre noted in the original thread, the backport missed dependencies. But since these patches were not really fixes in the first place, it seems preferable to simply revert them from 5.4 and earlier.
Quoted 7 lines
Quentin Perret (2):
Revert "of/fdt: Make sure no-map does not remove already reserved
regions"
Revert "fdt: Properly handle "no-map" field in the memory region"drivers/of/fdt.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
All now queued up, thanks.
greg k-h