From: Stanislaw Kardach Date: Mon, 12 Apr 2021 11:10:12 +0000 (+0200) Subject: riscv: enable generic PCI resource mapping X-Git-Tag: v5.14-rc1~32^2~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db756746807b5cb64bbe2e6ac4ff38d18b7787ed;p=thirdparty%2Flinux.git riscv: enable generic PCI resource mapping 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 Signed-off-by: Palmer Dabbelt --- diff --git a/arch/riscv/include/asm/pci.h b/arch/riscv/include/asm/pci.h index 658e112c3ce73..7fd52a30e6058 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