[PATCH 2/7] Powerpc MSI implementation
Christoph Hellwig
hch at lst.de
Fri Jan 12 08:36:03 EST 2007
On Thu, Jan 11, 2007 at 10:25:19PM +1100, Michael Ellerman wrote:
> Powerpc MSI implementation, based on a collection of "ops" callbacks.
> We have to take the ops approach to accomodate RTAS, where firmware
> handles almost all details of MSI setup/teardown. Bare-metal MSI
> can be accomodated also.
>
> See the comments in include/asm-powerpc/msi.h for more info.
Most of this shouldn't live in arch/powerpc as it's generic code except
for tiny little bits.
> +static struct ppc_msi_ops *get_msi_ops(struct pci_dev *pdev)
> +{
> + if (ppc_md.get_msi_ops)
> + return ppc_md.get_msi_ops(pdev);
> +
> + return NULL;
> +}
struct ppc_msi_ops should become msi_ops, and this function should
be an arch hook in asm/msi.h
> +static struct msi_info *get_msi_info(struct pci_dev *pdev)
> +{
> + return pdev->msi_info;
> +}
This wrapper looks rather useless :)
> +#if defined(CONFIG_PCI_MSI) && defined(CONFIG_PPC_MERGE)
> +struct msi_info;
> +#endif
Unconditional, please.
> /*
> * The pci_dev structure is used to describe PCI devices.
> */
> @@ -174,6 +178,9 @@ struct pci_dev {
> struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */
> int rom_attr_enabled; /* has display of the rom attribute been enabled? */
> struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */
> +#if defined(CONFIG_PCI_MSI) && defined(CONFIG_PPC_MERGE)
> + struct msi_info *msi_info;
> +#endif
and only #ifdef CONFIG_PCI_MSI here please.
More information about the Linuxppc-dev
mailing list