Lines Matching +full:data +full:- +full:size
1 // SPDX-License-Identifier: GPL-2.0-only
8 unsigned int size, in __regset_get() argument
9 void **data) in __regset_get() argument
11 void *p = *data, *to_free = NULL; in __regset_get()
14 if (!regset->regset_get) in __regset_get()
15 return -EOPNOTSUPP; in __regset_get()
16 if (size > regset->n * regset->size) in __regset_get()
17 size = regset->n * regset->size; in __regset_get()
19 to_free = p = kvzalloc(size, GFP_KERNEL); in __regset_get()
21 return -ENOMEM; in __regset_get()
23 res = regset->regset_get(target, regset, in __regset_get()
24 (struct membuf){.p = p, .left = size}); in __regset_get()
29 *data = p; in __regset_get()
30 return size - res; in __regset_get()
35 unsigned int size, in regset_get() argument
36 void *data) in regset_get() argument
38 return __regset_get(target, regset, size, &data); in regset_get()
44 unsigned int size, in regset_get_alloc() argument
45 void **data) in regset_get_alloc() argument
47 *data = NULL; in regset_get_alloc()
48 return __regset_get(target, regset, size, data); in regset_get_alloc()
53 * copy_regset_to_user - fetch a thread's user_regset data into user memory
56 * @setno: index in @view->regsets
57 * @offset: offset into the regset data, in bytes
58 * @size: amount of data to copy, in bytes
59 * @data: user-mode pointer to copy into
64 unsigned int offset, unsigned int size, in copy_regset_to_user() argument
65 void __user *data) in copy_regset_to_user() argument
67 const struct user_regset *regset = &view->regsets[setno]; in copy_regset_to_user()
71 ret = regset_get_alloc(target, regset, size, &buf); in copy_regset_to_user()
73 ret = copy_to_user(data, buf, ret) ? -EFAULT : 0; in copy_regset_to_user()