public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Mike Rapoport <rppt@kernel.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Wei Yang <richard.weiyang@gmail.com>,
	Sasha Levin <sashal@kernel.org>,
	monstr@monstr.eu
Subject: [PATCH AUTOSEL 6.6 10/20] microblaze: don't treat zero reserved memory regions as error
Date: Tue,  3 Sep 2024 15:23:42 -0400	[thread overview]
Message-ID: <20240903192425.1107562-10-sashal@kernel.org> (raw)
In-Reply-To: <20240903192425.1107562-1-sashal@kernel.org>

From: Mike Rapoport <rppt@kernel.org>

[ Upstream commit 0075df288dd8a7abfe03b3766176c393063591dd ]

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>
Link: https://lore.kernel.org/r/20240729053327.4091459-1-rppt@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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 3827dc76edd82..4520c57415797 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);
-- 
2.43.0


  parent reply	other threads:[~2024-09-03 20:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-03 19:23 [PATCH AUTOSEL 6.6 01/20] ASoC: SOF: mediatek: Add missing board compatible Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 02/20] ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 03/20] ASoC: allow module autoloading for table db1200_pids Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 04/20] ASoC: allow module autoloading for table board_ids Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 05/20] ALSA: hda/realtek - Fixed ALC256 headphone no sound Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 06/20] ALSA: hda/realtek - FIxed ALC285 " Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 07/20] scsi: lpfc: Fix overflow build issue Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 08/20] pinctrl: at91: make it work with current gpiolib Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 09/20] hwmon: (asus-ec-sensors) remove VRM temp X570-E GAMING Sasha Levin
2024-09-03 19:23 ` Sasha Levin [this message]
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 11/20] platform/x86: x86-android-tablets: Make Lenovo Yoga Tab 3 X90F DMI match less strict Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 12/20] net: ftgmac100: Ensure tx descriptor updates are visible Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 13/20] LoongArch: Define ARCH_IRQ_INIT_FLAGS as IRQ_NOPROBE Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 14/20] wifi: iwlwifi: lower message level for FW buffer destination Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 15/20] wifi: iwlwifi: mvm: fix iwl_mvm_scan_fits() calculation Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 16/20] wifi: iwlwifi: mvm: fix iwl_mvm_max_scan_ie_fw_cmd_room() Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 17/20] wifi: iwlwifi: mvm: pause TCM when the firmware is stopped Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 18/20] wifi: iwlwifi: mvm: don't wait for tx queues if firmware is dead Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 19/20] wifi: mac80211: free skb on error path in ieee80211_beacon_get_ap() Sasha Levin
2024-09-03 19:23 ` [PATCH AUTOSEL 6.6 20/20] wifi: iwlwifi: clear trans->state earlier upon error Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240903192425.1107562-10-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=monstr@monstr.eu \
    --cc=richard.weiyang@gmail.com \
    --cc=rppt@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox