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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 993F9C433EF for ; Thu, 21 Apr 2022 20:02:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 220226B0072; Thu, 21 Apr 2022 16:02:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1A7F06B0073; Thu, 21 Apr 2022 16:02:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 021076B0074; Thu, 21 Apr 2022 16:02:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id E10D96B0072 for ; Thu, 21 Apr 2022 16:02:28 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id A39C5308C for ; Thu, 21 Apr 2022 20:02:28 +0000 (UTC) X-FDA: 79381958376.25.C5E7419 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf23.hostedemail.com (Postfix) with ESMTP id 9326D14002F for ; Thu, 21 Apr 2022 20:02:25 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 04FAF61C1D; Thu, 21 Apr 2022 20:02:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43B22C385A7; Thu, 21 Apr 2022 20:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1650571346; bh=DCWnUlt77OP5/UuTbDE3I689i+ttCNysaJ6uMmunEA0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=r3WVW5ACCHKN4j8/SZnr1VcUcAx40ODBVBcwBePeRsRuSQuJIAxVxaHaFJ/HwP7gw 2rsYllrdjVyOXf+1xwtUb4hGXH2n3ez5Q+/fwwmr+BJ+zcjUm+Sdp5HJYY8HCArsbX 2IU2+pZk1qr7UUZuKpfUNFC7N9dDludXeEh2OUls= Date: Thu, 21 Apr 2022 13:02:25 -0700 From: Andrew Morton To: Peter Xu Cc: kernel test robot , kbuild-all@lists.01.org, Linux Memory Management List Subject: Re: [linux-next:master 5135/5346] include/linux/hugetlb.h:411:25: error: unknown type name 'zap_flags_t'; did you mean 'vm_flags_t'? Message-Id: <20220421130225.01b06f5c9b1a4f681df7acd0@linux-foundation.org> In-Reply-To: References: <202204211854.p1LJEBHt-lkp@intel.com> <20220421123849.ee76504ffb86254c99b2c0f8@linux-foundation.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 9326D14002F X-Stat-Signature: jyife5readsmbttbpukcse8nainyeodh Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=r3WVW5AC; dmarc=none; spf=pass (imf23.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-HE-Tag: 1650571345-775095 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 Thu, 21 Apr 2022 15:51:03 -0400 Peter Xu wrote: > > - * file-backed memory. This should only be specified when we will completely > > - * drop the page in the mm, either by truncation or unmapping of the vma. By > > - * default, the flag is not set. > > - */ > > -#define ZAP_FLAG_DROP_MARKER ((__force zap_flags_t) BIT(0)) > > - > > #endif /* _LINUX_MM_H */ > > _ > > > > Andrew, > > It may work, but I have worry that zap_flags_t should still be a common > struct for mm not hugetlb specific, let's say it's still legal some .c file > wants to reference it without hugetlb knowledge? > > >From that POV, could we perhaps move these chunk into mm_types.h (which > hugetlb.h includes anyway)? > Sure. ZAP_FLAG_DROP_MARKER isn't a type so how about we leave that in mm.h? --- a/include/linux/mm.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix +++ a/include/linux/mm.h @@ -3431,8 +3431,6 @@ madvise_set_anon_name(struct mm_struct * } #endif -typedef unsigned int __bitwise zap_flags_t; - /* * Whether to drop the pte markers, for example, the uffd-wp information for * file-backed memory. This should only be specified when we will completely --- a/include/linux/mm_types.h~mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix-fix +++ a/include/linux/mm_types.h @@ -850,4 +850,6 @@ enum fault_flag { FAULT_FLAG_ORIG_PTE_VALID = 1 << 11, }; +typedef unsigned int __bitwise zap_flags_t; + #endif /* _LINUX_MM_TYPES_H */ _