0
     =ˆÃÏƒ!oÂÁÑ #    =/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _LINUX_SECRETMEM_H
#define _LINUX_SECRETMEM_H

#ifdef CONFIG_SECRETMEM

extern const struct address_space_operations secretmem_aops;

static inline bool folio_is_secretmem(struct folio *folio)
{
	struct address_space *mapping;

	/*
	 * Using folio_mapping() is quite slow because of the actual call
	 * instruction.
	 * We know that secretmem pages are not compound, so we can
	 * save a couple of cycles here.
	 */
	if (folio_test_large(folio))
		return false;

	mapping = (struct address_space *)
		((unsigned long)folio->mapping & ~PAGE_MAPPING_FLAGS);

	if (!mapping || mapping != folio->mapping)
		return false;

	return mapping->a_ops == &secretmem_aops;
}

static inline bool secretmem_mapping(struct address_space *mapping)
{
	return mapping->a_ops == &secretmem_aops;
}

bool vma_is_secretmem(struct vm_area_struct *vma);
bool secretmem_active(void);

#else

static inline bool vma_is_secretmem(struct vm_area_struct *vma)
{
	return false;
}

static inline bool folio_is_secretmem(struct folio *folio)
{
	return false;
}

static inline bool secretmem_mapping(struct address_space *mapping)
{
	return false;
}

static inline bool secretmem_active(void)
{
	return false;
}

#endif /* CONFIG_SECRETMEM */

#endif /* _LINUX_SECRETMEM_H */
  "   ?ˆl–Ým_J*j"Tâ€Á;q§Å£Ðƒh¹ÂÒ      ?IO-APIC
  #   AˆÄÐƒi 5Ãa–Ým_J*j"Tâ€Á?pN)‹FÿÓ 4    A/* SPDX-License-Identifier: GPL-2.0 OR MIT */

#ifndef __DRM_EXEC_H__
#define __DRM_EXEC_H__

#include <linux/compiler.h>
#include <linux/ww_mutex.h>

#define DRM_EXEC_INTERRUPTIBLE_WAIT	BIT(0)
#define DRM_EXEC_IGNORE_DUPLICATES	BIT(1)

struct drm_gem_object;

/**
 * struct drm_exec - Execution context
 */
struct drm_exec {
	/**
	 * @flags: Flags to control locking behavior
	 */
	u32                     flags;

	/**
	 * @ticket: WW ticket used for acquiring locks
	 */
	struct ww_acquire_ctx	ticket;

	/**
	 * @num_objects: number of objects locked
	 */
	unsigned int		num_objects;

	/**
	 * @max_objects: maximum objects in array
	 */
	unsigned int		max_objects;

	/**
	 * @objects: array of the locked objects
	 */
	struct drm_gem_object	**objects;

	/**
	 * @contended: contended GEM object we backed off for
	 */
	struct drm_gem_object	*contended;

	/**
	 * @prelocked: already locked GEM object due to contention
	 */
	struct drm_gem_object *prelocked;
};

/**
 * drm_exec_obj() - Return the object for a give drm_exec index
 * @exec: Pointer to the drm_exec context
 * @index: The index.
 *
 * Return: Pointer to the locked object corresponding to @index if
 * index is within the number of locked objects. NULL otherwise.
 */
static inline struct drm_gem_object *
drm_exec_obj(struct drm_exec *exec, unsigned long index)
{
	return index < exec->num_objects ? exec->objects[index] : NULL;
}

/**
 * drm_exec_for_each_locked_object - iterate over all the locked objects
 * @exec: drm_exec object
 * @index: unsigned long index for the iteration
 * @obj: the current GEM object
 *
 * Iterate over all the locked GEM objects inside the drm_exec object.
 */
#define drm_exec_for_each_locked_object(exec, index, obj)		\
	for ((index) = 0; ((obj) = drm_exec_obj(exec, index)); ++(index))

/**
 * drm_exec_for_each_locked_object_reverse - iterate over all the locked
 * objects in reverse locking order
 * @exec: drm_exec object
 * @index: unsigned long index for the iteration
 * @obj: the current GEM object
 *
 * Iterate over all the locked GEM objects inside the drm_exec object in
 * reverse locking order. Note that @index may go below zero and wrap,
 * but that will be caught by drm_exec_obj(), returning a NULL object.
 */
#define drm_exec_for_each_locked_object_reverse(exec, index, obj)	\
	for ((index) = (exec)->num_objects - 1;				\
	     ((obj) = drm_exec_obj(exec, index)); --(index))

/**
 * drm_exec_until_all_locked - loop until all GEM objects are locked
 * @exec: drm_exec object
 *
 * Core functionality of the drm_exec object. Loops until all GEM objects are
 * locked and no more contention exists. At the begi