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
224 if (nr_segments > KEXEC_SEGMENT_MAX) in kexec_load_check()
230 SYSCALL_DEFINE4(kexec_load, unsigned long, entry, unsigned long, nr_segments, in SYSCALL_DEFINE4() argument
236 result = kexec_load_check(nr_segments, flags); in SYSCALL_DEFINE4()
245 ksegments = memdup_user(segments, nr_segments * sizeof(ksegments[0])); in SYSCALL_DEFINE4()
249 result = do_kexec_load(entry, nr_segments, ksegments, flags); in SYSCALL_DEFINE4()
257 compat_ulong_t, nr_segments, in COMPAT_SYSCALL_DEFINE4() argument
265 result = kexec_load_check(nr_segments, flags); in COMPAT_SYSCALL_DEFINE4()
275 ksegments = kmalloc_array(nr_segments, sizeof(ksegments[0]), in COMPAT_SYSCALL_DEFINE4()
280 for (i = 0; i < nr_segments; i++) { in COMPAT_SYSCALL_DEFINE4()
291 result = do_kexec_load(entry, nr_segments, ksegments, flags); in COMPAT_SYSCALL_DEFINE4()