linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Song Shuai <songshuaishuai@tinylab.org>
To: catalin.marinas@arm.com, will@kernel.org,
	paul.walmsley@sifive.com, palmer@dabbelt.com,
	aou@eecs.berkeley.edu, chris@zankel.net, jcmvbkbc@gmail.com,
	songshuaishuai@tinylab.org, steven.price@arm.com,
	vincenzo.frascino@arm.com, pcc@google.com, wangxiang@cdjrlc.com,
	ajones@ventanamicro.com, conor.dooley@microchip.com,
	jeeheng.sia@starfivetech.com, leyfoon.tan@starfivetech.com
Cc: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org
Subject: [PATCH 4/4] xtensa: hibernate: remove WARN_ON in save_processor_state
Date: Thu, 25 May 2023 10:55:55 +0800	[thread overview]
Message-ID: <20230525025555.24104-5-songshuaishuai@tinylab.org> (raw)
In-Reply-To: <20230525025555.24104-1-songshuaishuai@tinylab.org>

During hibernation or restoration, freeze_secondary_cpus
checks num_online_cpus via BUG_ON, and the subsequent
save_processor_state also does the checking with WARN_ON.

So remove the unnecessary checking in save_processor_state.

Signed-off-by: Song Shuai <songshuaishuai@tinylab.org>
---
 arch/xtensa/kernel/hibernate.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/xtensa/kernel/hibernate.c b/arch/xtensa/kernel/hibernate.c
index 06984327d6e2..314602bbf431 100644
--- a/arch/xtensa/kernel/hibernate.c
+++ b/arch/xtensa/kernel/hibernate.c
@@ -14,7 +14,6 @@ int pfn_is_nosave(unsigned long pfn)
 
 void notrace save_processor_state(void)
 {
-	WARN_ON(num_online_cpus() != 1);
 #if XTENSA_HAVE_COPROCESSORS
 	local_coprocessors_flush_release_all();
 #endif
-- 
2.20.1


      parent reply	other threads:[~2023-05-25  2:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25  2:55 [PATCH 0/4] Remove WARN_ON in save_processor_state Song Shuai
2023-05-25  2:55 ` [PATCH 1/4] ARM: hibernate: remove " Song Shuai
2023-05-25  2:55 ` [PATCH 2/4] arm64: " Song Shuai
2023-06-05 14:28   ` Will Deacon
2023-06-07  3:00     ` Song Shuai
2023-06-08 17:26       ` Will Deacon
2023-05-25  2:55 ` [PATCH 3/4] riscv: " Song Shuai
2023-05-25  2:55 ` Song Shuai [this message]

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=20230525025555.24104-5-songshuaishuai@tinylab.org \
    --to=songshuaishuai@tinylab.org \
    --cc=ajones@ventanamicro.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=catalin.marinas@arm.com \
    --cc=chris@zankel.net \
    --cc=conor.dooley@microchip.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=jeeheng.sia@starfivetech.com \
    --cc=leyfoon.tan@starfivetech.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=pcc@google.com \
    --cc=steven.price@arm.com \
    --cc=vincenzo.frascino@arm.com \
    --cc=wangxiang@cdjrlc.com \
    --cc=will@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;
as well as URLs for NNTP newsgroup(s).