From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 27/41] arm : add helper functions to map memory regions Date: Mon, 8 Jun 2015 15:05:56 +0100 Message-ID: <5575A144.7080301@citrix.com> References: <1431893048-5214-1-git-send-email-parth.dixit@linaro.org> <1431893048-5214-28-git-send-email-parth.dixit@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1431893048-5214-28-git-send-email-parth.dixit@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Parth Dixit , xen-devel@lists.xen.org Cc: keir@xen.org, ian.campbell@citrix.com, andrew.cooper3@citrix.com, tim@xen.org, julien.grall@citrix.com, stefano.stabellini@citrix.com, jbeulich@suse.com, christoffer.dall@linaro.org List-Id: xen-devel@lists.xenproject.org Hi Parth, On 17/05/2015 21:03, Parth Dixit wrote: > creates a helper function for mapping with cached attributes > > Signed-off-by: Parth Dixit > --- > xen/arch/arm/p2m.c | 26 ++++++++++++++++++++++++++ > xen/include/asm-arm/p2m.h | 10 ++++++++++ > 2 files changed, 36 insertions(+) > > diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c > index 903fa3f..fcb8116 100644 > --- a/xen/arch/arm/p2m.c > +++ b/xen/arch/arm/p2m.c > @@ -1140,6 +1140,32 @@ int p2m_populate_ram(struct domain *d, > d->arch.p2m.default_access); > } > > +int map_regions(struct domain *d, > + unsigned long start_gfn, > + unsigned long nr, > + unsigned long mfn) The name doesn't match the behavior. How the user will know that map_regions is actually using cached attribute. Also, I would prefer a function taking the caching attribute in parameter. I would be more generic that trying to introduce a new function every time is a new attribute is required. Regards, -- Julien Grall