Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3381681pxb; Mon, 1 Nov 2021 12:45:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy561Ig6yPmNdvjY8yj3OaOBq5LBS3Um1luLdiNNj0hB/uJSFoNCYWAJ4/KZ6up+i9tvX0o X-Received: by 2002:a02:a884:: with SMTP id l4mr23291688jam.44.1635795932026; Mon, 01 Nov 2021 12:45:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635795932; cv=none; d=google.com; s=arc-20160816; b=AhOSZiQO1dj91fy8xcT88BVYvCH0fNEUBRd4aQiOxfSWSYIcQ9RYUYnSP7VhPKuzqe 78BerUHWLh2eAifOJiU9VW+QKSaLtgz069To6F8RhGWtae6lhKy80mW0se19Rjkj918h IpNk8Nx/5ZvjRN4YG/VTN680/hqcemLhyswOaG8BYHJLY6RTerjKhWoGTkoguuvAT65j 02HCr7eQ5c0xVEmhvBcxvzljxAzcBlad+fjCUmIH3WCL/NvrqtJP/jcFHE0tUqYeN4EN p2/9lctnLWu/gCS9O6LVz30xZA0BhWVwd/9t36jicVva92eVw5ttEmrhhtuf6vFCf8WW kyEA== 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:dkim-signature; bh=5Ukfv7pdz0nMzxtQVrVKwSDs1iv/takb0qfr2vtUbBY=; b=Am8AXDrW7Cu8G0EfXktrQUYLLTEeOQYX+/lUhyzD6s9M7tEtSrk9PhVLEHTJ5nr4Ka RGA2pUF46mWS7j7XzpUoMsCOwJqTLADEIDnMMNM67ZRm5Nn7/TkyTEUzGA2SeKFiEoo2 iy+A3gDjNQRWeQkt97Gl1H/Jzdh0dnAOQtwJciuzG7DaUf5Fw3u7FEOmutedPSE69wk7 U5V9ZW8e1vmG6cAlZrSkn1fV1ELP2kyHR+0RzHf798KD7nI/opbbOsymKMZ6fZpCyRsS mbUo3slLGpnwvZtIBmn5Q12ZHpPsAxJ3n+Lm0BEy6w59ssAcqaubQY1f6piHJYyvhIpF DRRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DSgl+6WF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o10si28190138ilu.132.2021.11.01.12.45.19; Mon, 01 Nov 2021 12:45:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DSgl+6WF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230237AbhKATqN (ORCPT + 99 others); Mon, 1 Nov 2021 15:46:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229723AbhKATqM (ORCPT ); Mon, 1 Nov 2021 15:46:12 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5298C061714 for ; Mon, 1 Nov 2021 12:43:38 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id k2so2769505pff.11 for ; Mon, 01 Nov 2021 12:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5Ukfv7pdz0nMzxtQVrVKwSDs1iv/takb0qfr2vtUbBY=; b=DSgl+6WFZBpfISZNBj2g74k1FtWOu+ZlnfYg5QRFVMk98z8CnmEo/lD9kDZHHy101P VuVt2lKmD8nHMekVctclmHiT3IYIe8xn7Qx3htwOUSugXBdBJv2V8RWnT24Tk29rn/2R zMuR+9kzS9IbOAwrLmx+LLGcP0uwcL0KYHz5cK9sTjV+4xEPdEPoNKaXUoB+m8r3Dc+d hvm2RNsCPDvV4tXpwR6sFxOQtwxQjvKZjbK9XcHuGe+mv+O6/zOpoS7S163OUcqtZGEx 3dfUH5/qEOdBcgVESUJu0AZfnvEqnK8ethA9KcG60IqVRcbrp3tI0Syvp3ZOba4tFbMI Y6PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5Ukfv7pdz0nMzxtQVrVKwSDs1iv/takb0qfr2vtUbBY=; b=fLpMzYlSrgtaLsaR4ZeqhioEl3gjMvLD+HSpMQegaHLqIL2Xjff9On12yIA9MPfIHW wjDkXDvXeZQK4JMWX0A1Y2kDGD3veSB6pMsIhSdP0jfKFqBCU04l3l2AcM75ycSwDAIZ jHgZjknFjdpQe2W0N/kmFHK1Edif5CaQDdfTxEi2guFUslw5K5BqaJ3veIP7bIgS9jd9 pKHPYonlYUSdjxhdvj96IK2o3fzdrgTJh4tGaue8vB+i6FF5nhVvB+pP6uuuKATkH8bl teyKx9cKtg0+fv6Bn0PhieLE9ba531u1l1BMcI//sxOCQQDjTrn4NZvaNAixlfNUFJV9 RRCA== X-Gm-Message-State: AOAM531aAgWeqbYKxsxRXAzD7TJsYbEuO63XTdbUG40B5+zshBXtLBTm ncQFUSI55U5v82oMKHDy/2k= X-Received: by 2002:a65:6554:: with SMTP id a20mr11155635pgw.107.1635795818470; Mon, 01 Nov 2021 12:43:38 -0700 (PDT) Received: from localhost.localdomain (c-73-93-239-127.hsd1.ca.comcast.net. [73.93.239.127]) by smtp.gmail.com with ESMTPSA id c1sm14306887pfv.54.2021.11.01.12.43.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 12:43:37 -0700 (PDT) From: Yang Shi To: naresh.kamboju@linaro.org, willy@infradead.org, kirill.shutemov@linux.intel.com, naoya.horiguchi@nec.com, akpm@linux-foundation.org Cc: shy828301@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: page-flags: fix build failure due to missing parameter for HasHWPoisoned flag Date: Mon, 1 Nov 2021 12:43:36 -0700 Message-Id: <20211101194336.305546-1-shy828301@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The below build failure when !CONFIG_MEMORY_FAILURE was reported for v5.16 merge window: In file included from include/linux/mmzone.h:22, from include/linux/gfp.h:6, from include/linux/slab.h:15, from include/linux/crypto.h:20, from arch/x86/kernel/asm-offsets.c:9: include/linux/page-flags.h:806:29: error: macro "PAGEFLAG_FALSE" requires 2 arguments, but only 1 given 806 | PAGEFLAG_FALSE(HasHWPoisoned) | ^ include/linux/page-flags.h:411: note: macro "PAGEFLAG_FALSE" defined here 411 | #define PAGEFLAG_FALSE(uname, lname) TESTPAGEFLAG_FALSE(uname, lname) \ | include/linux/page-flags.h:807:39: error: macro "TESTSCFLAG_FALSE" requires 2 arguments, but only 1 given 807 | TESTSCFLAG_FALSE(HasHWPoisoned) | ^ include/linux/page-flags.h:414: note: macro "TESTSCFLAG_FALSE" defined here 414 | #define TESTSCFLAG_FALSE(uname, lname) \ | include/linux/page-flags.h:806:1: error: unknown type name 'PAGEFLAG_FALSE' 806 | PAGEFLAG_FALSE(HasHWPoisoned) | ^~~~~~~~~~~~~~ include/linux/page-flags.h:807:25: error: expected ';' before 'static' 807 | TESTSCFLAG_FALSE(HasHWPoisoned) | ^ | ; ...... 815 | static inline bool is_page_hwpoison(struct page *page) | ~~~~~~ make[2]: *** [scripts/Makefile.build:121: arch/x86/kernel/asm-offsets.s] Error 1 The commit d389a4a81155 ("mm: Add folio flag manipulation functions") changed the definition of PAGEFLAG macros, this caused the build failure for HasHWPoisoned flag. The new flag was introduced by commit eac96c3efdb5 ("mm: filemap: check if THP has hwpoisoned subpage for PMD page fault") in v5.15-rc7. But the folio series pull request was prepared before v5.15, so this new flag was missed. Reported-by: Linux Kernel Functional Testing Cc: Naresh Kamboju Cc: Matthew Wilcox Cc: Kirill A. Shutemov Cc: Naoya Horiguchi Signed-off-by: Yang Shi --- include/linux/page-flags.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index d8623d6e1141..981341a3c3c4 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -803,8 +803,8 @@ PAGEFLAG_FALSE(DoubleMap, double_map) PAGEFLAG(HasHWPoisoned, has_hwpoisoned, PF_SECOND) TESTSCFLAG(HasHWPoisoned, has_hwpoisoned, PF_SECOND) #else -PAGEFLAG_FALSE(HasHWPoisoned) - TESTSCFLAG_FALSE(HasHWPoisoned) +PAGEFLAG_FALSE(HasHWPoisoned, has_hwpoisoned) + TESTSCFLAG_FALSE(HasHWPoisoned, has_hwpoisoned) #endif /* -- 2.26.2