From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934096AbcI3VSq (ORCPT ); Fri, 30 Sep 2016 17:18:46 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111]:52820 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932382AbcI3VSp (ORCPT ); Fri, 30 Sep 2016 17:18:45 -0400 Subject: Re: [PATCH] ARCv2: intc: Use kflag if STATUS32.IE must be reset To: Yuriy Kolerov , References: <1473695703-29547-1-git-send-email-yuriy.kolerov@synopsys.com> CC: Alexey Brodkin , Newsgroups: gmane.linux.kernel,gmane.linux.kernel.arc From: Vineet Gupta Message-ID: Date: Fri, 30 Sep 2016 14:18:35 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <1473695703-29547-1-git-send-email-yuriy.kolerov@synopsys.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.10.161.62] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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