Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * apei.h - ACPI Platform Error Interface
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) #ifndef ACPI_APEI_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) #define ACPI_APEI_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #include <linux/acpi.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/cper.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <asm/ioctls.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #define APEI_ERST_INVALID_RECORD_ID	0xffffffffffffffffULL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #define APEI_ERST_CLEAR_RECORD		_IOW('E', 1, u64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #define APEI_ERST_GET_RECORD_COUNT	_IOR('E', 2, u32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #ifdef __KERNEL__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) enum hest_status {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 	HEST_ENABLED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 	HEST_DISABLED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 	HEST_NOT_FOUND,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) extern int hest_disable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) extern int erst_disable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #ifdef CONFIG_ACPI_APEI_GHES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) extern bool ghes_disable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) #define ghes_disable 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #ifdef CONFIG_ACPI_APEI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) void __init acpi_hest_init(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) static inline void acpi_hest_init(void) { return; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) typedef int (*apei_hest_func_t)(struct acpi_hest_header *hest_hdr, void *data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) int apei_hest_parse(apei_hest_func_t func, void *data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) int erst_write(const struct cper_record_header *record);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) ssize_t erst_get_record_count(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) int erst_get_record_id_begin(int *pos);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) int erst_get_record_id_next(int *pos, u64 *record_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) void erst_get_record_id_end(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) ssize_t erst_read(u64 record_id, struct cper_record_header *record,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 		  size_t buflen);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) int erst_clear(u64 record_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) int arch_apei_enable_cmcff(struct acpi_hest_header *hest_hdr, void *data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) void arch_apei_report_mem_error(int sev, struct cper_sec_mem_err *mem_err);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) #endif