xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Amit Tomer <amittomer25@gmail.com>
Cc: xen-devel@lists.xenproject.org,
	Julien Grall <julien.grall@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH v2] xen:arm: Populate arm64 image header
Date: Wed, 5 Sep 2018 14:04:20 +0100	[thread overview]
Message-ID: <520bfefd-7260-0916-2bc3-bb57fdfdc2f3@arm.com> (raw)
In-Reply-To: <CABHD4K8uWYXH1xodmrgS+689x=X=R4BvEDR+xKmxCaNw-H-UWA@mail.gmail.com>

Hi,

On 05/09/18 13:52, Amit Tomer wrote:
> Hello,
> 
> Thanks for having a look.
> 
> On Wed, Sep 5, 2018 at 6:07 PM Andre Przywara <andre.przywara@arm.com> wrote:
>>
>> Hi,
>>
>> I don't think it's helpful to hide that KERNEL_SIZE definition in
>> another file. Please just put "_end - start" here.
> 
> Yeah,  I thought about it and felt that it would be cleaner and more
> readable if we use macros here.

I don't see how this improves readability.
The point is that this line as is:

 .quad __KERNEL_SIZE /* Effective size of kernel image, little-endian */

conveys only little information, basically you say that "kernel size is
kernel size". I would rather see the actual definition of kernel size
here, since the comment explains the meaning already.

> Also, wanted to have minimal changes in head.S and that is the reason
> for using assemble.h.

assembler.h wouldn't be the right place anyway. AFAICT it's only there
to make those files in lib/ happy, which are mostly copied from Linux.

Cheers,
Andre.

>> Either you call this __HEAD_FLAG_PAGE_SIZE_4K, or, even better, copy the
>> Linux definition, which would make it obvious where this comes from and
>> would alert any developer of the PAGE_SIZE dependency.
>>
>> Plus move those into head.S, as mentioned above.
> 
> Ok.
>>> +
>>> +#define __KERNEL_SIZE           (_end - start)
>>> +
>>>  #endif /* __ASM_ASSEMBLER_H__ */
>>>
> 
> Thanks
> -Amit
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

      reply	other threads:[~2018-09-05 13:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-04 17:25 [PATCH v2] xen:arm: Populate arm64 image header Amit Singh Tomar
2018-09-05 12:37 ` Andre Przywara
2018-09-05 12:52   ` Amit Tomer
2018-09-05 13:04     ` Andre Przywara [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=520bfefd-7260-0916-2bc3-bb57fdfdc2f3@arm.com \
    --to=andre.przywara@arm.com \
    --cc=amittomer25@gmail.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).