Linux-RISC-V Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2] PCI/MSI: Enable PCI_MSI_IRQ_DOMAIN support for Microblaze
@ 2019-10-08 12:58 Michal Simek
  2019-10-08 15:46 ` Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Michal Simek @ 2019-10-08 12:58 UTC (permalink / raw)
  To: linux-kernel, monstr, michal.simek, git
  Cc: Kuldeep Dave, Albert Ou, Bharat Kumar Gogada, Greg Kroah-Hartman,
	Palmer Dabbelt, linux-pci, Masahiro Yamada, Firoz Khan,
	Paul Walmsley, Bjorn Helgaas, linux-riscv, Will Deacon

From: Kuldeep Dave <kuldeep.dave@xilinx.com>

Add Microblaze as an arch that supports PCI_MSI_IRQ_DOMAIN and add
generation of msi.h in the Microblaze arch.

The same change has been done by commit 251a44888183
("riscv: include generic support for MSI irqdomains")
and by commit 2a9af0273c1c
("PCI/MSI: Enable PCI_MSI_IRQ_DOMAIN support for RISC-V").

Signed-off-by: Kuldeep Dave <kuldeep.dave@xilinx.com>
Signed-off-by: Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

Changes in v2:
- Squash patches together https://lkml.org/lkml/2019/10/8/277
  https://lkml.org/lkml/2019/10/8/283

Please take it directly via pci tree.
---
 arch/microblaze/include/asm/Kbuild | 1 +
 drivers/pci/Kconfig                | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/microblaze/include/asm/Kbuild b/arch/microblaze/include/asm/Kbuild
index e5c9170a07fc..83417105c00a 100644
--- a/arch/microblaze/include/asm/Kbuild
+++ b/arch/microblaze/include/asm/Kbuild
@@ -25,6 +25,7 @@ generic-y += local64.h
 generic-y += mcs_spinlock.h
 generic-y += mm-arch-hooks.h
 generic-y += mmiowb.h
+generic-y += msi.h
 generic-y += parport.h
 generic-y += percpu.h
 generic-y += preempt.h
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index a304f5ea11b9..9d259372fbfd 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -52,7 +52,7 @@ config PCI_MSI
 	   If you don't know what to do here, say Y.
 
 config PCI_MSI_IRQ_DOMAIN
-	def_bool ARC || ARM || ARM64 || X86 || RISCV
+	def_bool ARC || ARM || ARM64 || X86 || RISCV || MICROBLAZE
 	depends on PCI_MSI
 	select GENERIC_MSI_IRQ_DOMAIN
 
-- 
2.17.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] PCI/MSI: Enable PCI_MSI_IRQ_DOMAIN support for Microblaze
  2019-10-08 12:58 [PATCH v2] PCI/MSI: Enable PCI_MSI_IRQ_DOMAIN support for Microblaze Michal Simek
@ 2019-10-08 15:46 ` Christoph Hellwig
  2019-10-14 23:23   ` Bjorn Helgaas
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2019-10-08 15:46 UTC (permalink / raw)
  To: Michal Simek
  Cc: Kuldeep Dave, Albert Ou, Bharat Kumar Gogada, Greg Kroah-Hartman,
	Palmer Dabbelt, monstr, linux-kernel, Masahiro Yamada,
	Firoz Khan, git, Paul Walmsley, linux-pci, Bjorn Helgaas,
	linux-riscv, Will Deacon

> diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
> index a304f5ea11b9..9d259372fbfd 100644
> --- a/drivers/pci/Kconfig
> +++ b/drivers/pci/Kconfig
> @@ -52,7 +52,7 @@ config PCI_MSI
>  	   If you don't know what to do here, say Y.
>  
>  config PCI_MSI_IRQ_DOMAIN
> -	def_bool ARC || ARM || ARM64 || X86 || RISCV
> +	def_bool ARC || ARM || ARM64 || X86 || RISCV || MICROBLAZE

Can you find out what the actual dependency is so that we can
automatically enabled this instead of the weird arch list?

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] PCI/MSI: Enable PCI_MSI_IRQ_DOMAIN support for Microblaze
  2019-10-08 15:46 ` Christoph Hellwig
