From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC PATCH v1 08/10] xen/arm: Add support for GIC v3 Date: Sun, 23 Mar 2014 14:49:53 +0000 Message-ID: <532EF491.4060906@linaro.org> References: <1395238631-2024-1-git-send-email-vijay.kilari@gmail.com> <1395238631-2024-9-git-send-email-vijay.kilari@gmail.com> <532B1A08.2090806@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Vijay Kilari Cc: Ian Campbell , Stefano Stabellini , Prasun Kapoor , Vijaya Kumar K , xen-devel@lists.xen.org, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Hello Vijay, For next time, can you try to quote only what you need? It's hard to find your answer in a long mail. On 22/03/14 10:21, Vijay Kilari wrote: > On Thu, Mar 20, 2014 at 10:10 PM, Julien Grall wrote: >> Please check all the file against CODING_STYLE. I won't shout anymore on >> every coding style error in this mail. > OK. Is there any script to check coding style of Xen? Unfortunately no. It might be interesting to have one for Xen as the coding style differs from Linux. People are often confusing between them :) >>> +static void save_state(struct vcpu *v) >>> +{ >>> + int i; >>> + struct gic_state_data *d; >>> + d = (struct gic_state_data *)v->arch.gic_state; >>> + >>> + /* No need for spinlocks here because interrupts are disabled around >>> + * this call and it only accesses struct vcpu fields that cannot be >>> + * accessed simultaneously by another pCPU. >>> + */ >>> + for ( i=0; i>> + d->gic_lr[i] = gich_read_lr(i); >> >> You are introducing a helper to read/write lr. How the compiler handle >> it? Will it optimize? >> >> For me it seems very slow... >> > because LR registers are system registers, we have to > use READ/WRITE_SYSREG Is it possible to read all of them (without looking at nr_lrs)? I see that KVM is using this solution, e.g not looping. Regards, -- Julien Grall