summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_cper.h
blob: 89fb8432f0279e64de7e1a9937d9999a73167ba2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* SPDX-License-Identifier: MIT */
/*
 * Copyright © 2026 Intel Corporation
 */

#ifndef _XE_CPER_H_
#define _XE_CPER_H_

#include <linux/types.h>

#include "abi/xe_sigid_abi.h"

struct va_format;
struct xe_device;
struct xe_ras_error_class;
struct xe_ras_get_counter_response;

#if IS_ENABLED(CONFIG_UEFI_CPER)
void xe_cper_emit(struct xe_device *xe, int cper_sev, enum xe_sigid sigid,
		  u32 component, u32 location, const void *data, size_t len,
		  struct va_format *vaf);
void xe_cper_emit_counter(struct xe_device *xe, int cper_sev, enum xe_sigid sigid,
			  const struct xe_ras_error_class *counter,
			  const struct xe_ras_get_counter_response *response);
int xe_cper_sysfs_init(struct xe_device *xe);
#else
static inline void xe_cper_emit(struct xe_device *xe, int cper_sev, enum xe_sigid sigid,
				u32 component, u32 location, const void *data, size_t len,
				struct va_format *vaf) {}
static inline void xe_cper_emit_counter(struct xe_device *xe, int cper_sev,
					enum xe_sigid sigid,
					const struct xe_ras_error_class *counter,
					const struct xe_ras_get_counter_response *response) {}
static inline int xe_cper_sysfs_init(struct xe_device *xe) { return 0; }
#endif

#endif /* _XE_CPER_H_ */