From: Andrew Morton Subject: Re: [RFC PATCH 24/35] Add support for Xen event channels. Date: Sat, 13 May 2006 05:27:50 -0700 Message-ID: <20060513052750.41cfcb9d.akpm@osdl.org> References: <20060509084945.373541000@sous-sol.org> <20060509085157.491027000@sous-sol.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060509085157.491027000@sous-sol.org> Sender: linux-kernel-owner@vger.kernel.org To: Chris Wright Cc: linux-kernel@vger.kernel.org, virtualization@lists.osdl.org, xen-devel@lists.xensource.com, ian.pratt@xensource.com, Christian.Limpach@cl.cam.ac.uk List-Id: xen-devel@lists.xenproject.org On Tue, 09 May 2006 00:00:24 -0700 Chris Wright wrote: > +void __init init_IRQ(void) > +{ > + int i; > + int cpu; > + > + irq_ctx_init(0); > + > + spin_lock_init(&irq_mapping_update_lock); May as well initialise this at compile time. > + init_evtchn_cpu_bindings(); > + > + /* No VIRQ or IPI bindings. */ > + for (cpu = 0; cpu < NR_CPUS; cpu++) { Using NR_CPUS is a little... old-fashioned. I'd suggest a sweep through all the Xen code, look for places where it should be using for_each_foo_cpu().