QDMA: libqdma: select timer_container_of() on RHEL backports (9.8+/10.1+) - #392
Open
amd-vserbu wants to merge 1 commit into
Open
QDMA: libqdma: select timer_container_of() on RHEL backports (9.8+/10.1+)#392amd-vserbu wants to merge 1 commit into
amd-vserbu wants to merge 1 commit into
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.
Summary
from_timer()was renamed totimer_container_of()upstream in Linux v6.16 (commit41cb08555c41). The existing guard inqdma_mbox.ckeyed solely offLINUX_VERSION_CODE > KERNEL_VERSION(6, 16, 0), which misfires on RHEL-family kernels that backported the rename while keeping an older version string, breaking the build on RHEL/AlmaLinux/Rocky 9.8+ and 10.1+.Fixes #391
Changes
QDMA_HAVE_TIMER_CONTAINER_OFfeature gate inqdma_compat.hthat is defined when either:LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0)(vanilla), orRHEL_RELEASE_CODEindicates 9.8–9.x or 10.1+ (the backported streams: RHEL-115039 for el9, RHEL-114125 for el10).#elif defined(RHEL_RELEASE_CODE)so thatRHEL_RELEASE_VERSION(...)is never evaluated on non-RHEL kernels (where it is undefined and would otherwise be a preprocessor error).qdma_mbox.cnow selects the branch via#if defined(QDMA_HAVE_TIMER_CONTAINER_OF).>to>=so a vanilla 6.16.0 kernel is also matched (the rename is present in 6.16).Testing
Compile-tested
make driver KDIR=<tree>against:kernel-devel-5.14.0-687.12.1.el9_8).