mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
video: tegra: nvmap: Fix build failure
Linux v6.10 and v6.11 are failing as follow_pfn was removed since kernel v6.10 Use conftest to detect if follow_pfn, follow_pfnmap_start functions are present or not and based upon this result, call the appropriate functions in nvmap code. Bug 5007238 Change-Id: Ie7e0c9bde652fd89158a5778aa8254fc86bf4696 Signed-off-by: Ketan Patil <ketanp@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3311535 Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com>
This commit is contained in:
@@ -7480,6 +7480,40 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_FOLIO_ENTIRE_MAPCOUNT_PRESENT" "" "functions"
|
||||
;;
|
||||
|
||||
follow_pfn)
|
||||
#
|
||||
# Determine if function follow_pfn() is present.
|
||||
#
|
||||
# Commit cb10c28ac82c9 ("mm: remove follow_pfn")
|
||||
# remove follow_pfn() in Linux v6.10.
|
||||
#
|
||||
CODE="
|
||||
#include <linux/mm.h>
|
||||
int conftest(void)
|
||||
{
|
||||
return follow_pfn();
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_FOLLOW_PFN_PRESENT" "" "functions"
|
||||
;;
|
||||
|
||||
follow_pfnmap_start)
|
||||
#
|
||||
# Determine if function follow_pfnmap_start() is present.
|
||||
#
|
||||
# Commit 6da8e9634bb7e3 ("mm: new follow_pfnmap API")
|
||||
# add follow_pfnmap_start() in Linux v6.12.
|
||||
#
|
||||
CODE="
|
||||
#include <linux/mm.h>
|
||||
int conftest(void)
|
||||
{
|
||||
return follow_pfnmap_start();
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_FOLLOW_PFNMAP_START_PRESENT" "" "functions"
|
||||
;;
|
||||
|
||||
fop_unsigned_offset)
|
||||
#
|
||||
# Determine if definition FOP_UNSIGNED_OFFSET is present.
|
||||
|
||||
Reference in New Issue
Block a user