linux/arch/x86/kernel/apic/x2apic_uv_x.c

/*
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * SGI UV APIC functions (note: not an Intel compatible APIC)
 *
 * (C) Copyright 2020 Hewlett Packard Enterprise Development LP
 * Copyright (C) 2007-2014 Silicon Graphics, Inc. All rights reserved.
 */
#include <linux/crash_dump.h>
#include <linux/cpuhotplug.h>
#include <linux/cpumask.h>
#include <linux/proc_fs.h>
#include <linux/memory.h>
#include <linux/export.h>
#include <linux/pci.h>
#include <linux/acpi.h>
#include <linux/efi.h>

#include <asm/e820/api.h>
#include <asm/uv/uv_mmrs.h>
#include <asm/uv/uv_hub.h>
#include <asm/uv/bios.h>
#include <asm/uv/uv.h>
#include <asm/apic.h>

#include "local.h"

static enum uv_system_type	uv_system_type;
static int			uv_hubbed_system;
static int			uv_hubless_system;
static u64			gru_start_paddr, gru_end_paddr;
static union uvh_apicid		uvh_apicid;
static int			uv_node_id;

/* Unpack AT/OEM/TABLE ID's to be NULL terminated strings */
static u8 uv_archtype[UV_AT_SIZE + 1];
static u8 oem_id[ACPI_OEM_ID_SIZE + 1];
static u8 oem_table_id[ACPI_OEM_TABLE_ID_SIZE + 1];

/* Information derived from CPUID and some UV MMRs */
static struct {} uv_cpuid;

static int uv_min_hub_revision_id;

static struct apic apic_x2apic_uv_x;
static struct uv_hub_info_s uv_hub_info_node0;

/* Set this to use hardware error handler instead of kernel panic: */
static int disable_uv_undefined_panic =;

unsigned long uv_undefined(char *str)
{}
EXPORT_SYMBOL();

static unsigned long __init uv_early_read_mmr(unsigned long addr)
{}

static inline bool is_GRU_range(u64 start, u64 end)
{}

static bool uv_is_untracked_pat_range(u64 start, u64 end)
{}

static void __init early_get_pnodeid(void)
{}

/* Running on a UV Hubbed system, determine which UV Hub Type it is */
static int __init early_set_hub_type(void)
{}

static void __init uv_tsc_check_sync(void)
{}

/* Selector for (4|4A|5) structs */
#define uvxy_field(sname, field, undef)

static void __init early_get_apic_socketid_shift(void)
{}

static void __init uv_stringify(int len, char *to, char *from)
{}

/* Find UV arch type entry in UVsystab */
static unsigned long __init early_find_archtype(struct uv_systab *st)
{}

/* Validate UV arch type field in UVsystab */
static int __init decode_arch_type(unsigned long ptr)
{}

/* Determine if UV arch type entry might exist in UVsystab */
static int __init early_get_arch_type(void)
{}

/* UV system found, check which APIC MODE BIOS already selected */
static void __init early_set_apic_mode(void)
{}

static int __init uv_set_system_type(char *_oem_id, char *_oem_table_id)
{}

/* Called early to probe for the correct APIC driver */
static int __init uv_acpi_madt_oem_check(char *_oem_id, char *_oem_table_id)
{}

enum uv_system_type get_uv_system_type(void)
{}

int uv_get_hubless_system(void)
{}
EXPORT_SYMBOL_GPL();

ssize_t uv_get_archtype(char *buf, int len)
{}
EXPORT_SYMBOL_GPL();

int is_uv_system(void)
{}
EXPORT_SYMBOL_GPL();

int is_uv_hubbed(int uvtype)
{}
EXPORT_SYMBOL_GPL();

static int is_uv_hubless(int uvtype)
{}

void **__uv_hub_info_list;
EXPORT_SYMBOL_GPL();

DEFINE_PER_CPU(struct uv_cpu_info_s, __uv_cpu_info);
EXPORT_PER_CPU_SYMBOL_GPL();

short uv_possible_blades;
EXPORT_SYMBOL_GPL();

unsigned long sn_rtc_cycles_per_second;
EXPORT_SYMBOL();

/* The following values are used for the per node hub info struct */
static __initdata unsigned short		_min_socket, _max_socket;
static __initdata unsigned short		_min_pnode, _max_pnode, _gr_table_len;
static __initdata struct uv_gam_range_entry	*uv_gre_table;
static __initdata struct uv_gam_parameters	*uv_gp_table;
static __initdata unsigned short		*_socket_to_node;
static __initdata unsigned short		*_socket_to_pnode;
static __initdata unsigned short		*_pnode_to_socket;
static __initdata unsigned short		*_node_to_socket;

