From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH 03/12] xen/events: remove unnecessary init_evtchn_cpu_bindings() Date: Wed, 20 Mar 2013 11:09:11 +0000 Message-ID: <5149A6E702000078000C71EF@nat28.tlf.novell.com> References: <1363727099-25519-1-git-send-email-david.vrabel@citrix.com> <1363727099-25519-4-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1363727099-25519-4-git-send-email-david.vrabel@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: Keir Fraser , Konrad Rzeszutek Wilk , Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 19.03.13 at 22:04, David Vrabel wrote: > From: David Vrabel > > Event channels are always explicitly bound to a specific VCPU before > they are first enabled. There is no need to initialize all possible > events as bound to VCPU 0 at start of day or after a resume. That part may indeed be safe to do, but ... > --- a/drivers/xen/events.c > +++ b/drivers/xen/events.c > @@ -333,24 +333,6 @@ static void bind_evtchn_to_cpu(unsigned int chn, > unsigned int cpu) > info_for_irq(irq)->cpu = cpu; > } > > -static void init_evtchn_cpu_bindings(void) > -{ > - int i; > -#ifdef CONFIG_SMP > - struct irq_info *info; > - > - /* By default all event channels notify CPU#0. */ > - list_for_each_entry(info, &xen_irq_list_head, list) { > - struct irq_desc *desc = irq_to_desc(info->irq); > - cpumask_copy(desc->irq_data.affinity, cpumask_of(0)); > - } > -#endif > - > - for_each_possible_cpu(i) > - memset(per_cpu(cpu_evtchn_mask, i), > - (i == 0) ? ~0 : 0, sizeof(*per_cpu(cpu_evtchn_mask, i))); ... you also remove the initialization of the mask bits here. If that was intended, a sentence about the safety of this would certainly be good to add to the description. Jan