* [PATCH] mm: clean up obsolete check on space in page->flags
@ 2019-12-08 18:35 Yu Zhao
2019-12-09 9:32 ` David Hildenbrand
0 siblings, 1 reply; 2+ messages in thread
From: Yu Zhao @ 2019-12-08 18:35 UTC (permalink / raw)
To: Andrew Morton, Arnd Bergmann; +Cc: linux-mm, linux-kernel, Yu Zhao
The check in linux/mm.h was intended to make sure we don't overrun
page flags. But it's obsolete because it doesn't include
LAST_CPUPID_WIDTH nor KASAN_TAG_WIDTH.
Just remove check since we already have it covered in
linux/page-flags-layout.h (near the end of the file).
Signed-off-by: Yu Zhao <yuzhao@google.com>
---
include/linux/mm.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index c97ea3b694e6..2e7596cce9d8 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -921,10 +921,6 @@ vm_fault_t finish_mkwrite_fault(struct vm_fault *vmf);
#define ZONEID_PGSHIFT (ZONEID_PGOFF * (ZONEID_SHIFT != 0))
-#if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS
-#error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS
-#endif
-
#define ZONES_MASK ((1UL << ZONES_WIDTH) - 1)
#define NODES_MASK ((1UL << NODES_WIDTH) - 1)
#define SECTIONS_MASK ((1UL << SECTIONS_WIDTH) - 1)
--
2.24.0.393.g34dc348eaf-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm: clean up obsolete check on space in page->flags
2019-12-08 18:35 [PATCH] mm: clean up obsolete check on space in page->flags Yu Zhao
@ 2019-12-09 9:32 ` David Hildenbrand
0 siblings, 0 replies; 2+ messages in thread
From: David Hildenbrand @ 2019-12-09 9:32 UTC (permalink / raw)
To: Yu Zhao, Andrew Morton, Arnd Bergmann; +Cc: linux-mm, linux-kernel
On 08.12.19 19:35, Yu Zhao wrote:
> The check in linux/mm.h was intended to make sure we don't overrun
> page flags. But it's obsolete because it doesn't include
> LAST_CPUPID_WIDTH nor KASAN_TAG_WIDTH.
>
> Just remove check since we already have it covered in
> linux/page-flags-layout.h (near the end of the file).
>
> Signed-off-by: Yu Zhao <yuzhao@google.com>
> ---
> include/linux/mm.h | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index c97ea3b694e6..2e7596cce9d8 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -921,10 +921,6 @@ vm_fault_t finish_mkwrite_fault(struct vm_fault *vmf);
>
> #define ZONEID_PGSHIFT (ZONEID_PGOFF * (ZONEID_SHIFT != 0))
>
> -#if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS
> -#error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS
> -#endif
> -
> #define ZONES_MASK ((1UL << ZONES_WIDTH) - 1)
> #define NODES_MASK ((1UL << NODES_WIDTH) - 1)
> #define SECTIONS_MASK ((1UL << SECTIONS_WIDTH) - 1)
>
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-09 9:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-08 18:35 [PATCH] mm: clean up obsolete check on space in page->flags Yu Zhao
2019-12-09 9:32 ` David Hildenbrand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).