gnif / vendor-reset

Linux kernel vendor specific hardware reset module for sequences that are too complex/complicated to land in pci_quirks.c
GNU General Public License v2.0
764 stars 65 forks source link

Fix build on Kernel v. 6.12 #86

Open mfrischknecht opened 1 week ago

mfrischknecht commented 1 week ago

asm/unaligned.h has been moved to linux/unaligned.h since Linux v. 6.12 ^1, which breaks the build of vendor-reset e.g. on NixOS unstable (and likely other distributions, as soon as those switch to 6.12, too).

On my system, the build fails with this error:

/build/source/src/amd/amdgpu/atom.c:32:10: fatal error: asm/unaligned.h: No such file or directory
   32 | #include <asm/unaligned.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/nix/store/lacdcr5zi7w59f8xsq4cfi41mzgc6dcn-linux-6.12-dev/lib/modules/6.12.0/source/scripts/Makefile.build:229: /build/source/src/amd/amdgpu/atom.o] Error 1
VoodaGod commented 5 days ago

unfortunately this breaks the build on previous kernels, should try to make this change conditional like this: https://github.com/gnif/vendor-reset/blob/084881c6e9e11bdadaf05798e669568848e698a3/src/amd/amdgpu/atom.c#L43

mfrischknecht commented 5 days ago

@VoodaGod I'm currently out of town, so I've just applied you suggestion through the GitHub mobile interface. I hope that's okay like this. Thanks!

Note: I havent tested this myself yet. I should be able to until friday.