Catalin Marinas b0284cd29a mm: Do not enable PG_arch_2 for all 64-bit architectures
Commit 4beba9486abd ("mm: Add PG_arch_2 page flag") introduced a new
page flag for all 64-bit architectures. However, even if an architecture
is 64-bit, it may still have limited spare bits in the 'flags' member of
'struct page'. This may happen if an architecture enables SPARSEMEM
without SPARSEMEM_VMEMMAP as is the case with the newly added loongarch.
This architecture port needs 19 more bits for the sparsemem section
information and, while it is currently fine with PG_arch_2, adding any
more PG_arch_* flags will trigger build-time warnings.

Add a new CONFIG_ARCH_USES_PG_ARCH_X option which can be selected by
architectures that need more PG_arch_* flags beyond PG_arch_1. Select it
on arm64.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
[pcc@google.com: fix build with CONFIG_ARM64_MTE disabled]
Signed-off-by: Peter Collingbourne <pcc@google.com>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Steven Price <steven.price@arm.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221104011041.290951-2-pcc@google.com
2022-11-29 09:26:06 +00:00
..
2021-05-05 11:27:24 -07:00
2022-09-26 19:46:26 -07:00
2022-10-03 14:02:53 -07:00
2022-09-26 19:46:16 -07:00
2022-10-03 14:02:53 -07:00
2022-03-23 18:03:08 -07:00
2022-10-03 14:03:04 -07:00
2022-06-16 19:48:30 -07:00
2022-05-13 07:20:09 -07:00
2022-09-26 19:46:09 -07:00
2022-10-03 14:02:43 -07:00
2022-10-28 13:37:23 -07:00
2022-09-26 19:46:09 -07:00
2022-09-26 19:46:28 -07:00
2022-09-26 19:46:26 -07:00
2021-05-07 00:26:35 -07:00
2022-10-03 14:02:45 -07:00
2022-10-03 14:02:51 -07:00
2022-10-03 14:02:45 -07:00
2022-01-15 16:30:31 +02:00