@@ -5583,6 +5583,23 @@ compile_test() {
55835583 else
55845584 echo " #undef NV_OF_PROPERTY_READ_VARIABLE_U32_ARRAY_PRESENT" | append_conftest " functions"
55855585 fi
5586+ ;;
5587+
5588+ module_import_ns_takes_string_literal)
5589+ #
5590+ # Determine if the MODULE_IMPORT_NS macro takes a string literal
5591+ # or constant.
5592+ #
5593+ # Commit cdd30ebb1b9f ("module: Convert symbol namespace to
5594+ # string literal") changed MODULE_IMPORT_NS to take a string
5595+ # literal in Linux kernel v6.13.
5596+ #
5597+ CODE="
5598+ #include <linux/module.h>
5599+
5600+ MODULE_IMPORT_NS(DMA_BUF);"
5601+
5602+ compile_check_conftest " $CODE " " NV_MODULE_IMPORT_NS_TAKES_STRING_LITERAL" " " " functions"
55865603 ;;
55875604
55885605 devm_of_platform_populate)
@@ -6616,7 +6633,8 @@ compile_test() {
66166633 # Determine whether drm_fbdev_ttm_setup is present.
66176634 #
66186635 # Added by commit aae4682e5d66 ("drm/fbdev-generic:
6619- # Convert to fbdev-ttm") in v6.11.
6636+ # Convert to fbdev-ttm") in v6.11. Removed by commit
6637+ # 1000634477d8 ("drm/fbdev-ttm:Convert to client-setup") in v6.13.
66206638 #
66216639 CODE="
66226640 #include <drm/drm_fb_helper.h>
@@ -6630,6 +6648,25 @@ compile_test() {
66306648 compile_check_conftest " $CODE " " NV_DRM_FBDEV_TTM_SETUP_PRESENT" " " " functions"
66316649 ;;
66326650
6651+ drm_client_setup)
6652+ #
6653+ # Determine whether drm_client_setup is present.
6654+ #
6655+ # Added by commit d07fdf922592 ("drm/fbdev-ttm:
6656+ # Convert to client-setup") in v6.13.
6657+ #
6658+ CODE="
6659+ #include <drm/drm_fb_helper.h>
6660+ #if defined(NV_DRM_DRM_CLIENT_SETUP_H_PRESENT)
6661+ #include <drm/drm_client_setup.h>
6662+ #endif
6663+ void conftest_drm_client_setup(void) {
6664+ drm_client_setup();
6665+ }"
6666+
6667+ compile_check_conftest " $CODE " " NV_DRM_CLIENT_SETUP_PRESENT" " " " functions"
6668+ ;;
6669+
66336670 drm_output_poll_changed)
66346671 #
66356672 # Determine whether drm_mode_config_funcs.output_poll_changed
@@ -6653,6 +6690,38 @@ compile_test() {
66536690 compile_check_conftest " $CODE " " NV_DRM_OUTPUT_POLL_CHANGED_PRESENT" " " " types"
66546691 ;;
66556692
6693+ aperture_remove_conflicting_devices)
6694+ #
6695+ # Determine whether aperture_remove_conflicting_devices is present.
6696+ #
6697+ # Added by commit 7283f862bd991 ("drm: Implement DRM aperture
6698+ # helpers under video/") in v6.0
6699+ CODE="
6700+ #if defined(NV_LINUX_APERTURE_H_PRESENT)
6701+ #include <linux/aperture.h>
6702+ #endif
6703+ void conftest_aperture_remove_conflicting_devices(void) {
6704+ aperture_remove_conflicting_devices();
6705+ }"
6706+ compile_check_conftest " $CODE " " NV_APERTURE_REMOVE_CONFLICTING_DEVICES_PRESENT" " " " functions"
6707+ ;;
6708+
6709+ aperture_remove_conflicting_pci_devices)
6710+ #
6711+ # Determine whether aperture_remove_conflicting_pci_devices is present.
6712+ #
6713+ # Added by commit 7283f862bd991 ("drm: Implement DRM aperture
6714+ # helpers under video/") in v6.0
6715+ CODE="
6716+ #if defined(NV_LINUX_APERTURE_H_PRESENT)
6717+ #include <linux/aperture.h>
6718+ #endif
6719+ void conftest_aperture_remove_conflicting_pci_devices(void) {
6720+ aperture_remove_conflicting_pci_devices();
6721+ }"
6722+ compile_check_conftest " $CODE " " NV_APERTURE_REMOVE_CONFLICTING_PCI_DEVICES_PRESENT" " " " functions"
6723+ ;;
6724+
66566725 drm_aperture_remove_conflicting_pci_framebuffers)
66576726 #
66586727 # Determine whether drm_aperture_remove_conflicting_pci_framebuffers is present.
@@ -6746,17 +6815,17 @@ compile_test() {
67466815 # This test is not complete and may return false positive.
67476816 #
67486817 CODE="
6749- #include <crypto/akcipher.h>
6750- #include <crypto/algapi.h>
6751- #include <crypto/ecc_curve.h>
6752- #include <crypto/ecdh.h>
6753- #include <crypto/hash.h>
6754- #include <crypto/internal/ecc.h>
6755- #include <crypto/kpp.h>
6756- #include <crypto/public_key.h>
6757- #include <crypto/sm3.h>
6758- #include <keys/asymmetric-type.h>
6759- #include <linux/crypto.h>
6818+ #include <crypto/akcipher.h>
6819+ #include <crypto/algapi.h>
6820+ #include <crypto/ecc_curve.h>
6821+ #include <crypto/ecdh.h>
6822+ #include <crypto/hash.h>
6823+ #include <crypto/internal/ecc.h>
6824+ #include <crypto/kpp.h>
6825+ #include <crypto/public_key.h>
6826+ #include <crypto/sm3.h>
6827+ #include <keys/asymmetric-type.h>
6828+ #include <linux/crypto.h>
67606829 void conftest_crypto(void) {
67616830 struct shash_desc sd;
67626831 struct crypto_shash cs;
@@ -6766,6 +6835,47 @@ compile_test() {
67666835 compile_check_conftest " $CODE " " NV_CRYPTO_PRESENT" " " " symbols"
67676836 ;;
67686837
6838+ crypto_akcipher_verify)
6839+ #
6840+ # Determine whether the crypto_akcipher_verify API is still present.
6841+ # It was removed by commit 6b34562 ('crypto: akcipher - Drop sign/verify operations')
6842+ # in v6.13-rc1 (2024-10-04).
6843+ #
6844+ # This test is dependent on the crypto conftest to determine whether crypto should be
6845+ # enabled at all. That means that if the kernel is old enough such that crypto_akcipher_verify
6846+ #
6847+ # The test merely checks for the presence of the API, as it assumes that if the API
6848+ # is no longer present, the new API to replace it (crypto_sig_verify) must be present.
6849+ # If the kernel version is too old to have crypto_akcipher_verify, it will fail the crypto
6850+ # conftest above and all crypto code will be compiled out.
6851+ #
6852+ CODE="
6853+ #include <crypto/akcipher.h>
6854+ #include <linux/crypto.h>
6855+ void conftest_crypto_akcipher_verify(void) {
6856+ (void)crypto_akcipher_verify;
6857+ }"
6858+
6859+ compile_check_conftest " $CODE " " NV_CRYPTO_AKCIPHER_VERIFY_PRESENT" " " " symbols"
6860+ ;;
6861+
6862+ ecc_digits_from_bytes)
6863+ #
6864+ # Determine whether ecc_digits_from_bytes is present.
6865+ # It was added in commit c6ab5c915da4 ('crypto: ecc - Prevent ecc_digits_from_bytes from
6866+ # reading too many bytes') in v6.10.
6867+ #
6868+ # This functionality is needed when crypto_akcipher_verify is not present.
6869+ #
6870+ CODE="
6871+ #include <crypto/internal/ecc.h>
6872+ void conftest_ecc_digits_from_bytes(void) {
6873+ (void)ecc_digits_from_bytes;
6874+ }"
6875+
6876+ compile_check_conftest " $CODE " " NV_ECC_DIGITS_FROM_BYTES_PRESENT" " " " symbols"
6877+ ;;
6878+
67696879 mempolicy_has_unified_nodes)
67706880 #
67716881 # Determine if the 'mempolicy' structure has
0 commit comments