From: Penny Zheng <Penny.Zheng@arm.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Bertrand Marquis <Bertrand.Marquis@arm.com>,
Wei Chen <Wei.Chen@arm.com>, nd <nd@arm.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
"sstabellini@kernel.org" <sstabellini@kernel.org>,
"julien@xen.org" <julien@xen.org>
Subject: RE: [PATCH V3 05/10] xen/arm: static memory initialization
Date: Wed, 21 Jul 2021 03:07:23 +0000 [thread overview]
Message-ID: <VE1PR08MB52156DCB9D06B07718ACF9D4F7E39@VE1PR08MB5215.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <295913d9-5727-2ec7-ca20-70b94c53309d@suse.com>
Hi Jan
> -----Original Message-----
> From: Jan Beulich <jbeulich@suse.com>
> Sent: Monday, July 19, 2021 4:20 PM
> To: Penny Zheng <Penny.Zheng@arm.com>
> Cc: Bertrand Marquis <Bertrand.Marquis@arm.com>; Wei Chen
> <Wei.Chen@arm.com>; nd <nd@arm.com>; xen-devel@lists.xenproject.org;
> sstabellini@kernel.org; julien@xen.org
> Subject: Re: [PATCH V3 05/10] xen/arm: static memory initialization
>
> On 15.07.2021 07:18, Penny Zheng wrote:
> > v3 change:
> > - include addition of CONFIG_STATIC_ALLOCATION in this commit, where
> > it is firstly used and also change the name to CONFIG_STATIC_MEMORY
> > - Fix TAB typo in Kconfig
>
> Not sure what this relates to, but ...
>
Before I was wrongly using " set tabstop=4 " for Kconfig file, so...
> > --- a/xen/arch/arm/Kconfig
> > +++ b/xen/arch/arm/Kconfig
> > @@ -106,6 +106,9 @@ config TEE
> >
> > source "arch/arm/tee/Kconfig"
> >
> > +config STATIC_MEMORY
> > + def_bool y
>
> ... this is (wrongly) using spaces for indentation.
>
> I also wonder about the placement: Shouldn't the option live in common code,
> with Arm "select"ing it?
>
Sure, I will place it in xen/common/Kconfig, and add "depends on ARM".
> > --- a/xen/arch/arm/setup.c
> > +++ b/xen/arch/arm/setup.c
> > @@ -622,6 +622,28 @@ static void __init init_pdx(void)
> > }
> > }
> >
> > +/* Static memory initialization */
> > +static void __init init_staticmem_pages(void) {
> > + unsigned int bank;
> > +
> > + /* TODO: Considering NUMA-support scenario. */
> > + for ( bank = 0 ; bank < bootinfo.static_mem.nr_banks; bank++ )
> > + {
> > + paddr_t bank_start = bootinfo.static_mem.bank[bank].start;
> > + paddr_t bank_size = bootinfo.static_mem.bank[bank].size;
> > + paddr_t bank_end = bank_start + bank_size;
> > +
> > + bank_start = round_pgup(bank_start);
> > + bank_end = round_pgdown(bank_end);
> > + if ( bank_end <= bank_start )
> > + return;
> > +
> > + free_staticmem_pages(maddr_to_page(bank_start),
> > + (bank_end - bank_start) >> PAGE_SHIFT,
> > + false);
>
> Indentation (one too few spaces). Perhaps also consider to avoid open-coding
> PFN_DOWN() here; in fact it and PFN_UP() could be used in place of
> round_pg{down,up}() above.
>
Sure. I will replace round_pg{down,up}() with PFN_DOWN()/PFN_UP().
> Jan
Cheers
Penny Zheng
next prev parent reply other threads:[~2021-07-21 3:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-15 5:18 [PATCH V3 00/10] Domain on Static Allocation Penny Zheng
2021-07-15 5:18 ` [PATCH V3 01/10] xen/arm: introduce domain " Penny Zheng
2021-07-15 5:18 ` [PATCH V3 02/10] xen/arm: introduce new helper device_tree_get_meminfo Penny Zheng
2021-07-15 5:18 ` [PATCH V3 03/10] xen/arm: handle static memory in dt_unreserved_regions Penny Zheng
2021-07-15 5:18 ` [PATCH V3 04/10] xen: introduce mark_page_free Penny Zheng
2021-07-19 8:13 ` Jan Beulich
2021-07-15 5:18 ` [PATCH V3 05/10] xen/arm: static memory initialization Penny Zheng
2021-07-19 8:20 ` Jan Beulich
2021-07-21 3:07 ` Penny Zheng [this message]
2021-07-21 8:15 ` Jan Beulich
2021-07-19 8:25 ` Jan Beulich
2021-07-15 5:18 ` [PATCH V3 06/10] xen/arm: introduce PGC_reserved Penny Zheng
2021-07-15 5:18 ` [PATCH V3 07/10] xen: re-define assign_pages and introduce assign_page Penny Zheng
2021-07-19 8:41 ` Jan Beulich
2021-07-21 5:53 ` Penny Zheng
2021-07-15 5:18 ` [PATCH V3 08/10] xen/arm: introduce acquire_staticmem_pages and acquire_domstatic_pages Penny Zheng
2021-07-19 9:26 ` Jan Beulich
2021-07-19 10:00 ` Julien Grall
2021-07-21 7:52 ` Penny Zheng
2021-07-21 7:37 ` Penny Zheng
2021-07-15 5:18 ` [PATCH V3 09/10] xen/arm: check "xen,static-mem" property during domain construction Penny Zheng
2021-07-15 5:18 ` [PATCH V3 10/10] xen/arm: introduce allocate_static_memory Penny Zheng
2021-07-27 3:44 ` Penny Zheng
2021-07-27 6:18 ` Penny Zheng
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=VE1PR08MB52156DCB9D06B07718ACF9D4F7E39@VE1PR08MB5215.eurprd08.prod.outlook.com \
--to=penny.zheng@arm.com \
--cc=Bertrand.Marquis@arm.com \
--cc=Wei.Chen@arm.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=nd@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).