Lines Matching refs:nr_segments
23 unsigned long nr_segments, in kimage_alloc_init() argument
44 image->nr_segments = nr_segments; in kimage_alloc_init()
45 memcpy(image->segment, segments, nr_segments * sizeof(*segments)); in kimage_alloc_init()
87 static int do_kexec_load(unsigned long entry, unsigned long nr_segments, in do_kexec_load() argument
110 if (nr_segments == 0) { in do_kexec_load()
125 ret = kimage_alloc_init(&image, entry, nr_segments, segments, flags); in do_kexec_load()
144 for (i = 0; i < nr_segments; i++) { in do_kexec_load()
190 static inline int kexec_load_check(unsigned long nr_segments, in kexec_load_check() argument
222 if (nr_segments > KEXEC_SEGMENT_MAX) in kexec_load_check()
228 SYSCALL_DEFINE4(kexec_load, unsigned long, entry, unsigned long, nr_segments, in SYSCALL_DEFINE4() argument
234 result = kexec_load_check(nr_segments, flags); in SYSCALL_DEFINE4()
243 ksegments = memdup_array_user(segments, nr_segments, sizeof(ksegments[0])); in SYSCALL_DEFINE4()
247 result = do_kexec_load(entry, nr_segments, ksegments, flags); in SYSCALL_DEFINE4()
255 compat_ulong_t, nr_segments, in COMPAT_SYSCALL_DEFINE4() argument
263 result = kexec_load_check(nr_segments, flags); in COMPAT_SYSCALL_DEFINE4()
273 ksegments = kmalloc_array(nr_segments, sizeof(ksegments[0]), in COMPAT_SYSCALL_DEFINE4()
278 for (i = 0; i < nr_segments; i++) { in COMPAT_SYSCALL_DEFINE4()
289 result = do_kexec_load(entry, nr_segments, ksegments, flags); in COMPAT_SYSCALL_DEFINE4()