From: Andrey Konovalov Date: Tue, 4 Jun 2019 12:04:47 +0000 (+0200) Subject: uaccess: add noop untagged_addr definition X-Git-Tag: v5.4-rc1~830 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d93445225cd3c8eb0bf1350c04875576428b45b4;p=platform%2Fkernel%2Flinux-rpi.git uaccess: add noop untagged_addr definition Architectures that support memory tagging have a need to perform untagging (stripping the tag) in various parts of the kernel. This patch adds an untagged_addr() macro, which is defined as noop for architectures that do not support memory tagging. The oncoming patch series will define it at least for sparc64 and arm64. Acked-by: Catalin Marinas Reviewed-by: Khalid Aziz Signed-off-by: Andrey Konovalov Signed-off-by: Linus Torvalds --- diff --git a/include/linux/mm.h b/include/linux/mm.h index 0e8834a..dd0b5f4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -99,6 +99,17 @@ extern int mmap_rnd_compat_bits __read_mostly; #include #include +/* + * Architectures that support memory tagging (assigning tags to memory regions, + * embedding these tags into addresses that point to these memory regions, and + * checking that the memory and the pointer tags match on memory accesses) + * redefine this macro to strip tags from pointers. + * It's defined as noop for arcitectures that don't support memory tagging. + */ +#ifndef untagged_addr +#define untagged_addr(addr) (addr) +#endif + #ifndef __pa_symbol #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0)) #endif