Re: [Patch Part2 v4 21/31] PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain

2014-11-06 Thread Thomas Gleixner
On Thu, 6 Nov 2014, Jiang Liu wrote: > On 2014/11/6 18:01, Thomas Gleixner wrote: > Hi Thomas, > Actually I'm working on a patch set to improve MSI support in > the way you described above this afternoon. And I'm also trying to > split MSI code into PCI dependent part and PCI independent part

Re: [Patch Part2 v4 21/31] PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain

2014-11-06 Thread Jiang Liu
On 2014/11/6 18:01, Thomas Gleixner wrote: > On Tue, 4 Nov 2014, Jiang Liu wrote: >> +#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN >> +static inline irq_hw_number_t >> +msi_get_hwirq(struct pci_dev *pdev, struct msi_desc *msidesc) >> +{ >> +return (irq_hw_number_t)msidesc->msi_attrib.entry_nr | >> +

Re: [Patch Part2 v4 21/31] PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain

2014-11-06 Thread Thomas Gleixner
On Thu, 6 Nov 2014, Thomas Gleixner wrote: > On Tue, 4 Nov 2014, Jiang Liu wrote: > > +#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN > > +static inline irq_hw_number_t > > +msi_get_hwirq(struct pci_dev *pdev, struct msi_desc *msidesc) > > +{ > > + return (irq_hw_number_t)msidesc->msi_attrib.entry_nr | > >

Re: [Patch Part2 v4 21/31] PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain

2014-11-06 Thread Thomas Gleixner
On Tue, 4 Nov 2014, Jiang Liu wrote: > +#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN > +static inline irq_hw_number_t > +msi_get_hwirq(struct pci_dev *pdev, struct msi_desc *msidesc) > +{ > + return (irq_hw_number_t)msidesc->msi_attrib.entry_nr | > + PCI_DEVID(pdev->bus->number, pdev->dev

Re: [Patch Part2 v4 21/31] PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain

2014-11-05 Thread Yijing Wang
On 2014/11/6 13:06, Jiang Liu wrote: > On 2014/11/6 9:58, Yijing Wang wrote: @@ -1098,3 +1099,128 @@ int pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries, return nvec; } EXPORT_SYMBOL(pci_enable_msix_range); + +#ifdefCONFIG_PC

Re: [Patch Part2 v4 21/31] PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain

2014-11-05 Thread Bjorn Helgaas
On Wed, Nov 5, 2014 at 9:58 PM, Jiang Liu wrote: > On 2014/11/6 7:09, Bjorn Helgaas wrote: >> On Tue, Nov 04, 2014 at 08:01:55PM +0800, Jiang Liu wrote: >>> +{ >>> +return (irq_hw_number_t)msidesc->msi_attrib.entry_nr | >>> +PCI_DEVID(pdev->bus->number, pdev->devfn) << 11 | >>> +

Re: [Patch Part2 v4 21/31] PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain

2014-11-05 Thread Jiang Liu
On 2014/11/6 9:58, Yijing Wang wrote: >>> >>> @@ -1098,3 +1099,128 @@ int pci_enable_msix_range(struct pci_dev *dev, >>> struct msix_entry *entries, >>> return nvec; >>> } >>> EXPORT_SYMBOL(pci_enable_msix_range); >>> + >>> +#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN >> >> Space, not tab. >> >>>

Re: [Patch Part2 v4 21/31] PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain

2014-11-05 Thread Jiang Liu
On 2014/11/6 7:09, Bjorn Helgaas wrote: > On Tue, Nov 04, 2014 at 08:01:55PM +0800, Jiang Liu wrote: > > In your topic: > > PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain > > There's no need to repeat "PCI MSI". Please run "git log --oneline > drivers/pci/msi.c" and make your si

Re: [Patch Part2 v4 21/31] PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain

2014-11-05 Thread Yijing Wang
On 2014/11/6 12:10, Bjorn Helgaas wrote: > On Wed, Nov 5, 2014 at 6:58 PM, Yijing Wang wrote: > +{ +return (irq_hw_number_t)msidesc->msi_attrib.entry_nr | +PCI_DEVID(pdev->bus->number, pdev->devfn) << 11 | +(pci_domain_nr(pdev->bus) & 0x) <<

Re: [Patch Part2 v4 21/31] PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain

2014-11-05 Thread Bjorn Helgaas
On Wed, Nov 5, 2014 at 6:58 PM, Yijing Wang wrote: >>> +{ >>> +return (irq_hw_number_t)msidesc->msi_attrib.entry_nr | >>> +PCI_DEVID(pdev->bus->number, pdev->devfn) << 11 | >>> +(pci_domain_nr(pdev->bus) & 0x) << 27; >> >> Where does this bit layout come from?

Re: [Patch Part2 v4 21/31] PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain

2014-11-05 Thread Yijing Wang
>> >> @@ -1098,3 +1099,128 @@ int pci_enable_msix_range(struct pci_dev *dev, >> struct msix_entry *entries, >> return nvec; >> } >> EXPORT_SYMBOL(pci_enable_msix_range); >> + >> +#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN > > Space, not tab. > >> +static inline irq_hw_number_t >> +msi_get_hw

Re: [Patch Part2 v4 21/31] PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain

2014-11-05 Thread Bjorn Helgaas
On Tue, Nov 04, 2014 at 08:01:55PM +0800, Jiang Liu wrote: In your topic: PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain There's no need to repeat "PCI MSI". Please run "git log --oneline drivers/pci/msi.c" and make your similar (capitalize the first word). > Enhance PCI MSI co

[Patch Part2 v4 21/31] PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain

2014-11-04 Thread Jiang Liu
Enhance PCI MSI core to support hierarchy irqdomain, so the common code could be shared among architectures. Signed-off-by: Jiang Liu --- drivers/pci/Kconfig |4 ++ drivers/pci/msi.c | 126 +++ include/linux/msi.h | 11 + 3 files chang