D-TACQ / AFHBA404

Linux host device driver for AFHBA404 and MTCA PCIe
GNU General Public License v2.0
2 stars 8 forks source link

Signature of iommu_map changed in Rocky Linux 9.3 with kernel 5.14.0-362.8.1 #107

Open cenkoloji opened 9 months ago

cenkoloji commented 9 months ago

Hello, in Rocky Linux 9.3 with kernel 5.14.0-362.8.1, I see that function iommu_map signature have changed.

[root@tcvrtdev08]# grep -A 2 "iommu_map(" /usr/src/kernels/5.14.0-362.8.1.el9_3.x86_64/include/linux/iommu.h
extern int iommu_map(struct iommu_domain *domain, unsigned long iova,
                     phys_addr_t paddr, size_t size, int prot, gfp_t gfp);

I tracked it down to following commit: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?id=1369459b2e219a6f4c861404c4f195cd81dcbb40

Following change in afhba_stream_drv.c fixes the compilation of AFHBA404, but I'm not sure what is it's effect. We can test the system and report back...

-        if (iommu_map(adev->iommu_dom, iova, paddr, size, prot)){
+        if (iommu_map(adev->iommu_dom, iova, paddr, size, prot, GFP_KERNEL)){

Here's the os and kernel version I'm using:

[root@tcvrtdev08 AFHBA404]# cat /etc/os-release 
NAME="Rocky Linux"
VERSION="9.3 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.3"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.3 (Blue Onyx)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:9::baseos"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2032-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-9"
ROCKY_SUPPORT_PRODUCT_VERSION="9.3"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.3"

[root@tcvrtdev08]# uname -a
Linux tcvrtdev08 5.14.0-362.8.1.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 8 17:36:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
cenkoloji commented 7 months ago

Tested and our systems behaves as before (Currently we probably don't use iommu anyway)

Peter kindly created a branch for now: rocky93

k-isis commented 7 months ago

[Update: crashes have stopped after further testing so clearly this is not related - this works as normal]

Hi I'm doing a similar update to my Rocky9 system, in my case from 5.14.0-284.30.1.el9_2.x86_64 -> 5.14.0-362.18.1.el9_3.x86_64.

I also updated from AFHBA404 v2.5 -> v2.7 and made the same patch as above.

The system crashes when rtm-stream-disk is run. I'm still in the process of diagnosis but I thought I might mention this now since other people are having to do the same.