diff mbox

irqchip/armada-370-xp: Enable MSI-X support

Message ID 20170502072600.13380-1-sr@denx.de (mailing list archive)
State New, archived
Headers show

Commit Message

Stefan Roese May 2, 2017, 7:26 a.m. UTC
Armada XP does not only support MSI, but also MSI-X. This patch sets
the MSI_FLAG_PCI_MSIX flag in the interrupt controller driver which
is the only change necessary to enable MSI-X support on this SoC. As
the Linux PCI MSI-X infrastructure takes care of writing the data and
address structures into the BAR specified by the MSI-X controller.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/irqchip/irq-armada-370-xp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefan Roese Aug. 15, 2017, 1:31 p.m. UTC | #1
Hi!

On 02.05.2017 09:26, Stefan Roese wrote:
> Armada XP does not only support MSI, but also MSI-X. This patch sets
> the MSI_FLAG_PCI_MSIX flag in the interrupt controller driver which
> is the only change necessary to enable MSI-X support on this SoC. As
> the Linux PCI MSI-X infrastructure takes care of writing the data and
> address structures into the BAR specified by the MSI-X controller.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> ---
>   drivers/irqchip/irq-armada-370-xp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
> index 33982cbd8a57..b17039ed8735 100644
> --- a/drivers/irqchip/irq-armada-370-xp.c
> +++ b/drivers/irqchip/irq-armada-370-xp.c
> @@ -124,7 +124,7 @@ static struct irq_chip armada_370_xp_msi_irq_chip = {
>   
>   static struct msi_domain_info armada_370_xp_msi_domain_info = {
>   	.flags	= (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
> -		   MSI_FLAG_MULTI_PCI_MSI),
> +		   MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX),
>   	.chip	= &armada_370_xp_msi_irq_chip,
>   };
>   
> 

Its been a while since this patch has been submitted - without any
comments so far. What's the current status with it? Is it someones
queue for upstreaming?

Thanks,
Stefan
Jason Cooper Aug. 15, 2017, 1:42 p.m. UTC | #2
+ Marc ;-)

On Tue, Aug 15, 2017 at 03:31:31PM +0200, Stefan Roese wrote:
> On 02.05.2017 09:26, Stefan Roese wrote:
> >Armada XP does not only support MSI, but also MSI-X. This patch sets
> >the MSI_FLAG_PCI_MSIX flag in the interrupt controller driver which
> >is the only change necessary to enable MSI-X support on this SoC. As
> >the Linux PCI MSI-X infrastructure takes care of writing the data and
> >address structures into the BAR specified by the MSI-X controller.
> >
> >Signed-off-by: Stefan Roese <sr@denx.de>
> >Cc: Bjorn Helgaas <bhelgaas@google.com>
> >Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> >Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
> >Cc: Jason Cooper <jason@lakedaemon.net>
> >Cc: Thomas Gleixner <tglx@linutronix.de>
> >---
> >  drivers/irqchip/irq-armada-370-xp.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
> >index 33982cbd8a57..b17039ed8735 100644
> >--- a/drivers/irqchip/irq-armada-370-xp.c
> >+++ b/drivers/irqchip/irq-armada-370-xp.c
> >@@ -124,7 +124,7 @@ static struct irq_chip armada_370_xp_msi_irq_chip = {
> >  static struct msi_domain_info armada_370_xp_msi_domain_info = {
> >  	.flags	= (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
> >-		   MSI_FLAG_MULTI_PCI_MSI),
> >+		   MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX),
> >  	.chip	= &armada_370_xp_msi_irq_chip,
> >  };
> >
> 
> Its been a while since this patch has been submitted - without any
> comments so far. What's the current status with it? Is it someones
> queue for upstreaming?

I'd like to see an Ack from Thomas P, as he's intimately familiar with
both the platforms and the PCI support.

thx,

Jason.
Marc Zyngier Aug. 15, 2017, 1:55 p.m. UTC | #3
On 15/08/17 14:42, Jason Cooper wrote:
> + Marc ;-)

Thanks Jason.

