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

@@ -184,6 +184,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += gpio_chip_struct_has_of_node_present
NV_CONFTEST_FUNCTION_COMPILE_TESTS += gpio_device_find
NV_CONFTEST_FUNCTION_COMPILE_TESTS += gpio_device_get_chip
NV_CONFTEST_FUNCTION_COMPILE_TESTS += of_property_for_each_u32_removed_internal_args
NV_CONFTEST_FUNCTION_COMPILE_TESTS += page_struct_has___folio_index
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pde_data
NV_CONFTEST_FUNCTION_COMPILE_TESTS += platform_msi_domain_alloc_irqs
NV_CONFTEST_FUNCTION_COMPILE_TESTS += platform_msi_domain_free_irqs

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.