static __initdata struct uv_gam_range_s		*_gr_table;

#define SOCK_EMPTY

/* Default UV memory block size is 2GB */
static unsigned long mem_block_size __initdata =;

/* Kernel parameter to specify UV mem block size */
static int __init parse_mem_block_size(char *ptr)
{}
early_param();

static __init int adj_blksize(u32 lgre)
{}

static __init void set_block_size(void)
{}

/* Build GAM range lookup table: */
static __init void build_uv_gr_table(void)
{}

static int uv_wakeup_secondary(u32 phys_apicid, unsigned long start_rip)
{}

static void uv_send_IPI_one(int cpu, int vector)
{}

static void uv_send_IPI_mask(const struct cpumask *mask, int vector)
{}

static void uv_send_IPI_mask_allbutself(const struct cpumask *mask, int vector)
{}

static void uv_send_IPI_allbutself(int vector)
{}

static void uv_send_IPI_all(int vector)
{}

static int uv_probe(void)
{}

static struct apic apic_x2apic_uv_x __ro_after_init =;

#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_LENGTH
#define DEST_SHIFT

static __init void get_lowmem_redirect(unsigned long *base, unsigned long *size)
{}

enum map_type {};
static const char * const mt[] =;

static __init void map_high(char *id, unsigned long base, int pshift, int bshift, int max_pnode, enum map_type map_type)
{}

static __init void map_gru_high(int max_pnode)
{}

static __init void map_mmr_high(int max_pnode)
{}

/* Arch specific ENUM cases */
enum mmioh_arch {};

/* Calculate and Map MMIOH Regions */
static void __init calc_mmioh_map(enum mmioh_arch index,
	int min_pnode, int max_pnode,
	int shift, unsigned long base, int m_io, int n_io)
{}

static __init void map_mmioh_high(int min_pnode, int max_pnode)
{}

static __init void map_low_mmrs(void)
{}

static __init void uv_rtc_init(void)
{}

/* Direct Legacy VGA I/O traffic to designated IOH */
static int uv_set_vga_state(struct pci_dev *pdev, bool decode, unsigned int command_bits, u32 flags)
{}

/*
 * Called on each CPU to initialize the per_cpu UV data area.
 * FIXME: hotplug not supported yet
 */
void uv_cpu_init(void)
{}

struct mn {};

/* Initialize caller's MN struct and fill in values */
static void get_mn(struct mn *mnp)
{}

static void __init uv_init_hub_info(struct uv_hub_info_s *hi)
{}

static void __init decode_gam_params(unsigned long ptr)
{}

static void __init decode_gam_rng_tbl(unsigned long ptr)
{}

/* Walk through UVsystab decoding the fields */
static int __init decode_uv_systab(void)
{}

/*
 * Given a bitmask 'bits' representing presnt blades, numbered
 * starting at 'base', masking off unused high bits of blade number
 * with 'mask', update the minimum and maximum blade numbers that we
 * have found.  (Masking with 'mask' necessary because of BIOS
 * treatment of system partitioning when creating this table we are
 * interpreting.)
 */
static inline void blade_update_min_max(unsigned long bits, int base, int mask, int *min, int *max)
{}

/* Set up physical blade translations from UVH_NODE_PRESENT_TABLE */
static __init void boot_init_possible_blades(struct uv_hub_info_s *hub_info)
{}

static int __init alloc_conv_table(int num_elem, unsigned short **table)
{}

/* Remove conversion table if it's 1:1 */
#define FREE_1_TO_1_TABLE(tbl, min, max, max2)

static void __init free_1_to_1_table(unsigned short **tp, char *tname, int min, int max, int max2)
{}

/*
 * Build Socket Tables
 * If the number of nodes is >1 per socket, socket to node table will
 * contain lowest node number on that socket.
 */
static void __init build_socket_tables(void)
{}

/* Check which reboot to use */
static void check_efi_reboot(void)
{}

/*
 * User proc fs file handling now deprecated.
 * Recommend using /sys/firmware/sgi_uv/... instead.
 */
static int __maybe_unused proc_hubbed_show(struct seq_file *file, void *data)
{}

static int __maybe_unused proc_hubless_show(struct seq_file *file, void *data)
{}

static int __maybe_unused proc_archtype_show(struct seq_file *file, void *data)
{}

static __init void uv_setup_proc_files(int hubless)
{}

/* Initialize UV hubless systems */
static __init int uv_system_init_hubless(void)
{}

static void __init uv_system_init_hub(void)
{}

/*
 * There is a different code path needed to initialize a UV system that does
 * not have a "UV HUB" (referred to as "hubless").
 */
void __init uv_system_init(void)
{}

apic_driver();