All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqchip: Replace update_bits with write_bits.
@ 2021-11-24  9:43 ` Billy Tsai
  0 siblings, 0 replies; 5+ messages in thread
From: Billy Tsai @ 2021-11-24  9:43 UTC (permalink / raw)
  To: eajames, tglx, maz, joel, andrew, linux-aspeed, linux-kernel,
	linux-arm-kernel
  Cc: BMC-SW

The interrupt status bits are cleared by writing 1, we should force a
write to clear the interrupt without checking if the value has changed.

Fixes: 04f605906ff0 ("irqchip: Add Aspeed SCU interrupt controller")
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
---
 drivers/irqchip/irq-aspeed-scu-ic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-aspeed-scu-ic.c b/drivers/irqchip/irq-aspeed-scu-ic.c
index f3c6855a4cef..18b77c3e6db4 100644
--- a/drivers/irqchip/irq-aspeed-scu-ic.c
+++ b/drivers/irqchip/irq-aspeed-scu-ic.c
@@ -76,8 +76,8 @@ static void aspeed_scu_ic_irq_handler(struct irq_desc *desc)
 		generic_handle_domain_irq(scu_ic->irq_domain,
 					  bit - scu_ic->irq_shift);
 
-		regmap_update_bits(scu_ic->scu, scu_ic->reg, mask,
-				   BIT(bit + ASPEED_SCU_IC_STATUS_SHIFT));
+		regmap_write_bits(scu_ic->scu, scu_ic->reg, mask,
+				  BIT(bit + ASPEED_SCU_IC_STATUS_SHIFT));
 	}
 
 	chained_irq_exit(chip, desc);
-- 
2.25.1


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

* [PATCH] irqchip: Replace update_bits with write_bits.
@ 2021-11-24  9:43 ` Billy Tsai
  0 siblings, 0 replies; 5+ messages in thread
From: Billy Tsai @ 2021-11-24  9:43 UTC (permalink / raw)
  To: eajames, tglx, maz, joel, andrew, linux-aspeed, linux-kernel,
	linux-arm-kernel
  Cc: BMC-SW

The interrupt status bits are cleared by writing 1, we should force a
write to clear the interrupt without checking if the value has changed.

Fixes: 04f605906ff0 ("irqchip: Add Aspeed SCU interrupt controller")
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
---
 drivers/irqchip/irq-aspeed-scu-ic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-aspeed-scu-ic.c b/drivers/irqchip/irq-aspeed-scu-ic.c
index f3c6855a4cef..18b77c3e6db4 100644
--- a/drivers/irqchip/irq-aspeed-scu-ic.c
+++ b/drivers/irqchip/irq-aspeed-scu-ic.c
@@ -76,8 +76,8 @@ static void aspeed_scu_ic_irq_handler(struct irq_desc *desc)
 		generic_handle_domain_irq(scu_ic->irq_domain,
 					  bit - scu_ic->irq_shift);
 
-		regmap_update_bits(scu_ic->scu, scu_ic->reg, mask,
-				   BIT(bit + ASPEED_SCU_IC_STATUS_SHIFT));
+		regmap_write_bits(scu_ic->scu, scu_ic->reg, mask,
+				  BIT(bit + ASPEED_SCU_IC_STATUS_SHIFT));
 	}
 
 	chained_irq_exit(chip, desc);
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] irqchip: Replace update_bits with write_bits.
  2021-11-24  9:43 ` Billy Tsai
@ 2021-11-24  9:50   ` Joel Stanley
  -1 siblings, 0 replies; 5+ messages in thread
From: Joel Stanley @ 2021-11-24  9:50 UTC (permalink / raw)
  To: Billy Tsai
  Cc: Eddie James, Thomas Gleixner, Marc Zyngier, Andrew Jeffery,
	linux-aspeed, Linux Kernel Mailing List, Linux ARM, BMC-SW

On Wed, 24 Nov 2021 at 09:43, Billy Tsai <billy_tsai@aspeedtech.com> wrote:
>
> The interrupt status bits are cleared by writing 1, we should force a
> write to clear the interrupt without checking if the value has changed.
>
> Fixes: 04f605906ff0 ("irqchip: Add Aspeed SCU interrupt controller")
> Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>

Good catch. This should go to stable too.

Reviewed-by: Joel Stanley <joel@jms.id.au>

Is there any reason to use the regmap abstraction in this driver?
AFAICT the registers aren't shared, so we could replace the regmap
calls with readl/writel. Such a cleanup probably wouldn't be
backported, so this patch is still useful.

> ---
>  drivers/irqchip/irq-aspeed-scu-ic.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-aspeed-scu-ic.c b/drivers/irqchip/irq-aspeed-scu-ic.c
> index f3c6855a4cef..18b77c3e6db4 100644
> --- a/drivers/irqchip/irq-aspeed-scu-ic.c
> +++ b/drivers/irqchip/irq-aspeed-scu-ic.c
> @@ -76,8 +76,8 @@ static void aspeed_scu_ic_irq_handler(struct irq_desc *desc)
>                 generic_handle_domain_irq(scu_ic->irq_domain,
>                                           bit - scu_ic->irq_shift);
>
> -               regmap_update_bits(scu_ic->scu, scu_ic->reg, mask,
> -                                  BIT(bit + ASPEED_SCU_IC_STATUS_SHIFT));
> +               regmap_write_bits(scu_ic->scu, scu_ic->reg, mask,
> +                                 BIT(bit + ASPEED_SCU_IC_STATUS_SHIFT));
>         }
>
>         chained_irq_exit(chip, desc);
> --
> 2.25.1
>

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

