Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation Error on later kernels and RHEL 8.3 #98

Open
NateThornton opened this issue Jan 29, 2021 · 2 comments
Open

Compilation Error on later kernels and RHEL 8.3 #98

NateThornton opened this issue Jan 29, 2021 · 2 comments

Comments

@NateThornton
Copy link

Looks like commit 6736a6f introduced AER code which is incompatible with kernel versions beyond 5.7.0 as a name change from pci_cleanup_aer_uncorrect_error_status() to pci_aer_clear_nonfatal_status() at torvalds/linux@894020f

Build fails with

[root switchtec-kernel]# make

make -C /lib/modules/4.18.0-240.10.1.el8_3.x86_64/build M=$PWD modules
make[1]: Entering directory '/usr/src/kernels/4.18.0-240.10.1.el8_3.x86_64'
  CC [M]  /usr/src/switchtec-kernel/switchtec.o
/usr/src/switchtec-kernel/switchtec.c: In function ‘switchtec_pci_error_resume’:
/usr/src/switchtec-kernel/switchtec.c:1790:2: error: implicit declaration of function ‘pci_cleanup_aer_uncorrect_error_status’ [-Werror=implicit-function-declaration]
  pci_cleanup_aer_uncorrect_error_status(pdev);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This also affects RHEL 8.3, which accepted that patch

I would propose the following patch

#if KERNEL_VERSION(5,7,0) <= LINUX_VERSION_CODE || \
      defined(RHEL_MAJOR) && RHEL_RELEASE_VERSION(8,3) <= RHEL_RELEASE_CODE
	pci_aer_clear_nonfatal_status(pdev);
#else
	pci_cleanup_aer_uncorrect_error_status(pdev);
#endif
@kelvin-cao
Copy link
Collaborator

Thanks for reporting this! As of now branch main/devel are working on 5.4/5.6 kernels. Will move them to support later kernels (with kernel API update) and create back port branch for 5.6.

@jborz27
Copy link
Collaborator

jborz27 commented Mar 4, 2021

There's a need to fix this for RedHat/CentOS 8.3. Kernel 4.18.0-240.15.1 which is included in RedHat also uses the new API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants