From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [Xen-devel] [PATCH v2 01/10] xen: remap GSIs as pirqs when running as initial domain Date: Wed, 6 Oct 2010 12:50:22 -0400 Message-ID: <20101006165022.GC1590@dumpdata.com> References: <1286191730-3188-1-git-send-email-stefano.stabellini@eu.citrix.com> <20101004192426.GA10291@dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Stefano Stabellini Cc: "linux-kernel@vger.kernel.org" , "xen-devel@lists.xensource.com" , Jeremy Fitzhardinge List-Id: xen-devel@lists.xenproject.org > > > +void __init xen_setup_pirqs(void) > > > +{ > > > + int irq; > > > +#ifndef CONFIG_SMP > > > + int nr_ioapics = 1; > > > +#endif > > > > Should this be defined in a header instead? Was this nr_ioapics==1 > > meant to fall in the '0 == nr_ioapics' to setup the first sixteen > > irqs? > > > > Is CONFIG_X86_IO_APIC more appropiate than CONFIG_SMP? > > I think it was supposed to fix a compilation error in case > CONFIG_X86_IO_APIC is not set, so that in both cases in which an ioapic > is not present in the system or the ioapic support is not compiled in > the kernel we would fall in the '0 == nr_ioapics' code path. That is what I thought, but nr_ioapics is set to one, so how do we fall in 0 == 1 code path? > So I guess the right thing to do here would be to replace CONFIG_SMP > with CONFIG_X86_IO_APIC. > I don't think that it is worth moving these three lines into an header > file. OK.