linux/drivers/acpi/numa/srat.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  acpi_numa.c - ACPI NUMA support
 *
 *  Copyright (C) 2002 Takayoshi Kochi <[email protected]>
 */

#define pr_fmt(fmt)

#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/acpi.h>
#include <linux/memblock.h>
#include <linux/numa.h>
#include <linux/nodemask.h>
#include <linux/topology.h>
#include <linux/numa_memblks.h>

static nodemask_t nodes_found_map =;

/* maps to convert between proximity domain and logical node ID */
static int pxm_to_node_map[MAX_PXM_DOMAINS]
			=;
static int node_to_pxm_map[MAX_NUMNODES]
			=;

unsigned char acpi_srat_revision __initdata;
static int acpi_numa __initdata;

static int last_real_pxm;

void __init disable_srat(void)
{}

int pxm_to_node(int pxm)
{}
EXPORT_SYMBOL();

int node_to_pxm(int node)
{}

static void __acpi_map_pxm_to_node(int pxm, int node)
{}

int acpi_map_pxm_to_node(int pxm)
{}
EXPORT_SYMBOL();

static void __init
acpi_table_print_srat_entry(struct acpi_subtable_header *header)
{}

/*
 * A lot of BIOS fill in 10 (= no distance) everywhere. This messes
 * up the NUMA heuristics which wants the local node to have a smaller
 * distance than the others.
 * Do some quick checks here and only use the SLIT if it passes.
 */
static int __init slit_valid(struct acpi_table_slit *slit)
{}

void __init bad_srat(void)
{}

int __init srat_disabled(void)
{}

__weak int __init numa_fill_memblks(u64 start, u64 end)
{}

/*
 * Callback for SLIT parsing.  pxm_to_node() returns NUMA_NO_NODE for
 * I/O localities since SRAT does not list them.  I/O localities are
 * not supported at this point.
 */
static int __init acpi_parse_slit(struct acpi_table_header *table)
{}

static int parsed_numa_memblks __initdata;

static int __init
acpi_parse_memory_affinity(union acpi_subtable_headers *header,
			   const unsigned long table_end)
{}

static int __init acpi_parse_cfmws(union acpi_subtable_headers *header,
				   void *arg, const unsigned long table_end)
{}

void __init __weak
acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa)
{}

static int __init
acpi_parse_x2apic_affinity(union acpi_subtable_headers *header,
			   const unsigned long end)
{}

static int __init
acpi_parse_processor_affinity(union acpi_subtable_headers *header,
			      const unsigned long end)
{}

static int __init
acpi_parse_gicc_affinity(union acpi_subtable_headers *header,
			 const unsigned long end)
{}

#if defined(CONFIG_X86) || defined(CONFIG_ARM64)
static int __init
acpi_parse_gi_affinity(union acpi_subtable_headers *header,
		       const unsigned long end)
{}
#else
static int __init
acpi_parse_gi_affinity(union acpi_subtable_headers *header,
		       const unsigned long end)
{
	return 0;
}
#endif /* defined(CONFIG_X86) || defined (CONFIG_ARM64) */

static int __init
acpi_parse_rintc_affinity(union acpi_subtable_headers *header,
			  const unsigned long end)
{}

static int __init acpi_parse_srat(struct acpi_table_header *table)
{}

static int __init
acpi_table_parse_srat(enum acpi_srat_type id,
		      acpi_tbl_entry_handler handler, unsigned int max_entries)
{}

int __init acpi_numa_init(void)
{}

bool acpi_node_backed_by_real_pxm(int nid)
{}
EXPORT_SYMBOL_GPL();

static int acpi_get_pxm(acpi_handle h)
{}

int acpi_get_node(acpi_handle handle)
{}
EXPORT_SYMBOL();