Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\vmalloc.c Create Date:2022-07-28 14:59:37
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:vm_unmap_ram - unmap linear kernel address space set up by vm_map_ram*@mem: the pointer returned by vm_map_ram*@count: the count passed to that vm_map_ram call (cannot unmap partial)

Proto:void vm_unmap_ram(const void *mem, unsigned int count)

Type:void

Parameter:

TypeParameterName
const void *mem
unsigned intcount
1772  size = count << PAGE_SHIFT determines the page size
1773  addr = mem
1776  might_sleep()
1777  BUG_ON(!addr)
1778  BUG_ON(addr < VMALLOC_START)
1779  BUG_ON(addr > VMALLOC_END)
1780  BUG_ON(!st whether an address (unsigned long or pointer) is aligned to PAGE_SIZE (addr))
1782  kasan_poison_vmalloc(mem, size)
1784  If Value is more likely to compile time(count <= 256K with 4K pages ) Then
1785  debug_check_no_locks_freed(mem, size)
1786  vb_free(mem, size)
1787  Return
1790  va = find_vmap_area(addr)
1791  BUG_ON(!va)
1792  Called when kernel memory is freed (or unmapped), or if a lock* is destroyed or reinitialized - this code checks whether there is* any held lock in the memory range of to :
1794  Free and unmap a vmap area
Caller
NameDescribe
vm_map_ramvm_map_ram - map pages linearly into kernel virtual address (vmalloc space)*@pages: an array of pointers to the pages to be mapped*@count: number of pages*@node: prefer to allocate data structures on this node*@prot: memory protection to use