> 
> On Tue, Aug 15, 2017 at 03:31:31PM +0200, Stefan Roese wrote:
>> On 02.05.2017 09:26, Stefan Roese wrote:
>>> Armada XP does not only support MSI, but also MSI-X. This patch sets
>>> the MSI_FLAG_PCI_MSIX flag in the interrupt controller driver which
>>> is the only change necessary to enable MSI-X support on this SoC. As
>>> the Linux PCI MSI-X infrastructure takes care of writing the data and
>>> address structures into the BAR specified by the MSI-X controller.
>>>
>>> Signed-off-by: Stefan Roese <sr@denx.de>
>>> Cc: Bjorn Helgaas <bhelgaas@google.com>
>>> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>>> Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
>>> Cc: Jason Cooper <jason@lakedaemon.net>
>>> Cc: Thomas Gleixner <tglx@linutronix.de>
>>> ---
>>>  drivers/irqchip/irq-armada-370-xp.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
>>> index 33982cbd8a57..b17039ed8735 100644
>>> --- a/drivers/irqchip/irq-armada-370-xp.c
>>> +++ b/drivers/irqchip/irq-armada-370-xp.c
>>> @@ -124,7 +124,7 @@ static struct irq_chip armada_370_xp_msi_irq_chip = {
>>>  static struct msi_domain_info armada_370_xp_msi_domain_info = {
>>>  	.flags	= (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
>>> -		   MSI_FLAG_MULTI_PCI_MSI),
>>> +		   MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX),
>>>  	.chip	= &armada_370_xp_msi_irq_chip,
>>>  };
>>>
>>
>> Its been a while since this patch has been submitted - without any
>> comments so far. What's the current status with it? Is it someones
>> queue for upstreaming?
> 
> I'd like to see an Ack from Thomas P, as he's intimately familiar with
> both the platforms and the PCI support.
Same here. If Thomas P is OK with it, I'll queue it.

Thanks,

	M.
Thomas Petazzoni Aug. 15, 2017, 2:01 p.m. UTC | #4
Hello,

On Tue, 15 Aug 2017 15:31:31 +0200, Stefan Roese wrote:

> On 02.05.2017 09:26, Stefan Roese wrote:
> > Armada XP does not only support MSI, but also MSI-X. This patch sets
> > the MSI_FLAG_PCI_MSIX flag in the interrupt controller driver which
> > is the only change necessary to enable MSI-X support on this SoC. As
> > the Linux PCI MSI-X infrastructure takes care of writing the data and
> > address structures into the BAR specified by the MSI-X controller.
> > 
> > Signed-off-by: Stefan Roese <sr@denx.de>
> > Cc: Bjorn Helgaas <bhelgaas@google.com>
> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
> > Cc: Jason Cooper <jason@lakedaemon.net>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > ---
> >   drivers/irqchip/irq-armada-370-xp.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
> > index 33982cbd8a57..b17039ed8735 100644
> > --- a/drivers/irqchip/irq-armada-370-xp.c
> > +++ b/drivers/irqchip/irq-armada-370-xp.c
> > @@ -124,7 +124,7 @@ static struct irq_chip armada_370_xp_msi_irq_chip = {
> >   
> >   static struct msi_domain_info armada_370_xp_msi_domain_info = {
> >   	.flags	= (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
> > -		   MSI_FLAG_MULTI_PCI_MSI),
> > +		   MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX),
> >   	.chip	= &armada_370_xp_msi_irq_chip,
> >   };
> >   
> >   
> 
> Its been a while since this patch has been submitted - without any
> comments so far. What's the current status with it? Is it someones
> queue for upstreaming?

Sorry for the lack of feedback, very good idea to ping me on this
topic. I don't have access to HW right now, so I can't give it a test.
However, I don't think I have MSI-X capable hardware, only MSI capable.

With which hardware did you test this? An off-the-shell PCIe card, or
some custom FPGA logic?

Best regards,

Thomas
Stefan Roese Aug. 15, 2017, 2:06 p.m. UTC | #5
Hi Thomas,

