Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\mtrr\mtrr.c Create Date:2022-07-28 08:05:12
Last Modify:2022-05-18 17:35:08 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:int mtrr_del_page(int reg, unsigned long base, unsigned long size)

Type:int

Parameter:

TypeParameterName
intreg
unsigned longbase
unsigned longsize
483  error = -EINVAL
485  If Not mtrr_enabled() Then Return -ENODEV
488  max = num_var_ranges
490  get_online_cpus()
491  mutex_lock( & mtrr_mutex)
492  If reg < 0 Then
494  When i < max cycle
495  get(i, & lbase, & lsize, & ltype)
496  If lbase == base && lsize == size Then
497  reg = i
498  Break
501  If reg < 0 Then
502  pr_debug("no MTRR for %lx000,%lx000 found\n", base, size)
504  Go to out
507  If reg >= max Then
508  pr_warn("register: %d too big\n", reg)
509  Go to out
511  get(reg, & lbase, & lsize, & ltype)
512  If lsize < 1 Then
513  pr_warn("MTRR %d not used\n", reg)
514  Go to out
516  If mtrr_usage_table[reg] < 1 Then
517  pr_warn("reg: %d has count=0\n", reg)
518  Go to out
520  If --mtrr_usage_table[reg] < 1 Then set_mtrr_cpuslocked(reg, 0, 0, 0)
522  error = reg
523  out :
524  mutex_unlock( & mtrr_mutex)
525  put_online_cpus()
526  Return error
Caller
NameDescribe
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