@ 2019-10-14 23:23   ` Bjorn Helgaas
  2019-10-15  5:59     ` Michal Simek
  0 siblings, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2019-10-14 23:23 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Kuldeep Dave, Albert Ou, Bharat Kumar Gogada, linux-kernel,
	Palmer Dabbelt, linux-pci, monstr, Michal Simek, Masahiro Yamada,
	Firoz Khan, git, Paul Walmsley, Greg Kroah-Hartman, linux-riscv,
	Will Deacon

On Tue, Oct 08, 2019 at 08:46:52AM -0700, Christoph Hellwig wrote:
> > diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
> > index a304f5ea11b9..9d259372fbfd 100644
> > --- a/drivers/pci/Kconfig
> > +++ b/drivers/pci/Kconfig
> > @@ -52,7 +52,7 @@ config PCI_MSI
> >  	   If you don't know what to do here, say Y.
> >  
> >  config PCI_MSI_IRQ_DOMAIN
> > -	def_bool ARC || ARM || ARM64 || X86 || RISCV
> > +	def_bool ARC || ARM || ARM64 || X86 || RISCV || MICROBLAZE
> 
> Can you find out what the actual dependency is so that we can
> automatically enabled this instead of the weird arch list?

Hi Michal, I'll wait for your response on whether it's feasible to do
something smarter than listing every arch here.  Please ping here or
post a v3; since I marked this patch "Changed Requested" in patchwork,
it's fallen off my to-do list.

Bjorn

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] PCI/MSI: Enable PCI_MSI_IRQ_DOMAIN support for Microblaze
  2019-10-14 23:23   ` Bjorn Helgaas
@ 2019-10-15  5:59     ` Michal Simek
  2019-10-16 23:57       ` Palmer Dabbelt
  0 siblings, 1 reply; 5+ messages in thread
From: Michal Simek @ 2019-10-15  5:59 UTC (permalink / raw)
  To: Bjorn Helgaas, Christoph Hellwig
  Cc: Kuldeep Dave, Albert Ou, Bharat Kumar Gogada, linux-kernel,
	Palmer Dabbelt, linux-pci, monstr, Michal Simek, Masahiro Yamada,
	Firoz Khan, git, Paul Walmsley, Greg Kroah-Hartman, linux-riscv,
	Will Deacon

Hi Bjorn,

On 15. 10. 19 1:23, Bjorn Helgaas wrote:
> On Tue, Oct 08, 2019 at 08:46:52AM -0700, Christoph Hellwig wrote:
>>> diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
>>> index a304f5ea11b9..9d259372fbfd 100644
>>> --- a/drivers/pci/Kconfig
>>> +++ b/drivers/pci/Kconfig
>>> @@ -52,7 +52,7 @@ config PCI_MSI
>>>  	   If you don't know what to do here, say Y.
>>>  
>>>  config PCI_MSI_IRQ_DOMAIN
>>> -	def_bool ARC || ARM || ARM64 || X86 || RISCV
>>> +	def_bool ARC || ARM || ARM64 || X86 || RISCV || MICROBLAZE
>>
>> Can you find out what the actual dependency is so that we can
>> automatically enabled this instead of the weird arch list?
> 
> Hi Michal, I'll wait for your response on whether it's feasible to do
> something smarter than listing every arch here.  Please ping here or
> post a v3; since I marked this patch "Changed Requested" in patchwork,
> it's fallen off my to-do list.

I was waiting more for you to comment this. I was expecting that the
same question came last time when RISCV was added.
I am happy to investigate more about it but definitely some your input
would help.

Thanks,
Michal


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] PCI/MSI: Enable PCI_MSI_IRQ_DOMAIN support for Microblaze
  2019-10-15  5:59     ` Michal Simek
