* [PATCH stable 5.4 1/2] Revert "of/fdt: Make sure no-map does not remove already reserved regions"
2021-05-12 12:28 Revert memblock backports with missing dependencies Quentin Perret
@ 2021-05-12 12:28 ` Quentin Perret
2021-05-12 12:28 ` [PATCH stable 5.4 2/2] Revert "fdt: Properly handle "no-map" field in the memory region" Quentin Perret
` (5 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Quentin Perret @ 2021-05-12 12:28 UTC (permalink / raw)
To: stable; +Cc: alexandre.torgue, robh+dt, f.fainelli, ardb, gregkh, sashal
This reverts commit 3cbd3038c9155038020560729cde50588311105d.
It is not really a fix, and the backport misses dependencies, which
breaks existing platforms.
Reported-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>
Signed-off-by: Quentin Perret <qperret@google.com>
---
drivers/of/fdt.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index fc24102e25ce..036af904e0cf 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -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);
}
--
2.31.1.607.g51e8a6a459-goog
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH stable 5.4 2/2] Revert "fdt: Properly handle "no-map" field in the memory region"
2021-05-12 12:28 Revert memblock backports with missing dependencies Quentin Perret
2021-05-12 12:28 ` [PATCH stable 5.4 1/2] Revert "of/fdt: Make sure no-map does not remove already reserved regions" Quentin Perret
@ 2021-05-12 12:28 ` Quentin Perret
2021-05-12 12:30 ` [PATCH stable 4.19 1/2] Revert "of/fdt: Make sure no-map does not remove already reserved regions" Quentin Perret
` (4 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Quentin Perret @ 2021-05-12 12:28 UTC (permalink / raw)
To: stable; +Cc: alexandre.torgue, robh+dt, f.fainelli, ardb, gregkh, sashal
This reverts commit fb326c6ce0dcbb6273202c6e012759754ec8538d.
It is not really a fix, and the backport misses dependencies, which
breaks existing platforms.
Reported-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>
Signed-off-by: Quentin Perret <qperret@google.com>
---
drivers/of/fdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 036af904e0cf..223d617ecfe1 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -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);
}
--
2.31.1.607.g51e8a6a459-goog
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH stable 4.19 1/2] Revert "of/fdt: Make sure no-map does not remove already reserved regions"
2021-05-12 12:28 Revert memblock backports with missing dependencies Quentin Perret
2021-05-12 12:28 ` [PATCH stable 5.4 1/2] Revert "of/fdt: Make sure no-map does not remove already reserved regions" Quentin Perret
2021-05-12 12:28 ` [PATCH stable 5.4 2/2] Revert "fdt: Properly handle "no-map" field in the memory region" Quentin Perret
@ 2021-05-12 12:30 ` Quentin Perret
2021-05-12 12:30 ` [PATCH stable 4.19 2/2] Revert "fdt: Properly handle "no-map" field in the memory region" Quentin Perret
2021-05-12 12:30 ` [PATCH stable 4.14 1/2] Revert "of/fdt: Make sure no-map does not remove already reserved regions" Quentin Perret
` (3 subsequent siblings)
6 siblings, 1 reply; 11+ messages in thread
From: Quentin Perret @ 2021-05-12 12:30 UTC (permalink / raw)
To: stable; +Cc: alexandre.torgue, robh+dt, f.fainelli, ardb, gregkh, sashal
This reverts commit 74f2678aab60c9915daa83e6e23d31a896932d9d.
It is not really a fix, and the backport misses dependencies, which
breaks existing platforms.
Reported-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>
Signed-off-by: Quentin Perret <qperret@google.com>
---
drivers/of/fdt.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 21160a08ead4..aa15e5d183c1 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -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);
}
--
2.31.1.607.g51e8a6a459-goog
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH stable 4.19 2/2] Revert "fdt: Properly handle "no-map" field in the memory region"
2021-05-12 12:30 ` [PATCH stable 4.19 1/2] Revert "of/fdt: Make sure no-map does not remove already reserved regions" Quentin Perret
@ 2021-05-12 12:30 ` Quentin Perret
0 siblings, 0 replies; 11+ messages in thread
From: Quentin Perret @ 2021-05-12 12:30 UTC (permalink / raw)
To: stable; +Cc: alexandre.torgue, robh+dt, f.fainelli, ardb, gregkh, sashal
This reverts commit 03972d6b1bbac1620455589e0367f6f69ff7b2df.
It is not really a fix, and the backport misses dependencies, which
breaks existing platforms.
Reported-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>
Signed-off-by: Quentin Perret <qperret@google.com>
---
drivers/of/fdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index aa15e5d183c1..800ad252cf9c 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -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);
}
--
2.31.1.607.g51e8a6a459-goog
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH stable 4.14 1/2] Revert "of/fdt: Make sure no-map does not remove already reserved regions"
2021-05-12 12:28 Revert memblock backports with missing dependencies Quentin Perret
` (2 preceding siblings ...)
2021-05-12 12:30 ` [PATCH stable 4.19 1/2] Revert "of/fdt: Make sure no-map does not remove already reserved regions" Quentin Perret
@ 2021-05-12 12:30 ` Quentin Perret
2021-05-12 12:30 ` [PATCH stable 4.14 2/2] Revert "fdt: Properly handle "no-map" field in the memory region" Quentin Perret
2021-05-12 12:30 ` [PATCH stable 4.9 1/2] Revert "of/fdt: Make sure no-map does not remove already reserved regions" Quentin Perret
` (2 subsequent siblings)
6 siblings, 1 reply; 11+ messages in thread
From: Quentin Perret @ 2021-05-12 12:30 UTC (permalink / raw)
To: stable; +Cc: alexandre.torgue, robh+dt, f.fainelli, ardb, gregkh, sashal
This reverts commit 6793433fc8f263eaba1621d3724b6aeba511c6c5.
It is not really a fix, and the backport misses dependencies, which
breaks existing platforms.
Reported-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>
Signed-off-by: Quentin Perret <qperret@google.com>
---
drivers/of/fdt.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 3f58812d02d9..6df66fcefbb4 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -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);
}
--
2.31.1.607.g51e8a6a459-goog
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH stable 4.14 2/2] Revert "fdt: Properly handle "no-map" field in the memory region"
2021-05-12 12:30 ` [PATCH stable 4.14 1/2] Revert "of/fdt: Make sure no-map does not remove already reserved regions" Quentin Perret
@ 2021-05-12 12:30 ` Quentin Perret
0 siblings, 0 replies; 11+ messages in thread
From: Quentin Perret @ 2021-05-12 12:30 UTC (permalink / raw)
To: stable; +Cc: alexandre.torgue, robh+dt, f.fainelli, ardb, gregkh, sashal
This reverts commit 71bc5d496725f7f923904d2f41cd39e32c647fdf.
It is not really a fix, and the backport misses dependencies, which
breaks existing platforms.
Reported-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>
Signed-off-by: Quentin Perret <qperret@google.com>
---
drivers/of/fdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 6df66fcefbb4..6337c394bfe3 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -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);
}
--
2.31.1.607.g51e8a6a459-goog
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH stable 4.9 1/2] Revert "of/fdt: Make sure no-map does not remove already reserved regions"
2021-05-12 12:28 Revert memblock backports with missing dependencies Quentin Perret
` (3 preceding siblings ...)
2021-05-12 12:30 ` [PATCH stable 4.14 1/2] Revert "of/fdt: Make sure no-map does not remove already reserved regions" Quentin Perret
@ 2021-05-12 12:30 ` Quentin Perret
2021-05-12 12:30 ` [PATCH stable 4.9 2/2] Revert "fdt: Properly handle "no-map" field in the memory region" Quentin Perret
2021-05-12 12:34 ` Revert memblock backports with missing dependencies Ard Biesheuvel
2021-05-12 14:07 ` Greg KH
6 siblings, 1 reply; 11+ messages in thread
From: Quentin Perret @ 2021-05-12 12:30 UTC (permalink / raw)
To: stable; +Cc: alexandre.torgue, robh+dt, f.fainelli, ardb, gregkh, sashal
This reverts commit 666ae7c255f9eb7a8fd8e55641542f3624a78b43.
It is not really a fix, and the backport misses dependencies, which
breaks existing platforms.
Reported-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>
Signed-off-by: Quentin Perret <qperret@google.com>
---
drivers/of/fdt.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 9054b8f218a7..f90b626269ab 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -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);
}
--
2.31.1.607.g51e8a6a459-goog
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH stable 4.9 2/2] Revert "fdt: Properly handle "no-map" field in the memory region"
2021-05-12 12:30 ` [PATCH stable 4.9 1/2] Revert "of/fdt: Make sure no-map does not remove already reserved regions" Quentin Perret
@ 2021-05-12 12:30 ` Quentin Perret
0 siblings, 0 replies; 11+ messages in thread
From: Quentin Perret @ 2021-05-12 12:30 UTC (permalink / raw)
To: stable; +Cc: alexandre.torgue, robh+dt, f.fainelli, ardb, gregkh, sashal
This reverts commit 86ac82a7c708acf4738c396228be7b8fdaae4d99.
It is not really a fix, and the backport misses dependencies, which
breaks existing platforms.
Reported-by: Alexandre TORGUE <alexandre.torgue@foss.st.com>
Signed-off-by: Quentin Perret <qperret@google.com>
---
drivers/of/fdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index f90b626269ab..e9360d5cbcba 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -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);
}
--
2.31.1.607.g51e8a6a459-goog
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: Revert memblock backports with missing dependencies
2021-05-12 12:28 Revert memblock backports with missing dependencies Quentin Perret
` (4 preceding siblings ...)
2021-05-12 12:30 ` [PATCH stable 4.9 1/2] Revert "of/fdt: Make sure no-map does not remove already reserved regions" Quentin Perret
@ 2021-05-12 12:34 ` Ard Biesheuvel
2021-05-12 14:07 ` Greg KH
6 siblings, 0 replies; 11+ messages in thread
From: Ard Biesheuvel @ 2021-05-12 12:34 UTC (permalink / raw)
To: Quentin Perret
Cc: # 3.4.x, Alexandre TORGUE, Rob Herring, Florian Fainelli,
Greg Kroah-Hartman, Sasha Levin
On Wed, 12 May 2021 at 14:28, Quentin Perret <qperret@google.com> wrote:
>
> 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.
>
> [1] https://lore.kernel.org/linux-arm-kernel/CAL_Jsq+LUPZFhXd+j-xM67rZB=pvEvZM+1sfckip0Lqq02PkZQ@mail.gmail.com/
>
> 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(-)
>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Revert memblock backports with missing dependencies
2021-05-12 12:28 Revert memblock backports with missing dependencies Quentin Perret
` (5 preceding siblings ...)
2021-05-12 12:34 ` Revert memblock backports with missing dependencies Ard Biesheuvel
@ 2021-05-12 14:07 ` Greg KH
6 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2021-05-12 14:07 UTC (permalink / raw)
To: Quentin Perret
Cc: stable, alexandre.torgue, robh+dt, f.fainelli, ardb, sashal
On Wed, May 12, 2021 at 12:28:51PM +0000, Quentin Perret wrote:
> 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.
>
> [1] https://lore.kernel.org/linux-arm-kernel/CAL_Jsq+LUPZFhXd+j-xM67rZB=pvEvZM+1sfckip0Lqq02PkZQ@mail.gmail.com/
>
> 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
^ permalink raw reply [flat|nested] 11+ messages in thread