函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\mtrr\mtrr.c Create Date:2022-07-27 09:05:26
Last Modify:2022-05-18 17:35:08 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:mtrr_del_page - delete a memory type region*@reg: Register returned by mtrr_add*@base: Physical base address*@size: Size of region* If register is supplied then base and size are ignored. This is* how drivers should call it.* Releases an MTRR region

函数原型:int mtrr_del_page(int reg, unsigned long base, unsigned long size)

返回类型:int

参数:

类型参数名称
intreg
unsigned longbase
unsigned longsize
483  error等于负EINVAL
485  如果非mtrr_enabled()则返回:负ENODEV
488  max等于num_var_ranges
490  get_online_cpus()
491  mutex_lock( & mtrr_mutex)
492  如果reg小于0则
494 i小于max循环
495  get(i, & lbase, & lsize, & ltype)
496  如果lbase恒等于baselsize恒等于size
497  reg等于i
498  退出
501  如果reg小于0则
502  pr_debug("no MTRR for %lx000,%lx000 found\n", base, size)
504  转到:out
507  如果reg大于等于max
508  打印警告信息("register: %d too big\n", reg)
509  转到:out
511  get(reg, & lbase, & lsize, & ltype)
512  如果lsize小于1则
513  打印警告信息("MTRR %d not used\n", reg)
514  转到:out
516  如果mtrr_usage_table[reg]小于1则
517  打印警告信息("reg: %d has count=0\n", reg)
518  转到:out
520  如果mtrr_usage_table[reg]先自减小于1则set_mtrr_cpuslocked(reg, 0, 0, 0)
522  error等于reg
523  out :
524  mutex_unlock( & mtrr_mutex)
525  put_online_cpus()
526  返回:error
调用者
名称描述
mtrr_delmtrr_del - delete a memory type region*@reg: Register returned by mtrr_add*@base: Physical base address*@size: Size of region* If register is supplied then base and size are ignored. This is* how drivers should call it.* Releases an MTRR region
mtrr_file_del
mtrr_writeseq_file can seek but we ignore it.* Format of control line:* "base=%Lx size=%Lx type=%s" or "disable=%d"
mtrr_ioctl