From patchwork Thu May 25 02:55:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Song Shuai X-Patchwork-Id: 13254727 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09FB5C77B73 for ; Thu, 25 May 2023 02:58:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0g1h/0kE/w8LPS7Mj71IIzbPLXO9Nz5c5B+G5YIfDtk=; b=SgAnZzV1rvfB6V yZLjyprEJ8Z2A4dddLA4QzXiBoAjTRyZs8Gt7BP3fVQ7yn66cy9OCNs6lPjZIbnnemAe6kh2iHG5k TZjsTnVzoXYAt1rvD1eVy1xkGs7cDAUigAVGvKXUVeHE+xI5Hfmf64qONeBI+kxDi7ZNbh3UYEolA sz9WmUnAHT7Di8vbtCXL/dr7iJjtmm4dUUOW65ZqdymziVFl2g9wv3LtG88MF0eGsw24GODPnj7Dz F+90lFLCjRHdN52Rluy7yu5A6EW4P5mWF/FPB5kB97Byf6S3GocQlfnu3L7fcxUqZ2W91xTl3qWi9 XCc3P8Rs9JW6QeDvl6Bg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q21Av-00FJZy-1k; Thu, 25 May 2023 02:58:01 +0000 Received: from bg4.exmail.qq.com ([43.154.54.12]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q21An-00FJVR-1v for linux-riscv@lists.infradead.org; Thu, 25 May 2023 02:57:55 +0000 X-QQ-mid: bizesmtp63t1684983425tx9azvf6 Received: from localhost.localdomain ( [221.226.144.218]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 25 May 2023 10:57:03 +0800 (CST) X-QQ-SSF: 01200000000000303000000A0000000 X-QQ-FEAT: jXjag1m6xl7WyIELRssET5EuttbKJzokSNielpVbJR2OiTpJeAJqTrFwO96YQ tokwilre7FqbTP0hnGE/ppzEy4bGUXKgRio2t+VIoMM2VWauzbUnGHa+Sipa1RrbyDuNOKx tqcxBrmnAFQ73StoonTBlSrKXKjl2PLQBKsga30zCSInjh0TED/zIWvq4tMsNQNAnCpkJ2b +LvFTNStGcpt/ubUt0VFOLUKlIk15QK9A6SIzGrTD+Bb5fa5C0POkIA6UXLqL4PbE4H4BGq tOb3wYkj0Rdial2N4ncNiCkaWFc0j00Ympqcu8Vo4UNBJiJsNZUxhCfOk3pEyLldJqjsgn2 wZqYEqOCnSmEcXUyeWpuM2qnQwOAUhUxLO5sjkUPYvR0+BKt1ZNLxG/7LKvYg== X-QQ-GoodBg: 0 X-BIZMAIL-ID: 6696857243706674612 From: Song Shuai 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 1/4] ARM: hibernate: remove WARN_ON in save_processor_state Date: Thu, 25 May 2023 10:55:52 +0800 Message-Id: <20230525025555.24104-2-songshuaishuai@tinylab.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230525025555.24104-1-songshuaishuai@tinylab.org> References: <20230525025555.24104-1-songshuaishuai@tinylab.org> MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230524_195753_932172_4B528C47 X-CRM114-Status: UNSURE ( 7.38 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.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 --- arch/arm/kernel/hibernate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/kernel/hibernate.c b/arch/arm/kernel/hibernate.c index 2373020af965..84abccf3221a 100644 --- a/arch/arm/kernel/hibernate.c +++ b/arch/arm/kernel/hibernate.c @@ -33,7 +33,6 @@ int pfn_is_nosave(unsigned long pfn) void notrace save_processor_state(void) { - WARN_ON(num_online_cpus() != 1); local_fiq_disable(); } From patchwork Thu May 25 02:55:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Song Shuai X-Patchwork-Id: 13254728 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1E8A9C77B7C for ; Thu, 25 May 2023 02:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QUHQszpvseprtTu6HVGyD5dMIQJBb3hilSMApXi+BMg=; b=AAb4XFWSCBHFrJ va1Pn0bulaKwYppEtz8Ubax/KyKdVw/sDwZPqhqjpZ7yISaAqp4x839046qupQa5Fdcxln8cQzdky sY6LQDLXwOG15Mr+6B4fifaW8ZdfBGcvmTYpnrsx81nCZvvimgNB0wsdniCPG8WONyz6F939coc9t XoEVGH+C/Kny8f1+awmFfsgSYD9ngL3NSOqHc9NJV19jeymaResoH5xVQXC+VpLIkizpXCxm7g+tF lVY8DkdgJJHRXE7g8vE1sl0B4woT0VyBYOHnAMb2kpCcTbp5wVleVOeaUB6ZTLvUW8AszmtBlHo4f CcxF+IcgSyJ1LnBBmMKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q21At-00FJZ6-14; Thu, 25 May 2023 02:57:59 +0000 Received: from bg4.exmail.qq.com ([43.155.65.254]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q21Am-00FJVI-29 for linux-riscv@lists.infradead.org; Thu, 25 May 2023 02:57:54 +0000 X-QQ-mid: bizesmtp63t1684983430tny3hp8d Received: from localhost.localdomain ( [221.226.144.218]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 25 May 2023 10:57:08 +0800 (CST) X-QQ-SSF: 01200000000000303000000A0000000 X-QQ-FEAT: Q40xx9djesRnvDjNn8FEKK30CJtqMZLJIor2xKhK5CaxBB9mt0DXuMlLPYqPB XwU+t+ZR2ppVV1gWFz/3tdYgXvOqNyx2sj1tDRvmvPJSxWf9mmIV9/kKzgpyLRFF6pAKMpv dB0eKB2SSKXJh3FTbdTch41OWKYEWPRex1/kKW7pZjOibMJK72PzfbAwoYu0dNrdZKe15AK dTMzuKSl3z/YxPs5jNKNOm7HuebEE7nCnLbDXy5qf6ij3OKz81p/au9NFgD8Zl6iWkiPEDq GcW6VwoPGDF1TVFO2o+HzRuvCW71F1mCYe/bYfS8TJHE/z7e4lhSzEBaQvPwUFBEwu87AX9 fT3d27frdI1M3q8tgGm3Jw0nwmLKBJdf6njsyPLQRlj+Yw3Q4gHY9U0yQCyzavwq1c5rNIA X-QQ-GoodBg: 0 X-BIZMAIL-ID: 4042248179779979880 From: Song Shuai 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 2/4] arm64: hibernate: remove WARN_ON in save_processor_state Date: Thu, 25 May 2023 10:55:53 +0800 Message-Id: <20230525025555.24104-3-songshuaishuai@tinylab.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230525025555.24104-1-songshuaishuai@tinylab.org> References: <20230525025555.24104-1-songshuaishuai@tinylab.org> MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230524_195753_040719_5669A667 X-CRM114-Status: UNSURE ( 7.28 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.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 --- arch/arm64/kernel/hibernate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/kernel/hibernate.c b/arch/arm64/kernel/hibernate.c index 788597a6b6a2..02870beb271e 100644 --- a/arch/arm64/kernel/hibernate.c +++ b/arch/arm64/kernel/hibernate.c @@ -99,7 +99,6 @@ int pfn_is_nosave(unsigned long pfn) void notrace save_processor_state(void) { - WARN_ON(num_online_cpus() != 1); } void notrace restore_processor_state(void) From patchwork Thu May 25 02:55:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Song Shuai X-Patchwork-Id: 13254726 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D54FC7EE2E for ; Thu, 25 May 2023 02:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VjelpG7mleZucN8sWaCfMwl3nUCPbUsEje159kScQV4=; b=vAMmvTkt250627 r6lFyMSN7SOyIrIsS1s7HvJidzdsixUwK4G+Y3mIVrujZHD1NvlvG01oMRUySA89+50s/0bYiTdY/ NS6k62Rwz0oAbp6yoEmoDNy7m5d9Jcr5ZQAhxjqODRi01bRsJHkzyucciQYubrYlnOXlCZ6GhxyY7 JGeSZXik7A0IktG4vQ35//V/C0KVZRhura/RJMe7eUd2H/gERlgixFB82am+Xbfw6nvRWdRPHpSzC /bs21LWW1ITznIhFq9dMYaWoh3ytCgOsb69lm1w3QCwFU73UUcxsvzAqxBvmVUbxaSN2177IN2f0D J1w5ot74foDsX949r1/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q21Au-00FJZm-3D; Thu, 25 May 2023 02:58:00 +0000 Received: from bg4.exmail.qq.com ([43.155.65.254]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q21An-00FJVK-02 for linux-riscv@lists.infradead.org; Thu, 25 May 2023 02:57:55 +0000 X-QQ-mid: bizesmtp63t1684983436tc4md4by Received: from localhost.localdomain ( [221.226.144.218]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 25 May 2023 10:57:13 +0800 (CST) X-QQ-SSF: 01200000000000303000000A0000000 X-QQ-FEAT: jXjag1m6xl5ZXRPvlfx7FOzns583Qa4+KA3B6kg49g6czQo1AbT32d+KPrxfJ cmTlBr1DnsRyQbPDfKLGciMk4B+ylpOzsOX9RctduYLeEuAlmq3E4sKqYDVfFaw3cfqE12o gVQCC2bD77/rUkQERGv3c8q3Pdpmr/Re0hCdHFBb8aoXMeALLHzg1HGymZHQ4pyy9AiadRT GzJtw8hLQcWzaK8WWd4Jrebu8d3OZaVHCQWP3TEYqZ/NpQ/3Ca8xG5DZSdH3vd7cTEGx5tA 68Lr6WidVIkVvna98ZlnltddOPkyhLIU7kqoI+O+w+yDmu5sv4ksyG2yTbgofNf3x1CuPZs wKRROMB8p3ftAGiD+3zDxXtcb7o7DR3omGM25n6AWxR9d/vzsFxxjG13oeWybHUksvhorRL X-QQ-GoodBg: 0 X-BIZMAIL-ID: 13095273285713463459 From: Song Shuai 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 3/4] riscv: hibernate: remove WARN_ON in save_processor_state Date: Thu, 25 May 2023 10:55:54 +0800 Message-Id: <20230525025555.24104-4-songshuaishuai@tinylab.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230525025555.24104-1-songshuaishuai@tinylab.org> References: <20230525025555.24104-1-songshuaishuai@tinylab.org> MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230524_195753_350380_82CB1800 X-CRM114-Status: UNSURE ( 7.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.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 --- arch/riscv/kernel/hibernate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/riscv/kernel/hibernate.c b/arch/riscv/kernel/hibernate.c index 395f835f067c..86f1c9ab6b0b 100644 --- a/arch/riscv/kernel/hibernate.c +++ b/arch/riscv/kernel/hibernate.c @@ -119,7 +119,6 @@ int pfn_is_nosave(unsigned long pfn) void notrace save_processor_state(void) { - WARN_ON(num_online_cpus() != 1); } void notrace restore_processor_state(void) From patchwork Thu May 25 02:55:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Song Shuai X-Patchwork-Id: 13254729 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 24644C77B7C for ; Thu, 25 May 2023 02:58:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KtCnji/JQCsBQaoClcuPqyvGBCSt22wkPA59JWxVx/A=; b=r6TnsOroduuA2+ CDYliHjZchb7gI1IIal9dCIuV9Ot2tIJTNla+9L1bz6QiYRr8c6Nj22S4Gn7mIEnBfcUtHQVHDXZ9 zWfdTw2pmcJx3IaXiEgsfpSGQliQv+xWS3U07pz+g34AnKr9oNwXGt7TP8ZjgG0WymN3txEhc7h9G 3qz2R/7Wcz2Hvj2VobJHu2Ea4li5Pb163pZCD1+dX2r8mwkbBLKw0PYkfjw991aqJIO8YHlzek7WT CgojE5VBLD6CKOQlxYO/I6jtvQiaOP9/DLRXtJ57+fsufuxvdQjqbFtWVWatrWPGxrZp69f653BqX JQxzqFI1UInaVe5z1ETw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q21Aw-00FJaB-0Q; Thu, 25 May 2023 02:58:02 +0000 Received: from bg4.exmail.qq.com ([43.154.54.12]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q21Ao-00FJVu-1r for linux-riscv@lists.infradead.org; Thu, 25 May 2023 02:57:56 +0000 X-QQ-mid: bizesmtp63t1684983441tzej1xdq Received: from localhost.localdomain ( [221.226.144.218]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 25 May 2023 10:57:19 +0800 (CST) X-QQ-SSF: 01200000000000303000000A0000000 X-QQ-FEAT: X3kNTHUrKMRJlZyT+2O5RdJGnxa2VEocmY9T2Ec5y4fHeQHbTKNAZHig3qVRw ugOfN+JUwaPDLD5af5iOZUA1gZW0bTB+xogyUz+29+XMpMp/y4kkGtYkNMmSkqAankJ89tN 7rgEUUJ0S9TNc6bW7ZlBlE9bhf0lPjRcvNwD9pygpsAGuM8Ad6FRxbZX584iCgA6tMj9jXF YlfaPcuPTXBBlSzNvxE5t7dWdzrB9dTSJ9QMQDuirSJ2rD6501e7T61GKiZI67m+vt2wS1n VjK12Xz12c87qvD9joA+8u4n3BOR84XIQPfGK6v+6Pe3CpKtgheeMeLjGb6A1/XtJfFe6iF uDRqZyUxoZQDgVORNOxbTtMN4GKhH08Y/8WJp9YyHLgm2ZEcMq6KJoi9GDRC/PWoD/vIVob X-QQ-GoodBg: 0 X-BIZMAIL-ID: 11307094136493837363 From: Song Shuai 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 Message-Id: <20230525025555.24104-5-songshuaishuai@tinylab.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230525025555.24104-1-songshuaishuai@tinylab.org> References: <20230525025555.24104-1-songshuaishuai@tinylab.org> MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230524_195754_914063_A502050C X-CRM114-Status: UNSURE ( 6.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.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 --- 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