On 15.08.2017 16:01, Thomas Petazzoni wrote:
> On Tue, 15 Aug 2017 15:31:31 +0200, Stefan Roese wrote:
> 
>> On 02.05.2017 09:26, Stefan Roese wrote:
>>> Armada XP does not only support MSI, but also MSI-X. This patch sets
>>> the MSI_FLAG_PCI_MSIX flag in the interrupt controller driver which
>>> is the only change necessary to enable MSI-X support on this SoC. As
>>> the Linux PCI MSI-X infrastructure takes care of writing the data and
>>> address structures into the BAR specified by the MSI-X controller.
>>>
>>> Signed-off-by: Stefan Roese <sr@denx.de>
>>> Cc: Bjorn Helgaas <bhelgaas@google.com>
>>> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>>> Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
>>> Cc: Jason Cooper <jason@lakedaemon.net>
>>> Cc: Thomas Gleixner <tglx@linutronix.de>
>>> ---
>>>    drivers/irqchip/irq-armada-370-xp.c | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
>>> index 33982cbd8a57..b17039ed8735 100644
>>> --- a/drivers/irqchip/irq-armada-370-xp.c
>>> +++ b/drivers/irqchip/irq-armada-370-xp.c
>>> @@ -124,7 +124,7 @@ static struct irq_chip armada_370_xp_msi_irq_chip = {
>>>    
>>>    static struct msi_domain_info armada_370_xp_msi_domain_info = {
>>>    	.flags	= (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
>>> -		   MSI_FLAG_MULTI_PCI_MSI),
>>> +		   MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX),
>>>    	.chip	= &armada_370_xp_msi_irq_chip,
>>>    };
>>>    
>>>    
>>
>> Its been a while since this patch has been submitted - without any
>> comments so far. What's the current status with it? Is it someones
>> queue for upstreaming?
> 
> Sorry for the lack of feedback, very good idea to ping me on this
> topic. I don't have access to HW right now, so I can't give it a test.
> However, I don't think I have MSI-X capable hardware, only MSI capable.
> 
> With which hardware did you test this? An off-the-shell PCIe card, or
> some custom FPGA logic?

I tested this code with some Altera / Intel FPGA using their PCI-Express
IP core. It should be possible to test this with some MSI-X capable
desktop PCIe cards as well on AXP boards equipped with PCIe slots,
like the Marvell AXP development board (orange box).

Thanks,
Stefan
Stefan Roese Aug. 18, 2017, 10:18 a.m. UTC | #6
Hi Thomas,

On 15.08.2017 16:06, Stefan Roese wrote:
> On 15.08.2017 16:01, Thomas Petazzoni wrote:
>> On Tue, 15 Aug 2017 15:31:31 +0200, Stefan Roese wrote:
>>
>>> On 02.05.2017 09:26, Stefan Roese wrote:
>>>> Armada XP does not only support MSI, but also MSI-X. This patch sets
>>>> the MSI_FLAG_PCI_MSIX flag in the interrupt controller driver which
>>>> is the only change necessary to enable MSI-X support on this SoC. As
>>>> the Linux PCI MSI-X infrastructure takes care of writing the data and
>>>> address structures into the BAR specified by the MSI-X controller.
>>>>
>>>> Signed-off-by: Stefan Roese <sr@denx.de>
>>>> Cc: Bjorn Helgaas <bhelgaas@google.com>
>>>> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>>>> Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
>>>> Cc: Jason Cooper <jason@lakedaemon.net>
>>>> Cc: Thomas Gleixner <tglx@linutronix.de>
>>>> ---
>>>>    drivers/irqchip/irq-armada-370-xp.c | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/irqchip/irq-armada-370-xp.c 
>>>> b/drivers/irqchip/irq-armada-370-xp.c
>>>> index 33982cbd8a57..b17039ed8735 100644
>>>> --- a/drivers/irqchip/irq-armada-370-xp.c
>>>> +++ b/drivers/irqchip/irq-armada-370-xp.c
>>>> @@ -124,7 +124,7 @@ static struct irq_chip 
>>>> armada_370_xp_msi_irq_chip = {
>>>>    static struct msi_domain_info armada_370_xp_msi_domain_info = {
>>>>        .flags    = (MSI_FLAG_USE_DEF_DOM_OPS | 
>>>> MSI_FLAG_USE_DEF_CHIP_OPS |
>>>> -           MSI_FLAG_MULTI_PCI_MSI),
>>>> +           MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX),
>>>>        .chip    = &armada_370_xp_msi_irq_chip,
>>>>    };
>>>
>>> Its been a while since this patch has been submitted - without any
>>> comments so far. What's the current status with it? Is it someones
>>> queue for upstreaming?
>>
>> Sorry for the lack of feedback, very good idea to ping me on this
>> topic. I don't have access to HW right now, so I can't give it a test.
>> However, I don't think I have MSI-X capable hardware, only MSI capable.
>>
>> With which hardware did you test this? An off-the-shell PCIe card, or
>> some custom FPGA logic?
> 
> I tested this code with some Altera / Intel FPGA using their PCI-Express
> IP core. It should be possible to test this with some MSI-X capable
> desktop PCIe cards as well on AXP boards equipped with PCIe slots,
> like the Marvell AXP development board (orange box).

