Files
kernel_arpi/include/linux
Mike Rapoport b19bd1c976 mm/mmzone.h: simplify is_highmem_idx()
There is a lot of historical ifdefery in is_highmem_idx() and its helper
zone_movable_is_highmem() that was required because of two different paths
for nodes and zones initialization that were selected at compile time.

Until commit 3f08a302f5 ("mm: remove CONFIG_HAVE_MEMBLOCK_NODE_MAP
option") the movable_zone variable was only available for configurations
that had CONFIG_HAVE_MEMBLOCK_NODE_MAP enabled so the test in
zone_movable_is_highmem() used that variable only for such configurations.
For other configurations the test checked if the index of ZONE_MOVABLE
was greater by 1 than the index of ZONE_HIGMEM and then movable zone was
considered a highmem zone.  Needless to say, ZONE_MOVABLE - 1 equals
ZONE_HIGHMEM by definition when CONFIG_HIGHMEM=y.

Commit 3f08a302f5 ("mm: remove CONFIG_HAVE_MEMBLOCK_NODE_MAP option")
made movable_zone variable always available.  Since this variable is set
to ZONE_HIGHMEM if CONFIG_HIGHMEM is enabled and highmem zone is
populated, it is enough to check whether

	zone_idx == ZONE_MOVABLE && movable_zone == ZONE_HIGMEM

to test if zone index points to a highmem zone.

Remove zone_movable_is_highmem() that is not used anywhere except
is_highmem_idx() and use the test above in is_highmem_idx() instead.

Link: https://lkml.kernel.org/r/20210426141927.1314326-3-rppt@kernel.org
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-06-29 10:53:53 -07:00
..
2021-05-18 17:24:52 +01:00
2021-05-06 19:24:11 -07:00
2021-04-14 16:30:30 +03:00
2021-05-08 21:49:48 -06:00
2021-04-08 16:04:20 -07:00
2021-05-24 12:45:26 -04:00
2021-05-24 12:45:26 -04:00
2021-04-08 16:04:20 -07:00
2021-04-08 16:04:20 -07:00
2021-05-06 19:24:11 -07:00
2021-04-19 13:13:26 -04:00
2021-04-12 15:04:23 +02:00
2021-06-29 10:53:48 -07:00
2020-12-02 22:10:35 -08:00
2021-04-30 11:20:40 -07:00
2021-06-29 10:53:48 -07:00
2021-04-05 22:39:38 -04:00
2020-12-15 16:19:31 +01:00
2019-12-11 09:12:38 +01:00
2020-05-08 18:18:11 +01:00
2020-05-08 00:12:42 +02:00
2021-04-08 16:04:20 -07:00
2021-04-06 08:34:39 +02:00
2019-02-08 15:02:49 -08:00
2021-04-21 10:24:41 -05:00
2021-02-03 19:05:50 +01:00
2017-11-09 10:23:28 +01:00
2021-06-29 10:53:52 -07:00
2019-06-15 12:25:49 +02:00
2020-08-18 17:06:15 +02:00
2021-06-29 10:53:49 -07:00
2021-03-25 17:39:33 -07:00
2021-01-06 16:24:59 -08:00
2021-04-15 10:32:17 +02:00
2021-04-26 22:55:12 +01:00
2021-04-09 16:00:00 +02:00
2021-06-24 19:40:53 -07:00
2021-04-16 15:31:02 -07:00
2021-03-30 13:42:33 -04:00