函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:apm

函数原型:static int apm(void *unused)

返回类型:int

参数:

类型参数名称
void *unused
1731  set_cpus_allowed_ptr(当前进程, cpumask_of - the cpumask containing just a given cpu*@cpu: the cpu (<= nr_cpu_ids)(0))
1732  BUG_ON(当前cpu ID() != 0)
1734  如果connection_version恒等于0则
1735  connection_version等于电源管理版本
1736  如果connection_version大于0x100则
1740  如果connection_version大于0x0102则connection_version等于0x0102
1743  如果error不等于Error codes
1751  如果debugprintk(formational "apm: Connection version %d.%d\n", (connection_version >> 8) & 0xff, connection_version & 0xff)
1771  如果电源管理标志按位与APM_BIOS_DISENGAGEDconnection_version大于0x0100则
1773  error等于apm_engage_power_management - enable PM on a device*@device: identity of device*@enable: on/off* Activate or deactivate power management on either a specific device* or the entire system (%APM_DEVICE_ALL).
1774  如果error
1776  返回:负1
1780  如果debugnum_online_cpus()恒等于1或smp的值则
1781  error等于apm_get_power_status - get current power state*@status: returned status*@bat: battery info*@life: estimated life* Obtain the current power status from the APM BIOS. We return a* status which gives the rough battery status, and current power* source
1782  如果errorprintk(formational "apm: power status not available\n")
1784  否则
1786  : & == 0
1787  power_stat等于"off line"
1788  退出
1789  : & == 1
1790  power_stat等于"on line"
1791  退出
1792  : & == 2
1793  power_stat等于"on backup power"
1794  退出
1795  默认
1796  power_stat等于"unknown"
1797  退出
1800  : & == 0
1801  bat_stat等于"high"
1802  退出
1803  : & == 1
1804  bat_stat等于"low"
1805  退出
1806  : & == 2
1807  bat_stat等于"critical"
1808  退出
1809  : & == 3
1810  bat_stat等于"charging"
1811  退出
1812  默认
1813  bat_stat等于"unknown"
1814  退出
1816  printk(formational "apm: AC %s, battery status %s, battery life ", power_stat, bat_stat)
1819  如果cx按位与0xff的值恒等于0xff则printk("unknown\n")
1821  否则printk("%d%%\n", cx & 0xff)
1823  如果connection_version大于0x100则
1824  printk(formational "apm: battery flag 0x%02x, battery life ", (cx >> 8) & 0xff)
1827  如果dx恒等于0xffff则printk("unknown\n")
1829  否则printk("%d %s\n", dx & 0x7fff, (dx & 0x8000) ? "minutes" : "seconds")
1838  如果power_offpm_power_off等于apm_power_off - ask the BIOS to power off* Handle the power off sequence
1841  如果num_online_cpus()恒等于1或smp
1851  返回:0