#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/acpi.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/kref.h>
#include <linux/interrupt.h>
#include <linux/debugfs.h>
#include <acpi/apei.h>
#include <linux/unaligned.h>
#include "apei-internal.h"
#define APEI_PFX …
#define APEI_EXEC_PRESERVE_REGISTER …
void apei_exec_ctx_init(struct apei_exec_context *ctx,
struct apei_exec_ins_type *ins_table,
u32 instructions,
struct acpi_whea_header *action_table,
u32 entries)
{ … }
EXPORT_SYMBOL_GPL(…);
int __apei_exec_read_register(struct acpi_whea_header *entry, u64 *val)
{ … }
int apei_exec_read_register(struct apei_exec_context *ctx,
struct acpi_whea_header *entry)
{ … }
EXPORT_SYMBOL_GPL(…);
int apei_exec_read_register_value(struct apei_exec_context *ctx,
struct acpi_whea_header *entry)
{ … }
EXPORT_SYMBOL_GPL(…);
int __apei_exec_write_register(struct acpi_whea_header *entry, u64 val)
{ … }
int apei_exec_write_register(struct apei_exec_context *ctx,
struct acpi_whea_header *entry)
{ … }
EXPORT_SYMBOL_GPL(…);
int apei_exec_write_register_value(struct apei_exec_context *ctx,
struct acpi_whea_header *entry)
{ … }
EXPORT_SYMBOL_GPL(…);
int apei_exec_noop(struct apei_exec_context *ctx,
struct acpi_whea_header *entry)
{ … }
EXPORT_SYMBOL_GPL(…);
int __apei_exec_run(struct apei_exec_context *ctx, u8 action,
bool optional)
{ … }
EXPORT_SYMBOL_GPL(…);
apei_exec_entry_func_t;
static int apei_exec_for_each_entry(struct apei_exec_context *ctx,
apei_exec_entry_func_t func,
void *data,
int *end)
{ … }
static int pre_map_gar_callback(struct apei_exec_context *ctx,
struct acpi_whea_header *entry,
void *data)
{ … }
int apei_exec_pre_map_gars(struct apei_exec_context *ctx)
{ … }
EXPORT_SYMBOL_GPL(…);
static int post_unmap_gar_callback(struct apei_exec_context *ctx,
struct acpi_whea_header *entry,
void *data)
{ … }
int apei_exec_post_unmap_gars(struct apei_exec_context *ctx)
{ … }
EXPORT_SYMBOL_GPL(…);
struct apei_res { … };
static struct apei_resources apei_resources_all = …;
static int apei_res_add(struct list_head *res_list,
unsigned long start, unsigned long size)
{ … }
static int apei_res_sub(struct list_head *res_list1,
struct list_head *res_list2)
{ … }
static void apei_res_clean(struct list_head *res_list)
{ … }
void apei_resources_fini(struct apei_resources *resources)
{ … }
EXPORT_SYMBOL_GPL(…);
static int apei_resources_merge(struct apei_resources *resources1,
struct apei_resources *resources2)
{ … }
int apei_resources_add(struct apei_resources *resources,
unsigned long start, unsigned long size,
bool iomem)
{ … }
EXPORT_SYMBOL_GPL(…);
int apei_resources_sub(struct apei_resources *resources1,
struct apei_resources *resources2)
{ … }
EXPORT_SYMBOL_GPL(…);
static int apei_get_res_callback(__u64 start, __u64 size, void *data)
{ … }
static int apei_get_nvs_resources(struct apei_resources *resources)
{ … }
int (*arch_apei_filter_addr)(int (*func)(__u64 start, __u64 size,
void *data), void *data);
static int apei_get_arch_resources(struct apei_resources *resources)
{ … }
int apei_resources_request(struct apei_resources *resources,
const char *desc)
{ … }
EXPORT_SYMBOL_GPL(…);
void apei_resources_release(struct apei_resources *resources)
{ … }
EXPORT_SYMBOL_GPL(…);
static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr,
u32 *access_bit_width)
{ … }
int apei_map_generic_address(struct acpi_generic_address *reg)
{ … }
EXPORT_SYMBOL_GPL(…);
int apei_read(u64 *val, struct acpi_generic_address *reg)
{ … }
EXPORT_SYMBOL_GPL(…);
int apei_write(u64 val, struct acpi_generic_address *reg)
{ … }
EXPORT_SYMBOL_GPL(…);
static int collect_res_callback(struct apei_exec_context *ctx,
struct acpi_whea_header *entry,
void *data)
{ … }
int apei_exec_collect_resources(struct apei_exec_context *ctx,
struct apei_resources *resources)
{ … }
EXPORT_SYMBOL_GPL(…);
struct dentry *apei_get_debugfs_dir(void)
{ … }
EXPORT_SYMBOL_GPL(…);
int __weak arch_apei_enable_cmcff(struct acpi_hest_header *hest_hdr,
void *data)
{ … }
EXPORT_SYMBOL_GPL(…);
void __weak arch_apei_report_mem_error(int sev,
struct cper_sec_mem_err *mem_err)
{ … }
EXPORT_SYMBOL_GPL(…);
int apei_osc_setup(void)
{ … }
EXPORT_SYMBOL_GPL(…);