blob: 950cb9df431af51b25ebe5887f1ca11b4c627445 [file] [log] [blame]
From 1d7545ed76ca1f360d61afb9311648dedc1a738f Mon Sep 17 00:00:00 2001
From: Vincenzo Frascino <>
Date: Fri, 10 Jan 2020 12:28:07 +0000
Subject: [PATCH] tee: optee: Fix compilation issue with nommu
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit 9e0caab8e0f96f0af7d1dd388e62f44184a75372 upstream.
The optee driver uses specific page table types to verify if a memory
region is normal. These types are not defined in nommu systems. Trying
to compile the driver in these systems results in a build error:
linux/drivers/tee/optee/call.c: In function is_normal_memory’:
linux/drivers/tee/optee/call.c:533:26: error: L_PTE_MT_MASK undeclared
(first use in this function); did you mean PREEMPT_MASK’?
return (pgprot_val(p) & L_PTE_MT_MASK) == L_PTE_MT_WRITEALLOC;
linux/drivers/tee/optee/call.c:533:26: note: each undeclared identifier is
reported only once for each function it appears in
linux/drivers/tee/optee/call.c:533:44: error: L_PTE_MT_WRITEALLOC undeclared
(first use in this function)
return (pgprot_val(p) & L_PTE_MT_MASK) == L_PTE_MT_WRITEALLOC;
Make the optee driver depend on MMU to fix the compilation issue.
Signed-off-by: Vincenzo Frascino <>
[jw: update commit title]
Signed-off-by: Jens Wiklander <>
Signed-off-by: Paul Gortmaker <>
diff --git a/drivers/tee/optee/Kconfig b/drivers/tee/optee/Kconfig
index d1ad512e1708..3ca71e3812ed 100644
--- a/drivers/tee/optee/Kconfig
+++ b/drivers/tee/optee/Kconfig
@@ -3,6 +3,7 @@
config OPTEE
tristate "OP-TEE"
depends on HAVE_ARM_SMCCC
+ depends on MMU
This implements the OP-TEE Trusted Execution Environment (TEE)