public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eugeniy Paltsev <eugeniy.paltsev@synopsys.com>
To: "Eugeniy.Paltsev@synopsys.com" <eugeniy.paltsev@synopsys.com>,
	"Vineet Gupta" <vineet.gupta1@synopsys.com>,
	"linux-snps-arc@lists.infradead.org" 
	<linux-snps-arc@lists.infradead.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Alexey Brodkin" <alexey.brodkin@synopsys.com>
Subject: Re: [PATCH 2/5] ARCv2: introduce unaligned access under a Kconfig option
Date: Wed, 30 Jan 2019 16:44:43 +0000	[thread overview]
Message-ID: <1548866682.29008.31.camel@synopsys.com> (raw)
In-Reply-To: <C2D7FE5348E1B147BCA15975FBA23075014642D58D@US01WEMBX2.internal.synopsys.com>

On Tue, 2019-01-29 at 21:44 +0000, Vineet Gupta wrote:
> On 1/29/19 2:49 AM, Eugeniy Paltsev wrote:
> > As of today we enable unaligned access unconditionally on ARCv2.
> > Lets move it under Kconfig option so we can disable it in case of
> > using HW configuration which lacks of it.
> > 
> > Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
> > ---
> >  arch/arc/Kconfig                      | 8 ++++++++
> >  arch/arc/include/asm/irqflags-arcv2.h | 4 ++++
> >  arch/arc/kernel/intc-arcv2.c          | 4 +++-
> >  3 files changed, 15 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arc/include/asm/irqflags-arcv2.h b/arch/arc/include/asm/irqflags-arcv2.h
> > index 8a4f77ea3238..9b911e2c6b31 100644
> > --- a/arch/arc/include/asm/irqflags-arcv2.h
> > +++ b/arch/arc/include/asm/irqflags-arcv2.h
> > @@ -44,8 +44,12 @@
> >  #define ARCV2_IRQ_DEF_PRIO	1
> >  
> >  /* seed value for status register */
> > +#ifdef CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS
> >  #define ISA_INIT_STATUS_BITS	(STATUS_IE_MASK | STATUS_AD_MASK | \
> >  					(ARCV2_IRQ_DEF_PRIO << 1))
> > +#else
> > +#define ISA_INIT_STATUS_BITS	(STATUS_IE_MASK | (ARCV2_IRQ_DEF_PRIO << 1))
> > +#endif /* CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS */
> 
> I'd prefer to change the define of STATUS_AD_MASK itself and keep all of this
> unchanged !
> 

Actually I'd prefer to leave STATUS_AD_MASK untouched. Otherwise we will implicitly assign
wrong value to STATUS_AD_MASK which is quite misleading.

BTW, STATUS_AD_MASK is used in ASM code in v2 patch and it shouldn't be dependent on
CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS.

-- 
 Eugeniy Paltsev

  reply	other threads:[~2019-01-30 16:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-29 10:49 [PATCH 0/5] introduce unaligned access under a Kconfig option Eugeniy Paltsev
2019-01-29 10:49 ` [PATCH 1/5] ARCv2: lib: memcpy: fix doing prefetchw outside of buffer Eugeniy Paltsev
2019-01-29 10:49 ` [PATCH 2/5] ARCv2: introduce unaligned access under a Kconfig option Eugeniy Paltsev
2019-01-29 21:44   ` Vineet Gupta
2019-01-30 16:44     ` Eugeniy Paltsev [this message]
2019-01-30 16:47       ` Vineet Gupta
2019-01-29 10:49 ` [PATCH 3/5] ARCv2: Enable unaligned access in early ASM code Eugeniy Paltsev
2019-01-29 10:49 ` [PATCH 4/5] ARCv2: use unaligned access in SW Eugeniy Paltsev
2019-01-29 10:49 ` [PATCH 5/5] ARCv2: LIB: MEMCPY: fixed and optimised routine Eugeniy Paltsev
2019-01-29 21:55   ` Vineet Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1548866682.29008.31.camel@synopsys.com \
    --to=eugeniy.paltsev@synopsys.com \
    --cc=alexey.brodkin@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=vineet.gupta1@synopsys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox