-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Linux 5.16 compat - fpu/xcr.h header and folio_wait_bit() changes #12800
Closed
Conversation
This file contains 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
ckane
changed the title
Linux 5.16 compat ckane
Linux 5.16 compat - fpu/xcr.h header and wait_on_page_writeback() changes
Nov 26, 2021
ckane
force-pushed
the
linux-5.16-compat-ckane
branch
from
November 26, 2021 21:32
22896ae
to
208b3a4
Compare
ckane
changed the title
Linux 5.16 compat - fpu/xcr.h header and wait_on_page_writeback() changes
Linux 5.16 compat - fpu/xcr.h header and folio_wait_bit() changes
Nov 26, 2021
Instead, linux/pagemap.h offers a number of folio-specific functions to be called instead. In this case, module/os/linux/zfs/zfs_vnops_os.c wants to call wait_on_page_bit(pp, PG_writeback). This gets replaced with folio_wait_bit(folio_page(pp), PG_writeback). This change modifies the code to conditionally compile that if configure identifies th presence of the folio_wait_bit() function. Signed-off-by: Coleman Kane <ckane@colemankane.org>
Linux 5.16 moved these functions into this new header in commit 1b4fb8545f2b00f2844c4b7619d64d98440a477c. This change adds code to look for the presence of this header, and include it so that the code using xgetbv & xsetbv will compile again. Signed-off-by: Coleman Kane <ckane@colemankane.org>
ckane
force-pushed
the
linux-5.16-compat-ckane
branch
from
November 26, 2021 21:38
208b3a4
to
30b6973
Compare
This was referenced Nov 29, 2021
behlendorf
approved these changes
Nov 29, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One step closer, thanks for sorting out this API change. LGTM.
behlendorf
pushed a commit
that referenced
this pull request
Nov 29, 2021
Linux 5.16 moved these functions into this new header in commit 1b4fb8545f2b00f2844c4b7619d64d98440a477c. This change adds code to look for the presence of this header, and include it so that the code using xgetbv & xsetbv will compile again. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes #12800
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this pull request
Dec 6, 2021
Instead, linux/pagemap.h offers a number of folio-specific functions to be called instead. In this case, module/os/linux/zfs/zfs_vnops_os.c wants to call wait_on_page_bit(pp, PG_writeback). This gets replaced with folio_wait_bit(folio_page(pp), PG_writeback). This change modifies the code to conditionally compile that if configure identifies th presence of the folio_wait_bit() function. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#12800
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this pull request
Dec 6, 2021
Instead, linux/pagemap.h offers a number of folio-specific functions to be called instead. In this case, module/os/linux/zfs/zfs_vnops_os.c wants to call wait_on_page_bit(pp, PG_writeback). This gets replaced with folio_wait_bit(folio_page(pp), PG_writeback). This change modifies the code to conditionally compile that if configure identifies th presence of the folio_wait_bit() function. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#12800
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this pull request
Dec 7, 2021
Linux 5.16 moved these functions into this new header in commit 1b4fb8545f2b00f2844c4b7619d64d98440a477c. This change adds code to look for the presence of this header, and include it so that the code using xgetbv & xsetbv will compile again. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#12800
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this pull request
Dec 7, 2021
Linux 5.16 moved these functions into this new header in commit 1b4fb8545f2b00f2844c4b7619d64d98440a477c. This change adds code to look for the presence of this header, and include it so that the code using xgetbv & xsetbv will compile again. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#12800
nicman23
pushed a commit
to nicman23/zfs
that referenced
this pull request
Aug 22, 2022
Instead, linux/pagemap.h offers a number of folio-specific functions to be called instead. In this case, module/os/linux/zfs/zfs_vnops_os.c wants to call wait_on_page_bit(pp, PG_writeback). This gets replaced with folio_wait_bit(folio_page(pp), PG_writeback). This change modifies the code to conditionally compile that if configure identifies th presence of the folio_wait_bit() function. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#12800
nicman23
pushed a commit
to nicman23/zfs
that referenced
this pull request
Aug 22, 2022
Linux 5.16 moved these functions into this new header in commit 1b4fb8545f2b00f2844c4b7619d64d98440a477c. This change adds code to look for the presence of this header, and include it so that the code using xgetbv & xsetbv will compile again. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#12800
nicman23
pushed a commit
to nicman23/zfs
that referenced
this pull request
Aug 22, 2022
Instead, linux/pagemap.h offers a number of folio-specific functions to be called instead. In this case, module/os/linux/zfs/zfs_vnops_os.c wants to call wait_on_page_bit(pp, PG_writeback). This gets replaced with folio_wait_bit(folio_page(pp), PG_writeback). This change modifies the code to conditionally compile that if configure identifies th presence of the folio_wait_bit() function. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#12800
nicman23
pushed a commit
to nicman23/zfs
that referenced
this pull request
Aug 22, 2022
Linux 5.16 moved these functions into this new header in commit 1b4fb8545f2b00f2844c4b7619d64d98440a477c. This change adds code to look for the presence of this header, and include it so that the code using xgetbv & xsetbv will compile again. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Coleman Kane <ckane@colemankane.org> Closes openzfs#12800
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.
Motivation and Context
Commit
1b4fb8545f2b00f2844c4b7619d64d98440a477c
moved the xgetbv & xsetbv intoasm/fpu/xcr.h
. This breaks compilation wheninclude/os/linux/kernel/linux/simd_x86.h
is included.This PR also includes a fix for the replacement of
wait_on_page_bit()
->folio_wait_bit()
, as the former is no longer available to modules.Description
This change tests for the presence of the aforementioned header in configure, and if present, will include it in
simd_x86.h
.This change also tests for the presence of
folio_wait_bit()
and conditionally compiles code using that API, if present.How Has This Been Tested?
So far I have only compile-tested this, as there are other regressions due to 5.16 that prevent the build from completing successfully.
Types of changes
Checklist:
Signed-off-by
.