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: 67403 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp873102wrd; Fri, 10 Mar 2023 05:32:48 -0800 (PST) X-Google-Smtp-Source: AK7set+BKMyc5Cna8TOavx22wGFZyGAiacv2leyWIa6myp2K30Le62ZCc8DwwXRc3/AZoUncG5AF X-Received: by 2002:a17:902:7787:b0:19e:4bc3:b1ef with SMTP id o7-20020a170902778700b0019e4bc3b1efmr7709880pll.64.1678455168264; Fri, 10 Mar 2023 05:32:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678455168; cv=none; d=google.com; s=arc-20160816; b=ACtXjmZoDbtpdP50ofWlBhPEHHZ5w5d1F1kUhkf9N+uGx0xcEKGfEoVzKDBfoPInoo KJmEU64xI7EpELhKCk7ojKHciMJZ+FNPEyHwk3eBJeVNvY8mPv3Q5/QxNRbcj461tMox cbWV4nK2sOHjLwl+hG2Qi7hy9DQZp2tMlwx7Sw5Kyn0Euf7/pnRuIvqUrFXOa31ti/Bj G4TWe55obxYZfoQ0I/rVc5fdwwl0r9ev7H5Lpt6Rya924Cf9xVaY9dBtnr1fwk5UIGR9 QRQ+0GQigZlWCow/vHn/cTYk6q9wf69/otwEpxxiVYHV3nymghZPJEcSGdL/m7NMuVv9 xC8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=fkaUQZGPpgvbyk1sEE7bG58k0f/6YhTod3AkBa7K2WU=; b=N1BpYcPM/uA2HwmBUZ5nMOGLetv1JGu8w8cXCs0KOcASooKZF1jzmLRLowBEAWuK/d N40DjnK8NrwtbHJgxtxQ0N3qbCzmZHArXignoZ07dijMvwf0NZhlj1vKTnp2yFxNwMWU krU+RU5wiP73MJE3Rr7qZ6DVTFJnsnKD+umt3R2VhyMs+DG2DACljJcb8CeMttjjULmu yC6taxGPPPYdDAmkUVhsoszZxOw2GaOvHLbeHKt7frTvvlGVmPHhnPjWxNkgoBFxJ/5L wjWXyMRtX9Qvd2oxqEIyTkdN3VdPtPRM7/FaJ1FZ6x/RxGb2th97WzKdszQUpuKdkFZq vQuA== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kp13-20020a170903280d00b0019cfc412df7si401plb.406.2023.03.10.05.32.35; Fri, 10 Mar 2023 05:32:48 -0800 (PST) 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229997AbjCJNTC (ORCPT + 99 others); Fri, 10 Mar 2023 08:19:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbjCJNS6 (ORCPT ); Fri, 10 Mar 2023 08:18:58 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B32FEBAD8 for ; Fri, 10 Mar 2023 05:18:54 -0800 (PST) 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759987806755936199?= X-GMAIL-MSGID: =?utf-8?q?1759987806755936199?= 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;