1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2016 SiFive
6 #ifndef _ASM_RISCV_PCI_H
7 #define _ASM_RISCV_PCI_H
9 #include <linux/types.h>
10 #include <linux/slab.h>
11 #include <linux/dma-mapping.h>
15 #if defined(CONFIG_PCI) && defined(CONFIG_NUMA)
16 static inline int pcibus_to_node(struct pci_bus *bus)
18 return dev_to_node(&bus->dev);
20 #ifndef cpumask_of_pcibus
21 #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \
23 cpumask_of_node(pcibus_to_node(bus)))
25 #endif /* defined(CONFIG_PCI) && defined(CONFIG_NUMA) */
28 #include <asm-generic/pci.h>
30 #endif /* _ASM_RISCV_PCI_H */