Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp359303rwd; Wed, 24 May 2023 19:59:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5pfw5zfJtDuDK03umVYyuNECFsKVgDzJllO6rI72Ym4QAU4ZfiXCm76jR1Dxc5SWjUCGTO X-Received: by 2002:a05:6a20:8f28:b0:105:f40f:c234 with SMTP id b40-20020a056a208f2800b00105f40fc234mr1397109pzk.17.1684983572589; Wed, 24 May 2023 19:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684983572; cv=none; d=google.com; s=arc-20160816; b=MLSIl5tMu15knd6M3OQYjec1uhkbM8XsCwXIOHFAEHFvhuBQbObZtxjrp/HtlJLwKh 9QOIkCpyRaZUXc0Tkxv1UbwdnjHzS+UzdArVemVI7Hk9sFZQ1Y4r/B7/Yv4atTLEX6CQ hmSg6rc075/WJDAufv7eLZH+ILLZY7sypS+VDk1t+FHtFEOAx0s6XV2Is5Ckt21/EFjU 54lYAx3xYZo3aByCvNyDTQ7/UPie+W8r+RDjrrqwjynF+HsxF7FFbyecZoXBzYO25iNV ayTgSL98tm9ApYJjtZHRpmv13va6pwbwKOgdD1vefQ5UpPm/a7QDO80REcDyyQywsw65 DrzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=9F3xaYC/dc3OagaIyClonfectf0gFZ+19BU7W78bB10=; b=Z3hCUYz50OqZdmPK/R+czPaXb2Tm1ePSaTz1krBZbxj0zM7sXzfw/rH8DIMDkyg9+4 tJPhBw/bnwQ1HEpjsj9uTZd/jDKu4kD+38I/B45KO4BhNQaJ0Aa3kqCV1zd/V7nM4O5h eZuhv9LyqAkxICpTpkoNXHRAAXT0SnkROMbjnAqk5g1bRktr5NgrjQ+vl+V2X7cpiXyy 3NIU0rCQMgDDtTIgqh15gTh3uRhWfk1PqOIRg4kjxjJ2Yus8CzwPgdB2yl5Ylxrhbeum eTo21I2isUsV8Hiy7nEKpOI+BcYzRDjddcBTib6wS5hcTizyTyIU9JVQNjXJ0+Wt0OQt 14Iw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h12-20020a63384c000000b00528c6c2ea96si46260pgn.306.2023.05.24.19.59.20; Wed, 24 May 2023 19:59:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237766AbjEYC54 (ORCPT + 99 others); Wed, 24 May 2023 22:57:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231126AbjEYC5s (ORCPT ); Wed, 24 May 2023 22:57:48 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.67.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46B1C139 for ; Wed, 24 May 2023 19:57:44 -0700 (PDT) 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 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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(); } -- 2.20.1