mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "kwangwoo.lee@sk.com" <kwangwoo.lee@sk.com>
To: Robin Murphy <robin.murphy@arm.com>,
	Russell King - ARM Linux <linux@armlinux.org.uk>,
	Catalin Marinas <catalin.marinas@arm.com>,
	"Will Deacon" <will.deacon@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Cc: "hyunchul3.kim@sk.com" <hyunchul3.kim@sk.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"woosuk.chung@sk.com" <woosuk.chung@sk.com>
Subject: RE: [PATCH v2] arm64: mm: convert __dma_* routines to use start, size
Date: Mon, 1 Aug 2016 23:24:21 +0000	[thread overview]
Message-ID: <c7f9cb77566b45f78c91403329f7e0c8@nmail01.hynixad.com> (raw)
In-Reply-To: <c2dd1a34-c97a-3865-cd5e-ccc4877bfe3e@arm.com>

> -----Original Message-----
> From: Robin Murphy [mailto:robin.murphy@arm.com]
> Sent: Monday, August 01, 2016 10:53 PM
> To: 이광우(LEE KWANGWOO) MS SW; Russell King - ARM Linux; Catalin Marinas; Will Deacon; Mark Rutland;
> linux-arm-kernel@lists.infradead.org
> Cc: 김현철(KIM HYUNCHUL) MS SW; linux-kernel@vger.kernel.org; 정우석(CHUNG WOO SUK) MS SW
> Subject: Re: [PATCH v2] arm64: mm: convert __dma_* routines to use start, size
> 
> On 01/08/16 14:36, Robin Murphy wrote:
> > On 01/08/16 00:45, kwangwoo.lee@sk.com wrote:
> > [...]
> >>>>> -----8<-----
> >>>>> diff --git a/arch/arm64/include/asm/assembler.h
> >>>>> b/arch/arm64/include/asm/assembler.h
> >>>>> index 10b017c4bdd8..1c005c90387e 100644
> >>>>> --- a/arch/arm64/include/asm/assembler.h
> >>>>> +++ b/arch/arm64/include/asm/assembler.h
> >>>>> @@ -261,7 +261,16 @@ lr	.req	x30		// link register
> >>>>>  	add	\size, \kaddr, \size
> >>>>>  	sub	\tmp2, \tmp1, #1
> >>>>>  	bic	\kaddr, \kaddr, \tmp2
> >>>>> -9998:	dc	\op, \kaddr
> >>>>> +9998:
> >>>>> +	.ifeqs "\op", "cvac"
> >>>>> +alternative_if_not ARM64_WORKAROUND_CLEAN_CACHE
> >>>>> +	dc	cvac, \kaddr
> >>>>> +alternative_else
> >>>>> +	dc	civac, \kaddr
> >>>>> +alternative_endif
> >>>>> +	.else
> >>>>> +	dc	\op, \kaddr
> >>>>> +	.endif
> >>>>>  	add	\kaddr, \kaddr, \tmp1
> >>>>>  	cmp	\kaddr, \size
> >>>>>  	b.lo	9998b
> >>>>
> >>>> I agree that it looks not viable because it makes the macro bigger and
> >>>> conditional specifically with CVAC op.
> >>>
> >>> Actually, having had a poke around in the resulting disassembly, it
> >>> looks like this does work correctly. I can't think of a viable reason
> >>> for the whole dcache_by_line_op to ever be wrapped in yet another
> >>> alternative (which almost certainly would go horribly wrong), and it
> >>> would mean that any other future users are automatically covered for
> >>> free. It's just horrible to look at at the source level.
> >>
> >> Then, Are you going to send a patch for this? Or should I include this change?
> >
> > I'll do a bit more testing just to make sure, then spin a separate patch
> > (and try to remember to keep you on CC..)
> 
> ...and said patch turns out to conflict with 823066d9edcd, since I
> hadn't realised it's already been fixed! So you can go ahead with the
> dcache_by_line_op cleanup as well, just rebase onto arm64/for-next/core
> (or linux/master, since it's been pulled already).

Thank you very much for the information! I'll rebase with it. 

> Robin.

Best Regards,
Kwangwoo Lee

      reply	other threads:[~2016-08-01 23:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26  7:34 Kwangwoo Lee
2016-07-26 10:43 ` Robin Murphy
2016-07-27  1:55   ` kwangwoo.lee
2016-07-27  9:56     ` Robin Murphy
2016-07-28  0:08       ` kwangwoo.lee
2016-07-29 17:06         ` Robin Murphy
2016-07-31 23:45           ` kwangwoo.lee
2016-08-01 13:36             ` Robin Murphy
2016-08-01 13:53               ` Robin Murphy
2016-08-01 23:24                 ` kwangwoo.lee [this message]

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=c7f9cb77566b45f78c91403329f7e0c8@nmail01.hynixad.com \
    --to=kwangwoo.lee@sk.com \
    --cc=catalin.marinas@arm.com \
    --cc=hyunchul3.kim@sk.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=robin.murphy@arm.com \
    --cc=will.deacon@arm.com \
    --cc=woosuk.chung@sk.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®