JFIF$        dd7 

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

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Intel(R) Trace Hub data structures for implementing buffer sinks.
 *
 * Copyright (C) 2019 Intel Corporation.
 */

#ifndef _INTEL_TH_H_
#define _INTEL_TH_H_

#include <linux/scatterlist.h>

/* MSC operating modes (MSC_MODE) */
enum {
	MSC_MODE_SINGLE	= 0,
	MSC_MODE_MULTI,
	MSC_MODE_EXI,
	MSC_MODE_DEBUG,
};

struct msu_buffer {
	const char	*name;
	/*
	 * ->assign() called when buffer 'mode' is set to this driver
	 *   (aka mode_store())
	 * @device:	struct device * of the msc
	 * @mode:	allows the driver to set HW mode (see the enum above)
	 * Returns:	a pointer to a private structure associated with this
	 *		msc or NULL in case of error. This private structure
	 *		will then be passed into all other callbacks.
	 */
	void	*(*assign)(struct device *dev, int *mode);
	/* ->unassign():	some other mode is selected, clean up */
	void	(*unassign)(void *priv);
	/*
	 * ->alloc_window(): allocate memory for the window of a given
	 *		size
	 * @sgt:	pointer to sg_table, can be overridden by the buffer
	 *		driver, or kept intact
	 * Returns:	number of sg table entries <= number of pages;
	 *		0 is treated as an allocation failure.
	 */
	int	(*alloc_window)(void *priv, struct sg_table **sgt,
				size_t size);
	void	(*free_window)(void *priv, struct sg_table *sgt);
	/* ->activate():	trace has started */
	void	(*activate)(void *priv);
	/* ->deactivate():	trace is about to stop */
	void	(*deactivate)(void *priv);
	/*
	 * ->ready():	window @sgt is filled up to the last block OR
	 *		tracing is stopped by the user; this window contains
	 *		@bytes data. The window in question transitions into
	 *		the "LOCKED" state, indicating that it can't be used
	 *		by hardware. To clear this state and make the window
	 *		available to the hardware again, call
	 *		intel_th_msc_window_unlock().
	 */
	int	(*ready)(void *priv, struct sg_table *sgt, size_t bytes);
};

int intel_th_msu_buffer_register(const struct msu_buffer *mbuf,
				 struct module *owner);
void intel_th_msu_buffer_unregister(const struct msu_buffer *mbuf);
void intel_th_msc_window_unlock(struct device *dev, struct sg_table *sgt);

#define module_intel_th_msu_buffer(__buffer) \
static int __init __buffer##_init(void) \
{ \
	return intel_th_msu_buffer_register(&(__buffer), THIS_MODULE); \
} \
module_init(__buffer##_init); \
static void __exit __buffer##_exit(void) \
{ \
	intel_th_msu_buffer_unregister(&(__buffer)); \
} \
module_exit(__buffer##_exit);

#endif /* _INTEL_TH_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&ޱմTrb$w)R$& N1EtdU3U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