diff options
| author | Rob Clark <robdclark@chromium.org> | 2023-03-20 10:31:25 -0700 |
|---|---|---|
| committer | Rob Clark <robdclark@chromium.org> | 2023-03-20 10:31:25 -0700 |
| commit | e752ab11dcb48353727ea26eefd740155e028865 (patch) | |
| tree | bbd47198be4e42bbf990096ca36e96f3da40cfb6 /include/linux/highmem-internal.h | |
| parent | 1844e680d56bb0c4e0489138f2b7ba2dc1c988e3 (diff) | |
| parent | 8bf6e20253b2d2b614f2c0b491f840e956fa6b05 (diff) | |
Merge remote-tracking branch 'drm/drm-next' into msm-next
Merge drm-next into msm-next to pick up external clk and PM dependencies
for improved a6xx GPU reset sequence.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'include/linux/highmem-internal.h')
| -rw-r--r-- | include/linux/highmem-internal.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/highmem-internal.h b/include/linux/highmem-internal.h index 034b1106d022..a3028e400a9c 100644 --- a/include/linux/highmem-internal.h +++ b/include/linux/highmem-internal.h @@ -152,7 +152,10 @@ static inline void totalhigh_pages_add(long count) static inline bool is_kmap_addr(const void *x) { unsigned long addr = (unsigned long)x; - return addr >= PKMAP_ADDR(0) && addr < PKMAP_ADDR(LAST_PKMAP); + + return (addr >= PKMAP_ADDR(0) && addr < PKMAP_ADDR(LAST_PKMAP)) || + (addr >= __fix_to_virt(FIX_KMAP_END) && + addr < __fix_to_virt(FIX_KMAP_BEGIN)); } #else /* CONFIG_HIGHMEM */ @@ -200,7 +203,7 @@ static inline void *kmap_local_pfn(unsigned long pfn) static inline void __kunmap_local(const void *addr) { #ifdef ARCH_HAS_FLUSH_ON_KUNMAP - kunmap_flush_on_unmap(addr); + kunmap_flush_on_unmap(PTR_ALIGN_DOWN(addr, PAGE_SIZE)); #endif } @@ -227,7 +230,7 @@ static inline void *kmap_atomic_pfn(unsigned long pfn) static inline void __kunmap_atomic(const void *addr) { #ifdef ARCH_HAS_FLUSH_ON_KUNMAP - kunmap_flush_on_unmap(addr); + kunmap_flush_on_unmap(PTR_ALIGN_DOWN(addr, PAGE_SIZE)); #endif pagefault_enable(); if (IS_ENABLED(CONFIG_PREEMPT_RT)) |
