summaryrefslogtreecommitdiff
path: root/arch/loongarch/include/asm/pgtable-bits.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2023-10-23 11:20:06 +0300
committerDave Airlie <airlied@redhat.com>2023-10-23 11:20:06 +0300
commit7cd62eab9babd1fed9c497141650b31168f4f430 (patch)
tree85ef2122ca0d88b2b598f45eb071fcd1f4faa3d2 /arch/loongarch/include/asm/pgtable-bits.h
parent035fdc38c1f6ddce3544d8a489548e6cc4de508a (diff)
parent05d3ef8bba77c1b5f98d941d8b2d4aeab8118ef1 (diff)
downloadlinux-7cd62eab9babd1fed9c497141650b31168f4f430.tar.xz
BackMerge tag 'v6.6-rc7' into drm-next
This is needed to add the msm pr which is based on a higher base. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'arch/loongarch/include/asm/pgtable-bits.h')
-rw-r--r--arch/loongarch/include/asm/pgtable-bits.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/loongarch/include/asm/pgtable-bits.h b/arch/loongarch/include/asm/pgtable-bits.h
index 35348d4c4209..21319c1e045c 100644
--- a/arch/loongarch/include/asm/pgtable-bits.h
+++ b/arch/loongarch/include/asm/pgtable-bits.h
@@ -105,13 +105,15 @@ static inline pgprot_t pgprot_noncached(pgprot_t _prot)
return __pgprot(prot);
}
+extern bool wc_enabled;
+
#define pgprot_writecombine pgprot_writecombine
static inline pgprot_t pgprot_writecombine(pgprot_t _prot)
{
unsigned long prot = pgprot_val(_prot);
- prot = (prot & ~_CACHE_MASK) | _CACHE_WUC;
+ prot = (prot & ~_CACHE_MASK) | (wc_enabled ? _CACHE_WUC : _CACHE_SUC);
return __pgprot(prot);
}