From patchwork Mon Nov 1 19:43:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 12597141 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A075C433F5 for ; Mon, 1 Nov 2021 19:43:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A5D7C61058 for ; Mon, 1 Nov 2021 19:43:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A5D7C61058 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 44451940026; Mon, 1 Nov 2021 15:43:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3CD6094000F; Mon, 1 Nov 2021 15:43:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 26EC9940026; Mon, 1 Nov 2021 15:43:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0252.hostedemail.com [216.40.44.252]) by kanga.kvack.org (Postfix) with ESMTP id 0DA2394000F for ; Mon, 1 Nov 2021 15:43:40 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C268B8249980 for ; Mon, 1 Nov 2021 19:43:39 +0000 (UTC) X-FDA: 78761386158.21.DB9224E Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by imf13.hostedemail.com (Postfix) with ESMTP id C1F08150451F for ; Mon, 1 Nov 2021 19:43:31 +0000 (UTC) Received: by mail-pg1-f178.google.com with SMTP id j9so9955315pgh.1 for ; Mon, 01 Nov 2021 12:43:39 -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=NB7XcRFpUxlv0EJaq80HO2bnVBac0FVhx21DcLgTUAfbeXsmCujTeVFUitRxFAaXDV p9MrGXrrQdyKkMQZzjo6wJ31RLYXIcQfX3Z/8UjSfR+WWH9ij59Uowyw3TFd1K+dOQrO i8itMdoBNWW42ClDpIgRstZzq4jWzrXWaI7Wl5UtuUHj00GFbeF/vJ8DA/z25gmjpI6n qoq18uGAa4nsRKn1bHBcAUmZURwP2GheesChPZcNSI0uTUMrl2grloUWxXPQWiVggB4r SihkGHr23/gQMt2c7pBJ8SmjcPju23HW9FqZ0ANIP/a42EGdzPsXifpKRexKs8QEbGu8 uZ5A== X-Gm-Message-State: AOAM532KBCoVglcUqPuIvBP4tAe1MLCR9+6tRNJqxCdDgWvtVB8Lq42A tKo1sAMlWIYVeUO5ZVDlUBQ= X-Google-Smtp-Source: ABdhPJz1EFCgRQt0FEm5r3xoBF+RDEU3HqMkdy/9HTH56ECJpk1YZTHP0liUuXiqqZXBnRZ1YTralQ== 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 X-Rspamd-Queue-Id: C1F08150451F X-Stat-Signature: be8gqtrrgkq5fg5ergksobnwgbszq3r6 Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=DSgl+6WF; spf=pass (imf13.hostedemail.com: domain of shy828301@gmail.com designates 209.85.215.178 as permitted sender) smtp.mailfrom=shy828301@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam02 X-HE-Tag: 1635795811-238570 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: 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 /*