@ 2019-10-16 23:57       ` Palmer Dabbelt
  0 siblings, 0 replies; 5+ messages in thread
From: Palmer Dabbelt @ 2019-10-16 23:57 UTC (permalink / raw)
  To: Christoph Hellwig, michal.simek
  Cc: monstr, aou, bharat.kumar.gogada, Greg KH, Paul Walmsley,
	michal.simek, linux-kernel, Christoph Hellwig, yamada.masahiro,
	firoz.khan, helgaas, git, linux-pci, kuldeep.dave, linux-riscv,
	will

On Mon, 14 Oct 2019 22:59:07 PDT (-0700), michal.simek@xilinx.com wrote:
> Hi Bjorn,
>
> On 15. 10. 19 1:23, Bjorn Helgaas wrote:
>> On Tue, Oct 08, 2019 at 08:46:52AM -0700, Christoph Hellwig wrote:
>>>> diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
>>>> index a304f5ea11b9..9d259372fbfd 100644
>>>> --- a/drivers/pci/Kconfig
>>>> +++ b/drivers/pci/Kconfig
>>>> @@ -52,7 +52,7 @@ config PCI_MSI
>>>>  	   If you don't know what to do here, say Y.
>>>>
>>>>  config PCI_MSI_IRQ_DOMAIN
>>>> -	def_bool ARC || ARM || ARM64 || X86 || RISCV
>>>> +	def_bool ARC || ARM || ARM64 || X86 || RISCV || MICROBLAZE
>>>
>>> Can you find out what the actual dependency is so that we can
>>> automatically enabled this instead of the weird arch list?
>>
>> Hi Michal, I'll wait for your response on whether it's feasible to do
>> something smarter than listing every arch here.  Please ping here or
>> post a v3; since I marked this patch "Changed Requested" in patchwork,
>> it's fallen off my to-do list.
>
> I was waiting more for you to comment this. I was expecting that the
> same question came last time when RISCV was added.
> I am happy to investigate more about it but definitely some your input
> would help.

Sorry: we usually try to do things the right way but it looks like this got 
lost in the shuffle.  It really doesn't look like there's any 
architecture-specific code implementation on our end:

    commit 251a44888183003b0380df184835a2c00bfa39d7
    Author: Wesley Terpstra <wesley@sifive.com>
    Date:   Mon May 20 10:29:26 2019 -0700
    
        riscv: include generic support for MSI irqdomains
    
        Some RISC-V systems include PCIe host controllers that support PCIe
        message-signaled interrupts.  For this to work on Linux, we need to
        enable PCI_MSI_IRQ_DOMAIN and define struct msi_alloc_info.  Support
        for the latter is enabled by including the architecture-generic msi.h
        include.
    
        Signed-off-by: Wesley Terpstra <wesley@sifive.com>
        [paul.walmsley@sifive.com: split initial patch into one arch/riscv
         patch and one drivers/pci patch]
        Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
    
    diff --git a/arch/riscv/include/asm/Kbuild b/arch/riscv/include/asm/Kbuild
    index 1efaeddf1e4b..16970f246860 100644
    --- a/arch/riscv/include/asm/Kbuild
    +++ b/arch/riscv/include/asm/Kbuild
    @@ -22,6 +22,7 @@ generic-y += kvm_para.h
     generic-y += local.h
     generic-y += local64.h
     generic-y += mm-arch-hooks.h
    +generic-y += msi.h
     generic-y += percpu.h
     generic-y += preempt.h
     generic-y += sections.h

I bet that dropping the architectures and adding msi.h everywhere it's not 
listed will at least get this building.  I'll give

    diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
    index a304f5ea11b9..77c1428cd945 100644
    --- a/drivers/pci/Kconfig
    +++ b/drivers/pci/Kconfig
    @@ -52,7 +52,7 @@ config PCI_MSI
               If you don't know what to do here, say Y.
    
     config PCI_MSI_IRQ_DOMAIN
    -       def_bool ARC || ARM || ARM64 || X86 || RISCV
    +       def_bool y
            depends on PCI_MSI
            select GENERIC_MSI_IRQ_DOMAIN
    
a build everywhere to see what falls out.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08 12:58 [PATCH v2] PCI/MSI: Enable PCI_MSI_IRQ_DOMAIN support for Microblaze Michal Simek
2019-10-08 15:46 ` Christoph Hellwig
2019-10-14 23:23   ` Bjorn Helgaas
2019-10-15  5:59     ` Michal Simek
2019-10-16 23:57       ` Palmer Dabbelt

Linux-RISC-V Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-riscv/0 linux-riscv/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-riscv linux-riscv/ https://lore.kernel.org/linux-riscv \
		linux-riscv@lists.infradead.org
	public-inbox-index linux-riscv

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-riscv


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git