On Wed, Nov 25, 2020 at 11:22:02AM +0200, Mike Rapoport wrote:
From: Mike Rapoport rppt@linux.ibm.com
On arm64, set_direct_map_*() functions may return 0 without actually changing the linear map. This behaviour can be controlled using kernel parameters, so we need a way to determine at runtime whether calls to set_direct_map_invalid_noflush() and set_direct_map_default_noflush() have any effect.
Extend set_memory API with can_set_direct_map() function that allows checking if calling set_direct_map_*() will actually change the page table, replace several occurrences of open coded checks in arm64 with the new function and provide a generic stub for architectures that always modify page tables upon calls to set_direct_map APIs.
Signed-off-by: Mike Rapoport rppt@linux.ibm.com
Reviewed-by: Catalin Marinas catalin.marinas@arm.com