net: marvell: oak: Fix build for Linux v6.16

In Linux v6.16, the 'index' member of the 'page' structure was renamed
to '__folio_index'. Add a test to conftest to detect this and update the
Marvell OAK ethernet driver accordingly to fix the build for Linux
v6.16.

JIRA LINQPJ14-60

Change-Id: I64a8e60990ea03eb212e79bfde474cd87efdf064
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3375190
(cherry picked from commit 5b61fa9366558e7567dc6b432059e581f347ca1a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3461879
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2025-06-03 11:52:36 +01:00
committed by mobile promotions
parent 66ab02d7b9
commit e48b52cbba
3 changed files with 25 additions and 0 deletions

View File

@@ -8060,6 +8060,22 @@ compile_test() {
compile_check_conftest "$CODE" "NV_PLATFORM_MSI_DOMAIN_ALLOC_IRQS_PRESENT" "" "functions"
;;
page_struct_has___folio_index)
#
# Determine if the 'page' structure has '__folio_index' member.
#
# This change was made in Linux v6.16 by commit ("acc53a0b4c15 mm:
# rename page->index to page->__folio_index").
#
CODE="
#include <linux/mm_types.h>
int conftest_page_struct_has___folio_index(void) {
return offsetof(struct page, __folio_index);
}"
compile_check_conftest "$CODE" "NV_PAGE_STRUCT_HAS___FOLIO_INDEX" "" "types"
;;
platform_msi_domain_free_irqs)
#
# Determine if the platform_msi_domain_free_irqs() API available or not.