mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ARCv2: intc: Use kflag if STATUS32.IE must be reset
@ 2016-09-12 15:55 Yuriy Kolerov
  2016-09-20 21:48 ` Vineet Gupta
  2016-09-30 21:18 ` Vineet Gupta
  0 siblings, 2 replies; 3+ messages in thread
From: Yuriy Kolerov @ 2016-09-12 15:55 UTC (permalink / raw)
  To: linux-snps-arc; +Cc: Vineet.Gupta1, linux-kernel, Yuriy Kolerov

In the end of "arc_init_IRQ" STATUS32.IE flag is going to be affected by
"flag" instruction but "flag" never touches IE flag on ARCv2. So "kflag"
instruction must be used instead of "flag".

Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
---
 arch/arc/kernel/intc-arcv2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arc/kernel/intc-arcv2.c b/arch/arc/kernel/intc-arcv2.c
index 6c24faf..62b59409 100644
--- a/arch/arc/kernel/intc-arcv2.c
+++ b/arch/arc/kernel/intc-arcv2.c
@@ -74,7 +74,7 @@ void arc_init_IRQ(void)
 	tmp = read_aux_reg(0xa);
 	tmp |= STATUS_AD_MASK | (irq_prio << 1);
 	tmp &= ~STATUS_IE_MASK;
-	asm volatile("flag %0	\n"::"r"(tmp));
+	asm volatile("kflag %0	\n"::"r"(tmp));
 }
 
 static void arcv2_irq_mask(struct irq_data *data)
-- 
2.7.4

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

* Re: [PATCH] ARCv2: intc: Use kflag if STATUS32.IE must be reset
  2016-09-12 15:55 [PATCH] ARCv2: intc: Use kflag if STATUS32.IE must be reset Yuriy Kolerov
@ 2016-09-20 21:48 ` Vineet Gupta
  2016-09-30 21:18 ` Vineet Gupta
  1 sibling, 0 replies; 3+ messages in thread
From: Vineet Gupta @ 2016-09-20 21:48 UTC (permalink / raw)
  To: Yuriy Kolerov, linux-snps-arc; +Cc: linux-kernel

On 09/12/2016 08:55 AM, Yuriy Kolerov wrote:
> In the end of "arc_init_IRQ" STATUS32.IE flag is going to be affected by
> "flag" instruction but "flag" never touches IE flag on ARCv2. So "kflag"
> instruction must be used instead of "flag".
> 
> Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>

Applied to for-next for 4.9 + stable backport.

Thx,
-Vineet

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

* Re: [PATCH] ARCv2: intc: Use kflag if STATUS32.IE must be reset
  2016-09-12 15:55 [PATCH] ARCv2: intc: Use kflag if STATUS32.IE must be reset Yuriy Kolerov
  2016-09-20 21:48 ` Vineet Gupta
@ 2016-09-30 21:18 ` Vineet Gupta
  1 sibling, 0 replies; 3+ messages in thread
From: Vineet Gupta @ 2016-09-30 21:18 UTC (permalink / raw)
  To: Yuriy Kolerov, linux-snps-arc; +Cc: Alexey Brodkin, linux-kernel

On 09/12/2016 08:55 AM, Yuriy Kolerov wrote:
> In the end of "arc_init_IRQ" STATUS32.IE flag is going to be affected by
> "flag" instruction but "flag" never touches IE flag on ARCv2. So "kflag"
> instruction must be used instead of "flag".
> 
> Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
> ---
>  arch/arc/kernel/intc-arcv2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arc/kernel/intc-arcv2.c b/arch/arc/kernel/intc-arcv2.c
> index 6c24faf..62b59409 100644
> --- a/arch/arc/kernel/intc-arcv2.c
> +++ b/arch/arc/kernel/intc-arcv2.c
> @@ -74,7 +74,7 @@ void arc_init_IRQ(void)
>  	tmp = read_aux_reg(0xa);
>  	tmp |= STATUS_AD_MASK | (irq_prio << 1);
>  	tmp &= ~STATUS_IE_MASK;
> -	asm volatile("flag %0	\n"::"r"(tmp));
> +	asm volatile("kflag %0	\n"::"r"(tmp));

Revisiting this in light of ongoing 2 priority interrupt support for HS38 cores.

It seems there is no need to fiddle with interrupt bits here at all.

init/main.c now has well known checkpoints where it explicitly disables the
interrupts in early boot code and enables them when time is right. So when we land
in arc_init_IRQ() interrupts have already been disabled.

So I'm dropping this patch and instead adding another one which removes the intr
bits touching part !

OK ?

-Vineet

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

end of thread, other threads:[~2016-09-30 21:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-12 15:55 [PATCH] ARCv2: intc: Use kflag if STATUS32.IE must be reset Yuriy Kolerov
2016-09-20 21:48 ` Vineet Gupta
2016-09-30 21:18 ` Vineet Gupta

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

all inboxes | Powered by JetHome®