From: Paul Burton Date: Tue, 19 Apr 2016 08:25:11 +0000 (+0100) Subject: MIPS: mm: Panic if an XPA kernel is run without RIXI X-Git-Tag: v4.7-rc1~6^2~96 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e56c7e18818dd721179f9ca95c77dd941a360384;p=platform%2Fkernel%2Flinux-exynos.git MIPS: mm: Panic if an XPA kernel is run without RIXI XPA kernels hardcode for the presence of RIXI - the PTE format & its handling presume RI & XI bits. Make this dependence explicit by panicing if we run on a system that violates it. Signed-off-by: Paul Burton Reviewed-by: James Hogan Cc: Paul Gortmaker Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13125/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 0efa621..274da90 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c @@ -2508,6 +2508,9 @@ void build_tlb_refill_handler(void) */ static int run_once = 0; + if (config_enabled(CONFIG_XPA) && !cpu_has_rixi) + panic("Kernels supporting XPA currently require CPUs with RIXI"); + output_pgtable_bits_defines(); check_pabits();