1 From bdc2e9572166f05c1e7c250f2b862449cc34ed55 Mon Sep 17 00:00:00 2001
2 From: Stanislaw Kardach <kda@semihalf.com>
3 Date: Mon, 12 Apr 2021 13:10:12 +0200
4 Subject: [PATCH 21/23] riscv: enable generic PCI resource mapping
6 Enable the PCI resource mapping on RISC-V using the generic framework.
7 This allows userspace applications to mmap PCI resources using
8 /sys/devices/pci*/*/resource* interface.
9 The mmap has been tested with Intel x520-DA2 NIC card on a HiFive
10 Unmatched board (SiFive FU740 SoC).
12 Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
14 arch/riscv/include/asm/pci.h | 2 ++
15 1 file changed, 2 insertions(+)
17 diff --git a/arch/riscv/include/asm/pci.h b/arch/riscv/include/asm/pci.h
18 index 658e112..7fd52a3 100644
19 --- a/arch/riscv/include/asm/pci.h
20 +++ b/arch/riscv/include/asm/pci.h
22 /* RISC-V shim does not initialize PCI bus */
23 #define pcibios_assign_all_busses() 1
25 +#define ARCH_GENERIC_PCI_MMAP_RESOURCE 1
27 extern int isa_dma_bridge_buggy;