ACPI updates for 5.9-rc1
- Eliminate significant AML processing overhead related to using operation regions in system memory by reworking the management of memory mappings in the ACPI code to defer unmap operations (to do them outside of the ACPICA locks, among other things) and making the memory operation reagion handler avoid releasing memory mappings created by it too early (Rafael Wysocki). - Update the ACPICA code in the kernel to upstream revision 20200717: * Prevent operation region reference counts from overflowing in some cases (Erik Kaneda). * Replace one-element array with flexible-array (Gustavo A. R. Silva). - Fix ACPI PCI hotplug reference counting (Rafael Wysocki). - Drop last bits of the ACPI procfs interface (Thomas Renninger). - Drop some redundant checks from the code parsing ACPI tables related to NUMA (Hanjun Guo). - Avoid redundant object evaluation in the ACPI device properties handling code (Heikki Krogerus). - Avoid unecessary memory overhead related to storing the signatures of the ACPI tables recognized by the kernel (Ard Biesheuvel). - Add missing newline characters when printing module parameter values in some places (Xiongfeng Wang). - Update the link to the ACPI specifications in some places (Tiezhu Yang). - Use the fallthrough pseudo-keyword in the ACPI code (Gustavo A. R. Silva). - Drop redundant variable initialization from the APEI code (Colin Ian King). - Drop uninitialized_var() from the ACPI PAD driver (Jason Yan). - Replace HTTP links with HTTPS ones in the ACPI code (Alexander A. Klimov). -----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAl8oO8gSHHJqd0Byand5 c29ja2kubmV0AAoJEILEb/54YlRx2nUP/iSRAW0DK4PYDNLDV1Q+y5RrQw44iMDf yfLQu3agardM1KGtPuYw5zmU0UoEYtW8s2r027bxw9Hvn0IzBh5TiDvcVjMEnbVC +6m/fWg3EStfZ9w2dxDzXDMIk/oiEZsjtWSRaDTfAIH2jc/xVcSXDojlMgBPQDu5 hIITjMbGGx783o4PNCYbIZy1ReJgd8MNQ+Xp3MCpTgbFgHMHKBOJ6B/nS8aTfilO eE5JvzhXED7qITaXYWxI9OZpRTPTNQ3eaEPbWvnw4KJ5boMfyREMGdTBipXO+kSA SwKhFysYEUAZM7Ffq0eTnWSCU7VWogAsTauIgs4+d9z8VrGhWi5+b6N/E/uwTKtj HF98xtk+Loe8V24LwN0snvv51O7P5nAH47QxwIBvQssfR8ZSgdwHtUQcckybAJhx LLmPtJrM8ZAefc9H4o0eVqumjoh1amGKC9dTY0g1j0UIE0y3ZIFHTvDNvhpTzgBk 5uUHHEiolGNWHVrs1LIMOEejqx62m+EjVc9b8XUdJqHoboTccMM73DRk/00meP/7 br/VfMI0aTjPLssvSC/ZSlTZt+ddrBm+cXw9eqruDQwdQaqxpJu+D3odjdaYSjpg luiYQrQdoDmIDh4UNuJbvG/Hub3CLzvJSqGWLExNbX7nWXxH4HIx/8PcNtVkKZRV qBXotIc+i4VD =Nn2Q -----END PGP SIGNATURE----- Merge tag 'acpi-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These eliminate significant AML processing overhead related to using operation regions in system memory, update the ACPICA code in the kernel to upstream revision 20200717 (including a fix to prevent operation region reference counts from overflowing in some cases), remove the last bits of the (long deprecated) ACPI procfs interface and do some assorted cleanups. Specifics: - Eliminate significant AML processing overhead related to using operation regions in system memory by reworking the management of memory mappings in the ACPI code to defer unmap operations (to do them outside of the ACPICA locks, among other things) and making the memory operation reagion handler avoid releasing memory mappings created by it too early (Rafael Wysocki). - Update the ACPICA code in the kernel to upstream revision 20200717: * Prevent operation region reference counts from overflowing in some cases (Erik Kaneda). * Replace one-element array with flexible-array (Gustavo A. R. Silva). - Fix ACPI PCI hotplug reference counting (Rafael Wysocki). - Drop last bits of the ACPI procfs interface (Thomas Renninger). - Drop some redundant checks from the code parsing ACPI tables related to NUMA (Hanjun Guo). - Avoid redundant object evaluation in the ACPI device properties handling code (Heikki Krogerus). - Avoid unecessary memory overhead related to storing the signatures of the ACPI tables recognized by the kernel (Ard Biesheuvel). - Add missing newline characters when printing module parameter values in some places (Xiongfeng Wang). - Update the link to the ACPI specifications in some places (Tiezhu Yang). - Use the fallthrough pseudo-keyword in the ACPI code (Gustavo A. R. Silva). - Drop redundant variable initialization from the APEI code (Colin Ian King). - Drop uninitialized_var() from the ACPI PAD driver (Jason Yan). - Replace HTTP links with HTTPS ones in the ACPI code (Alexander A. Klimov)" * tag 'acpi-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (22 commits) ACPI: APEI: remove redundant assignment to variable rc ACPI: NUMA: Remove the useless 'node >= MAX_NUMNODES' check ACPI: NUMA: Remove the useless sub table pointer check ACPI: tables: Remove the duplicated checks for acpi_parse_entries_array() ACPICA: Update version to 20200717 ACPICA: Do not increment operation_region reference counts for field units ACPICA: Replace one-element array with flexible-array ACPI: Replace HTTP links with HTTPS ones ACPI: Use valid link to the ACPI specification ACPI: OSL: Clean up the removal of unused memory mappings ACPI: OSL: Use deferred unmapping in acpi_os_unmap_iomem() ACPI: OSL: Use deferred unmapping in acpi_os_unmap_generic_address() ACPICA: Preserve memory opregion mappings ACPI: OSL: Implement deferred unmapping of ACPI memory ACPI: Use fallthrough pseudo-keyword PCI: hotplug: ACPI: Fix context refcounting in acpiphp_grab_context() ACPI: tables: avoid relocations for table signature array ACPI: PAD: Eliminate usage of uninitialized_var() macro ACPI: sysfs: add newlines when printing module parameters ACPI: EC: add newline when printing 'ec_event_clearing' module parameter ...
This commit is contained in:
commit
2baa85d692
|
@ -96,5 +96,5 @@ contents.
|
||||||
References
|
References
|
||||||
==========
|
==========
|
||||||
|
|
||||||
.. [1] http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf
|
.. [1] https://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf
|
||||||
.. [2] http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf
|
.. [2] https://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf
|
||||||
|
|
|
@ -85,9 +85,9 @@ References
|
||||||
==========
|
==========
|
||||||
|
|
||||||
[1] Hierarchical Data Extension UUID For _DSD.
|
[1] Hierarchical Data Extension UUID For _DSD.
|
||||||
<http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf>,
|
<https://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf>,
|
||||||
referenced 2018-07-17.
|
referenced 2018-07-17.
|
||||||
|
|
||||||
[2] Device Properties UUID For _DSD.
|
[2] Device Properties UUID For _DSD.
|
||||||
<http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf>,
|
<https://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf>,
|
||||||
referenced 2016-10-04.
|
referenced 2016-10-04.
|
||||||
|
|
|
@ -154,23 +154,23 @@ References
|
||||||
==========
|
==========
|
||||||
|
|
||||||
[1] _DSD (Device Specific Data) Implementation Guide.
|
[1] _DSD (Device Specific Data) Implementation Guide.
|
||||||
http://www.uefi.org/sites/default/files/resources/_DSD-implementation-guide-toplevel-1_1.htm,
|
https://www.uefi.org/sites/default/files/resources/_DSD-implementation-guide-toplevel-1_1.htm,
|
||||||
referenced 2016-10-03.
|
referenced 2016-10-03.
|
||||||
|
|
||||||
[2] Devicetree. http://www.devicetree.org, referenced 2016-10-03.
|
[2] Devicetree. https://www.devicetree.org, referenced 2016-10-03.
|
||||||
|
|
||||||
[3] Documentation/devicetree/bindings/graph.txt
|
[3] Documentation/devicetree/bindings/graph.txt
|
||||||
|
|
||||||
[4] Device Properties UUID For _DSD.
|
[4] Device Properties UUID For _DSD.
|
||||||
http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf,
|
https://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf,
|
||||||
referenced 2016-10-04.
|
referenced 2016-10-04.
|
||||||
|
|
||||||
[5] Hierarchical Data Extension UUID For _DSD.
|
[5] Hierarchical Data Extension UUID For _DSD.
|
||||||
http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf,
|
https://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf,
|
||||||
referenced 2016-10-04.
|
referenced 2016-10-04.
|
||||||
|
|
||||||
[6] Advanced Configuration and Power Interface Specification.
|
[6] Advanced Configuration and Power Interface Specification.
|
||||||
http://www.uefi.org/sites/default/files/resources/ACPI_6_1.pdf,
|
https://www.uefi.org/sites/default/files/resources/ACPI_6_1.pdf,
|
||||||
referenced 2016-10-04.
|
referenced 2016-10-04.
|
||||||
|
|
||||||
[7] _DSD Device Properties Usage Rules.
|
[7] _DSD Device Properties Usage Rules.
|
||||||
|
|
|
@ -90,7 +90,7 @@ where
|
||||||
References
|
References
|
||||||
==========
|
==========
|
||||||
|
|
||||||
[1] Device tree. <URL:http://www.devicetree.org>, referenced 2019-02-21.
|
[1] Device tree. <URL:https://www.devicetree.org>, referenced 2019-02-21.
|
||||||
|
|
||||||
[2] Advanced Configuration and Power Interface Specification.
|
[2] Advanced Configuration and Power Interface Specification.
|
||||||
<URL:https://uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf>,
|
<URL:https://uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf>,
|
||||||
|
@ -101,11 +101,11 @@ References
|
||||||
[4] Documentation/devicetree/bindings/media/video-interfaces.txt
|
[4] Documentation/devicetree/bindings/media/video-interfaces.txt
|
||||||
|
|
||||||
[5] Device Properties UUID For _DSD.
|
[5] Device Properties UUID For _DSD.
|
||||||
<URL:http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf>,
|
<URL:https://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf>,
|
||||||
referenced 2019-02-21.
|
referenced 2019-02-21.
|
||||||
|
|
||||||
[6] Hierarchical Data Extension UUID For _DSD.
|
[6] Hierarchical Data Extension UUID For _DSD.
|
||||||
<URL:http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf>,
|
<URL:https://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf>,
|
||||||
referenced 2019-02-21.
|
referenced 2019-02-21.
|
||||||
|
|
||||||
[7] Documentation/firmware-guide/acpi/dsd/data-node-references.rst
|
[7] Documentation/firmware-guide/acpi/dsd/data-node-references.rst
|
||||||
|
|
|
@ -7,7 +7,7 @@ Low Power Idle Table (LPIT)
|
||||||
To enumerate platform Low Power Idle states, Intel platforms are using
|
To enumerate platform Low Power Idle states, Intel platforms are using
|
||||||
“Low Power Idle Table” (LPIT). More details about this table can be
|
“Low Power Idle Table” (LPIT). More details about this table can be
|
||||||
downloaded from:
|
downloaded from:
|
||||||
http://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf
|
https://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf
|
||||||
|
|
||||||
Residencies for each low power state can be read via FFH
|
Residencies for each low power state can be read via FFH
|
||||||
(Function fixed hardware) or a memory mapped interface.
|
(Function fixed hardware) or a memory mapped interface.
|
||||||
|
|
|
@ -9,7 +9,7 @@ Supported systems:
|
||||||
|
|
||||||
Prefix: 'power_meter'
|
Prefix: 'power_meter'
|
||||||
|
|
||||||
Datasheet: http://acpi.info/, section 10.4.
|
Datasheet: https://uefi.org/specifications, section 10.4.
|
||||||
|
|
||||||
Author: Darrick J. Wong
|
Author: Darrick J. Wong
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ menuconfig ACPI
|
||||||
Linux support for ACPI is based on Intel Corporation's ACPI
|
Linux support for ACPI is based on Intel Corporation's ACPI
|
||||||
Component Architecture (ACPI CA). For more information on the
|
Component Architecture (ACPI CA). For more information on the
|
||||||
ACPI CA, see:
|
ACPI CA, see:
|
||||||
<http://acpica.org/>
|
<https://acpica.org/>
|
||||||
|
|
||||||
ACPI is an open industry specification originally co-developed by
|
ACPI is an open industry specification originally co-developed by
|
||||||
Hewlett-Packard, Intel, Microsoft, Phoenix, and Toshiba. Currently,
|
Hewlett-Packard, Intel, Microsoft, Phoenix, and Toshiba. Currently,
|
||||||
|
@ -40,8 +40,7 @@ menuconfig ACPI
|
||||||
the UEFI Forum and any UEFI member can join the ASWG and contribute
|
the UEFI Forum and any UEFI member can join the ASWG and contribute
|
||||||
to the ACPI specification.
|
to the ACPI specification.
|
||||||
The specification is available at:
|
The specification is available at:
|
||||||
<http://www.acpi.info>
|
<https://uefi.org/specifications>
|
||||||
<http://www.uefi.org/acpi/specs>
|
|
||||||
|
|
||||||
if ACPI
|
if ACPI
|
||||||
|
|
||||||
|
@ -99,23 +98,6 @@ config ACPI_SLEEP
|
||||||
depends on ACPI_SYSTEM_POWER_STATES_SUPPORT
|
depends on ACPI_SYSTEM_POWER_STATES_SUPPORT
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ACPI_PROCFS_POWER
|
|
||||||
bool "Deprecated power /proc/acpi directories"
|
|
||||||
depends on X86 && PROC_FS
|
|
||||||
help
|
|
||||||
For backwards compatibility, this option allows
|
|
||||||
deprecated power /proc/acpi/ directories to exist, even when
|
|
||||||
they have been replaced by functions in /sys.
|
|
||||||
The deprecated directories (and their replacements) include:
|
|
||||||
/proc/acpi/battery/* (/sys/class/power_supply/*) and
|
|
||||||
/proc/acpi/ac_adapter/* (sys/class/power_supply/*).
|
|
||||||
This option has no effect on /proc/acpi/ directories
|
|
||||||
and functions which do not yet exist in /sys.
|
|
||||||
This option, together with the proc directories, will be
|
|
||||||
deleted in the future.
|
|
||||||
|
|
||||||
Say N to delete power /proc/acpi/ directories that have moved to /sys.
|
|
||||||
|
|
||||||
config ACPI_REV_OVERRIDE_POSSIBLE
|
config ACPI_REV_OVERRIDE_POSSIBLE
|
||||||
bool "Allow supported ACPI revision to be overridden"
|
bool "Allow supported ACPI revision to be overridden"
|
||||||
depends on X86
|
depends on X86
|
||||||
|
|
|
@ -55,7 +55,6 @@ acpi-$(CONFIG_X86) += acpi_cmos_rtc.o
|
||||||
acpi-$(CONFIG_X86) += x86/apple.o
|
acpi-$(CONFIG_X86) += x86/apple.o
|
||||||
acpi-$(CONFIG_X86) += x86/utils.o
|
acpi-$(CONFIG_X86) += x86/utils.o
|
||||||
acpi-$(CONFIG_DEBUG_FS) += debugfs.o
|
acpi-$(CONFIG_DEBUG_FS) += debugfs.o
|
||||||
acpi-$(CONFIG_ACPI_PROCFS_POWER) += cm_sbs.o
|
|
||||||
acpi-y += acpi_lpat.o
|
acpi-y += acpi_lpat.o
|
||||||
acpi-$(CONFIG_ACPI_LPIT) += acpi_lpit.o
|
acpi-$(CONFIG_ACPI_LPIT) += acpi_lpit.o
|
||||||
acpi-$(CONFIG_ACPI_GENERIC_GSI) += irq.o
|
acpi-$(CONFIG_ACPI_GENERIC_GSI) += irq.o
|
||||||
|
|
|
@ -13,10 +13,6 @@
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/dmi.h>
|
#include <linux/dmi.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/seq_file.h>
|
|
||||||
#endif
|
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/power_supply.h>
|
#include <linux/power_supply.h>
|
||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
|
@ -66,12 +62,6 @@ static int acpi_ac_resume(struct device *dev);
|
||||||
#endif
|
#endif
|
||||||
static SIMPLE_DEV_PM_OPS(acpi_ac_pm, NULL, acpi_ac_resume);
|
static SIMPLE_DEV_PM_OPS(acpi_ac_pm, NULL, acpi_ac_resume);
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
extern struct proc_dir_entry *acpi_lock_ac_dir(void);
|
|
||||||
extern void *acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
static int ac_sleep_before_get_state_ms;
|
static int ac_sleep_before_get_state_ms;
|
||||||
static int ac_check_pmic = 1;
|
static int ac_check_pmic = 1;
|
||||||
|
|
||||||
|
@ -150,77 +140,6 @@ static enum power_supply_property ac_props[] = {
|
||||||
POWER_SUPPLY_PROP_ONLINE,
|
POWER_SUPPLY_PROP_ONLINE,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
/* --------------------------------------------------------------------------
|
|
||||||
FS Interface (/proc)
|
|
||||||
-------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
static struct proc_dir_entry *acpi_ac_dir;
|
|
||||||
|
|
||||||
static int acpi_ac_seq_show(struct seq_file *seq, void *offset)
|
|
||||||
{
|
|
||||||
struct acpi_ac *ac = seq->private;
|
|
||||||
|
|
||||||
|
|
||||||
if (!ac)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (acpi_ac_get_state(ac)) {
|
|
||||||
seq_puts(seq, "ERROR: Unable to read AC Adapter state\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
seq_puts(seq, "state: ");
|
|
||||||
switch (ac->state) {
|
|
||||||
case ACPI_AC_STATUS_OFFLINE:
|
|
||||||
seq_puts(seq, "off-line\n");
|
|
||||||
break;
|
|
||||||
case ACPI_AC_STATUS_ONLINE:
|
|
||||||
seq_puts(seq, "on-line\n");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
seq_puts(seq, "unknown\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int acpi_ac_add_fs(struct acpi_ac *ac)
|
|
||||||
{
|
|
||||||
struct proc_dir_entry *entry = NULL;
|
|
||||||
|
|
||||||
printk(KERN_WARNING PREFIX "Deprecated procfs I/F for AC is loaded,"
|
|
||||||
" please retry with CONFIG_ACPI_PROCFS_POWER cleared\n");
|
|
||||||
if (!acpi_device_dir(ac->device)) {
|
|
||||||
acpi_device_dir(ac->device) =
|
|
||||||
proc_mkdir(acpi_device_bid(ac->device), acpi_ac_dir);
|
|
||||||
if (!acpi_device_dir(ac->device))
|
|
||||||
return -ENODEV;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 'state' [R] */
|
|
||||||
entry = proc_create_single_data(ACPI_AC_FILE_STATE, S_IRUGO,
|
|
||||||
acpi_device_dir(ac->device), acpi_ac_seq_show, ac);
|
|
||||||
if (!entry)
|
|
||||||
return -ENODEV;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int acpi_ac_remove_fs(struct acpi_ac *ac)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (acpi_device_dir(ac->device)) {
|
|
||||||
remove_proc_entry(ACPI_AC_FILE_STATE,
|
|
||||||
acpi_device_dir(ac->device));
|
|
||||||
remove_proc_entry(acpi_device_bid(ac->device), acpi_ac_dir);
|
|
||||||
acpi_device_dir(ac->device) = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------
|
||||||
Driver Model
|
Driver Model
|
||||||
-------------------------------------------------------------------------- */
|
-------------------------------------------------------------------------- */
|
||||||
|
@ -236,7 +155,7 @@ static void acpi_ac_notify(struct acpi_device *device, u32 event)
|
||||||
default:
|
default:
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
||||||
"Unsupported event [0x%x]\n", event));
|
"Unsupported event [0x%x]\n", event));
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case ACPI_AC_NOTIFY_STATUS:
|
case ACPI_AC_NOTIFY_STATUS:
|
||||||
case ACPI_NOTIFY_BUS_CHECK:
|
case ACPI_NOTIFY_BUS_CHECK:
|
||||||
case ACPI_NOTIFY_DEVICE_CHECK:
|
case ACPI_NOTIFY_DEVICE_CHECK:
|
||||||
|
@ -348,11 +267,6 @@ static int acpi_ac_add(struct acpi_device *device)
|
||||||
psy_cfg.drv_data = ac;
|
psy_cfg.drv_data = ac;
|
||||||
|
|
||||||
ac->charger_desc.name = acpi_device_bid(device);
|
ac->charger_desc.name = acpi_device_bid(device);
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
result = acpi_ac_add_fs(ac);
|
|
||||||
if (result)
|
|
||||||
goto end;
|
|
||||||
#endif
|
|
||||||
ac->charger_desc.type = POWER_SUPPLY_TYPE_MAINS;
|
ac->charger_desc.type = POWER_SUPPLY_TYPE_MAINS;
|
||||||
ac->charger_desc.properties = ac_props;
|
ac->charger_desc.properties = ac_props;
|
||||||
ac->charger_desc.num_properties = ARRAY_SIZE(ac_props);
|
ac->charger_desc.num_properties = ARRAY_SIZE(ac_props);
|
||||||
|
@ -372,9 +286,6 @@ static int acpi_ac_add(struct acpi_device *device)
|
||||||
register_acpi_notifier(&ac->battery_nb);
|
register_acpi_notifier(&ac->battery_nb);
|
||||||
end:
|
end:
|
||||||
if (result) {
|
if (result) {
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
acpi_ac_remove_fs(ac);
|
|
||||||
#endif
|
|
||||||
kfree(ac);
|
kfree(ac);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,10 +329,6 @@ static int acpi_ac_remove(struct acpi_device *device)
|
||||||
power_supply_unregister(ac->charger);
|
power_supply_unregister(ac->charger);
|
||||||
unregister_acpi_notifier(&ac->battery_nb);
|
unregister_acpi_notifier(&ac->battery_nb);
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
acpi_ac_remove_fs(ac);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
kfree(ac);
|
kfree(ac);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -447,18 +354,8 @@ static int __init acpi_ac_init(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
acpi_ac_dir = acpi_lock_ac_dir();
|
|
||||||
if (!acpi_ac_dir)
|
|
||||||
return -ENODEV;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
result = acpi_bus_register_driver(&acpi_ac_driver);
|
result = acpi_bus_register_driver(&acpi_ac_driver);
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
acpi_unlock_ac_dir(acpi_ac_dir);
|
|
||||||
#endif
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -468,9 +365,6 @@ static int __init acpi_ac_init(void)
|
||||||
static void __exit acpi_ac_exit(void)
|
static void __exit acpi_ac_exit(void)
|
||||||
{
|
{
|
||||||
acpi_bus_unregister_driver(&acpi_ac_driver);
|
acpi_bus_unregister_driver(&acpi_ac_driver);
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
acpi_unlock_ac_dir(acpi_ac_dir);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
module_init(acpi_ac_init);
|
module_init(acpi_ac_init);
|
||||||
module_exit(acpi_ac_exit);
|
module_exit(acpi_ac_exit);
|
||||||
|
|
|
@ -88,7 +88,7 @@ static void round_robin_cpu(unsigned int tsk_index)
|
||||||
cpumask_var_t tmp;
|
cpumask_var_t tmp;
|
||||||
int cpu;
|
int cpu;
|
||||||
unsigned long min_weight = -1;
|
unsigned long min_weight = -1;
|
||||||
unsigned long uninitialized_var(preferred_cpu);
|
unsigned long preferred_cpu;
|
||||||
|
|
||||||
if (!alloc_cpumask_var(&tmp, GFP_KERNEL))
|
if (!alloc_cpumask_var(&tmp, GFP_KERNEL))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -79,7 +79,7 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev)
|
||||||
* PIIX4 models.
|
* PIIX4 models.
|
||||||
*/
|
*/
|
||||||
errata.piix4.throttle = 1;
|
errata.piix4.throttle = 1;
|
||||||
/* fall through*/
|
fallthrough;
|
||||||
|
|
||||||
case 2: /* PIIX4E */
|
case 2: /* PIIX4E */
|
||||||
case 3: /* PIIX4M */
|
case 3: /* PIIX4M */
|
||||||
|
|
|
@ -38,6 +38,7 @@ acpi_ev_system_memory_region_setup(acpi_handle handle,
|
||||||
union acpi_operand_object *region_desc =
|
union acpi_operand_object *region_desc =
|
||||||
(union acpi_operand_object *)handle;
|
(union acpi_operand_object *)handle;
|
||||||
struct acpi_mem_space_context *local_region_context;
|
struct acpi_mem_space_context *local_region_context;
|
||||||
|
struct acpi_mem_mapping *mm;
|
||||||
|
|
||||||
ACPI_FUNCTION_TRACE(ev_system_memory_region_setup);
|
ACPI_FUNCTION_TRACE(ev_system_memory_region_setup);
|
||||||
|
|
||||||
|
@ -46,13 +47,14 @@ acpi_ev_system_memory_region_setup(acpi_handle handle,
|
||||||
local_region_context =
|
local_region_context =
|
||||||
(struct acpi_mem_space_context *)*region_context;
|
(struct acpi_mem_space_context *)*region_context;
|
||||||
|
|
||||||
/* Delete a cached mapping if present */
|
/* Delete memory mappings if present */
|
||||||
|
|
||||||
if (local_region_context->mapped_length) {
|
while (local_region_context->first_mm) {
|
||||||
acpi_os_unmap_memory(local_region_context->
|
mm = local_region_context->first_mm;
|
||||||
mapped_logical_address,
|
local_region_context->first_mm = mm->next_mm;
|
||||||
local_region_context->
|
acpi_os_unmap_memory(mm->logical_address,
|
||||||
mapped_length);
|
mm->length);
|
||||||
|
ACPI_FREE(mm);
|
||||||
}
|
}
|
||||||
ACPI_FREE(local_region_context);
|
ACPI_FREE(local_region_context);
|
||||||
*region_context = NULL;
|
*region_context = NULL;
|
||||||
|
|
|
@ -473,10 +473,6 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
|
||||||
(u8)access_byte_width;
|
(u8)access_byte_width;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* An additional reference for the container */
|
|
||||||
|
|
||||||
acpi_ut_add_reference(obj_desc->field.region_obj);
|
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
|
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
|
||||||
"RegionField: BitOff %X, Off %X, Gran %X, Region %p\n",
|
"RegionField: BitOff %X, Off %X, Gran %X, Region %p\n",
|
||||||
obj_desc->field.start_field_bit_offset,
|
obj_desc->field.start_field_bit_offset,
|
||||||
|
|
|
@ -41,6 +41,7 @@ acpi_ex_system_memory_space_handler(u32 function,
|
||||||
acpi_status status = AE_OK;
|
acpi_status status = AE_OK;
|
||||||
void *logical_addr_ptr = NULL;
|
void *logical_addr_ptr = NULL;
|
||||||
struct acpi_mem_space_context *mem_info = region_context;
|
struct acpi_mem_space_context *mem_info = region_context;
|
||||||
|
struct acpi_mem_mapping *mm = mem_info->cur_mm;
|
||||||
u32 length;
|
u32 length;
|
||||||
acpi_size map_length;
|
acpi_size map_length;
|
||||||
acpi_size page_boundary_map_length;
|
acpi_size page_boundary_map_length;
|
||||||
|
@ -96,20 +97,37 @@ acpi_ex_system_memory_space_handler(u32 function,
|
||||||
* Is 1) Address below the current mapping? OR
|
* Is 1) Address below the current mapping? OR
|
||||||
* 2) Address beyond the current mapping?
|
* 2) Address beyond the current mapping?
|
||||||
*/
|
*/
|
||||||
if ((address < mem_info->mapped_physical_address) ||
|
if (!mm || (address < mm->physical_address) ||
|
||||||
(((u64) address + length) > ((u64)
|
((u64) address + length > (u64) mm->physical_address + mm->length)) {
|
||||||
mem_info->mapped_physical_address +
|
|
||||||
mem_info->mapped_length))) {
|
|
||||||
/*
|
/*
|
||||||
* The request cannot be resolved by the current memory mapping;
|
* The request cannot be resolved by the current memory mapping.
|
||||||
* Delete the existing mapping and create a new one.
|
*
|
||||||
|
* Look for an existing saved mapping covering the address range
|
||||||
|
* at hand. If found, save it as the current one and carry out
|
||||||
|
* the access.
|
||||||
*/
|
*/
|
||||||
if (mem_info->mapped_length) {
|
for (mm = mem_info->first_mm; mm; mm = mm->next_mm) {
|
||||||
|
if (mm == mem_info->cur_mm)
|
||||||
|
continue;
|
||||||
|
|
||||||
/* Valid mapping, delete it */
|
if (address < mm->physical_address)
|
||||||
|
continue;
|
||||||
|
|
||||||
acpi_os_unmap_memory(mem_info->mapped_logical_address,
|
if ((u64) address + length >
|
||||||
mem_info->mapped_length);
|
(u64) mm->physical_address + mm->length)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
mem_info->cur_mm = mm;
|
||||||
|
goto access;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Create a new mappings list entry */
|
||||||
|
mm = ACPI_ALLOCATE_ZEROED(sizeof(*mm));
|
||||||
|
if (!mm) {
|
||||||
|
ACPI_ERROR((AE_INFO,
|
||||||
|
"Unable to save memory mapping at 0x%8.8X%8.8X, size %u",
|
||||||
|
ACPI_FORMAT_UINT64(address), length));
|
||||||
|
return_ACPI_STATUS(AE_NO_MEMORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -143,29 +161,39 @@ acpi_ex_system_memory_space_handler(u32 function,
|
||||||
|
|
||||||
/* Create a new mapping starting at the address given */
|
/* Create a new mapping starting at the address given */
|
||||||
|
|
||||||
mem_info->mapped_logical_address =
|
logical_addr_ptr = acpi_os_map_memory(address, map_length);
|
||||||
acpi_os_map_memory(address, map_length);
|
if (!logical_addr_ptr) {
|
||||||
if (!mem_info->mapped_logical_address) {
|
|
||||||
ACPI_ERROR((AE_INFO,
|
ACPI_ERROR((AE_INFO,
|
||||||
"Could not map memory at 0x%8.8X%8.8X, size %u",
|
"Could not map memory at 0x%8.8X%8.8X, size %u",
|
||||||
ACPI_FORMAT_UINT64(address),
|
ACPI_FORMAT_UINT64(address),
|
||||||
(u32)map_length));
|
(u32)map_length));
|
||||||
mem_info->mapped_length = 0;
|
ACPI_FREE(mm);
|
||||||
return_ACPI_STATUS(AE_NO_MEMORY);
|
return_ACPI_STATUS(AE_NO_MEMORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save the physical address and mapping size */
|
/* Save the physical address and mapping size */
|
||||||
|
|
||||||
mem_info->mapped_physical_address = address;
|
mm->logical_address = logical_addr_ptr;
|
||||||
mem_info->mapped_length = map_length;
|
mm->physical_address = address;
|
||||||
|
mm->length = map_length;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Add the new entry to the mappigs list and save it as the
|
||||||
|
* current mapping.
|
||||||
|
*/
|
||||||
|
mm->next_mm = mem_info->first_mm;
|
||||||
|
mem_info->first_mm = mm;
|
||||||
|
|
||||||
|
mem_info->cur_mm = mm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
access:
|
||||||
/*
|
/*
|
||||||
* Generate a logical pointer corresponding to the address we want to
|
* Generate a logical pointer corresponding to the address we want to
|
||||||
* access
|
* access
|
||||||
*/
|
*/
|
||||||
logical_addr_ptr = mem_info->mapped_logical_address +
|
logical_addr_ptr = mm->logical_address +
|
||||||
((u64) address - (u64) mem_info->mapped_physical_address);
|
((u64) address - (u64) mm->physical_address);
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
||||||
"System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n",
|
"System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n",
|
||||||
|
|
|
@ -568,11 +568,6 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
|
||||||
next_object = object->buffer_field.buffer_obj;
|
next_object = object->buffer_field.buffer_obj;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
|
||||||
|
|
||||||
next_object = object->field.region_obj;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
||||||
|
|
||||||
next_object = object->bank_field.bank_obj;
|
next_object = object->bank_field.bank_obj;
|
||||||
|
@ -613,6 +608,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
||||||
case ACPI_TYPE_REGION:
|
case ACPI_TYPE_REGION:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
|
|
|
@ -263,8 +263,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node *device_node,
|
||||||
* 3) Size of the actual CID strings
|
* 3) Size of the actual CID strings
|
||||||
*/
|
*/
|
||||||
cid_list_size = sizeof(struct acpi_pnp_device_id_list) +
|
cid_list_size = sizeof(struct acpi_pnp_device_id_list) +
|
||||||
((count - 1) * sizeof(struct acpi_pnp_device_id)) +
|
(count * sizeof(struct acpi_pnp_device_id)) + string_area_size;
|
||||||
string_area_size;
|
|
||||||
|
|
||||||
cid_list = ACPI_ALLOCATE_ZEROED(cid_list_size);
|
cid_list = ACPI_ALLOCATE_ZEROED(cid_list_size);
|
||||||
if (!cid_list) {
|
if (!cid_list) {
|
||||||
|
|
|
@ -227,7 +227,7 @@ __setup("hest_disable", setup_hest_disable);
|
||||||
void __init acpi_hest_init(void)
|
void __init acpi_hest_init(void)
|
||||||
{
|
{
|
||||||
acpi_status status;
|
acpi_status status;
|
||||||
int rc = -ENODEV;
|
int rc;
|
||||||
unsigned int ghes_count = 0;
|
unsigned int ghes_count = 0;
|
||||||
|
|
||||||
if (hest_disable) {
|
if (hest_disable) {
|
||||||
|
|
|
@ -24,12 +24,6 @@
|
||||||
|
|
||||||
#include <asm/unaligned.h>
|
#include <asm/unaligned.h>
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/seq_file.h>
|
|
||||||
#include <linux/uaccess.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
#include <linux/power_supply.h>
|
#include <linux/power_supply.h>
|
||||||
|
|
||||||
|
@ -69,11 +63,6 @@ static unsigned int cache_time = 1000;
|
||||||
module_param(cache_time, uint, 0644);
|
module_param(cache_time, uint, 0644);
|
||||||
MODULE_PARM_DESC(cache_time, "cache time in milliseconds");
|
MODULE_PARM_DESC(cache_time, "cache time in milliseconds");
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
extern struct proc_dir_entry *acpi_lock_battery_dir(void);
|
|
||||||
extern void *acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static const struct acpi_device_id battery_device_ids[] = {
|
static const struct acpi_device_id battery_device_ids[] = {
|
||||||
{"PNP0C0A", 0},
|
{"PNP0C0A", 0},
|
||||||
{"", 0},
|
{"", 0},
|
||||||
|
@ -1023,226 +1012,6 @@ static void acpi_battery_refresh(struct acpi_battery *battery)
|
||||||
sysfs_add_battery(battery);
|
sysfs_add_battery(battery);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------
|
|
||||||
FS Interface (/proc)
|
|
||||||
-------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
static struct proc_dir_entry *acpi_battery_dir;
|
|
||||||
|
|
||||||
static const char *acpi_battery_units(const struct acpi_battery *battery)
|
|
||||||
{
|
|
||||||
return (battery->power_unit == ACPI_BATTERY_POWER_UNIT_MA) ?
|
|
||||||
"mA" : "mW";
|
|
||||||
}
|
|
||||||
|
|
||||||
static int acpi_battery_info_proc_show(struct seq_file *seq, void *offset)
|
|
||||||
{
|
|
||||||
struct acpi_battery *battery = seq->private;
|
|
||||||
int result = acpi_battery_update(battery, false);
|
|
||||||
|
|
||||||
if (result)
|
|
||||||
goto end;
|
|
||||||
|
|
||||||
seq_printf(seq, "present: %s\n",
|
|
||||||
acpi_battery_present(battery) ? "yes" : "no");
|
|
||||||
if (!acpi_battery_present(battery))
|
|
||||||
goto end;
|
|
||||||
if (battery->design_capacity == ACPI_BATTERY_VALUE_UNKNOWN)
|
|
||||||
seq_printf(seq, "design capacity: unknown\n");
|
|
||||||
else
|
|
||||||
seq_printf(seq, "design capacity: %d %sh\n",
|
|
||||||
battery->design_capacity,
|
|
||||||
acpi_battery_units(battery));
|
|
||||||
|
|
||||||
if (battery->full_charge_capacity == ACPI_BATTERY_VALUE_UNKNOWN)
|
|
||||||
seq_printf(seq, "last full capacity: unknown\n");
|
|
||||||
else
|
|
||||||
seq_printf(seq, "last full capacity: %d %sh\n",
|
|
||||||
battery->full_charge_capacity,
|
|
||||||
acpi_battery_units(battery));
|
|
||||||
|
|
||||||
seq_printf(seq, "battery technology: %srechargeable\n",
|
|
||||||
battery->technology ? "" : "non-");
|
|
||||||
|
|
||||||
if (battery->design_voltage == ACPI_BATTERY_VALUE_UNKNOWN)
|
|
||||||
seq_printf(seq, "design voltage: unknown\n");
|
|
||||||
else
|
|
||||||
seq_printf(seq, "design voltage: %d mV\n",
|
|
||||||
battery->design_voltage);
|
|
||||||
seq_printf(seq, "design capacity warning: %d %sh\n",
|
|
||||||
battery->design_capacity_warning,
|
|
||||||
acpi_battery_units(battery));
|
|
||||||
seq_printf(seq, "design capacity low: %d %sh\n",
|
|
||||||
battery->design_capacity_low,
|
|
||||||
acpi_battery_units(battery));
|
|
||||||
seq_printf(seq, "cycle count: %i\n", battery->cycle_count);
|
|
||||||
seq_printf(seq, "capacity granularity 1: %d %sh\n",
|
|
||||||
battery->capacity_granularity_1,
|
|
||||||
acpi_battery_units(battery));
|
|
||||||
seq_printf(seq, "capacity granularity 2: %d %sh\n",
|
|
||||||
battery->capacity_granularity_2,
|
|
||||||
acpi_battery_units(battery));
|
|
||||||
seq_printf(seq, "model number: %s\n", battery->model_number);
|
|
||||||
seq_printf(seq, "serial number: %s\n", battery->serial_number);
|
|
||||||
seq_printf(seq, "battery type: %s\n", battery->type);
|
|
||||||
seq_printf(seq, "OEM info: %s\n", battery->oem_info);
|
|
||||||
end:
|
|
||||||
if (result)
|
|
||||||
seq_printf(seq, "ERROR: Unable to read battery info\n");
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int acpi_battery_state_proc_show(struct seq_file *seq, void *offset)
|
|
||||||
{
|
|
||||||
struct acpi_battery *battery = seq->private;
|
|
||||||
int result = acpi_battery_update(battery, false);
|
|
||||||
|
|
||||||
if (result)
|
|
||||||
goto end;
|
|
||||||
|
|
||||||
seq_printf(seq, "present: %s\n",
|
|
||||||
acpi_battery_present(battery) ? "yes" : "no");
|
|
||||||
if (!acpi_battery_present(battery))
|
|
||||||
goto end;
|
|
||||||
|
|
||||||
seq_printf(seq, "capacity state: %s\n",
|
|
||||||
(battery->state & 0x04) ? "critical" : "ok");
|
|
||||||
if ((battery->state & 0x01) && (battery->state & 0x02))
|
|
||||||
seq_printf(seq,
|
|
||||||
"charging state: charging/discharging\n");
|
|
||||||
else if (battery->state & 0x01)
|
|
||||||
seq_printf(seq, "charging state: discharging\n");
|
|
||||||
else if (battery->state & 0x02)
|
|
||||||
seq_printf(seq, "charging state: charging\n");
|
|
||||||
else
|
|
||||||
seq_printf(seq, "charging state: charged\n");
|
|
||||||
|
|
||||||
if (battery->rate_now == ACPI_BATTERY_VALUE_UNKNOWN)
|
|
||||||
seq_printf(seq, "present rate: unknown\n");
|
|
||||||
else
|
|
||||||
seq_printf(seq, "present rate: %d %s\n",
|
|
||||||
battery->rate_now, acpi_battery_units(battery));
|
|
||||||
|
|
||||||
if (battery->capacity_now == ACPI_BATTERY_VALUE_UNKNOWN)
|
|
||||||
seq_printf(seq, "remaining capacity: unknown\n");
|
|
||||||
else
|
|
||||||
seq_printf(seq, "remaining capacity: %d %sh\n",
|
|
||||||
battery->capacity_now, acpi_battery_units(battery));
|
|
||||||
if (battery->voltage_now == ACPI_BATTERY_VALUE_UNKNOWN)
|
|
||||||
seq_printf(seq, "present voltage: unknown\n");
|
|
||||||
else
|
|
||||||
seq_printf(seq, "present voltage: %d mV\n",
|
|
||||||
battery->voltage_now);
|
|
||||||
end:
|
|
||||||
if (result)
|
|
||||||
seq_printf(seq, "ERROR: Unable to read battery state\n");
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int acpi_battery_alarm_proc_show(struct seq_file *seq, void *offset)
|
|
||||||
{
|
|
||||||
struct acpi_battery *battery = seq->private;
|
|
||||||
int result = acpi_battery_update(battery, false);
|
|
||||||
|
|
||||||
if (result)
|
|
||||||
goto end;
|
|
||||||
|
|
||||||
if (!acpi_battery_present(battery)) {
|
|
||||||
seq_printf(seq, "present: no\n");
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
seq_printf(seq, "alarm: ");
|
|
||||||
if (battery->alarm) {
|
|
||||||
seq_printf(seq, "%u %sh\n", battery->alarm,
|
|
||||||
acpi_battery_units(battery));
|
|
||||||
} else {
|
|
||||||
seq_printf(seq, "unsupported\n");
|
|
||||||
}
|
|
||||||
end:
|
|
||||||
if (result)
|
|
||||||
seq_printf(seq, "ERROR: Unable to read battery alarm\n");
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ssize_t acpi_battery_write_alarm(struct file *file,
|
|
||||||
const char __user * buffer,
|
|
||||||
size_t count, loff_t * ppos)
|
|
||||||
{
|
|
||||||
int result = 0;
|
|
||||||
char alarm_string[12] = { '\0' };
|
|
||||||
struct seq_file *m = file->private_data;
|
|
||||||
struct acpi_battery *battery = m->private;
|
|
||||||
|
|
||||||
if (!battery || (count > sizeof(alarm_string) - 1))
|
|
||||||
return -EINVAL;
|
|
||||||
if (!acpi_battery_present(battery)) {
|
|
||||||
result = -ENODEV;
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if (copy_from_user(alarm_string, buffer, count)) {
|
|
||||||
result = -EFAULT;
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
alarm_string[count] = '\0';
|
|
||||||
if (kstrtoint(alarm_string, 0, &battery->alarm)) {
|
|
||||||
result = -EINVAL;
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
result = acpi_battery_set_alarm(battery);
|
|
||||||
end:
|
|
||||||
if (result)
|
|
||||||
return result;
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int acpi_battery_alarm_proc_open(struct inode *inode, struct file *file)
|
|
||||||
{
|
|
||||||
return single_open(file, acpi_battery_alarm_proc_show, PDE_DATA(inode));
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct proc_ops acpi_battery_alarm_proc_ops = {
|
|
||||||
.proc_open = acpi_battery_alarm_proc_open,
|
|
||||||
.proc_read = seq_read,
|
|
||||||
.proc_write = acpi_battery_write_alarm,
|
|
||||||
.proc_lseek = seq_lseek,
|
|
||||||
.proc_release = single_release,
|
|
||||||
};
|
|
||||||
|
|
||||||
static int acpi_battery_add_fs(struct acpi_device *device)
|
|
||||||
{
|
|
||||||
pr_warn(PREFIX "Deprecated procfs I/F for battery is loaded, please retry with CONFIG_ACPI_PROCFS_POWER cleared\n");
|
|
||||||
if (!acpi_device_dir(device)) {
|
|
||||||
acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
|
|
||||||
acpi_battery_dir);
|
|
||||||
if (!acpi_device_dir(device))
|
|
||||||
return -ENODEV;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!proc_create_single_data("info", S_IRUGO, acpi_device_dir(device),
|
|
||||||
acpi_battery_info_proc_show, acpi_driver_data(device)))
|
|
||||||
return -ENODEV;
|
|
||||||
if (!proc_create_single_data("state", S_IRUGO, acpi_device_dir(device),
|
|
||||||
acpi_battery_state_proc_show, acpi_driver_data(device)))
|
|
||||||
return -ENODEV;
|
|
||||||
if (!proc_create_data("alarm", S_IFREG | S_IRUGO | S_IWUSR,
|
|
||||||
acpi_device_dir(device), &acpi_battery_alarm_proc_ops,
|
|
||||||
acpi_driver_data(device)))
|
|
||||||
return -ENODEV;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void acpi_battery_remove_fs(struct acpi_device *device)
|
|
||||||
{
|
|
||||||
if (!acpi_device_dir(device))
|
|
||||||
return;
|
|
||||||
remove_proc_subtree(acpi_device_bid(device), acpi_battery_dir);
|
|
||||||
acpi_device_dir(device) = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------
|
||||||
Driver Interface
|
Driver Interface
|
||||||
-------------------------------------------------------------------------- */
|
-------------------------------------------------------------------------- */
|
||||||
|
@ -1432,14 +1201,6 @@ static int acpi_battery_add(struct acpi_device *device)
|
||||||
if (result)
|
if (result)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
result = acpi_battery_add_fs(device);
|
|
||||||
if (result) {
|
|
||||||
acpi_battery_remove_fs(device);
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
pr_info(PREFIX "%s Slot [%s] (battery %s)\n",
|
pr_info(PREFIX "%s Slot [%s] (battery %s)\n",
|
||||||
ACPI_BATTERY_DEVICE_NAME, acpi_device_bid(device),
|
ACPI_BATTERY_DEVICE_NAME, acpi_device_bid(device),
|
||||||
device->status.battery_present ? "present" : "absent");
|
device->status.battery_present ? "present" : "absent");
|
||||||
|
@ -1468,9 +1229,6 @@ static int acpi_battery_remove(struct acpi_device *device)
|
||||||
device_init_wakeup(&device->dev, 0);
|
device_init_wakeup(&device->dev, 0);
|
||||||
battery = acpi_driver_data(device);
|
battery = acpi_driver_data(device);
|
||||||
unregister_pm_notifier(&battery->pm_nb);
|
unregister_pm_notifier(&battery->pm_nb);
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
acpi_battery_remove_fs(device);
|
|
||||||
#endif
|
|
||||||
sysfs_remove_battery(battery);
|
sysfs_remove_battery(battery);
|
||||||
mutex_destroy(&battery->lock);
|
mutex_destroy(&battery->lock);
|
||||||
mutex_destroy(&battery->sysfs_lock);
|
mutex_destroy(&battery->sysfs_lock);
|
||||||
|
@ -1531,16 +1289,7 @@ static void __init acpi_battery_init_async(void *unused, async_cookie_t cookie)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
acpi_battery_dir = acpi_lock_battery_dir();
|
|
||||||
if (!acpi_battery_dir)
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
result = acpi_bus_register_driver(&acpi_battery_driver);
|
result = acpi_bus_register_driver(&acpi_battery_driver);
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
if (result < 0)
|
|
||||||
acpi_unlock_battery_dir(acpi_battery_dir);
|
|
||||||
#endif
|
|
||||||
battery_driver_registered = (result == 0);
|
battery_driver_registered = (result == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1560,10 +1309,6 @@ static void __exit acpi_battery_exit(void)
|
||||||
acpi_bus_unregister_driver(&acpi_battery_driver);
|
acpi_bus_unregister_driver(&acpi_battery_driver);
|
||||||
battery_hook_exit();
|
battery_hook_exit();
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_ACPI_PROCFS_POWER
|
|
||||||
if (acpi_battery_dir)
|
|
||||||
acpi_unlock_battery_dir(acpi_battery_dir);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(acpi_battery_init);
|
module_init(acpi_battery_init);
|
||||||
|
|
|
@ -405,7 +405,7 @@ static void acpi_button_notify(struct acpi_device *device, u32 event)
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case ACPI_FIXED_HARDWARE_EVENT:
|
case ACPI_FIXED_HARDWARE_EVENT:
|
||||||
event = ACPI_BUTTON_NOTIFY_STATUS;
|
event = ACPI_BUTTON_NOTIFY_STATUS;
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case ACPI_BUTTON_NOTIFY_STATUS:
|
case ACPI_BUTTON_NOTIFY_STATUS:
|
||||||
input = button->input;
|
input = button->input;
|
||||||
if (button->type == ACPI_BUTTON_TYPE_LID) {
|
if (button->type == ACPI_BUTTON_TYPE_LID) {
|
||||||
|
|
|
@ -1,87 +0,0 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/acpi.h>
|
|
||||||
#include <linux/types.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/seq_file.h>
|
|
||||||
#include <acpi/acpi_bus.h>
|
|
||||||
#include <acpi/acpi_drivers.h>
|
|
||||||
|
|
||||||
#define PREFIX "ACPI: "
|
|
||||||
|
|
||||||
ACPI_MODULE_NAME("cm_sbs");
|
|
||||||
#define ACPI_AC_CLASS "ac_adapter"
|
|
||||||
#define ACPI_BATTERY_CLASS "battery"
|
|
||||||
#define _COMPONENT ACPI_SBS_COMPONENT
|
|
||||||
static struct proc_dir_entry *acpi_ac_dir;
|
|
||||||
static struct proc_dir_entry *acpi_battery_dir;
|
|
||||||
|
|
||||||
static DEFINE_MUTEX(cm_sbs_mutex);
|
|
||||||
|
|
||||||
static int lock_ac_dir_cnt;
|
|
||||||
static int lock_battery_dir_cnt;
|
|
||||||
|
|
||||||
struct proc_dir_entry *acpi_lock_ac_dir(void)
|
|
||||||
{
|
|
||||||
mutex_lock(&cm_sbs_mutex);
|
|
||||||
if (!acpi_ac_dir)
|
|
||||||
acpi_ac_dir = proc_mkdir(ACPI_AC_CLASS, acpi_root_dir);
|
|
||||||
if (acpi_ac_dir) {
|
|
||||||
lock_ac_dir_cnt++;
|
|
||||||
} else {
|
|
||||||
printk(KERN_ERR PREFIX
|
|
||||||
"Cannot create %s\n", ACPI_AC_CLASS);
|
|
||||||
}
|
|
||||||
mutex_unlock(&cm_sbs_mutex);
|
|
||||||
return acpi_ac_dir;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(acpi_lock_ac_dir);
|
|
||||||
|
|
||||||
void acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir_param)
|
|
||||||
{
|
|
||||||
mutex_lock(&cm_sbs_mutex);
|
|
||||||
if (acpi_ac_dir_param)
|
|
||||||
lock_ac_dir_cnt--;
|
|
||||||
if (lock_ac_dir_cnt == 0 && acpi_ac_dir_param && acpi_ac_dir) {
|
|
||||||
remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir);
|
|
||||||
acpi_ac_dir = NULL;
|
|
||||||
}
|
|
||||||
mutex_unlock(&cm_sbs_mutex);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(acpi_unlock_ac_dir);
|
|
||||||
|
|
||||||
struct proc_dir_entry *acpi_lock_battery_dir(void)
|
|
||||||
{
|
|
||||||
mutex_lock(&cm_sbs_mutex);
|
|
||||||
if (!acpi_battery_dir) {
|
|
||||||
acpi_battery_dir =
|
|
||||||
proc_mkdir(ACPI_BATTERY_CLASS, acpi_root_dir);
|
|
||||||
}
|
|
||||||
if (acpi_battery_dir) {
|
|
||||||
lock_battery_dir_cnt++;
|
|
||||||
} else {
|
|
||||||
printk(KERN_ERR PREFIX
|
|
||||||
"Cannot create %s\n", ACPI_BATTERY_CLASS);
|
|
||||||
}
|
|
||||||
mutex_unlock(&cm_sbs_mutex);
|
|
||||||
return acpi_battery_dir;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(acpi_lock_battery_dir);
|
|
||||||
|
|
||||||
void acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir_param)
|
|
||||||
{
|
|
||||||
mutex_lock(&cm_sbs_mutex);
|
|
||||||
if (acpi_battery_dir_param)
|
|
||||||
lock_battery_dir_cnt--;
|
|
||||||
if (lock_battery_dir_cnt == 0 && acpi_battery_dir_param
|
|
||||||
&& acpi_battery_dir) {
|
|
||||||
remove_proc_entry(ACPI_BATTERY_CLASS, acpi_root_dir);
|
|
||||||
acpi_battery_dir = NULL;
|
|
||||||
}
|
|
||||||
mutex_unlock(&cm_sbs_mutex);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(acpi_unlock_battery_dir);
|
|
|
@ -469,7 +469,7 @@ int dock_notify(struct acpi_device *adev, u32 event)
|
||||||
surprise_removal = 1;
|
surprise_removal = 1;
|
||||||
event = ACPI_NOTIFY_EJECT_REQUEST;
|
event = ACPI_NOTIFY_EJECT_REQUEST;
|
||||||
/* Fall back */
|
/* Fall back */
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case ACPI_NOTIFY_EJECT_REQUEST:
|
case ACPI_NOTIFY_EJECT_REQUEST:
|
||||||
begin_undock(ds);
|
begin_undock(ds);
|
||||||
if ((immediate_undock && !(ds->flags & DOCK_IS_ATA))
|
if ((immediate_undock && !(ds->flags & DOCK_IS_ATA))
|
||||||
|
|
|
@ -2059,13 +2059,13 @@ static int param_get_event_clearing(char *buffer,
|
||||||
{
|
{
|
||||||
switch (ec_event_clearing) {
|
switch (ec_event_clearing) {
|
||||||
case ACPI_EC_EVT_TIMING_STATUS:
|
case ACPI_EC_EVT_TIMING_STATUS:
|
||||||
return sprintf(buffer, "status");
|
return sprintf(buffer, "status\n");
|
||||||
case ACPI_EC_EVT_TIMING_QUERY:
|
case ACPI_EC_EVT_TIMING_QUERY:
|
||||||
return sprintf(buffer, "query");
|
return sprintf(buffer, "query\n");
|
||||||
case ACPI_EC_EVT_TIMING_EVENT:
|
case ACPI_EC_EVT_TIMING_EVENT:
|
||||||
return sprintf(buffer, "event");
|
return sprintf(buffer, "event\n");
|
||||||
default:
|
default:
|
||||||
return sprintf(buffer, "invalid");
|
return sprintf(buffer, "invalid\n");
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares,
|
||||||
|
|
||||||
if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle)))
|
if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle)))
|
||||||
break;
|
break;
|
||||||
/* fall through */
|
fallthrough;
|
||||||
default:
|
default:
|
||||||
if (ACPI_SUCCESS(acpi_get_handle(handle, "_EVT", &evt_handle)))
|
if (ACPI_SUCCESS(acpi_get_handle(handle, "_EVT", &evt_handle)))
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
/* ACPI 6.1 */
|
/* ACPI 6.1 */
|
||||||
#define UUID_NFIT_BUS "2f10e7a4-9e91-11e4-89d3-123b93f75cba"
|
#define UUID_NFIT_BUS "2f10e7a4-9e91-11e4-89d3-123b93f75cba"
|
||||||
|
|
||||||
/* http://pmem.io/documents/NVDIMM_DSM_Interface-V1.6.pdf */
|
/* https://pmem.io/documents/NVDIMM_DSM_Interface-V1.6.pdf */
|
||||||
#define UUID_NFIT_DIMM "4309ac30-0d11-11e4-9191-0800200c9a66"
|
#define UUID_NFIT_DIMM "4309ac30-0d11-11e4-9191-0800200c9a66"
|
||||||
|
|
||||||
/* https://github.com/HewlettPackard/hpe-nvm/blob/master/Documentation/ */
|
/* https://github.com/HewlettPackard/hpe-nvm/blob/master/Documentation/ */
|
||||||
|
|
|
@ -230,7 +230,7 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
|
||||||
pxm &= 0xff;
|
pxm &= 0xff;
|
||||||
|
|
||||||
node = acpi_map_pxm_to_node(pxm);
|
node = acpi_map_pxm_to_node(pxm);
|
||||||
if (node == NUMA_NO_NODE || node >= MAX_NUMNODES) {
|
if (node == NUMA_NO_NODE) {
|
||||||
pr_err("SRAT: Too many proximity domains.\n");
|
pr_err("SRAT: Too many proximity domains.\n");
|
||||||
goto out_err_bad_srat;
|
goto out_err_bad_srat;
|
||||||
}
|
}
|
||||||
|
@ -291,8 +291,6 @@ acpi_parse_x2apic_affinity(union acpi_subtable_headers *header,
|
||||||
struct acpi_srat_x2apic_cpu_affinity *processor_affinity;
|
struct acpi_srat_x2apic_cpu_affinity *processor_affinity;
|
||||||
|
|
||||||
processor_affinity = (struct acpi_srat_x2apic_cpu_affinity *)header;
|
processor_affinity = (struct acpi_srat_x2apic_cpu_affinity *)header;
|
||||||
if (!processor_affinity)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
acpi_table_print_srat_entry(&header->common);
|
acpi_table_print_srat_entry(&header->common);
|
||||||
|
|
||||||
|
@ -309,8 +307,6 @@ acpi_parse_processor_affinity(union acpi_subtable_headers *header,
|
||||||
struct acpi_srat_cpu_affinity *processor_affinity;
|
struct acpi_srat_cpu_affinity *processor_affinity;
|
||||||
|
|
||||||
processor_affinity = (struct acpi_srat_cpu_affinity *)header;
|
processor_affinity = (struct acpi_srat_cpu_affinity *)header;
|
||||||
if (!processor_affinity)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
acpi_table_print_srat_entry(&header->common);
|
acpi_table_print_srat_entry(&header->common);
|
||||||
|
|
||||||
|
@ -327,8 +323,6 @@ acpi_parse_gicc_affinity(union acpi_subtable_headers *header,
|
||||||
struct acpi_srat_gicc_affinity *processor_affinity;
|
struct acpi_srat_gicc_affinity *processor_affinity;
|
||||||
|
|
||||||
processor_affinity = (struct acpi_srat_gicc_affinity *)header;
|
processor_affinity = (struct acpi_srat_gicc_affinity *)header;
|
||||||
if (!processor_affinity)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
acpi_table_print_srat_entry(&header->common);
|
acpi_table_print_srat_entry(&header->common);
|
||||||
|
|
||||||
|
@ -347,8 +341,6 @@ acpi_parse_memory_affinity(union acpi_subtable_headers * header,
|
||||||
struct acpi_srat_mem_affinity *memory_affinity;
|
struct acpi_srat_mem_affinity *memory_affinity;
|
||||||
|
|
||||||
memory_affinity = (struct acpi_srat_mem_affinity *)header;
|
memory_affinity = (struct acpi_srat_mem_affinity *)header;
|
||||||
if (!memory_affinity)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
acpi_table_print_srat_entry(&header->common);
|
acpi_table_print_srat_entry(&header->common);
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,10 @@ struct acpi_ioremap {
|
||||||
void __iomem *virt;
|
void __iomem *virt;
|
||||||
acpi_physical_address phys;
|
acpi_physical_address phys;
|
||||||
acpi_size size;
|
acpi_size size;
|
||||||
unsigned long refcount;
|
union {
|
||||||
|
unsigned long refcount;
|
||||||
|
struct rcu_work rwork;
|
||||||
|
} track;
|
||||||
};
|
};
|
||||||
|
|
||||||
static LIST_HEAD(acpi_ioremaps);
|
static LIST_HEAD(acpi_ioremaps);
|
||||||
|
@ -250,7 +253,7 @@ void __iomem *acpi_os_get_iomem(acpi_physical_address phys, unsigned int size)
|
||||||
map = acpi_map_lookup(phys, size);
|
map = acpi_map_lookup(phys, size);
|
||||||
if (map) {
|
if (map) {
|
||||||
virt = map->virt + (phys - map->phys);
|
virt = map->virt + (phys - map->phys);
|
||||||
map->refcount++;
|
map->track.refcount++;
|
||||||
}
|
}
|
||||||
mutex_unlock(&acpi_ioremap_lock);
|
mutex_unlock(&acpi_ioremap_lock);
|
||||||
return virt;
|
return virt;
|
||||||
|
@ -335,7 +338,7 @@ void __iomem __ref
|
||||||
/* Check if there's a suitable mapping already. */
|
/* Check if there's a suitable mapping already. */
|
||||||
map = acpi_map_lookup(phys, size);
|
map = acpi_map_lookup(phys, size);
|
||||||
if (map) {
|
if (map) {
|
||||||
map->refcount++;
|
map->track.refcount++;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,7 +361,7 @@ void __iomem __ref
|
||||||
map->virt = virt;
|
map->virt = virt;
|
||||||
map->phys = pg_off;
|
map->phys = pg_off;
|
||||||
map->size = pg_sz;
|
map->size = pg_sz;
|
||||||
map->refcount = 1;
|
map->track.refcount = 1;
|
||||||
|
|
||||||
list_add_tail_rcu(&map->list, &acpi_ioremaps);
|
list_add_tail_rcu(&map->list, &acpi_ioremaps);
|
||||||
|
|
||||||
|
@ -374,31 +377,36 @@ void *__ref acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(acpi_os_map_memory);
|
EXPORT_SYMBOL_GPL(acpi_os_map_memory);
|
||||||
|
|
||||||
/* Must be called with mutex_lock(&acpi_ioremap_lock) */
|
static void acpi_os_map_remove(struct work_struct *work)
|
||||||
static unsigned long acpi_os_drop_map_ref(struct acpi_ioremap *map)
|
|
||||||
{
|
{
|
||||||
unsigned long refcount = --map->refcount;
|
struct acpi_ioremap *map = container_of(to_rcu_work(work),
|
||||||
|
struct acpi_ioremap,
|
||||||
|
track.rwork);
|
||||||
|
|
||||||
if (!refcount)
|
|
||||||
list_del_rcu(&map->list);
|
|
||||||
return refcount;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void acpi_os_map_cleanup(struct acpi_ioremap *map)
|
|
||||||
{
|
|
||||||
synchronize_rcu_expedited();
|
|
||||||
acpi_unmap(map->phys, map->virt);
|
acpi_unmap(map->phys, map->virt);
|
||||||
kfree(map);
|
kfree(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Must be called with mutex_lock(&acpi_ioremap_lock) */
|
||||||
|
static void acpi_os_drop_map_ref(struct acpi_ioremap *map)
|
||||||
|
{
|
||||||
|
if (--map->track.refcount)
|
||||||
|
return;
|
||||||
|
|
||||||
|
list_del_rcu(&map->list);
|
||||||
|
|
||||||
|
INIT_RCU_WORK(&map->track.rwork, acpi_os_map_remove);
|
||||||
|
queue_rcu_work(system_wq, &map->track.rwork);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* acpi_os_unmap_iomem - Drop a memory mapping reference.
|
* acpi_os_unmap_iomem - Drop a memory mapping reference.
|
||||||
* @virt: Start of the address range to drop a reference to.
|
* @virt: Start of the address range to drop a reference to.
|
||||||
* @size: Size of the address range to drop a reference to.
|
* @size: Size of the address range to drop a reference to.
|
||||||
*
|
*
|
||||||
* Look up the given virtual address range in the list of existing ACPI memory
|
* Look up the given virtual address range in the list of existing ACPI memory
|
||||||
* mappings, drop a reference to it and unmap it if there are no more active
|
* mappings, drop a reference to it and if there are no more active references
|
||||||
* references to it.
|
* to it, queue it up for later removal.
|
||||||
*
|
*
|
||||||
* During early init (when acpi_permanent_mmap has not been set yet) this
|
* During early init (when acpi_permanent_mmap has not been set yet) this
|
||||||
* routine simply calls __acpi_unmap_table() to get the job done. Since
|
* routine simply calls __acpi_unmap_table() to get the job done. Since
|
||||||
|
@ -408,7 +416,6 @@ static void acpi_os_map_cleanup(struct acpi_ioremap *map)
|
||||||
void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size)
|
void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size)
|
||||||
{
|
{
|
||||||
struct acpi_ioremap *map;
|
struct acpi_ioremap *map;
|
||||||
unsigned long refcount;
|
|
||||||
|
|
||||||
if (!acpi_permanent_mmap) {
|
if (!acpi_permanent_mmap) {
|
||||||
__acpi_unmap_table(virt, size);
|
__acpi_unmap_table(virt, size);
|
||||||
|
@ -416,23 +423,27 @@ void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size)
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_lock(&acpi_ioremap_lock);
|
mutex_lock(&acpi_ioremap_lock);
|
||||||
|
|
||||||
map = acpi_map_lookup_virt(virt, size);
|
map = acpi_map_lookup_virt(virt, size);
|
||||||
if (!map) {
|
if (!map) {
|
||||||
mutex_unlock(&acpi_ioremap_lock);
|
mutex_unlock(&acpi_ioremap_lock);
|
||||||
WARN(true, PREFIX "%s: bad address %p\n", __func__, virt);
|
WARN(true, PREFIX "%s: bad address %p\n", __func__, virt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
refcount = acpi_os_drop_map_ref(map);
|
acpi_os_drop_map_ref(map);
|
||||||
mutex_unlock(&acpi_ioremap_lock);
|
|
||||||
|
|
||||||
if (!refcount)
|
mutex_unlock(&acpi_ioremap_lock);
|
||||||
acpi_os_map_cleanup(map);
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(acpi_os_unmap_iomem);
|
EXPORT_SYMBOL_GPL(acpi_os_unmap_iomem);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* acpi_os_unmap_memory - Drop a memory mapping reference.
|
||||||
|
* @virt: Start of the address range to drop a reference to.
|
||||||
|
* @size: Size of the address range to drop a reference to.
|
||||||
|
*/
|
||||||
void __ref acpi_os_unmap_memory(void *virt, acpi_size size)
|
void __ref acpi_os_unmap_memory(void *virt, acpi_size size)
|
||||||
{
|
{
|
||||||
return acpi_os_unmap_iomem((void __iomem *)virt, size);
|
acpi_os_unmap_iomem((void __iomem *)virt, size);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(acpi_os_unmap_memory);
|
EXPORT_SYMBOL_GPL(acpi_os_unmap_memory);
|
||||||
|
|
||||||
|
@ -461,7 +472,6 @@ void acpi_os_unmap_generic_address(struct acpi_generic_address *gas)
|
||||||
{
|
{
|
||||||
u64 addr;
|
u64 addr;
|
||||||
struct acpi_ioremap *map;
|
struct acpi_ioremap *map;
|
||||||
unsigned long refcount;
|
|
||||||
|
|
||||||
if (gas->space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY)
|
if (gas->space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY)
|
||||||
return;
|
return;
|
||||||
|
@ -472,16 +482,15 @@ void acpi_os_unmap_generic_address(struct acpi_generic_address *gas)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mutex_lock(&acpi_ioremap_lock);
|
mutex_lock(&acpi_ioremap_lock);
|
||||||
|
|
||||||
map = acpi_map_lookup(addr, gas->bit_width / 8);
|
map = acpi_map_lookup(addr, gas->bit_width / 8);
|
||||||
if (!map) {
|
if (!map) {
|
||||||
mutex_unlock(&acpi_ioremap_lock);
|
mutex_unlock(&acpi_ioremap_lock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
refcount = acpi_os_drop_map_ref(map);
|
acpi_os_drop_map_ref(map);
|
||||||
mutex_unlock(&acpi_ioremap_lock);
|
|
||||||
|
|
||||||
if (!refcount)
|
mutex_unlock(&acpi_ioremap_lock);
|
||||||
acpi_os_map_cleanup(map);
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(acpi_os_unmap_generic_address);
|
EXPORT_SYMBOL(acpi_os_unmap_generic_address);
|
||||||
|
|
||||||
|
|
|
@ -203,8 +203,7 @@ static void tsc_check_state(int state)
|
||||||
*/
|
*/
|
||||||
if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC))
|
if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC))
|
||||||
return;
|
return;
|
||||||
|
fallthrough;
|
||||||
/*FALL THROUGH*/
|
|
||||||
default:
|
default:
|
||||||
/* TSC could halt in idle, so notify users */
|
/* TSC could halt in idle, so notify users */
|
||||||
if (state > ACPI_STATE_C1)
|
if (state > ACPI_STATE_C1)
|
||||||
|
|
|
@ -606,13 +606,7 @@ static struct fwnode_handle *
|
||||||
acpi_fwnode_get_named_child_node(const struct fwnode_handle *fwnode,
|
acpi_fwnode_get_named_child_node(const struct fwnode_handle *fwnode,
|
||||||
const char *childname)
|
const char *childname)
|
||||||
{
|
{
|
||||||
char name[ACPI_PATH_SEGMENT_LENGTH];
|
|
||||||
struct fwnode_handle *child;
|
struct fwnode_handle *child;
|
||||||
struct acpi_buffer path;
|
|
||||||
acpi_status status;
|
|
||||||
|
|
||||||
path.length = sizeof(name);
|
|
||||||
path.pointer = name;
|
|
||||||
|
|
||||||
fwnode_for_each_child_node(fwnode, child) {
|
fwnode_for_each_child_node(fwnode, child) {
|
||||||
if (is_acpi_data_node(child)) {
|
if (is_acpi_data_node(child)) {
|
||||||
|
@ -621,12 +615,8 @@ acpi_fwnode_get_named_child_node(const struct fwnode_handle *fwnode,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = acpi_get_name(ACPI_HANDLE_FWNODE(child),
|
if (!strncmp(acpi_device_bid(to_acpi_device_node(child)),
|
||||||
ACPI_SINGLE_NAME, &path);
|
childname, ACPI_NAMESEG_SIZE))
|
||||||
if (ACPI_FAILURE(status))
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (!strncmp(name, childname, ACPI_NAMESEG_SIZE))
|
|
||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -373,7 +373,7 @@ unsigned int acpi_dev_get_irq_type(int triggering, int polarity)
|
||||||
case ACPI_ACTIVE_BOTH:
|
case ACPI_ACTIVE_BOTH:
|
||||||
if (triggering == ACPI_EDGE_SENSITIVE)
|
if (triggering == ACPI_EDGE_SENSITIVE)
|
||||||
return IRQ_TYPE_EDGE_BOTH;
|
return IRQ_TYPE_EDGE_BOTH;
|
||||||
/* fall through */
|
fallthrough;
|
||||||
default:
|
default:
|
||||||
return IRQ_TYPE_NONE;
|
return IRQ_TYPE_NONE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
|
||||||
table->serial_port.access_width))) {
|
table->serial_port.access_width))) {
|
||||||
default:
|
default:
|
||||||
pr_err("Unexpected SPCR Access Width. Defaulting to byte size\n");
|
pr_err("Unexpected SPCR Access Width. Defaulting to byte size\n");
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case 8:
|
case 8:
|
||||||
iotype = "mmio";
|
iotype = "mmio";
|
||||||
break;
|
break;
|
||||||
|
@ -128,7 +128,7 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
|
||||||
switch (table->interface_type) {
|
switch (table->interface_type) {
|
||||||
case ACPI_DBG2_ARM_SBSA_32BIT:
|
case ACPI_DBG2_ARM_SBSA_32BIT:
|
||||||
iotype = "mmio32";
|
iotype = "mmio32";
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case ACPI_DBG2_ARM_PL011:
|
case ACPI_DBG2_ARM_PL011:
|
||||||
case ACPI_DBG2_ARM_SBSA_GENERIC:
|
case ACPI_DBG2_ARM_SBSA_GENERIC:
|
||||||
case ACPI_DBG2_BCM2835:
|
case ACPI_DBG2_BCM2835:
|
||||||
|
|
|
@ -214,7 +214,7 @@ static int param_set_trace_method_name(const char *val,
|
||||||
|
|
||||||
static int param_get_trace_method_name(char *buffer, const struct kernel_param *kp)
|
static int param_get_trace_method_name(char *buffer, const struct kernel_param *kp)
|
||||||
{
|
{
|
||||||
return scnprintf(buffer, PAGE_SIZE, "%s", acpi_gbl_trace_method_name);
|
return scnprintf(buffer, PAGE_SIZE, "%s\n", acpi_gbl_trace_method_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct kernel_param_ops param_ops_trace_method = {
|
static const struct kernel_param_ops param_ops_trace_method = {
|
||||||
|
@ -271,15 +271,15 @@ static int param_set_trace_state(const char *val,
|
||||||
static int param_get_trace_state(char *buffer, const struct kernel_param *kp)
|
static int param_get_trace_state(char *buffer, const struct kernel_param *kp)
|
||||||
{
|
{
|
||||||
if (!(acpi_gbl_trace_flags & ACPI_TRACE_ENABLED))
|
if (!(acpi_gbl_trace_flags & ACPI_TRACE_ENABLED))
|
||||||
return sprintf(buffer, "disable");
|
return sprintf(buffer, "disable\n");
|
||||||
else {
|
else {
|
||||||
if (acpi_gbl_trace_method_name) {
|
if (acpi_gbl_trace_method_name) {
|
||||||
if (acpi_gbl_trace_flags & ACPI_TRACE_ONESHOT)
|
if (acpi_gbl_trace_flags & ACPI_TRACE_ONESHOT)
|
||||||
return sprintf(buffer, "method-once");
|
return sprintf(buffer, "method-once\n");
|
||||||
else
|
else
|
||||||
return sprintf(buffer, "method");
|
return sprintf(buffer, "method\n");
|
||||||
} else
|
} else
|
||||||
return sprintf(buffer, "enable");
|
return sprintf(buffer, "enable\n");
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -302,7 +302,7 @@ static int param_get_acpica_version(char *buffer,
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = sprintf(buffer, "%x", ACPI_CA_VERSION);
|
result = sprintf(buffer, "%x\n", ACPI_CA_VERSION);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -292,20 +292,6 @@ static int __init acpi_parse_entries_array(char *id, unsigned long table_size,
|
||||||
int errs = 0;
|
int errs = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (acpi_disabled)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
if (!id)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
if (!table_size)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
if (!table_header) {
|
|
||||||
pr_warn("%4.4s not present\n", id);
|
|
||||||
return -ENODEV;
|
|
||||||
}
|
|
||||||
|
|
||||||
table_end = (unsigned long)table_header + table_header->length;
|
table_end = (unsigned long)table_header + table_header->length;
|
||||||
|
|
||||||
/* Parse all entries looking for a match. */
|
/* Parse all entries looking for a match. */
|
||||||
|
@ -371,6 +357,9 @@ int __init acpi_table_parse_entries_array(char *id,
|
||||||
if (!id)
|
if (!id)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (!table_size)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if (!strncmp(id, ACPI_SIG_MADT, 4))
|
if (!strncmp(id, ACPI_SIG_MADT, 4))
|
||||||
instance = acpi_apic_instance;
|
instance = acpi_apic_instance;
|
||||||
|
|
||||||
|
@ -490,7 +479,7 @@ static u8 __init acpi_table_checksum(u8 *buffer, u32 length)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* All but ACPI_SIG_RSDP and ACPI_SIG_FACS: */
|
/* All but ACPI_SIG_RSDP and ACPI_SIG_FACS: */
|
||||||
static const char * const table_sigs[] = {
|
static const char table_sigs[][ACPI_NAMESEG_SIZE] __initconst = {
|
||||||
ACPI_SIG_BERT, ACPI_SIG_BGRT, ACPI_SIG_CPEP, ACPI_SIG_ECDT,
|
ACPI_SIG_BERT, ACPI_SIG_BGRT, ACPI_SIG_CPEP, ACPI_SIG_ECDT,
|
||||||
ACPI_SIG_EINJ, ACPI_SIG_ERST, ACPI_SIG_HEST, ACPI_SIG_MADT,
|
ACPI_SIG_EINJ, ACPI_SIG_ERST, ACPI_SIG_HEST, ACPI_SIG_MADT,
|
||||||
ACPI_SIG_MSCT, ACPI_SIG_SBST, ACPI_SIG_SLIT, ACPI_SIG_SRAT,
|
ACPI_SIG_MSCT, ACPI_SIG_SBST, ACPI_SIG_SLIT, ACPI_SIG_SRAT,
|
||||||
|
@ -501,7 +490,7 @@ static const char * const table_sigs[] = {
|
||||||
ACPI_SIG_WDDT, ACPI_SIG_WDRT, ACPI_SIG_DSDT, ACPI_SIG_FADT,
|
ACPI_SIG_WDDT, ACPI_SIG_WDRT, ACPI_SIG_DSDT, ACPI_SIG_FADT,
|
||||||
ACPI_SIG_PSDT, ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT,
|
ACPI_SIG_PSDT, ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT,
|
||||||
ACPI_SIG_IORT, ACPI_SIG_NFIT, ACPI_SIG_HMAT, ACPI_SIG_PPTT,
|
ACPI_SIG_IORT, ACPI_SIG_NFIT, ACPI_SIG_HMAT, ACPI_SIG_PPTT,
|
||||||
ACPI_SIG_NHLT, NULL };
|
ACPI_SIG_NHLT };
|
||||||
|
|
||||||
#define ACPI_HEADER_SIZE sizeof(struct acpi_table_header)
|
#define ACPI_HEADER_SIZE sizeof(struct acpi_table_header)
|
||||||
|
|
||||||
|
@ -548,11 +537,11 @@ void __init acpi_table_upgrade(void)
|
||||||
|
|
||||||
table = file.data;
|
table = file.data;
|
||||||
|
|
||||||
for (sig = 0; table_sigs[sig]; sig++)
|
for (sig = 0; sig < ARRAY_SIZE(table_sigs); sig++)
|
||||||
if (!memcmp(table->signature, table_sigs[sig], 4))
|
if (!memcmp(table->signature, table_sigs[sig], 4))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (!table_sigs[sig]) {
|
if (sig >= ARRAY_SIZE(table_sigs)) {
|
||||||
pr_err("ACPI OVERRIDE: Unknown signature [%s%s]\n",
|
pr_err("ACPI OVERRIDE: Unknown signature [%s%s]\n",
|
||||||
cpio_path, file.name);
|
cpio_path, file.name);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -122,13 +122,21 @@ static struct acpiphp_context *acpiphp_grab_context(struct acpi_device *adev)
|
||||||
struct acpiphp_context *context;
|
struct acpiphp_context *context;
|
||||||
|
|
||||||
acpi_lock_hp_context();
|
acpi_lock_hp_context();
|
||||||
|
|
||||||
context = acpiphp_get_context(adev);
|
context = acpiphp_get_context(adev);
|
||||||
if (!context || context->func.parent->is_going_away) {
|
if (!context)
|
||||||
acpi_unlock_hp_context();
|
goto unlock;
|
||||||
return NULL;
|
|
||||||
|
if (context->func.parent->is_going_away) {
|
||||||
|
acpiphp_put_context(context);
|
||||||
|
context = NULL;
|
||||||
|
goto unlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
get_bridge(context->func.parent);
|
get_bridge(context->func.parent);
|
||||||
acpiphp_put_context(context);
|
acpiphp_put_context(context);
|
||||||
|
|
||||||
|
unlock:
|
||||||
acpi_unlock_hp_context();
|
acpi_unlock_hp_context();
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
|
@ -527,8 +527,8 @@ static void program_hpx_type3_register(struct pci_dev *dev,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case HPX_CFG_VEND_CAP: /* Fall through */
|
case HPX_CFG_VEND_CAP:
|
||||||
case HPX_CFG_DVSEC: /* Fall through */
|
case HPX_CFG_DVSEC:
|
||||||
default:
|
default:
|
||||||
pci_warn(dev, "Encountered _HPX type 3 with unsupported config space location");
|
pci_warn(dev, "Encountered _HPX type 3 with unsupported config space location");
|
||||||
return;
|
return;
|
||||||
|
@ -1001,7 +1001,7 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
|
||||||
error = -EBUSY;
|
error = -EBUSY;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Fall through */
|
fallthrough;
|
||||||
case PCI_D0:
|
case PCI_D0:
|
||||||
case PCI_D1:
|
case PCI_D1:
|
||||||
case PCI_D2:
|
case PCI_D2:
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||||
|
|
||||||
#define ACPI_CA_VERSION 0x20200528
|
#define ACPI_CA_VERSION 0x20200717
|
||||||
|
|
||||||
#include <acpi/acconfig.h>
|
#include <acpi/acconfig.h>
|
||||||
#include <acpi/actypes.h>
|
#include <acpi/actypes.h>
|
||||||
|
|
|
@ -1146,7 +1146,7 @@ struct acpi_pnp_device_id {
|
||||||
struct acpi_pnp_device_id_list {
|
struct acpi_pnp_device_id_list {
|
||||||
u32 count; /* Number of IDs in Ids array */
|
u32 count; /* Number of IDs in Ids array */
|
||||||
u32 list_size; /* Size of list, including ID strings */
|
u32 list_size; /* Size of list, including ID strings */
|
||||||
struct acpi_pnp_device_id ids[1]; /* ID array */
|
struct acpi_pnp_device_id ids[]; /* ID array */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1201,12 +1201,18 @@ struct acpi_pci_id {
|
||||||
u16 function;
|
u16 function;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct acpi_mem_mapping {
|
||||||
|
acpi_physical_address physical_address;
|
||||||
|
u8 *logical_address;
|
||||||
|
acpi_size length;
|
||||||
|
struct acpi_mem_mapping *next_mm;
|
||||||
|
};
|
||||||
|
|
||||||
struct acpi_mem_space_context {
|
struct acpi_mem_space_context {
|
||||||
u32 length;
|
u32 length;
|
||||||
acpi_physical_address address;
|
acpi_physical_address address;
|
||||||
acpi_physical_address mapped_physical_address;
|
struct acpi_mem_mapping *cur_mm;
|
||||||
u8 *mapped_logical_address;
|
struct acpi_mem_mapping *first_mm;
|
||||||
acpi_size mapped_length;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -44,7 +44,7 @@ struct tboot_acpi_generic_address {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* combines Sx info from FADT and FACS tables per ACPI 2.0+ spec
|
* combines Sx info from FADT and FACS tables per ACPI 2.0+ spec
|
||||||
* (http://www.acpi.info/)
|
* (https://uefi.org/specifications)
|
||||||
*/
|
*/
|
||||||
struct tboot_acpi_sleep_info {
|
struct tboot_acpi_sleep_info {
|
||||||
struct tboot_acpi_generic_address pm1a_cnt_blk;
|
struct tboot_acpi_generic_address pm1a_cnt_blk;
|
||||||
|
|
|
@ -75,7 +75,7 @@ By default only values of core zero are displayed. How to display settings of
|
||||||
other cores is described in the cpupower(1) manpage in the \-\-cpu option
|
other cores is described in the cpupower(1) manpage in the \-\-cpu option
|
||||||
section.
|
section.
|
||||||
.SH REFERENCES
|
.SH REFERENCES
|
||||||
http://www.acpi.info/spec.htm
|
https://uefi.org/specifications
|
||||||
.SH "FILES"
|
.SH "FILES"
|
||||||
.nf
|
.nf
|
||||||
\fI/sys/devices/system/cpu/cpu*/cpuidle/state*\fP
|
\fI/sys/devices/system/cpu/cpu*/cpuidle/state*\fP
|
||||||
|
|
Loading…
Reference in New Issue
Block a user