diff options
author | Brian Behlendorf <[email protected]> | 2009-05-20 14:23:13 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2009-05-20 14:23:13 -0700 |
commit | 5232d256b45b3c48dd96d30b5907c0205192197b (patch) | |
tree | 82f3341f62d1e0d49c42fb1b4f3cd40e66515c7a /config | |
parent | 3731931529df2bff63ca3d62e387d4e602de7cb2 (diff) |
SLES10 Fixes (part 6)
- Prior to 2.6.17 there were no *_pgdat helper functions in mm/mmzone.c.
Instead for_each_zone() operated directly on pgdat_list which may or
may not have been exported depending on how your kernel was compiled.
Now new configure checks determine if you have the helpers or not, and
if the needed symbols are exported. If they are not exported then they
are dynamically aquired at runtime by kallsyms_lookup_name().
Diffstat (limited to 'config')
-rw-r--r-- | config/spl-build.m4 | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4 index ce798cc74..750218941 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -803,6 +803,31 @@ AC_DEFUN([SPL_AC_GET_VMALLOC_INFO], [ ]) dnl # +dnl # 2.6.17 API change +dnl # The helper functions first_online_pgdat(), next_online_pgdat(), and +dnl # next_zone() are introduced to simplify for_each_zone(). These symbols +dnl # were exported in 2.6.17 for use by modules which was consistent with +dnl # the previous implementation of for_each_zone(). From 2.6.18 - 2.6.19 +dnl # the symbols were exported as 'unused', and by 2.6.20 they exports +dnl # were dropped entirely leaving modules no way to directly iterate over +dnl # the zone list. Because we need access to the zone helpers we check +dnl # if the kernel contains the old or new implementation. Then we check +dnl # to see if the symbols we need for each version are available. If they +dnl # are not, dynamically aquire the addresses with kallsyms_lookup_name(). +dnl # +AC_DEFUN([SPL_AC_PGDAT_HELPERS], [ + AC_MSG_CHECKING([whether symbol *_pgdat exist]) + grep -q -E 'first_online_pgdat' $LINUX/include/linux/mmzone.h 2>/dev/null + rc=$? + if test $rc -eq 0; then + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_PGDAT_HELPERS, 1, [pgdat helpers are available]) + else + AC_MSG_RESULT([no]) + fi +]) + +dnl # dnl # Proposed API change, dnl # This symbol is not available in stock kernels. You may build a dnl # custom kernel with the *-spl-export-symbols.patch which will export @@ -851,6 +876,19 @@ AC_DEFUN([SPL_AC_NEXT_ZONE], [ ]) dnl # +dnl # 2.6.17 API change, +dnl # See SPL_AC_PGDAT_HELPERS for details. +dnl # +AC_DEFUN([SPL_AC_PGDAT_LIST], [ + SPL_CHECK_SYMBOL_EXPORT( + [pgdat_list], + [], + [AC_DEFINE(HAVE_PGDAT_LIST, 1, + [pgdat_list is available])], + []) +]) + +dnl # dnl # Proposed API change, dnl # This symbol is not available in stock kernels. You may build a dnl # custom kernel with the *-spl-export-symbols.patch which will export |