JFIF$        dd7 

Viewing File: /usr/src/kernels/5.14.0-570.32.1.el9_6.x86_64/include/linux/arm_sdei.h

// SPDX-License-Identifier: GPL-2.0
// Copyright (C) 2017 Arm Ltd.
#ifndef __LINUX_ARM_SDEI_H
#define __LINUX_ARM_SDEI_H

#include <uapi/linux/arm_sdei.h>

#include <acpi/ghes.h>

#ifdef CONFIG_ARM_SDE_INTERFACE
#include <asm/sdei.h>
#endif

/* Arch code should override this to set the entry point from firmware... */
#ifndef sdei_arch_get_entry_point
#define sdei_arch_get_entry_point(conduit)	(0)
#endif

/*
 * When an event occurs sdei_event_handler() will call a user-provided callback
 * like this in NMI context on the CPU that received the event.
 */
typedef int (sdei_event_callback)(u32 event, struct pt_regs *regs, void *arg);

/*
 * Register your callback to claim an event. The event must be described
 * by firmware.
 */
int sdei_event_register(u32 event_num, sdei_event_callback *cb, void *arg);

/*
 * Calls to sdei_event_unregister() may return EINPROGRESS. Keep calling
 * it until it succeeds.
 */
int sdei_event_unregister(u32 event_num);

int sdei_event_enable(u32 event_num);
int sdei_event_disable(u32 event_num);

/* GHES register/unregister helpers */
int sdei_register_ghes(struct ghes *ghes, sdei_event_callback *normal_cb,
		       sdei_event_callback *critical_cb);
int sdei_unregister_ghes(struct ghes *ghes);

#ifdef CONFIG_ARM_SDE_INTERFACE
/* For use by arch code when CPU hotplug notifiers are not appropriate. */
int sdei_mask_local_cpu(void);
int sdei_unmask_local_cpu(void);
void sdei_handler_abort(void);
void __init sdei_init(void);
#else
static inline int sdei_mask_local_cpu(void) { return 0; }
static inline int sdei_unmask_local_cpu(void) { return 0; }
static inline void sdei_handler_abort(void) { }
static inline void sdei_init(void) { }
#endif /* CONFIG_ARM_SDE_INTERFACE */


/*
 * This struct represents an event that has been registered. The driver
 * maintains a list of all events, and which ones are registered. (Private
 * events have one entry in the list, but are registered on each CPU).
 * A pointer to this struct is passed to firmware, and back to the event
 * handler. The event handler can then use this to invoke the registered
 * callback, without having to walk the list.
 *
 * For CPU private events, this structure is per-cpu.
 */
struct sdei_registered_event {
	/* For use by arch code: */
	struct pt_regs          interrupted_regs;

	sdei_event_callback	*callback;
	void			*callback_arg;
	u32			 event_num;
	u8			 priority;
};

/* The arch code entry point should then call this when an event arrives. */
int notrace sdei_event_handler(struct pt_regs *regs,
			       struct sdei_registered_event *arg);

/* arch code may use this to retrieve the extra registers. */
int sdei_api_event_context(u32 query, u64 *result);

#endif /* __LINUX_ARM_SDEI_H */
Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF<_W ԣsKcëIzyQy/_LKℂ;C",pFA:/]=H  ~,ls/9ć:[=/#f;)x{ٛEQ )~ =𘙲r*2~ a _V=' kumFD}KYYC)({ *g&f`툪ry`=^cJ.I](*`wq1dđ#̩͑0;H]u搂@:~וKL Nsh}OIR*8:2 !lDJVo(3=M(zȰ+i*NAr6KnSl)!JJӁ* %݉?|D}d5:eP0R;{$X'xF@.ÊB {,WJuQɲRI;9QE琯62fT.DUJ;*cP A\ILNj!J۱+O\͔]ޒS߼Jȧc%ANolՎprULZԛerE2=XDXgVQeӓk yP7U*omQIs,K`)6\G3t?pgjrmۛجwluGtfh9uyP0D;Uڽ"OXlif$)&|ML0Zrm1[HXPlPR0'G=i2N+0e2]]9VTPO׮7h(F*癈'=QVZDF,d߬~TX G[`le69CR(!S2!P <0x<!1AQ "Raq02Br#SCTb ?Ζ"]mH5WR7k.ۛ!}Q~+yԏz|@T20S~Kek *zFf^2X*(@8r?CIuI|֓>^ExLgNUY+{.RѪ τV׸YTD I62'8Y27'\TP.6d&˦@Vqi|8-OΕ]ʔ U=TL8=;6c| !qfF3aů&~$l}'NWUs$Uk^SV:U# 6w++s&r+nڐ{@29 gL u"TÙM=6(^"7r}=6YݾlCuhquympǦ GjhsǜNlɻ}o7#S6aw4!OSrD57%|?x>L |/nD6?/8w#[)L7+6〼T ATg!%5MmZ/c-{1_Je"|^$'O&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