[linux] 01/01: [mips*] pgtable-bits.h: Correct _PAGE_GLOBAL_SHIFT build failure
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Sun Sep 27 13:24:41 UTC 2015
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch sid
in repository linux.
commit 484d1aef7c83a3819cd343e26b530b1cbda41763
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Sun Sep 27 14:16:59 2015 +0100
[mips*] pgtable-bits.h: Correct _PAGE_GLOBAL_SHIFT build failure
This was a regression in 4.0, but not a build failure for us.
---
debian/changelog | 2 +
...e-bits.h-correct-_page_global_shift-build.patch | 88 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 91 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 54cd563..ba0b484 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ linux (4.2.1-2) UNRELEASED; urgency=medium
* [hppa/parisc64-smp,mips*el/loongson-3] udeb: Remove i2c-modules again, as
the drivers that belong in it are actually built-in (fixes FTBFS)
* sctp: fix race on protocol/netns initialization (CVE-2015-5283)
+ * [mips*] pgtable-bits.h: Correct _PAGE_GLOBAL_SHIFT build failure
+ (regression in 4.0, but not a build failure for us)
-- Ben Hutchings <ben at decadent.org.uk> Sat, 26 Sep 2015 16:40:51 +0100
diff --git a/debian/patches/bugfix/mips/mips-pgtable-bits.h-correct-_page_global_shift-build.patch b/debian/patches/bugfix/mips/mips-pgtable-bits.h-correct-_page_global_shift-build.patch
new file mode 100644
index 0000000..b306671
--- /dev/null
+++ b/debian/patches/bugfix/mips/mips-pgtable-bits.h-correct-_page_global_shift-build.patch
@@ -0,0 +1,88 @@
+From: "Maciej W. Rozycki" <macro at linux-mips.org>
+Date: Sun, 3 May 2015 10:36:19 +0100
+Subject: MIPS: pgtable-bits.h: Correct _PAGE_GLOBAL_SHIFT build failure
+Origin: https://git.kernel.org/linus/1cfa8de2880e5512f9037c7804ea47a79cc8232c
+
+Correct a build failure introduced by be0c37c9 [MIPS: Rearrange PTE bits
+into fixed positions.]:
+
+In file included from ./arch/mips/include/asm/io.h:27:0,
+ from ./arch/mips/include/asm/page.h:176,
+ from include/linux/mm_types.h:15,
+ from include/linux/sched.h:27,
+ from include/linux/ptrace.h:5,
+ from arch/mips/kernel/cpu-probe.c:16:
+./arch/mips/include/asm/pgtable-bits.h:164:0: error: "_PAGE_GLOBAL_SHIFT" redefined [-Werror]
+ #define _PAGE_GLOBAL_SHIFT (_PAGE_MODIFIED_SHIFT + 1)
+ ^
+./arch/mips/include/asm/pgtable-bits.h:141:0: note: this is the location of the previous definition
+ #define _PAGE_GLOBAL_SHIFT (_PAGE_SPLITTING_SHIFT + 1)
+ ^
+cc1: all warnings being treated as errors
+make[2]: *** [arch/mips/kernel/cpu-probe.o] Error 1
+
+for 64BIT/CPU_MIPSR1/MIPS_HUGE_TLB_SUPPORT configurations. Remove the
+scattered double `_PAGE_NO_EXEC_SHIFT' and `_PAGE_GLOBAL_SHIFT' macro
+definitions and rearrange them so that the respective macros these
+definitions are based on are also those used for guarding conditionals.
+
+[ralf at linux-mips.org: resolved conflicts and updated commments.]
+
+Signed-off-by: Maciej W. Rozycki <macro at linux-mips.org>
+Cc: Steven J. Hill <Steven.Hill at imgtec.com>
+Cc: linux-mips at linux-mips.org
+Patchwork: https://patchwork.linux-mips.org/patch/9960/
+Signed-off-by: Ralf Baechle <ralf at linux-mips.org>
+---
+ arch/mips/include/asm/pgtable-bits.h | 23 +++++++++--------------
+ 1 file changed, 9 insertions(+), 14 deletions(-)
+
+diff --git a/arch/mips/include/asm/pgtable-bits.h b/arch/mips/include/asm/pgtable-bits.h
+index c28a849..4601741 100644
+--- a/arch/mips/include/asm/pgtable-bits.h
++++ b/arch/mips/include/asm/pgtable-bits.h
+@@ -133,20 +133,13 @@
+ #define _PAGE_HUGE (1 << _PAGE_HUGE_SHIFT)
+ #define _PAGE_SPLITTING_SHIFT (_PAGE_HUGE_SHIFT + 1)
+ #define _PAGE_SPLITTING (1 << _PAGE_SPLITTING_SHIFT)
+-
+-/* Only R2 or newer cores have the XI bit */
+-#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)
+-#define _PAGE_NO_EXEC_SHIFT (_PAGE_SPLITTING_SHIFT + 1)
+-#else
+-#define _PAGE_GLOBAL_SHIFT (_PAGE_SPLITTING_SHIFT + 1)
+-#define _PAGE_GLOBAL (1 << _PAGE_GLOBAL_SHIFT)
+-#endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */
+-
+ #endif /* CONFIG_64BIT && CONFIG_MIPS_HUGE_TLB_SUPPORT */
+
+ #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6)
+ /* XI - page cannot be executed */
+-#ifndef _PAGE_NO_EXEC_SHIFT
++#ifdef _PAGE_SPLITTING_SHIFT
++#define _PAGE_NO_EXEC_SHIFT (_PAGE_SPLITTING_SHIFT + 1)
++#else
+ #define _PAGE_NO_EXEC_SHIFT (_PAGE_MODIFIED_SHIFT + 1)
+ #endif
+ #define _PAGE_NO_EXEC (cpu_has_rixi ? (1 << _PAGE_NO_EXEC_SHIFT) : 0)
+@@ -156,14 +149,16 @@
+ #define _PAGE_READ (cpu_has_rixi ? 0 : (1 << _PAGE_READ_SHIFT))
+ #define _PAGE_NO_READ_SHIFT _PAGE_READ_SHIFT
+ #define _PAGE_NO_READ (cpu_has_rixi ? (1 << _PAGE_READ_SHIFT) : 0)
++#endif /* defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR6) */
+
++#if defined(_PAGE_NO_READ_SHIFT)
+ #define _PAGE_GLOBAL_SHIFT (_PAGE_NO_READ_SHIFT + 1)
+-#define _PAGE_GLOBAL (1 << _PAGE_GLOBAL_SHIFT)
+-
+-#else /* !CONFIG_CPU_MIPSR2 && !CONFIG_CPU_MIPSR6 */
++#elif defined(_PAGE_SPLITTING_SHIFT)
++#define _PAGE_GLOBAL_SHIFT (_PAGE_SPLITTING_SHIFT + 1)
++#else
+ #define _PAGE_GLOBAL_SHIFT (_PAGE_MODIFIED_SHIFT + 1)
++#endif
+ #define _PAGE_GLOBAL (1 << _PAGE_GLOBAL_SHIFT)
+-#endif /* CONFIG_CPU_MIPSR2 || CONFIG_CPU_MIPSR6 */
+
+ #define _PAGE_VALID_SHIFT (_PAGE_GLOBAL_SHIFT + 1)
+ #define _PAGE_VALID (1 << _PAGE_VALID_SHIFT)
diff --git a/debian/patches/series b/debian/patches/series
index 36799c8..f9a58ae 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -98,3 +98,4 @@ bugfix/all/e1000e-fix-tight-loop-implementation-of-systime-read.patch
bugfix/all/usb-whiteheat-fix-potential-null-deref-at-probe.patch
bugfix/all/media-uvcvideo-disable-hardware-timestamps-by-defaul.patch
bugfix/all/sctp-fix-race-on-protocol-netns-initialization.patch
+bugfix/mips/mips-pgtable-bits.h-correct-_page_global_shift-build.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list