Re: git: 3473f2832284 - main - Switch the arm64 VM_MEMATTR_DEVICE to nGnRE
- In reply to: Andrew Turner : "Fwd: git: 3473f2832284 - main - Switch the arm64 VM_MEMATTR_DEVICE to nGnRE"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 Mar 2023 18:53:29 UTC
On Mar 16, 2023, at 09:53, Andrew Turner <andrew@fubar.geek.nz> wrote: > I’ve pushed a change to relax the default device memory type on arm64. This is now equivalent to the device memory type used on arm. > > Because of this I expect most devices to just work, however if you are seeing strange issues you can set kern.force_nonposted=1 in loader.conf to revert to the previous memory type globally, or hint.<device>.<unit>.force_nonposted=1 to disable it for a specific device. For example to disable it for xhci0 you would use hint.xhci.0.force_nonposted=1. > > If you do find this fixes an issue please report it so we can fix the driver. A probably unfortunate issue relative to some types of testing is that drm-515-kmod and drm-510-kmod fail to build for aarch64 (arm64). (drm-510-kmod might not be reasonable for aarch64 for alll I know.) The current problem for drm-515-kmod is lack of in_interrupt via lack of sufficient #include <linux/preempt.h> use (that provides the macro definition involved): error: call to undeclared function 'in_interrupt' (I'm guessing that amd64 works only via some amd64 specific header polution that aarch64 does not get.) My vague understanding of issues that exist in Linux land may suggest that Cortex-A72's may have additional issues shown via video card use. An example is the video-related activity for the HoneyComb to avoid the issues. > Andrew > >> Begin forwarded message: >> >> From: Andrew Turner <andrew@FreeBSD.org> >> Subject: git: 3473f2832284 - main - Switch the arm64 VM_MEMATTR_DEVICE to nGnRE >> Date: 16 March 2023 at 16:46:11 GMT >> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org >> >> The branch main has been updated by andrew: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3473f283228401ba585044ac6dea8c8eb27237a5 >> >> commit 3473f283228401ba585044ac6dea8c8eb27237a5 >> Author: Andrew Turner <andrew@FreeBSD.org> >> AuthorDate: 2023-03-16 15:36:06 +0000 >> Commit: Andrew Turner <andrew@FreeBSD.org> >> CommitDate: 2023-03-16 16:45:42 +0000 >> >> Switch the arm64 VM_MEMATTR_DEVICE to nGnRE >> >> Move device memory to a weaker type. The new device memory type allows >> the system to acknowledge a write to a device before the write has >> completed. This is inline with VM_MEMATTR_DEVICE on armv6/armv7. >> >> Sponsored by: Arm Ltd >> Differential Revision: https://reviews.freebsd.org/D38945 >> --- >> sys/arm64/include/vm.h | 6 +----- >> 1 file changed, 1 insertion(+), 5 deletions(-) >> >> diff --git a/sys/arm64/include/vm.h b/sys/arm64/include/vm.h >> index e479aab52e26..a8c1ea97b513 100644 >> --- a/sys/arm64/include/vm.h >> +++ b/sys/arm64/include/vm.h >> @@ -36,11 +36,7 @@ >> #define VM_MEMATTR_WRITE_THROUGH 3 >> #define VM_MEMATTR_DEVICE_nGnRE 4 >> >> -/* >> - * VM_MEMATTR_DEVICE can be changed to VM_MEMATTR_DEVICE_nGnRE when >> - * the PCI drivers use VM_MEMATTR_DEVICE_NP for their config space. >> - */ >> -#define VM_MEMATTR_DEVICE VM_MEMATTR_DEVICE_nGnRnE >> +#define VM_MEMATTR_DEVICE VM_MEMATTR_DEVICE_nGnRE >> #define VM_MEMATTR_DEVICE_NP VM_MEMATTR_DEVICE_nGnRnE >> >> #ifdef _KERNEL >> > === Mark Millard marklmi at yahoo.com