public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqchip/gic-v3: move reading of GICR_TYPER later
@ 2023-09-25  2:34 Rex Nie
  2023-09-26 16:39 ` Marc Zyngier
  0 siblings, 1 reply; 3+ messages in thread
From: Rex Nie @ 2023-09-25  2:34 UTC (permalink / raw)
  To: tglx, maz; +Cc: linux-kernel, Rex Nie

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@jaguarmicro.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


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

end of thread, other threads:[~2023-10-08 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-25  2:34 [PATCH] irqchip/gic-v3: move reading of GICR_TYPER later Rex Nie
2023-09-26 16:39 ` Marc Zyngier
2023-10-08 12:55   ` 答复: " Rex Nie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox