Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates-src > by-pkgid > 9c90fbc038ca28f1c22e1c232e9b8a44 > files > 6

virtualbox-5.1.2-1.mga5.src.rpm


cpu_has_pge was dropped in 4.7 series.

As the boot_cpu_has() exists since atleast 4.4 series we switch to that without ifdefs 

Signed-of-by: Thomas Backlund <tmb@mageia.org>

diff -Nurp VirtualBox-5.1.0.p16/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h VirtualBox-5.1.0.p17/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
--- VirtualBox-5.1.0.p16/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h	2016-07-12 17:54:57.000000000 +0300
+++ VirtualBox-5.1.0.p17/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h	2016-07-13 01:55:21.758184720 +0300
@@ -249,9 +249,9 @@ DECLINLINE(unsigned long) msecs_to_jiffi
 #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 8) && defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE)
 # ifdef __PAGE_KERNEL_EXEC
    /* >= 2.6.27 */
-#  define MY_PAGE_KERNEL_EXEC   __pgprot(cpu_has_pge ? __PAGE_KERNEL_EXEC | _PAGE_GLOBAL : __PAGE_KERNEL_EXEC)
+#  define MY_PAGE_KERNEL_EXEC   __pgprot(boot_cpu_has(X86_FEATURE_PGE) ? __PAGE_KERNEL_EXEC | _PAGE_GLOBAL : __PAGE_KERNEL_EXEC)
 # else
-#  define MY_PAGE_KERNEL_EXEC   __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)
+#  define MY_PAGE_KERNEL_EXEC   __pgprot(boot_cpu_has(X86_FEATURE_PGE) ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)
 # endif
 #else
 # define MY_PAGE_KERNEL_EXEC    PAGE_KERNEL