Commit 541623a4 authored by Lucas De Marchi's avatar Lucas De Marchi Committed by Rodrigo Vivi

drm/xe: Fix typo persitent->persistent

Fix typo as noticed by Matt Roper:

	git grep -l persitent | xargs sed -i 's/persitent/persistent/g'

... and then fix coding style issues.
Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://lore.kernel.org/r/20230302013411.3262608-2-lucas.demarchi@intel.comSigned-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 3ea9f1f1
......@@ -51,8 +51,8 @@ static int xe_file_open(struct drm_device *dev, struct drm_file *file)
return 0;
}
static void device_kill_persitent_engines(struct xe_device *xe,
struct xe_file *xef);
static void device_kill_persistent_engines(struct xe_device *xe,
struct xe_file *xef);
static void xe_file_close(struct drm_device *dev, struct drm_file *file)
{
......@@ -69,7 +69,7 @@ static void xe_file_close(struct drm_device *dev, struct drm_file *file)
}
mutex_unlock(&xef->engine.lock);
mutex_destroy(&xef->engine.lock);
device_kill_persitent_engines(xe, xef);
device_kill_persistent_engines(xe, xef);
mutex_lock(&xef->vm.lock);
xa_for_each(&xef->vm.xa, idx, vm)
......@@ -189,8 +189,8 @@ struct xe_device *xe_device_create(struct pci_dev *pdev,
drmm_mutex_init(&xe->drm, &xe->usm.lock);
xa_init_flags(&xe->usm.asid_to_vm, XA_FLAGS_ALLOC1);
drmm_mutex_init(&xe->drm, &xe->persitent_engines.lock);
INIT_LIST_HEAD(&xe->persitent_engines.list);
drmm_mutex_init(&xe->drm, &xe->persistent_engines.lock);
INIT_LIST_HEAD(&xe->persistent_engines.list);
spin_lock_init(&xe->pinned.lock);
INIT_LIST_HEAD(&xe->pinned.kernel_bo_present);
......@@ -305,35 +305,35 @@ void xe_device_shutdown(struct xe_device *xe)
{
}
void xe_device_add_persitent_engines(struct xe_device *xe, struct xe_engine *e)
void xe_device_add_persistent_engines(struct xe_device *xe, struct xe_engine *e)
{
mutex_lock(&xe->persitent_engines.lock);
list_add_tail(&e->persitent.link, &xe->persitent_engines.list);
mutex_unlock(&xe->persitent_engines.lock);
mutex_lock(&xe->persistent_engines.lock);
list_add_tail(&e->persistent.link, &xe->persistent_engines.list);
mutex_unlock(&xe->persistent_engines.lock);
}
void xe_device_remove_persitent_engines(struct xe_device *xe,
struct xe_engine *e)
void xe_device_remove_persistent_engines(struct xe_device *xe,
struct xe_engine *e)
{
mutex_lock(&xe->persitent_engines.lock);
if (!list_empty(&e->persitent.link))
list_del(&e->persitent.link);
mutex_unlock(&xe->persitent_engines.lock);
mutex_lock(&xe->persistent_engines.lock);
if (!list_empty(&e->persistent.link))
list_del(&e->persistent.link);
mutex_unlock(&xe->persistent_engines.lock);
}
static void device_kill_persitent_engines(struct xe_device *xe,
struct xe_file *xef)
static void device_kill_persistent_engines(struct xe_device *xe,
struct xe_file *xef)
{
struct xe_engine *e, *next;
mutex_lock(&xe->persitent_engines.lock);
list_for_each_entry_safe(e, next, &xe->persitent_engines.list,
persitent.link)
if (e->persitent.xef == xef) {
mutex_lock(&xe->persistent_engines.lock);
list_for_each_entry_safe(e, next, &xe->persistent_engines.list,
persistent.link)
if (e->persistent.xef == xef) {
xe_engine_kill(e);
list_del_init(&e->persitent.link);
list_del_init(&e->persistent.link);
}
mutex_unlock(&xe->persitent_engines.lock);
mutex_unlock(&xe->persistent_engines.lock);
}
void xe_device_wmb(struct xe_device *xe)
......
......@@ -37,9 +37,9 @@ int xe_device_probe(struct xe_device *xe);
void xe_device_remove(struct xe_device *xe);
void xe_device_shutdown(struct xe_device *xe);
void xe_device_add_persitent_engines(struct xe_device *xe, struct xe_engine *e);
void xe_device_remove_persitent_engines(struct xe_device *xe,
struct xe_engine *e);
void xe_device_add_persistent_engines(struct xe_device *xe, struct xe_engine *e);
void xe_device_remove_persistent_engines(struct xe_device *xe,
struct xe_engine *e);
void xe_device_wmb(struct xe_device *xe);
......
......@@ -138,13 +138,13 @@ struct xe_device {
struct mutex lock;
} usm;
/** @persitent_engines: engines that are closed but still running */
/** @persistent_engines: engines that are closed but still running */
struct {
/** @lock: protects persitent engines */
/** @lock: protects persistent engines */
struct mutex lock;
/** @list: list of persitent engines */
/** @list: list of persistent engines */
struct list_head list;
} persitent_engines;
} persistent_engines;
/** @pinned: pinned BO state */
struct {
......
......@@ -47,7 +47,7 @@ static struct xe_engine *__xe_engine_create(struct xe_device *xe,
e->fence_irq = &gt->fence_irq[hwe->class];
e->ring_ops = gt->ring_ops[hwe->class];
e->ops = gt->engine_ops;
INIT_LIST_HEAD(&e->persitent.link);
INIT_LIST_HEAD(&e->persistent.link);
INIT_LIST_HEAD(&e->compute.link);
INIT_LIST_HEAD(&e->multi_gt_link);
......@@ -620,7 +620,7 @@ int xe_engine_create_ioctl(struct drm_device *dev, void *data,
goto put_engine;
}
e->persitent.xef = xef;
e->persistent.xef = xef;
mutex_lock(&xef->engine.lock);
err = xa_alloc(&xef->engine.xa, &id, e, xa_limit_32b, GFP_KERNEL);
......@@ -716,7 +716,7 @@ int xe_engine_destroy_ioctl(struct drm_device *dev, void *data,
if (!(e->flags & ENGINE_FLAG_PERSISTENT))
xe_engine_kill(e);
else
xe_device_add_persitent_engines(xe, e);
xe_device_add_persistent_engines(xe, e);
trace_xe_engine_close(e);
xe_engine_put(e);
......
......@@ -94,14 +94,14 @@ struct xe_engine {
};
/**
* @persitent: persitent engine state
* @persistent: persistent engine state
*/
struct {
/** @xef: file which this engine belongs to */
struct xe_file *xef;
/** @link: link in list of persitent engines */
/** @link: link in list of persistent engines */
struct list_head link;
} persitent;
} persistent;
union {
/**
......
......@@ -400,7 +400,7 @@ static void execlist_engine_fini_async(struct work_struct *w)
spin_unlock_irqrestore(&exl->port->lock, flags);
if (e->flags & ENGINE_FLAG_PERSISTENT)
xe_device_remove_persitent_engines(gt_to_xe(e->gt), e);
xe_device_remove_persistent_engines(gt_to_xe(e->gt), e);
drm_sched_entity_fini(&exl->entity);
drm_sched_fini(&exl->sched);
kfree(exl);
......
......@@ -890,7 +890,7 @@ static void __guc_engine_fini_async(struct work_struct *w)
trace_xe_engine_destroy(e);
if (e->flags & ENGINE_FLAG_PERSISTENT)
xe_device_remove_persitent_engines(gt_to_xe(e->gt), e);
xe_device_remove_persistent_engines(gt_to_xe(e->gt), e);
release_guc_id(guc, e);
xe_sched_entity_fini(&ge->entity);
xe_sched_fini(&ge->sched);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment