powerpc: Set minimum kernel version for powerpc64le

Message ID 1484286307-32539-1-git-send-email-raji@linux.vnet.ibm.com
State Superseded
Delegated to: Florian Weimer
Headers

Commit Message

Rajalakshmi S Jan. 13, 2017, 5:45 a.m. UTC
  This patch sets the minimum kernel version required for ppc64le as 3.10.0.
Tested on powerpc64 and powerpc64le.

2017-01-13  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>

	[BZ #15998]
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
	(arch_minimum_kernel): Set as 3.10.0 for ppc64le.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/configure: Regenerate.
---
 .../unix/sysv/linux/powerpc/powerpc64/configure    | 24 ++++++++++++++++++++++
 .../unix/sysv/linux/powerpc/powerpc64/configure.ac |  7 +++++++
 2 files changed, 31 insertions(+)
  

Comments

Florian Weimer Jan. 13, 2017, 8:55 a.m. UTC | #1
On 01/13/2017 06:45 AM, Rajalakshmi Srinivasaraghavan wrote:
> This patch sets the minimum kernel version required for ppc64le as 3.10.0.

Please document somewhere why this kernel version was chosen (and not 
3.12 or later, as Joseph suggested).  I can guess the reason, but it 
would be nice to make this explicit.

Thanks,
Florian
  
Rajalakshmi S Jan. 13, 2017, 4:53 p.m. UTC | #2
On 01/13/2017 02:25 PM, Florian Weimer wrote:
> On 01/13/2017 06:45 AM, Rajalakshmi Srinivasaraghavan wrote:
>> This patch sets the minimum kernel version required for ppc64le as
>> 3.10.0.
>
> Please document somewhere why this kernel version was chosen (and not
> 3.12 or later, as Joseph suggested).  I can guess the reason, but it
> would be nice to make this explicit.

Linux 3.13 was the first upstream version to support powerpc64le, but
3.10 is the oldest kernel version known to still be supported on
powerpc64le.
Added that in bugzilla comment as well.
  
Tulio Magno Quites Machado Filho Feb. 6, 2017, 5:31 p.m. UTC | #3
Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com> writes:

> This patch sets the minimum kernel version required for ppc64le as 3.10.0.
> Tested on powerpc64 and powerpc64le.
>
> 2017-01-13  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>
>
> 	[BZ #15998]
> 	* sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
> 	(arch_minimum_kernel): Set as 3.10.0 for ppc64le.
> 	* sysdeps/unix/sysv/linux/powerpc/powerpc64/configure: Regenerate.
> ---
>  .../unix/sysv/linux/powerpc/powerpc64/configure    | 24 ++++++++++++++++++++++
>  .../unix/sysv/linux/powerpc/powerpc64/configure.ac |  7 +++++++
>  2 files changed, 31 insertions(+)
>
> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
> index 0822915..763b0b4 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
> @@ -27,3 +27,10 @@ else
>      libc_extra_cppflags="$libc_extra_cppflags -D_CALL_ELF=1"
>    fi
>  fi
> +# Set minimum kernel version for ppc64le

Missing punctuation here ------------------^

LGTM.
  

Patch

diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
index af06970..3d952ba 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
@@ -207,3 +207,27 @@  $as_echo "$libc_cv_ppc64_def_call_elf" >&6; }
     libc_extra_cppflags="$libc_extra_cppflags -D_CALL_ELF=1"
   fi
 fi
+# Set minimum kernel version for ppc64le
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the machine type to set minimum kernel version" >&5
+$as_echo_n "checking the machine type to set minimum kernel version... " >&6; }
+if ${libc_cv_ppc64_le+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+                      yes
+                     #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  arch_minimum_kernel=3.10.0
+else
+  libc_cv_ppc64_le=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ppc64_le" >&5
+$as_echo "$libc_cv_ppc64_le" >&6; }
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
index 0822915..763b0b4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
@@ -27,3 +27,10 @@  else
     libc_extra_cppflags="$libc_extra_cppflags -D_CALL_ELF=1"
   fi
 fi
+# Set minimum kernel version for ppc64le
+AC_CACHE_CHECK([the machine type to set minimum kernel version],
+  [libc_cv_ppc64_le],
+  [AC_EGREP_CPP(yes,[#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+                      yes
+                     #endif
+  ], arch_minimum_kernel=3.10.0, libc_cv_ppc64_le=no)])