^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifndef __BUS_NUMA_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define __BUS_NUMA_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * sub bus (transparent) will use entres from 3 to store extra from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * root, so need to make sure we have enough slot there.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) struct pci_root_res {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) struct list_head list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) struct resource res;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) struct pci_root_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) struct list_head list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) char name[12];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) struct list_head resources;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) struct resource busn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) int node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) int link;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) extern struct list_head pci_root_infos;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) struct pci_root_info *alloc_pci_root_info(int bus_min, int bus_max,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) int node, int link);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) extern void update_res(struct pci_root_info *info, resource_size_t start,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) resource_size_t end, unsigned long flags, int merge);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #endif