search for: table_lock

Displaying 20 results from an estimated 44 matches for "table_lock".

2023 Feb 14
3
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...oke; + } + /* - * Get the user-visible handle using idr. Preload and perform - * allocation under our spinlock. + * Get the user-visible handle using idr as the _last_ step. + * Preload and perform allocation under our spinlock. */ idr_preload(GFP_KERNEL); spin_lock(&file_priv->table_lock); - ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT); - spin_unlock(&file_priv->table_lock); idr_preload_end(); - mutex_unlock(&dev->object_name_lock); if (ret < 0) - goto err_unref; - - handle = ret; + goto err_close; - ret = drm_vma_node_allow(&...
2023 Feb 14
3
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...oke; + } + /* - * Get the user-visible handle using idr. Preload and perform - * allocation under our spinlock. + * Get the user-visible handle using idr as the _last_ step. + * Preload and perform allocation under our spinlock. */ idr_preload(GFP_KERNEL); spin_lock(&file_priv->table_lock); - ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT); - spin_unlock(&file_priv->table_lock); idr_preload_end(); - mutex_unlock(&dev->object_name_lock); if (ret < 0) - goto err_unref; - - handle = ret; + goto err_close; - ret = drm_vma_node_allow(&...
2023 Feb 20
2
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...rform >> -???? * allocation under our spinlock. >> +???? * Get the user-visible handle using idr as the _last_ step. >> +???? * Preload and perform allocation under our spinlock. >> ?????? */ >> ????? idr_preload(GFP_KERNEL); >> ????? spin_lock(&file_priv->table_lock); >> - >> ????? ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT); >> - >> ????? spin_unlock(&file_priv->table_lock); >> ????? idr_preload_end(); >> -??? mutex_unlock(&dev->object_name_lock); >> ????? if (ret < 0) >&g...
2023 Feb 20
2
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...rform >> -???? * allocation under our spinlock. >> +???? * Get the user-visible handle using idr as the _last_ step. >> +???? * Preload and perform allocation under our spinlock. >> ?????? */ >> ????? idr_preload(GFP_KERNEL); >> ????? spin_lock(&file_priv->table_lock); >> - >> ????? ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT); >> - >> ????? spin_unlock(&file_priv->table_lock); >> ????? idr_preload_end(); >> -??? mutex_unlock(&dev->object_name_lock); >> ????? if (ret < 0) >&g...
2023 Feb 20
1
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...our spinlock. >>>> +???? * Get the user-visible handle using idr as the _last_ step. >>>> +???? * Preload and perform allocation under our spinlock. >>>> ?????? */ >>>> ????? idr_preload(GFP_KERNEL); >>>> ????? spin_lock(&file_priv->table_lock); >>>> - >>>> ????? ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT); >>>> - >>>> ????? spin_unlock(&file_priv->table_lock); >>>> ????? idr_preload_end(); >>>> -??? mutex_unlock(&dev->object_n...
2023 Feb 20
1
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...our spinlock. >>>> +???? * Get the user-visible handle using idr as the _last_ step. >>>> +???? * Preload and perform allocation under our spinlock. >>>> ?????? */ >>>> ????? idr_preload(GFP_KERNEL); >>>> ????? spin_lock(&file_priv->table_lock); >>>> - >>>> ????? ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT); >>>> - >>>> ????? spin_unlock(&file_priv->table_lock); >>>> ????? idr_preload_end(); >>>> -??? mutex_unlock(&dev->object_n...
2023 Feb 14
0
[PATCH] drm/gem: Expose the buffer object handle to userspace last
...-visible handle using idr. Preload and perform > - * allocation under our spinlock. > + * Get the user-visible handle using idr as the _last_ step. > + * Preload and perform allocation under our spinlock. > */ > idr_preload(GFP_KERNEL); > spin_lock(&file_priv->table_lock); > - > ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT); > - > spin_unlock(&file_priv->table_lock); > idr_preload_end(); > > - mutex_unlock(&dev->object_name_lock); > if (ret < 0) > - goto err_unref; > - > - han...
2023 Feb 14
0
[Nouveau] [PATCH] drm/gem: Expose the buffer object handle to userspace last
...-visible handle using idr. Preload and perform > - * allocation under our spinlock. > + * Get the user-visible handle using idr as the _last_ step. > + * Preload and perform allocation under our spinlock. > */ > idr_preload(GFP_KERNEL); > spin_lock(&file_priv->table_lock); > - > ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT); > - > spin_unlock(&file_priv->table_lock); > idr_preload_end(); > > - mutex_unlock(&dev->object_name_lock); > if (ret < 0) > - goto err_unref; > - > - han...
2023 Feb 20
0
[Nouveau] [PATCH] drm/gem: Expose the buffer object handle to userspace last
...* allocation under our spinlock. >>> +???? * Get the user-visible handle using idr as the _last_ step. >>> +???? * Preload and perform allocation under our spinlock. >>> ?????? */ >>> ????? idr_preload(GFP_KERNEL); >>> ????? spin_lock(&file_priv->table_lock); >>> - >>> ????? ret = idr_alloc(&file_priv->object_idr, obj, 1, 0, GFP_NOWAIT); >>> - >>> ????? spin_unlock(&file_priv->table_lock); >>> ????? idr_preload_end(); >>> -??? mutex_unlock(&dev->object_name_lock); >>>...
2014 Apr 17
0
[PATCH] drm/nouveau: add some basic debugfs dumping for nouveau's clients and vm mappings
..., "client \"%s\"\n", cli->base.name); + + if (!cli->base.vm) + return 0; + + abi16 = cli->abi16; + if (!abi16) + return 0; + + filp = abi16->file; + dump_channels_abi16(m, drm, cli, abi16); + + seq_printf(m, " gem handles\n"); + spin_lock(&filp->table_lock); + idr_for_each_entry(&filp->object_idr, entry, id) { + struct nouveau_bo *nvbo = nouveau_gem_object(entry); + struct ttm_buffer_object *bo = &nvbo->bo; + + ttm_bo_reference(&nvbo->bo); + spin_unlock(&filp->table_lock); + + ret = ww_mutex_lock_interruptible(&nv...
2016 Dec 08
4
[PATCH v6 0/2] virtio-crypto: add Linux driver
v6: - add patch 1/2 to make sparc architecture happy. [Sam] - close created sessions previousely when rekeying. - convert the priority of virtio crypto algs from 4001 to 501 which is enough. v5: - add comments for algs_lock and table_lock. [Stefan] - use kzfree instead of kfree for key material security. [Stefan] - drop unnecessary spin_lock for struct virtio_crypto_ablkcipher_ctx. - dynamically allocated memory for iv in order to avoid to do DMA from the stack memory in __virtio_crypto_ablkcipher_do_req(). - add logs for err...
2016 Dec 08
4
[PATCH v6 0/2] virtio-crypto: add Linux driver
v6: - add patch 1/2 to make sparc architecture happy. [Sam] - close created sessions previousely when rekeying. - convert the priority of virtio crypto algs from 4001 to 501 which is enough. v5: - add comments for algs_lock and table_lock. [Stefan] - use kzfree instead of kfree for key material security. [Stefan] - drop unnecessary spin_lock for struct virtio_crypto_ablkcipher_ctx. - dynamically allocated memory for iv in order to avoid to do DMA from the stack memory in __virtio_crypto_ablkcipher_do_req(). - add logs for err...
2016 Dec 01
3
[PATCH v5 0/1] virtio-crypto: add Linux driver
v5: - add comments for algs_lock and table_lock. [Stefan] - use kzfree instead of kfree for key material security. [Stefan] - drop unnecessary spin_lock for struct virtio_crypto_ablkcipher_ctx. - dynamically allocated memory for iv in order to avoid to do DMA from the stack memory in __virtio_crypto_ablkcipher_do_req(). - add logs for err...
2016 Dec 01
3
[PATCH v5 0/1] virtio-crypto: add Linux driver
v5: - add comments for algs_lock and table_lock. [Stefan] - use kzfree instead of kfree for key material security. [Stefan] - drop unnecessary spin_lock for struct virtio_crypto_ablkcipher_ctx. - dynamically allocated memory for iv in order to avoid to do DMA from the stack memory in __virtio_crypto_ablkcipher_do_req(). - add logs for err...
2016 Dec 15
2
[PATCH v8 0/1] virtio-crypto: add Linux driver
...king the callback. - rebase on the latest kernel master tree. v6: - add patch 1/2 to make sparc architecture happy. [Sam] - close created sessions previousely when rekeying. - convert the priority of virtio crypto algs from 4001 to 501 which is enough. v5: - add comments for algs_lock and table_lock. [Stefan] - use kzfree instead of kfree for key material security. [Stefan] - drop unnecessary spin_lock for struct virtio_crypto_ablkcipher_ctx. - dynamically allocated memory for iv in order to avoid to do DMA from the stack memory in __virtio_crypto_ablkcipher_do_req(). - add logs for err...
2016 Dec 15
2
[PATCH v8 0/1] virtio-crypto: add Linux driver
...king the callback. - rebase on the latest kernel master tree. v6: - add patch 1/2 to make sparc architecture happy. [Sam] - close created sessions previousely when rekeying. - convert the priority of virtio crypto algs from 4001 to 501 which is enough. v5: - add comments for algs_lock and table_lock. [Stefan] - use kzfree instead of kfree for key material security. [Stefan] - drop unnecessary spin_lock for struct virtio_crypto_ablkcipher_ctx. - dynamically allocated memory for iv in order to avoid to do DMA from the stack memory in __virtio_crypto_ablkcipher_do_req(). - add logs for err...
2016 Dec 14
2
[PATCH v7 0/1] virtio-crypto: add Linux driver
...king the callback. - rebase on the latest kernel master tree. v6: - add patch 1/2 to make sparc architecture happy. [Sam] - close created sessions previousely when rekeying. - convert the priority of virtio crypto algs from 4001 to 501 which is enough. v5: - add comments for algs_lock and table_lock. [Stefan] - use kzfree instead of kfree for key material security. [Stefan] - drop unnecessary spin_lock for struct virtio_crypto_ablkcipher_ctx. - dynamically allocated memory for iv in order to avoid to do DMA from the stack memory in __virtio_crypto_ablkcipher_do_req(). - add logs for err...
2016 Dec 14
2
[PATCH v7 0/1] virtio-crypto: add Linux driver
...king the callback. - rebase on the latest kernel master tree. v6: - add patch 1/2 to make sparc architecture happy. [Sam] - close created sessions previousely when rekeying. - convert the priority of virtio crypto algs from 4001 to 501 which is enough. v5: - add comments for algs_lock and table_lock. [Stefan] - use kzfree instead of kfree for key material security. [Stefan] - drop unnecessary spin_lock for struct virtio_crypto_ablkcipher_ctx. - dynamically allocated memory for iv in order to avoid to do DMA from the stack memory in __virtio_crypto_ablkcipher_do_req(). - add logs for err...
2016 Dec 01
0
[PATCH v5 1/1] crypto: add virtio-crypto driver
...nu.org/licenses/>. + */ + +#include <linux/mutex.h> +#include <linux/list.h> +#include <linux/module.h> + +#include <uapi/linux/virtio_crypto.h> +#include "virtio_crypto_common.h" + +static LIST_HEAD(virtio_crypto_table); +static uint32_t num_devices; + +/* The table_lock protects the above global list and num_devices */ +static DEFINE_MUTEX(table_lock); + +#define VIRTIO_CRYPTO_MAX_DEVICES 32 + + +/* + * virtcrypto_devmgr_add_dev() - Add vcrypto_dev to the acceleration + * framework. + * @vcrypto_dev: Pointer to virtio crypto device. + * + * Function adds virtio c...
2016 Dec 08
0
[PATCH v6 2/2] crypto: add virtio-crypto driver
...nu.org/licenses/>. + */ + +#include <linux/mutex.h> +#include <linux/list.h> +#include <linux/module.h> + +#include <uapi/linux/virtio_crypto.h> +#include "virtio_crypto_common.h" + +static LIST_HEAD(virtio_crypto_table); +static uint32_t num_devices; + +/* The table_lock protects the above global list and num_devices */ +static DEFINE_MUTEX(table_lock); + +#define VIRTIO_CRYPTO_MAX_DEVICES 32 + + +/* + * virtcrypto_devmgr_add_dev() - Add vcrypto_dev to the acceleration + * framework. + * @vcrypto_dev: Pointer to virtio crypto device. + * + * Function adds virtio c...