From patchwork Fri Mar 10 13:38:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13169256 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D7AFC64EC4 for ; Fri, 10 Mar 2023 13:19:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ACBE78E0001; Fri, 10 Mar 2023 08:19:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A7B176B0074; Fri, 10 Mar 2023 08:19:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 969A48E0001; Fri, 10 Mar 2023 08:19:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 898686B0072 for ; Fri, 10 Mar 2023 08:19:06 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 656B71614BD for ; Fri, 10 Mar 2023 13:19:06 +0000 (UTC) X-FDA: 80553044292.30.415067E Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf01.hostedemail.com (Postfix) with ESMTP id 96AAC40019 for ; Fri, 10 Mar 2023 13:19:01 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf01.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678454344; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=fkaUQZGPpgvbyk1sEE7bG58k0f/6YhTod3AkBa7K2WU=; b=Cgb+qo9VkVga2UQgllv6pl+f2MM90jz54JL8cVqavNdkEG8Bzh9fWiaU9/zTle9P+6xHq8 BNx/su22bJJhvnKmSH/xaSloBLJ1xDgRm27AXJZWz19Ndv4Aldcs+ylvLUV73Kzb2FiYYS KmjajrmKXszu48aFgqAwqf2t0PlvlYU= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf01.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678454344; a=rsa-sha256; cv=none; b=aguJ0/BAr60LZuXQP6hNdjJ95r+/aZ+rVWoWAQZGITXNglAPKbdNGqHMoegUjNBJAtsI4w yRW3EVuLjx6LyD9lKtOqAN3kBBVjyaj1tQvZ/QWbu02gDIVG06ghh4DwNtsr4igmP5vEHn Csl05eIOUDzUw0JsxhmIhb4YIoBzPw8= Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4PY64H70v5zSkgw; Fri, 10 Mar 2023 21:15:43 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 10 Mar 2023 21:18:51 +0800 From: Kefeng Wang To: Naoya Horiguchi , Andrew Morton , CC: Miaohe Lin , , Kefeng Wang Subject: [PATCH] mm: memory-failure: correct HWPOISON_INJECT config Date: Fri, 10 Mar 2023 21:38:43 +0800 Message-ID: <20230310133843.76883-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 96AAC40019 X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: 7bpeoept66j3y558zyd7b5ie4r651jfw X-HE-Tag: 1678454341-340497 X-HE-Meta: U2FsdGVkX1+jwv57cqRnUMxuk/PTsTlAACAgtS0dpIZcRlj8jCVAfEbmkW1bPJu2vjv7s1rZHD3ukJpHfPcPgoV/PK3OqCPEPo0mmNUNPrWiQCX4KAw36Hcw6MK9ZnLe64888rsiOVu81SMMJgcJhy6hnJENvwP0+VHnnfPC0RA4Jz84uR40gM2pko4JxsYDDXWaCh2I1M9Zf13XxOH0wxxY3Oyg6+GaVYV8DyUCjtBfofPvmnaBuB7o7EWY1IVtRCse8o1E8QKSu1OidEHwoS0Tbq3Yt/rY6jarWkdTK4rjIH3j+FAKQwJdpQsaMW+VGQoeDzlH1payLFTBodAlaQqJwsYpxojJErmR5wzYGYf11iHKM6lurJToKdFgLft5Es4VNfBHIsLTsaHu+EWbqwgy8YKFZ4ve57Kb7MxFdJidZQFIaYiC0pSdvdP+tcpHkPfcSokiSHVuHwsY/5B06QXJ6Ta8GM3RaUOAeQ0Ni3wHCbUqQYTz66tEcYbkZSn6r2DV0FAu37rKK1tot5bZm/oC5Anf13/JagCZfEGP0FjiyFkbr7kDDcDTa8UJ/nym5KJFrFSglO0Uz00cGtkX0Vb8e8aVHsz+HVfDJbBlHeeDRulaYG5lT69qBaxyJQcW98VTFGOTrdIvmvtY4fpLZm97GfrDHh9NIhurnYmBk4DW5bE172+/iRr92VJjjdKvWc0lGzliSCKyb7sQqqut0um7CyZBiQffFGSmz/LFeF7chce4rzfmGX2eLPUlr9+MMuCS5vBYSpqN8FH5By55NKF0M5aHpvJQPmeqHG4Fn+ZHTuEqnJtWddMbpWA2YqoHS8fl9CqresRmDQ7KRP7MC7CNgVqf9rtw7lSrA3vJpBggoTLoId86wz8kQWGReboewp9tioIx07hza28ZgDW+brgicMl0QOWjfMbIZhIjkrAYU4GRnf836lZVuc4FtRDIDM1gvG2MrXLSzB/EEmk BlS8o1F6 PRsMt0dL3Ccdz5nChmcPUfIAMFnYTghWLngsCOdCqSa2ux3cgppZal/0vS4I5+/snmyXdqS3A3WrUEVXr6TiDtyPvmrrbmO2fyX6rCYb6dBd4jNf30YM5mAcgpmbCb9OoOhRopnoe3eAXOrvXGQii7nfy9/nTittUiwXargUhFCA1xqzqIgcXBSUKqA71MF6SU5cqKHuKGrw9vylLNNV9BuOAGA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Use IS_ENABLED(CONFIG_HWPOISON_INJECT) to check whether or not to enable HWPoison injector module. Signed-off-by: Kefeng Wang Reviewed-by: David Hildenbrand Acked-by: Naoya Horiguchi --- mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index fae9baf3be16..f761704d27d7 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -168,7 +168,7 @@ static bool page_handle_poison(struct page *page, bool hugepage_or_freepage, boo return true; } -#if defined(CONFIG_HWPOISON_INJECT) || defined(CONFIG_HWPOISON_INJECT_MODULE) +#if IS_ENABLED(CONFIG_HWPOISON_INJECT) u32 hwpoison_filter_enable = 0; u32 hwpoison_filter_dev_major = ~0U;