git: 52c00b65a76e - stable/13 - arm: switch the BUSDMA buffers to normal uncached memory
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 08 Dec 2024 13:38:06 UTC
The branch stable/13 has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=52c00b65a76e0bc670c5d2b9d7c85542e3b536b9 commit 52c00b65a76e0bc670c5d2b9d7c85542e3b536b9 Author: Michal Meloun <mmel@FreeBSD.org> AuthorDate: 2024-11-08 12:00:57 +0000 Commit: Michal Meloun <mmel@FreeBSD.org> CommitDate: 2024-12-08 13:19:41 +0000 arm: switch the BUSDMA buffers to normal uncached memory The BUSDMA buffer is treated as normal memory during compilation and compiler is free to inline/optimize basic functions (i.e. memset, memcpy) accessing buffers, including when an instruction is generated that performs a word access to unaligned data. We support this, but only if the buffer in question is mapped as normal memory (cached or not), but not to memory mapped as strongly ordered or device type. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47485 (cherry picked from commit 248109448f6afb3d093a522677aab2975a3e7a15) --- sys/arm/include/vm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/include/vm.h b/sys/arm/include/vm.h index 439dbdf440a6..697b48689bd8 100644 --- a/sys/arm/include/vm.h +++ b/sys/arm/include/vm.h @@ -36,7 +36,7 @@ #define VM_MEMATTR_WRITE_THROUGH ((vm_memattr_t)4) #define VM_MEMATTR_DEFAULT VM_MEMATTR_WB_WA -#define VM_MEMATTR_UNCACHEABLE VM_MEMATTR_SO /* misused by DMA */ +#define VM_MEMATTR_UNCACHEABLE VM_MEMATTR_NOCACHE /* used by BUSDMA */ #ifdef _KERNEL /* Don't export aliased VM_MEMATTR to userland */ #define VM_MEMATTR_WRITE_COMBINING VM_MEMATTR_WRITE_THROUGH /* for DRM */