Patch "MIPS: Fix HTW config on XPA kernel without LPA enabled" has been added to the 4.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    MIPS: Fix HTW config on XPA kernel without LPA enabled

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mips-fix-htw-config-on-xpa-kernel-without-lpa-enabled.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 14bc241443e126c62fcbf571b7d4c79740debc58 Mon Sep 17 00:00:00 2001
From: James Hogan <jhogan@xxxxxxxxxx>
Date: Tue, 19 Apr 2016 09:25:00 +0100
Subject: MIPS: Fix HTW config on XPA kernel without LPA enabled

From: James Hogan <james.hogan@xxxxxxxxxx>

commit 14bc241443e126c62fcbf571b7d4c79740debc58 upstream.

The hardware page table walker (HTW) configuration is broken on XPA
kernels where XPA couldn't be enabled (either nohtw or the hardware
doesn't support it). This is because the PWSize.PTEW field (PTE width)
was only set to 8 bytes (an extra shift of 1) in config_htw_params() if
PageGrain.ELPA (enable large physical addressing) is set. On an XPA
kernel though the size of PTEs is fixed at 8 bytes regardless of whether
XPA could actually be enabled.

Fix the initialisation of this field based on sizeof(pte_t) instead.

Fixes: c5b367835cfc ("MIPS: Add support for XPA.")
Signed-off-by: James Hogan <james.hogan@xxxxxxxxxx>
Cc: Steven J. Hill <sjhill@xxxxxxxxxxxxxxxxxx>
Cc: Paul Burton <paul.burton@xxxxxxxxxx>
Cc: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>
Cc: linux-mips@xxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Patchwork: https://patchwork.linux-mips.org/patch/13113/
Signed-off-by: Paul Burton <paul.burton@xxxxxxxxxx>
Signed-off-by: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 arch/mips/mm/tlbex.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -2329,9 +2329,7 @@ static void config_htw_params(void)
 	if (CONFIG_PGTABLE_LEVELS >= 3)
 		pwsize |= ilog2(PTRS_PER_PMD) << MIPS_PWSIZE_MDW_SHIFT;
 
-	/* If XPA has been enabled, PTEs are 64-bit in size. */
-	if (config_enabled(CONFIG_64BITS) || (read_c0_pagegrain() & PG_ELPA))
-		pwsize |= 1;
+	pwsize |= ilog2(sizeof(pte_t)/4) << MIPS_PWSIZE_PTEW_SHIFT;
 
 	write_c0_pwsize(pwsize);
 


Patches currently in stable-queue which might be from jhogan@xxxxxxxxxx are

queue-4.4/mips-ptrace-drop-cp0_tcstatus-from-regoffset_table.patch
queue-4.4/mips-fix-htw-config-on-xpa-kernel-without-lpa-enabled.patch
queue-4.4/mips-fix-64-bit-htw-configuration.patch
queue-4.4/mips-perf-fix-i6400-event-numbers.patch
queue-4.4/mips-kvm-fix-translation-of-mfc0-errctl.patch
queue-4.4/mips-fix-little-endian-micromips-msa-encodings.patch
queue-4.4/mips-define-at_vector_size_arch-for-arch_dlinfo.patch
queue-4.4/mips-smp-update-cpu_foreign_map-on-cpu-disable.patch
queue-4.4/mips-c-r4k-fix-protected_writeback_scache_line-for-eva.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux