mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Martin <Dave.Martin@arm.com>
To: Yingjoe Chen <yingjoe.chen@mediatek.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Russell King <linux@arm.linux.org.uk>,
	linux-kernel@vger.kernel.org, srv_heupstream@mediatek.com
Subject: Re: [PATCH] ARM: alignment: Use is_wide_instruction() to check wide instruction
Date: Mon, 13 Apr 2015 16:07:57 +0100	[thread overview]
Message-ID: <20150413150757.GB15504@e103592.cambridge.arm.com> (raw)
In-Reply-To: <1428936444.7514.66.camel@mtksdaap41>

On Mon, Apr 13, 2015 at 10:47:24PM +0800, Yingjoe Chen wrote:
> On Mon, 2015-04-13 at 13:48 +0100, Dave Martin wrote:
> > On Fri, Apr 10, 2015 at 10:05:41PM +0800, Yingjoe Chen wrote:
> > > 
> > > I first notice the comment is incorrect, then I realize there's another
> > > macro which do exactly the same thing.
> > > Tested with hand written userspace program with a few wide instructions
> > > to make sure this still work as expect.
> > > 
> > > 8<-------------------------------------------------
> > > do_alignment() is using locally added IS_T32() macro to check if an
> > > instruction is a Thumb-2 32 bit instruction. The macro
> > > is_wide_instruction() is doing the same thing, with slightly faster
> > > implementation.
> > > Change to use is_wide_instruction() in do_alignment() and remove
> > > IS_T32().
> > 
> > Reviewed-by: Dave Martin <Dave.Martin@arm.com>
> > 
> > The existing code is correct, but the comment is indeed wrong.
> > Consolidating this with one of the other existing macros makes sense.
> > 
> > 
> > !__opcode_is_thumb16() could also be used here (or is_wide_instruction()
> > redefined in terms of it), but that's not essential.
> 
> Hi Dave,
> 
> Thanks for your review.
> 
> I did notice there are __opcode_is_thumb16/32. They need to handle
> 32bits instruction instead of 16bits only for is_wide_instruction, so I
> think using same implementation for them is a different story.
> 
> Joe.C

No worries.  It can be tidied up some more later if someone finds a good
reason for it.

Cheers
---Dave


  reply	other threads:[~2015-04-13 15:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10 14:05 Yingjoe Chen
2015-04-13 12:48 ` Dave Martin
2015-04-13 14:47   ` Yingjoe Chen
2015-04-13 15:07     ` Dave Martin [this message]
2015-05-07  7:03 ` Yingjoe Chen

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=20150413150757.GB15504@e103592.cambridge.arm.com \
    --to=dave.martin@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=srv_heupstream@mediatek.com \
    --cc=yingjoe.chen@mediatek.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

all inboxes | Powered by JetHome®