From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Grundler Date: Tue, 03 Jan 2006 22:39:18 +0000 Subject: Re: [PATCH 1/3] msi vector targeting abstractions Message-Id: <20060103223918.GB13841@esmail.cup.hp.com> List-Id: References: <20051222201651.2019.37913.96422@lnx-maule.americas.sgi.com> <20051222201657.2019.69251.48815@lnx-maule.americas.sgi.com> In-Reply-To: <20051222201657.2019.69251.48815@lnx-maule.americas.sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Mark Maule Cc: linuxppc64-dev@ozlabs.org, linux-pci@atrey.karlin.mff.cuni.cz, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, Tony Luck , gregkh@suse.de On Thu, Dec 22, 2005 at 02:15:49PM -0600, Mark Maule wrote: > Abstract portions of the MSI core for platforms that do not use standard > APIC interrupt controllers. This is implemented through a new arch-specific > msi setup routine, and a set of msi ops which can be set on a per platform > basis. ... > + > + msi_ops->target(vector, dest_cpu, &address_hi, &address_lo); > + > + pci_write_config_dword(entry->dev, msi_upper_address_reg(pos), > + address_hi); > pci_write_config_dword(entry->dev, msi_lower_address_reg(pos), > - address.lo_address.value); > + address_lo); > set_native_irq_info(irq, cpu_mask); > break; > } ... > --- /dev/null 1970-01-01 00:00:00.000000000 +0000 > +++ msi/drivers/pci/msi-apic.c 2005-12-22 11:09:37.022232088 -0600 ... > +struct msi_ops msi_apic_ops = { > + .setup = msi_setup_apic, > + .teardown = msi_teardown_apic, > +#ifdef CONFIG_SMP > + .target = msi_target_apic, > +#endif Mark, msi_target_apic() initializes address_lo parameter. Even on a UP machine, we need inialize this value. If target is called unconditionally, wouldn't it be better for msi_target_apic() always be called? It would also be good for msi_target_apic to validate the 'dest_cpu' is online. Maybe a BUG_ON or something like that. grant ps. not done looking through this...and still curious to see where other discussion about generic vector assignment leads.