summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2020-11-27 17:45:45 +0100
committerArnd Bergmann <arnd@arndb.de>2020-11-27 17:45:45 +0100
commitae597565d13febc73b9066c05935c1003a57a03e (patch)
tree89c948e3632438ac9d9a3e116651a7dbde38f792
parent454a079b381a1fea3962f89016f55761b251f4bd (diff)
parent853735e404244f5496cdb6188c5ed9a0f9627ee6 (diff)
downloadlinux-ae597565d13febc73b9066c05935c1003a57a03e.tar.bz2
Merge tag 'optee-valid-memory-type-for-v5.11' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes
Add writeback to valid OP-TEE shared memory types Allows OP-TEE to work with ARMv7 based single CPU systems by allowing writeback cache policy for shared memory. * tag 'optee-valid-memory-type-for-v5.11' of git://git.linaro.org/people/jens.wiklander/linux-tee: optee: add writeback to valid memory type Link: https://lore.kernel.org/r/20201125120134.GA1642471@jade Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--drivers/tee/optee/call.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c
index 20b6fd7383c5..c981757ba0d4 100644
--- a/drivers/tee/optee/call.c
+++ b/drivers/tee/optee/call.c
@@ -534,7 +534,8 @@ void optee_free_pages_list(void *list, size_t num_entries)
static bool is_normal_memory(pgprot_t p)
{
#if defined(CONFIG_ARM)
- return (pgprot_val(p) & L_PTE_MT_MASK) == L_PTE_MT_WRITEALLOC;
+ return (((pgprot_val(p) & L_PTE_MT_MASK) == L_PTE_MT_WRITEALLOC) ||
+ ((pgprot_val(p) & L_PTE_MT_MASK) == L_PTE_MT_WRITEBACK));
#elif defined(CONFIG_ARM64)
return (pgprot_val(p) & PTE_ATTRINDX_MASK) == PTE_ATTRINDX(MT_NORMAL);
#else