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
113 if (nr_segments == 0) { in do_kexec_load()
128 ret = kimage_alloc_init(&image, entry, nr_segments, segments, flags); in do_kexec_load()
147 for (i = 0; i < nr_segments; i++) { in do_kexec_load()
193 static inline int kexec_load_check(unsigned long nr_segments, in kexec_load_check() argument
225 if (nr_segments > KEXEC_SEGMENT_MAX) in kexec_load_check()
231 SYSCALL_DEFINE4(kexec_load, unsigned long, entry, unsigned long, nr_segments, in SYSCALL_DEFINE4() argument
237 result = kexec_load_check(nr_segments, flags); in SYSCALL_DEFINE4()
246 ksegments = memdup_user(segments, nr_segments * sizeof(ksegments[0])); in SYSCALL_DEFINE4()
250 result = do_kexec_load(entry, nr_segments, ksegments, flags); in SYSCALL_DEFINE4()
258 compat_ulong_t, nr_segments, in COMPAT_SYSCALL_DEFINE4() argument
266 result = kexec_load_check(nr_segments, flags); in COMPAT_SYSCALL_DEFINE4()
276 ksegments = kmalloc_array(nr_segments, sizeof(ksegments[0]), in COMPAT_SYSCALL_DEFINE4()
281 for (i = 0; i < nr_segments; i++) { in COMPAT_SYSCALL_DEFINE4()
292 result = do_kexec_load(entry, nr_segments, ksegments, flags); in COMPAT_SYSCALL_DEFINE4()