All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Fan <van.freenix@gmail.com>
To: Julien Grall <julien.grall@arm.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>, xen-devel@lists.xen.org
Subject: Re: [PATCH 2/2] xen/arm64: use shift operator
Date: Thu, 21 Apr 2016 09:06:29 +0800	[thread overview]
Message-ID: <20160421010516.GA2652@linux-7smt.suse> (raw)
In-Reply-To: <571795B9.1030002@arm.com>

Hi Julien,

On Wed, Apr 20, 2016 at 03:44:09PM +0100, Julien Grall wrote:
>Hello Peng,
>
>On 20/04/16 14:54, Peng Fan wrote:
>>Use shift operator, but not muliplication.
>>No function change.
>
>Why? The compiler will calculate the address at compilation time.

Yeah. The compiler will do this. I just think in asm, we rarely use
multiplication. In this file, there is "cmp   x1, #(LPAE_ENTRIES<<3)",
here use shift operator but not multiplication.

Thanks,
Peng.

>
>Regards,
>
>>Signed-off-by: Peng Fan <van.freenix@gmail.com>
>>Cc: Stefano Stabellini <sstabellini@kernel.org>
>>Cc: Julien Grall <julien.grall@arm.com>
>>---
>>  xen/arch/arm/arm64/head.S | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
>>index 05e3db0..ad6e593 100644
>>--- a/xen/arch/arm/arm64/head.S
>>+++ b/xen/arch/arm/arm64/head.S
>>@@ -524,7 +524,7 @@ paging:
>>          lsl   x2, x2, #THIRD_SHIFT   /* 4K aligned paddr of UART */
>>          mov   x3, #PT_DEV_L3
>>          orr   x2, x2, x3             /* x2 := 4K dev map including UART */
>>-        str   x2, [x1, #(FIXMAP_CONSOLE*8)] /* Map it in the first fixmap's slot */
>>+        str   x2, [x1, #(FIXMAP_CONSOLE << 3)] /* Map it in the first fixmap's slot */
>>  1:
>>
>>          /* Map fixmap into boot_second */
>>
>
>-- 
>Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-04-21  1:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20 13:54 [PATCH 1/2] xen/arm64: correct comments Peng Fan
2016-04-20 13:54 ` [PATCH 2/2] xen/arm64: use shift operator Peng Fan
2016-04-20 14:44   ` Julien Grall
2016-04-21  1:06     ` Peng Fan [this message]
2016-04-22 16:08       ` Julien Grall
2016-04-23 13:28         ` Peng Fan
2016-04-22 16:24 ` [PATCH 1/2] xen/arm64: correct comments Julien Grall

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=20160421010516.GA2652@linux-7smt.suse \
    --to=van.freenix@gmail.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xen.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.