Converted bridge code to a platform driver using the PCI generic driver framework and use adding platform devices during xtalk scan. This allows easier sharing bridge driver for other SGI platforms like IP30 (Octane) and IP35 (Origin 3k, Fuel, Tezro). Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de> [paul.burton@mips.com: - Leave __phys_to_dma(), __dma_to_phys() & pcibus_to_node() in arch/mips/pci/pci-ip27.c since the motivation for moving them disappeared when the driver stopped being moved to drivers/pci.] Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: James Hogan <jhogan@kernel.org> Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org
33 lines
934 B
C
33 lines
934 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_MACH_TOPOLOGY_H
|
|
#define _ASM_MACH_TOPOLOGY_H 1
|
|
|
|
#include <asm/sn/hub.h>
|
|
#include <asm/sn/types.h>
|
|
#include <asm/mmzone.h>
|
|
|
|
struct cpuinfo_ip27 {
|
|
cnodeid_t p_nodeid; /* my node ID in compact-id-space */
|
|
nasid_t p_nasid; /* my node ID in numa-as-id-space */
|
|
unsigned char p_slice; /* Physical position on node board */
|
|
};
|
|
|
|
extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
|
|
|
|
#define cpu_to_node(cpu) (sn_cpu_info[(cpu)].p_nodeid)
|
|
#define cpumask_of_node(node) ((node) == -1 ? \
|
|
cpu_all_mask : \
|
|
&hub_data(node)->h_cpus)
|
|
struct pci_bus;
|
|
extern int pcibus_to_node(struct pci_bus *);
|
|
|
|
#define cpumask_of_pcibus(bus) (cpumask_of_node(pcibus_to_node(bus)))
|
|
|
|
extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
|
|
|
|
#define node_distance(from, to) (__node_distances[(from)][(to)])
|
|
|
|
#include <asm-generic/topology.h>
|
|
|
|
#endif /* _ASM_MACH_TOPOLOGY_H */
|