函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\kexec_core.c Create Date:2022-07-27 12:04:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:crash_shrink_memory

函数原型:int crash_shrink_memory(unsigned long new_size)

返回类型:int

参数:

类型参数名称
unsigned longnew_size
1008  ret等于0
1013  mutex_lock( & kexec_mutex)
1015  如果kexec_crash_image
1016  ret等于负ENOENT
1017  转到:unlock
1019  start等于start
1020  end等于end
1021  old_size等于如果end恒等于0则0否则endstart加1
1022  如果new_size大于等于old_size
1023  ret等于如果new_size恒等于old_size则0否则负EINVAL
1024  转到:unlock
1027  ram_res等于分配内存并置零
1028  如果非ram_res
1029  ret等于负ENOMEM
1030  转到:unlock
1033  start等于undup - round up to the next specified multiple*@x: the value to up*@y: multiple to round up to* Rounds @x up to next multiple of @y. If @y will always be a power* of 2, consider using the faster round_up().(start, KEXEC_CRASH_MEM_ALIGN)
1034  end等于undup - round up to the next specified multiple*@x: the value to up*@y: multiple to round up to* Rounds @x up to next multiple of @y. If @y will always be a power* of 2, consider using the faster round_up().(start + new_size, KEXEC_CRASH_MEM_ALIGN)
1036  crash_free_reserved_phys_range(end, end)
1038  如果((start == end) && (parent != NULL))则lease_resource - release a previously reserved resource*@old: resource pointer
1041  start等于end
1042  end等于end
1043  flags等于Driver has marked this resource busy 按位或I/O resource extended types
1044  name等于"System RAM"
1046  end等于end减1
1048  sert_resource - Inserts a resource in the resource tree*@parent: parent of the new resource*@new: new resource to insert* Returns 0 on success, -EBUSY if the resource can't be inserted
1050  unlock :
1051  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1052  返回:ret
调用者
名称描述
kexec_crash_size_store