linux/drivers/acpi/numa/hmat.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2019, Intel Corporation.
 *
 * Heterogeneous Memory Attributes Table (HMAT) representation
 *
 * This program parses and reports the platform's HMAT tables, and registers
 * the applicable attributes with the node's interfaces.
 */

#define pr_fmt(fmt)

#include <linux/acpi.h>
#include <linux/bitops.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/list.h>
#include <linux/mm.h>
#include <linux/platform_device.h>
#include <linux/list_sort.h>
#include <linux/memregion.h>
#include <linux/memory.h>
#include <linux/mutex.h>
#include <linux/node.h>
#include <linux/sysfs.h>
#include <linux/dax.h>
#include <linux/memory-tiers.h>

static u8 hmat_revision;
static int hmat_disable __initdata;

void __init disable_hmat(void)
{}

static LIST_HEAD(targets);
static LIST_HEAD(initiators);
static LIST_HEAD(localities);

static DEFINE_MUTEX(target_lock);

/*
 * The defined enum order is used to prioritize attributes to break ties when
 * selecting the best performing node.
 */
enum locality_types {};

static struct memory_locality *localities_types[4];

struct target_cache {};

enum {};

struct memory_target {};

struct memory_initiator {};

struct memory_locality {};

static struct memory_initiator *find_mem_initiator(unsigned int cpu_pxm)
{}

static struct memory_target *find_mem_target(unsigned int mem_pxm)
{}

static struct memory_target *acpi_find_genport_target(u32 uid)
{}

/**
 * acpi_get_genport_coordinates - Retrieve the access coordinates for a generic port
 * @uid: ACPI unique id
 * @coord: The access coordinates written back out for the generic port.
 *	   Expect 2 levels array.
 *
 * Return: 0 on success. Errno on failure.
 *
 * Only supports device handles that are ACPI. Assume ACPI0016 HID for CXL.
 */
int acpi_get_genport_coordinates(u32 uid,
				 struct access_coordinate *coord)
{}
EXPORT_SYMBOL_NS_GPL();

static __init void alloc_memory_initiator(unsigned int cpu_pxm)
{}

static __init struct memory_target *alloc_target(unsigned int mem_pxm)
{}

static __init void alloc_memory_target(unsigned int mem_pxm,
				       resource_size_t start,
				       resource_size_t len)
{}

static __init void alloc_genport_target(unsigned int mem_pxm, u8 *handle)
{}

static __init const char *hmat_data_type(u8 type)
{}

static __init const char *hmat_data_type_suffix(u8 type)
{}

static u32 hmat_normalize(u16 entry, u64 base, u8 type)
{}

static void hmat_update_target_access(struct memory_target *target,
				      u8 type, u32 value, int access)
{}

int hmat_update_target_coordinates(int nid, struct access_coordinate *coord,
				   enum access_coordinate_class access)
{}
EXPORT_SYMBOL_GPL();

static __init void hmat_add_locality(struct acpi_hmat_locality *hmat_loc)
{}

static __init void hmat_update_target(unsigned int tgt_pxm, unsigned int init_pxm,
				      u8 mem_hier, u8 type, u32 value)
{}

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

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

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

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

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

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

static u32 hmat_initiator_perf(struct memory_target *target,
			       struct memory_initiator *initiator,
			       struct acpi_hmat_locality *hmat_loc)
{}

static bool hmat_update_best(u8 type, u32 value, u32 *best)
{}

static int initiator_cmp(void *priv, const struct list_head *a,
			 const struct list_head *b)
{}

static int initiators_to_nodemask(unsigned long *p_nodes)
{}

static void hmat_update_target_attrs(struct memory_target *target,
				     unsigned long *p_nodes, int access)
{}

static void __hmat_register_target_initiators(struct memory_target *target,
					      unsigned long *p_nodes,
					      int access)
{}

static void hmat_update_generic_target(struct memory_target *target)
{}

static void hmat_register_target_initiators(struct memory_target *target)
{}

static void hmat_register_target_cache(struct memory_target *target)
{}

static void hmat_register_target_perf(struct memory_target *target, int access)
{}

static void hmat_register_target_devices(struct memory_target *target)
{}

static void hmat_register_target(struct memory_target *target)
{}

static void hmat_register_targets(void)
{}

static int hmat_callback(struct notifier_block *self,
			 unsigned long action, void *arg)
{}

static int __init hmat_set_default_dram_perf(void)
{}

static int hmat_calculate_adistance(struct notifier_block *self,
				    unsigned long nid, void *data)
{}

static struct notifier_block hmat_adist_nb __meminitdata =;

static __init void hmat_free_structures(void)
{}

static __init int hmat_init(void)
{}
subsys_initcall(hmat_init);