All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] riscv: enable generic PCI resource mapping
@ 2021-05-23 22:24 Palmer Dabbelt
  0 siblings, 0 replies; only message in thread
From: Palmer Dabbelt @ 2021-05-23 22:24 UTC (permalink / raw)
  To: linux-riscv, kda, david.abdurachmanov; +Cc: Palmer Dabbelt

From: Stanislaw Kardach <kda@semihalf.com>

Enable the PCI resource mapping on RISC-V using the generic framework.
This allows userspace applications to mmap PCI resources using
/sys/devices/pci*/*/resource* interface.
The mmap has been tested with Intel x520-DA2 NIC card on a HiFive
Unmatched board (SiFive FU740 SoC).

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
---
David, who was CC'd on the original patch, pointed out I missed this one.  For
some reason it's not in my inbox, I'm not entirely sure why as it landed on
lore:
https://lore.kernel.org/linux-riscv/20210412111012.675957-1-kda@semihalf.com/ .
Given the discrepency I thought it would be best to just send this out again.

I've put this on for-next.

Thanks!
---
 arch/riscv/include/asm/pci.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/riscv/include/asm/pci.h b/arch/riscv/include/asm/pci.h
index 658e112c3ce7..7fd52a30e605 100644
--- a/arch/riscv/include/asm/pci.h
+++ b/arch/riscv/include/asm/pci.h
@@ -18,6 +18,8 @@
 /* RISC-V shim does not initialize PCI bus */
 #define pcibios_assign_all_busses() 1
 
+#define ARCH_GENERIC_PCI_MMAP_RESOURCE 1
+
 extern int isa_dma_bridge_buggy;
 
 #ifdef CONFIG_PCI
-- 
2.31.1.818.g46aad6cb9e-goog


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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-24 17:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-23 22:24 [PATCH RESEND] riscv: enable generic PCI resource mapping Palmer Dabbelt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.