From mboxrd@z Thu Jan 1 00:00:00 1970 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 9865EC433EF for ; Mon, 1 Nov 2021 21:07:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3C83360724 for ; Mon, 1 Nov 2021 21:07:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3C83360724 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 915BF6B0096; Mon, 1 Nov 2021 17:07:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8C46C6B00C1; Mon, 1 Nov 2021 17:07:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 78CC494000F; Mon, 1 Nov 2021 17:07:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0082.hostedemail.com [216.40.44.82]) by kanga.kvack.org (Postfix) with ESMTP id 652596B0096 for ; Mon, 1 Nov 2021 17:07:03 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 151388249980 for ; Mon, 1 Nov 2021 21:07:03 +0000 (UTC) X-FDA: 78761596326.13.EE58CF5 Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by imf02.hostedemail.com (Postfix) with ESMTP id 399BA7001A23 for ; Mon, 1 Nov 2021 21:06:58 +0000 (UTC) Received: by mail-ed1-f41.google.com with SMTP id w15so68775201edc.9 for ; Mon, 01 Nov 2021 14:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/SAIU+IuE23Lw7sXqYvikkteMzMCec9k3mkNvwAaD1c=; b=JTLt05AlEHI961xxW/tusGjITZ2yRmJvdTokKIPc2QLIuzEbC74+SjvP+80LlX1JY7 DZqGeDI1LYtuhuyZNhBmkcCjmnQKanNCh4eFfrVd9FWCAh0dNMO/0qTd+3QxoIJWQx2P lbiGtp7Xzj6ewwzVrhIfYJeMn2RanJ+33SGst8cCfX3xACL2fB8kr0LRWpmbqDZ4Y6DH +O3YUP6/9N5DeDqgx/+yIkiTsdQE0X41fXsk0YUt4Fo6f5tzzGfoimm7UY/GVJUSK4al JzbhCaUTmbqQtVC1DH5QOe/zUBBBzsv51PBlAWuAGTEijo61cvMl4P3U5632pPJv3zGz uh0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/SAIU+IuE23Lw7sXqYvikkteMzMCec9k3mkNvwAaD1c=; b=aQX11awEpQdxMFuwSMuF+zWJjLcc9ULMA04i2w9EHvNHqEd8BzX9v+ffEw8Uztx63X JESmhV3TMWHl4FDZmF3lqDwQf1msAD19U5HJfv/tx+hjTNRMBsT/bGHjZWm+rxPInPqE HkoljzK936cAxu65azsYsD5zP+it9i5wuYiwRShR6fnZyRBbg6/Xmgiys0KKGLow0zlk Y3JQMJ3w4/FV8pZ3ZnjJTWHBG/h8ZVSx2aGLvf81jxAIcqxGagd16Lcp6XnbBhVcptgq 011uTQlaCQsJJJCj+cngCdRW2OCPeNh46HWsM04988SU8XQuK+J6aLQRcflKcBgGYcqq A8kw== X-Gm-Message-State: AOAM5332udCTLAS3wNb3/gMGIRt6aZP8zbkIW1wXSFxpAv3BRWpTaCYX dX7jSTaZpsRS/UdEOo3AL+9/mk4e9e0p3tnL1Jc= X-Google-Smtp-Source: ABdhPJxN3QSIRkPsc+8zd3aRq/WjgQUAMwDW9tVIqvOw68oAb61UD21Pse+Izcm3WITNC1J3KVzBSDZIPJTtvL7C26w= X-Received: by 2002:a17:906:d20c:: with SMTP id w12mr18780674ejz.521.1635800821471; Mon, 01 Nov 2021 14:07:01 -0700 (PDT) MIME-Version: 1.0 References: <20211101194336.305546-1-shy828301@gmail.com> In-Reply-To: From: Yang Shi Date: Mon, 1 Nov 2021 14:06:49 -0700 Message-ID: Subject: Re: [PATCH] mm: page-flags: fix build failure due to missing parameter for HasHWPoisoned flag To: Matthew Wilcox Cc: Linus Torvalds , Naresh Kamboju , "Kirill A. Shutemov" , =?UTF-8?B?SE9SSUdVQ0hJIE5BT1lBKOWggOWPoyDnm7TkuZ8p?= , Andrew Morton , Linux MM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 399BA7001A23 X-Stat-Signature: 6cqk6k7qo1461383nidyd9mpsk14x68d Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=JTLt05Al; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf02.hostedemail.com: domain of shy828301@gmail.com designates 209.85.208.41 as permitted sender) smtp.mailfrom=shy828301@gmail.com X-HE-Tag: 1635800818-948719 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: On Mon, Nov 1, 2021 at 1:45 PM Matthew Wilcox wrote: > > Should probbaly cc Linus, and also note that Stephen noticed & fixed > this problem already. > https://lore.kernel.org/lkml/20211101174846.2b1097d7@canb.auug.org.au/ Oh, yes, I forgot that fix. Anyway picking either one is fine to me. > > I didn't know about it at the time I sent the pull request because it > hadn't been merged at that point. It is fine. I really don't mean blame to you. > > On Mon, Nov 01, 2021 at 12:43:36PM -0700, Yang Shi wrote: > > 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 > > > >