Merge tag '9p-for-5.20' of https://github.com/martinetd/linux
[linux-2.6-microblaze.git] / arch / riscv / include / asm / pci.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (C) 2016 SiFive
4  */
5
6 #ifndef _ASM_RISCV_PCI_H
7 #define _ASM_RISCV_PCI_H
8
9 #include <linux/types.h>
10 #include <linux/slab.h>
11 #include <linux/dma-mapping.h>
12
13 #include <asm/io.h>
14
15 #if defined(CONFIG_PCI) && defined(CONFIG_NUMA)
16 static inline int pcibus_to_node(struct pci_bus *bus)
17 {
18         return dev_to_node(&bus->dev);
19 }
20 #ifndef cpumask_of_pcibus
21 #define cpumask_of_pcibus(bus)  (pcibus_to_node(bus) == -1 ?            \
22                                  cpu_all_mask :                         \
23                                  cpumask_of_node(pcibus_to_node(bus)))
24 #endif
25 #endif /* defined(CONFIG_PCI) && defined(CONFIG_NUMA) */
26
27 /* Generic PCI */
28 #include <asm-generic/pci.h>
29
30 #endif  /* _ASM_RISCV_PCI_H */