* [PATCH] microblaze: don't treat zero reserved memory regions as error
@ 2024-07-29 5:33 Mike Rapoport
2024-07-29 5:42 ` Michal Simek
0 siblings, 1 reply; 2+ messages in thread
From: Mike Rapoport @ 2024-07-29 5:33 UTC (permalink / raw)
To: Michal Simek; +Cc: Guenter Roeck, Mike Rapoport, Wei Yang, linux-kernel
Before commit 721f4a6526da ("mm/memblock: remove empty dummy entry") the
check for non-zero of memblock.reserved.cnt in mmu_init() would always
be true either because memblock.reserved.cnt is initialized to 1 or
because there were memory reservations earlier.
The removal of dummy empty entry in memblock caused this check to fail
because now memblock.reserved.cnt is initialized to 0.
Remove the check for non-zero of memblock.reserved.cnt because it's
perfectly fine to have an empty memblock.reserved array that early in
boot.
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mike Rapoport <rppt@kernel.org>
Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
---
Looks like it fell between the cracks.
arch/microblaze/mm/init.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index 3827dc76edd8..4520c5741579 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -193,11 +193,6 @@ asmlinkage void __init mmu_init(void)
{
unsigned int kstart, ksize;
- if (!memblock.reserved.cnt) {
- pr_emerg("Error memory count\n");
- machine_restart(NULL);
- }
-
if ((u32) memblock.memory.regions[0].size < 0x400000) {
pr_emerg("Memory must be greater than 4MB\n");
machine_restart(NULL);
base-commit: dc1c8034e31b14a2e5e212104ec508aec44ce1b9
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] microblaze: don't treat zero reserved memory regions as error
2024-07-29 5:33 [PATCH] microblaze: don't treat zero reserved memory regions as error Mike Rapoport
@ 2024-07-29 5:42 ` Michal Simek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2024-07-29 5:42 UTC (permalink / raw)
To: Mike Rapoport; +Cc: Guenter Roeck, Wei Yang, linux-kernel
po 29. 7. 2024 v 7:33 odesílatel Mike Rapoport <rppt@kernel.org> napsal:
>
> Before commit 721f4a6526da ("mm/memblock: remove empty dummy entry") the
> check for non-zero of memblock.reserved.cnt in mmu_init() would always
> be true either because memblock.reserved.cnt is initialized to 1 or
> because there were memory reservations earlier.
>
> The removal of dummy empty entry in memblock caused this check to fail
> because now memblock.reserved.cnt is initialized to 0.
>
> Remove the check for non-zero of memblock.reserved.cnt because it's
> perfectly fine to have an empty memblock.reserved array that early in
> boot.
>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Mike Rapoport <rppt@kernel.org>
> Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
> Tested-by: Guenter Roeck <linux@roeck-us.net>
> ---
>
> Looks like it fell between the cracks.
>
> arch/microblaze/mm/init.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
> index 3827dc76edd8..4520c5741579 100644
> --- a/arch/microblaze/mm/init.c
> +++ b/arch/microblaze/mm/init.c
> @@ -193,11 +193,6 @@ asmlinkage void __init mmu_init(void)
> {
> unsigned int kstart, ksize;
>
> - if (!memblock.reserved.cnt) {
> - pr_emerg("Error memory count\n");
> - machine_restart(NULL);
> - }
> -
> if ((u32) memblock.memory.regions[0].size < 0x400000) {
> pr_emerg("Memory must be greater than 4MB\n");
> machine_restart(NULL);
>
> base-commit: dc1c8034e31b14a2e5e212104ec508aec44ce1b9
> --
> 2.43.0
>
Applied.
M
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-29 5:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-29 5:33 [PATCH] microblaze: don't treat zero reserved memory regions as error Mike Rapoport
2024-07-29 5:42 ` Michal Simek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®