From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754055AbdA3S5Q (ORCPT ); Mon, 30 Jan 2017 13:57:16 -0500 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111]:38780 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753852AbdA3S5N (ORCPT ); Mon, 30 Jan 2017 13:57:13 -0500 Subject: Re: [PATCH 1/6] ARCv2: IRQ: Move structures for core intc to the header To: Yuriy Kolerov , References: <1485561703-20921-1-git-send-email-yuriy.kolerov@synopsys.com> <1485561703-20921-2-git-send-email-yuriy.kolerov@synopsys.com> CC: , , Newsgroups: gmane.linux.kernel,gmane.linux.kernel.arc From: Vineet Gupta Message-ID: Date: Mon, 30 Jan 2017 10:56:59 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <1485561703-20921-2-git-send-email-yuriy.kolerov@synopsys.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.10.161.49] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/27/2017 04:01 PM, Yuriy Kolerov wrote: > Also add new macro ARC_REG_STATUS32 for the address of STATUS32 > auxiliary register. It is better to use it instead of magic numbers. > > Signed-off-by: Yuriy Kolerov > --- > arch/arc/include/asm/arcregs.h | 26 ++++++++++++++++++++++++++ > arch/arc/kernel/intc-arcv2.c | 23 +++-------------------- > 2 files changed, 29 insertions(+), 20 deletions(-) > > diff --git a/arch/arc/include/asm/arcregs.h b/arch/arc/include/asm/arcregs.h > index f659942..bc1f7bf 100644 > --- a/arch/arc/include/asm/arcregs.h > +++ b/arch/arc/include/asm/arcregs.h [snip]... > + > +struct aux_irq_ctrl_arcv2 { > +#ifdef CONFIG_CPU_BIG_ENDIAN > + unsigned int res3:18, save_idx_regs:1, res2:1, save_u_to_u:1, > + save_lp_regs:1, save_blink:1, res:4, save_nr_gpr_pairs:5; > +#else > + unsigned int save_nr_gpr_pairs:5, res:4, save_blink:1, save_lp_regs:1, > + save_u_to_u:1, res2:1, save_idx_regs:1, res3:18; > +#endif > +}; > + arcreg.h used to be dumping ground for every struct definition which is wrong. I've trimmed it gradually - so please don't reintroduce stuff here, unless it is really arc global. > /* > ******************************************************************* > * Generic structures to hold build configuration used at runtime > diff --git a/arch/arc/kernel/intc-arcv2.c b/arch/arc/kernel/intc-arcv2.c > index ecef0fb..2f31bb1 100644 > --- a/arch/arc/kernel/intc-arcv2.c > +++ b/arch/arc/kernel/intc-arcv2.c > @@ -24,25 +24,8 @@ void arc_init_IRQ(void) > { [snip]... > @@ -69,7 +52,7 @@ void arc_init_IRQ(void) > irq_bcr.firq ? " FIRQ (not used)":""); > > /* setup status32, don't enable intr yet as kernel doesn't want */ > - tmp = read_aux_reg(0xa); > + tmp = read_aux_reg(ARC_REG_STATUS32); This is fine ! > tmp |= STATUS_AD_MASK | (ARCV2_IRQ_DEF_PRIO << 1); > tmp &= ~STATUS_IE_MASK; > asm volatile("kflag %0 \n"::"r"(tmp)); >