blob: 697dd841b118acac57187ff0560fa842f7fa466d [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Yinghai Lu284f9332010-02-10 01:20:12 -08002#ifndef __BUS_NUMA_H
3#define __BUS_NUMA_H
Yinghai Lu99935a72009-10-04 21:54:24 -07004/*
5 * sub bus (transparent) will use entres from 3 to store extra from
Bjorn Helgaas2fe2abf2010-02-23 10:24:36 -07006 * root, so need to make sure we have enough slot there.
Yinghai Lu99935a72009-10-04 21:54:24 -07007 */
Yinghai Lud28e5ac2012-04-02 18:31:54 -07008struct pci_root_res {
9 struct list_head list;
10 struct resource res;
11};
12
Yinghai Lu99935a72009-10-04 21:54:24 -070013struct pci_root_info {
Yinghai Lud28e5ac2012-04-02 18:31:54 -070014 struct list_head list;
Yinghai Lu99935a72009-10-04 21:54:24 -070015 char name[12];
Yinghai Lud28e5ac2012-04-02 18:31:54 -070016 struct list_head resources;
Yinghai Lua10bb122012-05-17 18:51:12 -070017 struct resource busn;
Yinghai Lu99935a72009-10-04 21:54:24 -070018 int node;
19 int link;
20};
21
Yinghai Lud28e5ac2012-04-02 18:31:54 -070022extern struct list_head pci_root_infos;
23struct pci_root_info *alloc_pci_root_info(int bus_min, int bus_max,
24 int node, int link);
Yinghai Lub74fd232010-02-10 01:20:08 -080025extern void update_res(struct pci_root_info *info, resource_size_t start,
26 resource_size_t end, unsigned long flags, int merge);
Yinghai Lu99935a72009-10-04 21:54:24 -070027#endif