Displaying 2 results from an estimated 2 matches for "kcov_remote_lock".
2019 Oct 21
0
[PATCH RFC 1/3] kcov: remote coverage support
...+ struct list_head list;
> + unsigned int size;
> +};
> +
> +struct kcov_remote {
> + u64 handle;
> + struct kcov *kcov;
> + struct hlist_node hnode;
> };
>
> +static DEFINE_SPINLOCK(kcov_remote_lock);
> +static DEFINE_HASHTABLE(kcov_remote_map, 4);
> +static struct list_head kcov_remote_areas = LIST_HEAD_INIT(kcov_remote_areas);
> +
> +static struct kcov_remote *kcov_remote_find(u64 handle)
> +{
> + struct kcov_remote *remote;
> +
> + hash_for_each_possible(...
2019 Oct 23
0
[PATCH v2 1/3] kcov: remote coverage support
...malloc(sizeof(*remote), GFP_ATOMIC);
> + if (!remote)
> + return ERR_PTR(-ENOMEM);
> + remote->handle = handle;
> + remote->kcov = kcov;
> + hash_add(kcov_remote_map, &remote->hnode, handle);
> + return remote;
> +}
> +
>
> ...
>
> + spin_lock(&kcov_remote_lock);
> + for (i = 0; i < remote_arg->num_handles; i++) {
> + kcov_debug("handle %llx\n", remote_arg->handles[i]);
> + if (!kcov_check_handle(remote_arg->handles[i],
> + false, true, false)) {
> + spin_unlock(&kcov_remote_lock);
> + kcov_disab...