(In reply to stt02296199 from comment #0) > [问题描述] > kernel-selftests.dmabuf-heaps.dmabuf-heap 测试提示/dev/dma_heap不存在 > # selftests: dmabuf-heaps: dmabuf-heap # No /dev/dma_heap directory? not ok 1 selftests: dmabuf-heaps: dmabuf-heap # exit=255 > [重现环境]: > [root@localhost netfilter]# uname -r > 6.6.102-5.2.1_rc1.an23.riscv64 > [root@localhost netfilter]# cat /boot/config-6.6.102-5.2.1_rc1.an23.riscv64 > |grep -i dma|grep -i heap > # CONFIG_DMABUF_HEAPS is not set > [root@localhost netfilter]# lscpu > Architecture: riscv64 > Byte Order: Little Endian > CPU(s): 64 > On-line CPU(s) list: 0-63 > NUMA: > NUMA node(s): 4 > NUMA node0 CPU(s): 0-7,16-23 > NUMA node1 CPU(s): 8-15,24-31 > NUMA node2 CPU(s): 32-39,48-55 > NUMA node3 CPU(s): 40-47,56-63 > [root@localhost netfilter]# lsblk > NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS > nvme0n1 259:0 0 953.9G 0 disk > ├─nvme0n1p1 259:1 0 121.9M 0 part /boot/efi > ├─nvme0n1p2 259:2 0 488M 0 part /boot > ├─nvme0n1p3 259:3 0 143.1G 0 part / > ├─nvme0n1p4 259:4 0 1K 0 part > ├─nvme0n1p5 259:5 0 286.1G 0 part /fs/nvme0n1p5 > └─nvme0n1p6 259:6 0 286.1G 0 part > [root@localhost netfilter]# free -g > total used free shared buff/cache > available > Mem: 61 2 0 0 59 > 59 > Swap: 0 0 0 > [root@localhost netfilter]# cat /proc/cmdline > root=UUID=e297bfa3-2c55-44f8-90cb-ae8eb642d188 ro console=ttyS0,115200 > root=LABEL=ROOT rootfstype=ext4 rootwait rw earlycon selinux=0 > LANG=en_US.UTF-8 nvme.use_threaded_interrupts=1 nvme_core.io_timeout=3000 > audit=0 per_numa_node_futex=disable > [重现步骤] > 1.获取内核对应src.rpm包 > (KERNEL_SRC_RPM=http://8.131.87.1/kojifiles/repos/dist-an23.3-riscv64-gcc14- > build/latest/riscv64/toplink/work/tasks/5939/1035939/kernel-6.6.102-5.2. > 1_rc1.an23.src.rpm) > rpm -ivh xxx.src.rpm 默认安装到/root下 > yum install yum-utils > yum-builddep -y /root/rpmbuild/SPECS/kernel.spec 自动安装前置依赖包 需要yum-utils > rpmbuild -bp /root/rpmbuild/SPECS/kernel.spec # 这个步骤会打相关的patch, > 解压缩tar包,生成BUILD目录 > cd /root/rpmbuild/BUILD/kernel-*/linux-*/tools/testing/selftests/dmabuf-heaps > make > ./dmabuf-heap > > [实际结果] > 测试fail > [期望结果] > 测试pass > [原因分析] > 初步分析是 CONFIG_DMABUF_HEAPS 未开启导致 请确认是否需要开启 > cat /boot/config-6.6.102-5.2.1_rc1.an23.riscv64 |grep -i dma|grep -i heap > # CONFIG_DMABUF_HEAPS is not set
config未打开,符合预期