ami: fix eventfd_signal() build on RHEL 9.5+#34
Open
amd-vserbu wants to merge 1 commit into
Open
Conversation
Signed-off-by: Vlad-Gabriel Serbu <Vlad-Gabriel.Serbu@amd.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #33
Extend the
eventfd_signal()preprocessor gate insw/AMI/driver/ami_program.cso that the new one-argument form is also selected on RHEL 9.5+ and its rebuilds (Rocky Linux 9.5+, AlmaLinux 9.5+, …), where Red Hat backported the upstream v6.8eventfd_signal()simplification into the 5.14-based kernel. See the linked issue for the full root-cause and reproduction.Before:
After:
The same change is applied to the second
eventfd_signal()call site (the boot-tag rewrite path), so the two gates stay in sync.The form chosen here,
defined(RHEL_RELEASE_CODE) && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 5), is the same idiom already used by this driver insw/AMI/driver/ami_cdev.cfor theclass_create()/devnode()signature change, so it's consistent with existing AVED conventions.Downstream context
We are currently carrying this fix downstream in SLASH (https://github.com/Xilinx/SLASH) as a
sedpatch applied inscripts/package-ami.shright beforegen_package.pyis invoked, and reverted on exit:The
sedproduces exactly the diff in this PR, and we have verified it works: with the patch applied,gen_package.pyproduces a workingami-*.rpmwhoseami.kobuilds with DKMS and loads cleanly on Rocky Linux 9.6 (kernel-5.14.0-570.58.1.el9_6.x86_64). Without it, packaging breaks at compile time on the same machine.Testing
kernel-5.14.0-570.58.1.el9_6.x86_64— fails without this PR, builds + loads with it; PDI download viaami_toolworks end-to-end and the eventfd progress notifications fire.LINUX_VERSION_CODEterm.