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