So what do you think about this patch? Can I get your Acked-by /
Reviewed-by, or do you have some objections? Or do plan to first do
some tests yourself?

Thanks,
Stefan
Thomas Petazzoni Aug. 18, 2017, 12:12 p.m. UTC | #7
Hello,

On Fri, 18 Aug 2017 12:18:28 +0200, Stefan Roese wrote:


> >>> Its been a while since this patch has been submitted - without any
> >>> comments so far. What's the current status with it? Is it someones
> >>> queue for upstreaming?  
> >>
> >> Sorry for the lack of feedback, very good idea to ping me on this
> >> topic. I don't have access to HW right now, so I can't give it a test.
> >> However, I don't think I have MSI-X capable hardware, only MSI capable.
> >>
> >> With which hardware did you test this? An off-the-shell PCIe card, or
> >> some custom FPGA logic?  
> > 
> > I tested this code with some Altera / Intel FPGA using their PCI-Express
> > IP core. It should be possible to test this with some MSI-X capable
> > desktop PCIe cards as well on AXP boards equipped with PCIe slots,
> > like the Marvell AXP development board (orange box).  
> 
> So what do you think about this patch? Can I get your Acked-by /
> Reviewed-by, or do you have some objections? Or do plan to first do
> some tests yourself?

I thought about testing it myself, but since I don't have any MSI-X
capable device, I'm not sure it would bring a lot.

Therefore:

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Best regards,

Thomas
Marc Zyngier Aug. 18, 2017, 12:46 p.m. UTC | #8
On 18/08/17 13:12, Thomas Petazzoni wrote:
> Hello,
> 
> On Fri, 18 Aug 2017 12:18:28 +0200, Stefan Roese wrote:
> 
> 
>>>>> Its been a while since this patch has been submitted - without any
>>>>> comments so far. What's the current status with it? Is it someones
>>>>> queue for upstreaming?  
>>>>
>>>> Sorry for the lack of feedback, very good idea to ping me on this
>>>> topic. I don't have access to HW right now, so I can't give it a test.
>>>> However, I don't think I have MSI-X capable hardware, only MSI capable.
>>>>
>>>> With which hardware did you test this? An off-the-shell PCIe card, or
>>>> some custom FPGA logic?  
>>>
>>> I tested this code with some Altera / Intel FPGA using their PCI-Express
>>> IP core. It should be possible to test this with some MSI-X capable
>>> desktop PCIe cards as well on AXP boards equipped with PCIe slots,
>>> like the Marvell AXP development board (orange box).  
>>
>> So what do you think about this patch? Can I get your Acked-by /
>> Reviewed-by, or do you have some objections? Or do plan to first do
>> some tests yourself?
> 
> I thought about testing it myself, but since I don't have any MSI-X
> capable device, I'm not sure it would bring a lot.
> 
> Therefore:
> 
> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thanks.

Stefan: Can you resend this patch (cc'ing the usual irqchip
maintainers)? I'll queue it for 4.14.

	M.
diff mbox

Patch

diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
index 33982cbd8a57..b17039ed8735 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -124,7 +124,7 @@  static struct irq_chip armada_370_xp_msi_irq_chip = {
 
 static struct msi_domain_info armada_370_xp_msi_domain_info = {
 	.flags	= (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
-		   MSI_FLAG_MULTI_PCI_MSI),
+		   MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX),
 	.chip	= &armada_370_xp_msi_irq_chip,
 };