All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64/io: Don't use WZR in writel
@ 2019-02-09 18:34 ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 74+ messages in thread
From: AngeloGioacchino Del Regno @ 2019-02-09 18:34 UTC (permalink / raw)
  To: Jens Axboe, Will Deacon, Catalin Marinas
  Cc: AngeloGioacchino Del Regno, linux-arm-kernel, linux-kernel,
	linux-arm-msm

>From 33fb6d036de273bb71ac1c67d7a91b7a5148e659 Mon Sep 17 00:00:00 2001
From: "Angelo G. Del Regno" <kholk11@gmail.com>
Date: Sat, 9 Feb 2019 18:56:46 +0100
Subject: [PATCH] arm64/io: Don't use WZR in writel

This is a partial revert of commit ee5e41b5f21a
("arm64/io: Allow I/O writes to use {W,X}ZR")

When we try to use the zero register directly on some SoCs,
their security will make them freeze due to a firmware bug.
This behavior is seen with the arm-smmu driver freezing on
TLBI and TLBSYNC on MSM8996, MSM8998, SDM630, SDM660.

Allocating a temporary register to store the zero for the
write actually solves the issue on these SoCs.

Signed-off-by: Angelo G. Del Regno <kholk11@gmail.com>
---
 arch/arm64/include/asm/io.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h
index ee723835c1f4..a0a6d1aeb670 100644
--- a/arch/arm64/include/asm/io.h
+++ b/arch/arm64/include/asm/io.h
@@ -49,7 +49,7 @@ static inline void __raw_writew(u16 val, volatile void __iomem *addr)
 #define __raw_writel __raw_writel
 static inline void __raw_writel(u32 val, volatile void __iomem *addr)
 {
-	asm volatile("str %w0, [%1]" : : "rZ" (val), "r" (addr));
+	asm volatile("str %w0, [%1]" : : "r" (val), "r" (addr));
 }
 
 #define __raw_writeq __raw_writeq
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 74+ messages in thread
* [PATCH] arm64/io: Don't use WZR in writel
@ 2019-02-09 18:30 ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 74+ messages in thread
From: AngeloGioacchino Del Regno @ 2019-02-09 18:30 UTC (permalink / raw)
  To: Jens Axboe, Will Deacon, Catalin Marinas
  Cc: AngeloGioacchino Del Regno, linux-arm-kernel, linux-kernel,
	linux-arm-msm



^ permalink raw reply	[flat|nested] 74+ messages in thread

end of thread, other threads:[~2019-05-20 15:05 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-09 18:34 [PATCH] arm64/io: Don't use WZR in writel AngeloGioacchino Del Regno
2019-02-09 18:34 ` AngeloGioacchino Del Regno
2019-02-09 18:34 ` AngeloGioacchino Del Regno
2019-02-11 10:57 ` Will Deacon
2019-02-11 10:57   ` Will Deacon
2019-02-11 11:52   ` Marc Zyngier
2019-02-11 11:52     ` Marc Zyngier
2019-02-11 14:29     ` AngeloGioacchino Del Regno
2019-02-11 14:29       ` AngeloGioacchino Del Regno
2019-02-11 14:59       ` Marc Zyngier
2019-02-11 14:59         ` Marc Zyngier
2019-02-11 16:15         ` AngeloGioacchino Del Regno
2019-02-11 16:15           ` AngeloGioacchino Del Regno
2019-02-11 16:37         ` Robin Murphy
2019-02-11 16:37           ` Robin Murphy
2019-02-23 18:12         ` Bjorn Andersson
2019-02-23 18:12           ` Bjorn Andersson
2019-02-23 18:37           ` Marc Zyngier
2019-02-23 18:37             ` Marc Zyngier
2019-02-23 18:37             ` Marc Zyngier
2019-02-24  3:53             ` Bjorn Andersson
2019-02-24  3:53               ` Bjorn Andersson
2019-03-12 12:36               ` Marc Gonzalez
2019-03-12 12:36                 ` Marc Gonzalez
2019-03-18 16:04                 ` Robin Murphy
2019-03-18 16:04                   ` Robin Murphy
2019-03-18 17:00                   ` Russell King - ARM Linux admin
2019-03-18 17:00                     ` Russell King - ARM Linux admin
2019-03-18 17:11                     ` Ard Biesheuvel
2019-03-18 17:11                       ` Ard Biesheuvel
2019-03-18 17:19                     ` Robin Murphy
2019-03-18 17:19                       ` Robin Murphy
2019-03-18 17:24                       ` Robin Murphy
2019-03-18 17:24                         ` Robin Murphy
2019-03-19 11:45                         ` Robin Murphy
2019-03-19 11:45                           ` Robin Murphy
2019-03-18 17:30                       ` Marc Gonzalez
2019-03-18 17:30                         ` Marc Gonzalez
2019-03-18 17:59                         ` Robin Murphy
2019-03-18 17:59                           ` Robin Murphy
2019-05-02 16:05                   ` Marc Gonzalez
2019-05-02 16:05                     ` Marc Gonzalez
2019-05-02 16:05                     ` Marc Gonzalez
2019-05-02 16:33                     ` Robin Murphy
2019-05-02 16:33                       ` Robin Murphy
2019-05-02 16:33                       ` Robin Murphy
2019-05-02 16:50                       ` Marc Gonzalez
2019-05-02 16:50                         ` Marc Gonzalez
2019-05-02 16:50                         ` Marc Gonzalez
2019-05-03 11:36                         ` Marc Gonzalez
2019-05-03 11:36                           ` Marc Gonzalez
2019-05-03 11:36                           ` Marc Gonzalez
2019-05-03 12:48                           ` Robin Murphy
2019-05-03 12:48                             ` Robin Murphy
2019-05-03 13:07                             ` Marc Gonzalez
2019-05-03 13:07                               ` Marc Gonzalez
2019-05-03 13:07                               ` Marc Gonzalez
2019-05-04 13:35                               ` AngeloGioacchino Del Regno
2019-05-04 13:35                                 ` AngeloGioacchino Del Regno
2019-05-04 13:35                                 ` AngeloGioacchino Del Regno
2019-05-05 18:05                                 ` AngeloGioacchino Del Regno
2019-05-05 18:05                                   ` AngeloGioacchino Del Regno
2019-05-05 18:05                                   ` AngeloGioacchino Del Regno
2019-05-20 15:05                             ` Marc Gonzalez
2019-05-20 15:05                               ` Marc Gonzalez
2019-05-02 17:27                       ` Marc Gonzalez
2019-05-02 17:27                         ` Marc Gonzalez
2019-05-02 17:27                         ` Marc Gonzalez
2019-05-03  0:38                       ` Bjorn Andersson
2019-05-03  0:38                         ` Bjorn Andersson
2019-05-03  0:38                         ` Bjorn Andersson
  -- strict thread matches above, loose matches on Subject: below --
2019-02-09 18:30 AngeloGioacchino Del Regno
2019-02-09 18:30 ` AngeloGioacchino Del Regno
2019-02-09 18:30 ` AngeloGioacchino Del Regno

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.