]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
riscv: enable generic PCI resource mapping
authorStanislaw Kardach <kda@semihalf.com>
Mon, 12 Apr 2021 11:10:12 +0000 (13:10 +0200)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Wed, 26 May 2021 05:50:49 +0000 (22:50 -0700)
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>
arch/riscv/include/asm/pci.h

index 658e112c3ce73bcbce10e627400426ec41c8daec..7fd52a30e6058e040443860e59eb297794d090a8 100644 (file)
@@ -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