Re: Support for multiple MSI with ARM platform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2010-05-31 at 16:46 +0530, Pratyush Anand wrote:
> Hi All,
> 
> I am using a PCIE device having MSI capability. It sends 4 different MSI vecotrs to host controller. 
> The host controller which I am using is based on ARM platform( SPEAr).
> 
> Currently, arch_setup_msi_irqs function (which may be replaced by arch specific code) is not defined
> for ARM. So my code used one default definition in driver/pci/msi.c But this code does not support 
> multiple MSI.
> 
> what would be the best way to do it:
> 
> 1. add following defines in arch/arm/include/asm/pci.h
> 
> #define arch_setup_msi_irqs arch_setup_msi_irqs
> 
> and then define this function in our mach-xxxx specific directory.

This won't work because if your mach-xxxx isn't built (I assume that's
possible), then the kernel won't build - because arch_setup_msi_irqs()
will be missing.

> or.
> 
> 2. add following defines in arch/arm/include/asm/pci.h
> 
> #define arch_setup_msi_irqs arch_setup_msi_irqs
> 
> and then define this function in arch/arm/kernel/msi.c.
> Now call some mach sepicif function from this routine.

That could work.

But, it's really up to the ARM platform maintainers and how they want it
managed. It depends on whether you want to be able to build a single
kernel image that supports both multi-MSI, or not, depending on which
platform you're running on.

You can see for example on powerpc we always define arch_setup_msi_irqs,
and then we use our existing struct machdep_calls to call the right
routine based on which platform we're running. That's like your option
2.

On the other hand if you only want to make the decision at build time
then the easiest option is to only #define arch_setup_msi_irqs when your
platform is being built. So either conditionally define it in
arch/arm/include/asm/pci.h, or in some other header for your platform.

The third option is to define arch_setup_msi_irqs, and have it check if
it's running on your platform and only in that case call your routine,
else call back to the generic version.

But you should really be asking on the linux-arm list.

cheers

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux