lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230925023408.1441-1-rex.nie@jaguarmicro.com>
Date:   Mon, 25 Sep 2023 10:34:08 +0800
From:   Rex Nie <rex.nie@...uarmicro.com>
To:     tglx@...utronix.de, maz@...nel.org
Cc:     linux-kernel@...r.kernel.org, Rex Nie <rex.nie@...uarmicro.com>
Subject: [PATCH] irqchip/gic-v3: move reading of GICR_TYPER later

This changeset will reduce one reading of GICR_TYPER register
when any of next 2 condictions meets:
1. found redistributor for current cpu
2. single_redist is true for gic_data.redist_regions[i]

Signed-off-by: Rex Nie <rex.nie@...uarmicro.com>
---
 drivers/irqchip/irq-gic-v3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index eedfa8e9f077..d08a4773f631 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -982,7 +982,6 @@ static int gic_iterate_rdists(int (*fn)(struct redist_region *, void __iomem *))
 		}
 
 		do {
-			typer = gic_read_typer(ptr + GICR_TYPER);
 			ret = fn(gic_data.redist_regions + i, ptr);
 			if (!ret)
 				return 0;
@@ -990,6 +989,7 @@ static int gic_iterate_rdists(int (*fn)(struct redist_region *, void __iomem *))
 			if (gic_data.redist_regions[i].single_redist)
 				break;
 
+			typer = gic_read_typer(ptr + GICR_TYPER);
 			if (gic_data.redist_stride) {
 				ptr += gic_data.redist_stride;
 			} else {
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