stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "arm64: head.S: ensure visibility of page tables" has been added to the 3.19-stable tree
@ 2015-05-02 16:55 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-05-02 16:55 UTC (permalink / raw)
  To: mark.rutland, catalin.marinas, gregkh, will.deacon; +Cc: stable, stable-commits


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

    arm64: head.S: ensure visibility of page tables

to the 3.19-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:
     arm64-head.s-ensure-visibility-of-page-tables.patch
and it can be found in the queue-3.19 subdirectory.

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


>From 91d57155dc5ab4b311624b7ee570339b6af19ad5 Mon Sep 17 00:00:00 2001
From: Mark Rutland <mark.rutland@arm.com>
Date: Tue, 24 Mar 2015 13:50:27 +0000
Subject: arm64: head.S: ensure visibility of page tables

From: Mark Rutland <mark.rutland@arm.com>

commit 91d57155dc5ab4b311624b7ee570339b6af19ad5 upstream.

After writing the page tables, we use __inval_cache_range to invalidate
any stale cache entries. Strongly Ordered memory accesses are not
ordered w.r.t. cache maintenance instructions, and hence explicit memory
barriers are required to provide this ordering. However,
__inval_cache_range was written to be used on Normal Cacheable memory
once the MMU and caches are on, and does not have any barriers prior to
the DC instructions.

This patch adds a DMB between the page tables being written and the
corresponding cachelines being invalidated, ensuring that the
invalidation makes the new data visible to subsequent cacheable
accesses. A barrier is not required before the prior invalidate as we do
not access the page table memory area prior to this, and earlier
barriers in preserve_boot_args and set_cpu_boot_mode_flag ensures
ordering w.r.t. any stores performed prior to entering Linux.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Fixes: c218bca74eeafa2f ("arm64: Relax the kernel cache requirements for boot")
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm64/kernel/head.S |    1 +
 1 file changed, 1 insertion(+)

--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -426,6 +426,7 @@ __create_page_tables:
 	 */
 	mov	x0, x25
 	add	x1, x26, #SWAPPER_DIR_SIZE
+	dmb	sy
 	bl	__inval_cache_range
 
 	mov	lr, x27


Patches currently in stable-queue which might be from mark.rutland@arm.com are

queue-3.19/arm64-head.s-ensure-visibility-of-page-tables.patch
queue-3.19/arm64-apply-alternatives-for-smp-kernels.patch
queue-3.19/arm64-errata-add-workaround-for-cortex-a53-erratum-845719.patch
queue-3.19/drivers-base-cacheinfo-validate-device-node-for-all-the-caches.patch
queue-3.19/arm64-kvm-fix-stage-2-pgd-allocation-to-have-per-page-refcounting.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-02 16:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-02 16:55 Patch "arm64: head.S: ensure visibility of page tables" has been added to the 3.19-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).