* Re: [PATCH] irqchip: Replace update_bits with write_bits.
@ 2021-11-24  9:50   ` Joel Stanley
  0 siblings, 0 replies; 5+ messages in thread
From: Joel Stanley @ 2021-11-24  9:50 UTC (permalink / raw)
  To: Billy Tsai
  Cc: Eddie James, Thomas Gleixner, Marc Zyngier, Andrew Jeffery,
	linux-aspeed, Linux Kernel Mailing List, Linux ARM, BMC-SW

On Wed, 24 Nov 2021 at 09:43, Billy Tsai <billy_tsai@aspeedtech.com> wrote:
>
> The interrupt status bits are cleared by writing 1, we should force a
> write to clear the interrupt without checking if the value has changed.
>
> Fixes: 04f605906ff0 ("irqchip: Add Aspeed SCU interrupt controller")
> Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>

Good catch. This should go to stable too.

Reviewed-by: Joel Stanley <joel@jms.id.au>

Is there any reason to use the regmap abstraction in this driver?
AFAICT the registers aren't shared, so we could replace the regmap
calls with readl/writel. Such a cleanup probably wouldn't be
backported, so this patch is still useful.

> ---
>  drivers/irqchip/irq-aspeed-scu-ic.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-aspeed-scu-ic.c b/drivers/irqchip/irq-aspeed-scu-ic.c
> index f3c6855a4cef..18b77c3e6db4 100644
> --- a/drivers/irqchip/irq-aspeed-scu-ic.c
> +++ b/drivers/irqchip/irq-aspeed-scu-ic.c
> @@ -76,8 +76,8 @@ static void aspeed_scu_ic_irq_handler(struct irq_desc *desc)
>                 generic_handle_domain_irq(scu_ic->irq_domain,
>                                           bit - scu_ic->irq_shift);
>
> -               regmap_update_bits(scu_ic->scu, scu_ic->reg, mask,
> -                                  BIT(bit + ASPEED_SCU_IC_STATUS_SHIFT));
> +               regmap_write_bits(scu_ic->scu, scu_ic->reg, mask,
> +                                 BIT(bit + ASPEED_SCU_IC_STATUS_SHIFT));
>         }
>
>         chained_irq_exit(chip, desc);
> --
> 2.25.1
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [irqchip: irq/irqchip-fixes] irqchip/aspeed-scu: Replace update_bits with write_bits.
  2021-11-24  9:43 ` Billy Tsai
  (?)
  (?)
@ 2021-11-25 17:03 ` irqchip-bot for Billy Tsai
  -1 siblings, 0 replies; 5+ messages in thread
From: irqchip-bot for Billy Tsai @ 2021-11-25 17:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: Billy Tsai, Joel Stanley, Marc Zyngier, stable, tglx

The following commit has been merged into the irq/irqchip-fixes branch of irqchip:

Commit-ID:     8958389681b929fcc7301e7dc5f0da12e4a256a0
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/8958389681b929fcc7301e7dc5f0da12e4a256a0
Author:        Billy Tsai <billy_tsai@aspeedtech.com>
AuthorDate:    Wed, 24 Nov 2021 17:43:48 +08:00
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Thu, 25 Nov 2021 16:50:44 

irqchip/aspeed-scu: Replace update_bits with write_bits.

The interrupt status bits are cleared by writing 1, we should force a
write to clear the interrupt without checking if the value has changed.

Fixes: 04f605906ff0 ("irqchip: Add Aspeed SCU interrupt controller")
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211124094348.11621-1-billy_tsai@aspeedtech.com
Cc: stable@vger.kernel.org
---
 drivers/irqchip/irq-aspeed-scu-ic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-aspeed-scu-ic.c b/drivers/irqchip/irq-aspeed-scu-ic.c
index f3c6855..18b77c3 100644
--- a/drivers/irqchip/irq-aspeed-scu-ic.c
+++ b/drivers/irqchip/irq-aspeed-scu-ic.c
@@ -76,8 +76,8 @@ static void aspeed_scu_ic_irq_handler(struct irq_desc *desc)
 		generic_handle_domain_irq(scu_ic->irq_domain,
 					  bit - scu_ic->irq_shift);
 
-		regmap_update_bits(scu_ic->scu, scu_ic->reg, mask,
-				   BIT(bit + ASPEED_SCU_IC_STATUS_SHIFT));
+		regmap_write_bits(scu_ic->scu, scu_ic->reg, mask,
+				  BIT(bit + ASPEED_SCU_IC_STATUS_SHIFT));
 	}
 
 	chained_irq_exit(chip, desc);

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

end of thread, other threads:[~2021-11-25 17:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24  9:43 [PATCH] irqchip: Replace update_bits with write_bits Billy Tsai
2021-11-24  9:43 ` Billy Tsai
2021-11-24  9:50 ` Joel Stanley
2021-11-24  9:50   ` Joel Stanley
2021-11-25 17:03 ` [irqchip: irq/irqchip-fixes] irqchip/aspeed-scu: " irqchip-bot for Billy Tsai

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.