2022-08-31 19:56:26

by Randy Dunlap

[permalink] [raw]
Subject: [PATCH v2] hugetlb: use mm.h instead of mm_types.h

mm_types.h does not have zap_flags_t in it so use mm.h instead
in hugetlb.h.

Fixes this build error:

In file included from ../drivers/virt/nitro_enclaves/ne_misc_dev.c:16:0:
../include/linux/hugetlb.h:414:4: error: unknown type name ‘zap_flags_t’; did you mean ‘vm_flags_t’?
zap_flags_t zap_flags)

Signed-off-by: Randy Dunlap <[email protected]>
Cc: Peter Xu <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: [email protected]
Cc: Andrew Morton <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
---
Fixes: mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix.patch
v2: add Rev-by: Peter
drop the bogus S-o-b: in Cc: Peter Xu

include/linux/hugetlb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -2,7 +2,7 @@
#ifndef _LINUX_HUGETLB_H
#define _LINUX_HUGETLB_H

-#include <linux/mm_types.h>
+#include <linux/mm.h>
#include <linux/mmdebug.h>
#include <linux/fs.h>
#include <linux/hugetlb_inline.h>


2022-08-31 20:03:54

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH v2] hugetlb: use mm.h instead of mm_types.h

On Wed, Aug 31, 2022 at 11:57:39AM -0700, Randy Dunlap wrote:
> mm_types.h does not have zap_flags_t in it so use mm.h instead
> in hugetlb.h.

... my copy of mm_types.h has zap_flags_t in it. Was it recently moved?
Perhaps moving it back is a better solution to this problem?

> Fixes this build error:
>
> In file included from ../drivers/virt/nitro_enclaves/ne_misc_dev.c:16:0:
> ../include/linux/hugetlb.h:414:4: error: unknown type name ‘zap_flags_t’; did you mean ‘vm_flags_t’?
> zap_flags_t zap_flags)
>
> Signed-off-by: Randy Dunlap <[email protected]>
> Cc: Peter Xu <[email protected]>
> Cc: Mike Kravetz <[email protected]>
> Cc: [email protected]
> Cc: Andrew Morton <[email protected]>
> Reviewed-by: Peter Xu <[email protected]>
> ---
> Fixes: mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix.patch
> v2: add Rev-by: Peter
> drop the bogus S-o-b: in Cc: Peter Xu
>
> include/linux/hugetlb.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/include/linux/hugetlb.h
> +++ b/include/linux/hugetlb.h
> @@ -2,7 +2,7 @@
> #ifndef _LINUX_HUGETLB_H
> #define _LINUX_HUGETLB_H
>
> -#include <linux/mm_types.h>
> +#include <linux/mm.h>
> #include <linux/mmdebug.h>
> #include <linux/fs.h>
> #include <linux/hugetlb_inline.h>
>

2022-08-31 20:06:08

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH v2] hugetlb: use mm.h instead of mm_types.h



On 8/31/22 12:27, Matthew Wilcox wrote:
> On Wed, Aug 31, 2022 at 11:57:39AM -0700, Randy Dunlap wrote:
>> mm_types.h does not have zap_flags_t in it so use mm.h instead
>> in hugetlb.h.
>
> ... my copy of mm_types.h has zap_flags_t in it. Was it recently moved?
> Perhaps moving it back is a better solution to this problem?

Ah, I see. This patch was originally to mmotm, but then for merging
(commit 05e90bd05eea), Peter Xu moved the typedef so that this patch
is not needed. Sorry for the noise.

and Thanks.

>> Fixes this build error:
>>
>> In file included from ../drivers/virt/nitro_enclaves/ne_misc_dev.c:16:0:
>> ../include/linux/hugetlb.h:414:4: error: unknown type name ‘zap_flags_t’; did you mean ‘vm_flags_t’?
>> zap_flags_t zap_flags)
>>
>> Signed-off-by: Randy Dunlap <[email protected]>
>> Cc: Peter Xu <[email protected]>
>> Cc: Mike Kravetz <[email protected]>
>> Cc: [email protected]
>> Cc: Andrew Morton <[email protected]>
>> Reviewed-by: Peter Xu <[email protected]>
>> ---
>> Fixes: mm-hugetlb-only-drop-uffd-wp-special-pte-if-required-fix.patch
>> v2: add Rev-by: Peter
>> drop the bogus S-o-b: in Cc: Peter Xu
>>
>> include/linux/hugetlb.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- a/include/linux/hugetlb.h
>> +++ b/include/linux/hugetlb.h
>> @@ -2,7 +2,7 @@
>> #ifndef _LINUX_HUGETLB_H
>> #define _LINUX_HUGETLB_H
>>
>> -#include <linux/mm_types.h>
>> +#include <linux/mm.h>
>> #include <linux/mmdebug.h>
>> #include <linux/fs.h>
>> #include <linux/hugetlb_inline.h>
>>

--
~Randy