From: Ian Campbell Subject: Re: [RFC PATCH v1 01/10] xen/arm: make secondary gic init as notifier call Date: Fri, 21 Mar 2014 17:15:38 +0000 Message-ID: <1395422138.25521.44.camel@kazak.uk.xensource.com> References: <1395238631-2024-1-git-send-email-vijay.kilari@gmail.com> <1395238631-2024-2-git-send-email-vijay.kilari@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1395238631-2024-2-git-send-email-vijay.kilari@gmail.com> 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@gmail.com Cc: stefano.stabellini@eu.citrix.com, Prasun.Kapoor@caviumnetworks.com, vijaya.kumar@caviumnetworks.com, julien.grall@linaro.org, xen-devel@lists.xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Wed, 2014-03-19 at 19:47 +0530, vijay.kilari@gmail.com wrote: > From: Vijaya Kumar K > > make gic init for secondary cpus as notifier call > instead calling directly from secondary boot for > each cpu. > This makes secondary gic init generic and runtime. s/and/at/ perhaps? Otherwise I can't make sense of what you are trying to say. > +static struct notifier_block gic_cpu_nb = { > + .notifier_call = gic_init_secondary_cpu, > + .priority = 100 > In wondering what 100 was, I notice that the other similar uses have a "/* Highest priority */" comment, please add one here too. I notice that the percpu stuff (cpu_percpu_nfb) is also priority == 100, which makes me suspect that they will run in arbitrary order, which makes me uncomfortable, not least because at least gic_{cpu,hyp}_init both touch per-cpu data structures. Ah, I see the percpu stuff is a CPU_UP_PREPARE notifier, so has already happened. Good. It does make me wonder if it is wise to do something as critical as interrupt controller setup in a notifier. Do you think this is necessary for some reason? > +}; > +static void gic_smp_init(void) Like Julien says there isn't really a need for this, but if it were it should be __init I think. Ian.