Patrick Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame^] | 1 | From 61c33344f747deac2860571ef965c20f9170efea Mon Sep 17 00:00:00 2001 |
| 2 | From: Jens Wiklander <jens.wiklander@linaro.org> |
| 3 | Date: Thu, 21 Oct 2021 14:55:39 +0200 |
| 4 | Subject: [PATCH 13/40] optee: smc_abi.c: add missing #include <linux/mm.h> |
| 5 | |
| 6 | Adds missing #include <linux/mm.h> drivers/tee/optee/smc_abi.c to fix |
| 7 | compile errors like: |
| 8 | drivers/tee/optee/smc_abi.c:405:15: error: implicit |
| 9 | declaration of function 'page_to_section' |
| 10 | [-Werror,-Wimplicit-function-declaration] |
| 11 | optee_page = page_to_phys(*pages) + |
| 12 | ^ |
| 13 | arch/arm/include/asm/memory.h:148:43: note: expanded from |
| 14 | macro 'page_to_phys' |
| 15 | ^ |
| 16 | include/asm-generic/memory_model.h:52:21: note: expanded |
| 17 | from macro 'page_to_pfn' |
| 18 | ^ |
| 19 | include/asm-generic/memory_model.h:35:14: note: expanded |
| 20 | from macro '__page_to_pfn' |
| 21 | int __sec = page_to_section(__pg); \ |
| 22 | ^ |
| 23 | drivers/tee/optee/smc_abi.c:405:15: note: did you mean |
| 24 | '__nr_to_section'? |
| 25 | arch/arm/include/asm/memory.h:148:43: note: expanded from |
| 26 | macro 'page_to_phys' |
| 27 | ^ |
| 28 | include/asm-generic/memory_model.h:52:21: note: expanded |
| 29 | from macro 'page_to_pfn' |
| 30 | ^ |
| 31 | include/asm-generic/memory_model.h:35:14: note: expanded |
| 32 | from macro '__page_to_pfn' |
| 33 | int __sec = page_to_section(__pg); \ |
| 34 | ^ |
| 35 | include/linux/mmzone.h:1365:35: note: '__nr_to_section' |
| 36 | declared here |
| 37 | static inline struct mem_section *__nr_to_section(unsigned long nr) |
| 38 | |
| 39 | Fixes: c51a564a5b48 ("optee: isolate smc abi") |
| 40 | Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 41 | Link: https://lore.kernel.org/r/20211021125539.3858495-1-jens.wiklander@linaro.org' |
| 42 | Signed-off-by: Arnd Bergmann <arnd@arndb.de> |
| 43 | Upstream-Status: Backport [https://lore.kernel.org/r/20211021125539.3858495-1-jens.wiklander@linaro.org] |
| 44 | Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com> |
| 45 | --- |
| 46 | drivers/tee/optee/smc_abi.c | 1 + |
| 47 | 1 file changed, 1 insertion(+) |
| 48 | |
| 49 | diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c |
| 50 | index 9a787fb4f5e5..6196d7c3888f 100644 |
| 51 | --- a/drivers/tee/optee/smc_abi.c |
| 52 | +++ b/drivers/tee/optee/smc_abi.c |
| 53 | @@ -10,6 +10,7 @@ |
| 54 | #include <linux/errno.h> |
| 55 | #include <linux/io.h> |
| 56 | #include <linux/sched.h> |
| 57 | +#include <linux/mm.h> |
| 58 | #include <linux/module.h> |
| 59 | #include <linux/of.h> |
| 60 | #include <linux/of_platform.h> |
| 61 | -- |
| 62 | 2.34.1 |
| 63 | |