From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vijay Kilari Subject: Re: [PATCH v2 01/15] xen/arm: register mmio handler at runtime Date: Tue, 8 Apr 2014 16:04:39 +0530 Message-ID: References: <1396612593-443-1-git-send-email-vijay.kilari@gmail.com> <1396612593-443-2-git-send-email-vijay.kilari@gmail.com> <533EA307.4000900@linaro.org> <533EACB0.6070604@linaro.org> <5343CCB8.9040507@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5343CCB8.9040507@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: Julien Grall Cc: Ian Campbell , Stefano Stabellini , Prasun Kapoor , Vijaya Kumar K , Andrii Anisov , xen-devel@lists.xen.org, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, Apr 8, 2014 at 3:47 PM, Julien Grall wrote: > On 04/08/2014 05:47 AM, Vijay Kilari wrote: >>>>> >>>>>> >>>>>> -const struct mmio_handler vgic_distr_mmio_handler = { >>>>>> +static struct mmio_handler vgic_distr_mmio_handler = { >>>>> >>>>> Why did you remove the const? >>>> >>>> I think, compiler is allowing forward declaration with const >>> >>> You meant doesn't allow? If so, please move the whole structure. I'd >>> prefer code movement rather than removing a const because of compiler issue. >>> >> Yes, compiler does not allow. I will move the code > > This is from the specification... if you declare something const you > have to assign the value directly. > Also we cannot keep it as const for the reason that register_mmio_handler fails to assign this const pointer to handler list. Anyway we will get rid of this structure completely after implementing check handler where read & write handler are passed as parameter to register_mmio_handler() call. >>>> >>>>> >>>>> [..] >>>>> >>>>>> diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h >>>>>> index 50b9b54..23dac85 100644 >>>>>> --- a/xen/include/asm-arm/domain.h >>>>>> +++ b/xen/include/asm-arm/domain.h >>>>>> @@ -116,6 +116,7 @@ struct arch_domain >>>>>> struct hvm_domain hvm_domain; >>>>>> xen_pfn_t *grant_table_gpfn; >>>>>> >>>>>> + struct io_handler *io_handlers; >>>>> >>>>> Why do you need a pointer here? I think can can directly use >>>>> struct io_handler iohandlers. >>>>> >>>> I just adds to increase the size of this arch_domain struct. >>>> so allocated memory at runtime. >>> >>> Do you hit the page size? >> Yes, I have faced page size exhausted issue which I have reported earlier > > Did you still have the issue when you moved out GICv stuff outside? Now I am not getting this issue. But I feel we are on the edge. So it is always better to allocate runtime. > > Regards, > > -- > Julien Grall