From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: xen-devel@lists.xenproject.org, tim@xen.org,
stefano.stabellini@citrix.com
Subject: Re: [PATCH for 4.5] xen/arm: p2m: Correctly initialize cur_offset
Date: Wed, 01 Oct 2014 16:00:39 +0100 [thread overview]
Message-ID: <542C1717.3000700@linaro.org> (raw)
In-Reply-To: <1412159612.4861.10.camel@citrix.com>
On 10/01/2014 11:33 AM, Ian Campbell wrote:
> On Tue, 2014-09-30 at 15:51 +0100, Julien Grall wrote:
>> {~0,} only initializes the first cell of the array to ~0. The other cells
>> are initialized to 0.
>>
>> Change the initialization to a loop and, at the same time, do the same
>> for the mappings.
>
> I'm not sure a loop is the best option here vs either { ~0, ~0, ~0, ~0 }
> or a memset, but OK.
Thinking a bit more, we effectively need to initialize only the first 2
cells. It's because the P2M can start either at level 0 or level 1.
Anyway I will use { ~0, ~0, ~0, ~0 }.
> I don't think mappings is wrong as it is though, any reason to change?
{ NULL, } initialize the first cell to NULL and the other to 0.
As NULL is equal to (void *)0 it's fine, but I would prefer if we can
get a rid of this construction.
I would prefer if we do { NULL, NULL, NULL, NULL }.
>> This is fixing boot after 82985d7 "xen: arm: handle variable p2m levels
>> in apply_p2m_changes" on platform where the root-level doesn't have
>> concatenate table (such as the Foundation Model).
>
> You forgot your S-o-b.
Oh right. I will resend a patch
--
Julien Grall
next prev parent reply other threads:[~2014-10-01 15:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-30 14:51 [PATCH for 4.5] xen/arm: p2m: Correctly initialize cur_offset Julien Grall
2014-10-01 10:33 ` Ian Campbell
2014-10-01 15:00 ` Julien Grall [this message]
2014-10-01 15:03 ` Ian Campbell
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=542C1717.3000700@linaro.org \
--to=julien.grall@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=tim@xen.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).