Merge tag 'acpi-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI updates from Rafael Wysocki: "These update the ACPICA code in the kernel to the 20180508 upstream revision and make it support the RT patch, add CPPC v3 support to the ACPI CPPC library, add a WDAT-based watchdog quirk to prevent clashes with the RTC, add quirks to the ACPI AC and battery drivers, and update the ACPI SoC drivers. Specifics: - Update the ACPICA code in the kernel to the 20180508 upstream revision including: * iASL -tc option enhancement (Bob Moore). * Debugger improvements (Bob Moore). * Support for tables larger than 1 MB in acpidump/acpixtract (Bob Moore). * Minor fixes and cleanups (Colin Ian King, Toomas Soome). - Make the ACPICA code in the kernel support the RT patch (Sebastian Andrzej Siewior, Steven Rostedt). - Add a kmemleak annotation to the ACPICA code (Larry Finger). - Add CPPC v3 support to the ACPI CPPC library and fix two issues related to CPPC (Prashanth Prakash, Al Stone). - Add an ACPI WDAT-based watchdog quirk to prefer iTCO_wdt on systems where WDAT clashes with the RTC SRAM (Mika Westerberg). - Add some quirks to the ACPI AC and battery drivers (Carlo Caione, Hans de Goede). - Update the ACPI SoC drivers for Intel (LPSS) and AMD (APD) platforms (Akshu Agrawal, Hans de Goede). - Fix up some assorted minor issues (Al Stone, Laszlo Toth, Mathieu Malaterre)" * tag 'acpi-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits) ACPICA: Mark acpi_ut_create_internal_object_dbg() memory allocations as non-leaks ACPI / watchdog: Prefer iTCO_wdt always when WDAT table uses RTC SRAM mailbox: PCC: erroneous error message when parsing ACPI PCCT ACPICA: Update version to 20180508 ACPICA: acpidump/acpixtract: Support for tables larger than 1MB ACPI: APD: Add AMD misc clock handler support clk: x86: Add ST oscout platform clock ACPICA: Update version to 20180427 ACPICA: Debugger: Removed direct support for EC address space in "Test Objects" ACPICA: Debugger: Add Package support for "test objects" command ACPICA: Improve error messages for the namespace root node ACPICA: Fix potential infinite loop in acpi_rs_dump_byte_list ACPICA: vsnprintf: this statement may fall through ACPICA: Tables: Fix spelling mistake in comment ACPICA: iASL: Enhance the -tc option (create AML hex file in C) ACPI: Add missing prototype_for arch_post_acpi_subsys_init() ACPI / tables: improve comments regarding acpi_parse_entries_array() ACPICA: Convert acpi_gbl_hardware lock back to an acpi_raw_spinlock ACPICA: provide abstraction for raw_spinlock_t ACPI / CPPC: Fix invalid PCC channel status errors ...
This commit is contained in:
@@ -49,11 +49,14 @@
|
||||
/* Definitions of the predefined namespace names */
|
||||
|
||||
#define ACPI_UNKNOWN_NAME (u32) 0x3F3F3F3F /* Unknown name is "????" */
|
||||
#define ACPI_ROOT_NAME (u32) 0x5F5F5F5C /* Root name is "\___" */
|
||||
|
||||
#define ACPI_PREFIX_MIXED (u32) 0x69706341 /* "Acpi" */
|
||||
#define ACPI_PREFIX_LOWER (u32) 0x69706361 /* "acpi" */
|
||||
|
||||
/* Root name stuff */
|
||||
|
||||
#define ACPI_ROOT_NAME (u32) 0x5F5F5F5C /* Root name is "\___" */
|
||||
#define ACPI_ROOT_PATHNAME "\\___"
|
||||
#define ACPI_NAMESPACE_ROOT "Namespace Root"
|
||||
#define ACPI_NS_ROOT_PATH "\\"
|
||||
|
||||
#endif /* __ACNAMES_H__ */
|
||||
|
@@ -97,6 +97,27 @@ acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle);
|
||||
void acpi_os_release_lock(acpi_spinlock handle, acpi_cpu_flags flags);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* RAW spinlock primitives. If the OS does not provide them, fallback to
|
||||
* spinlock primitives
|
||||
*/
|
||||
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_raw_lock
|
||||
# define acpi_os_create_raw_lock(out_handle) acpi_os_create_lock(out_handle)
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_delete_raw_lock
|
||||
# define acpi_os_delete_raw_lock(handle) acpi_os_delete_lock(handle)
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_acquire_raw_lock
|
||||
# define acpi_os_acquire_raw_lock(handle) acpi_os_acquire_lock(handle)
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_release_raw_lock
|
||||
# define acpi_os_release_raw_lock(handle, flags) \
|
||||
acpi_os_release_lock(handle, flags)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Semaphore primitives
|
||||
*/
|
||||
|
@@ -12,7 +12,7 @@
|
||||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20180313
|
||||
#define ACPI_CA_VERSION 0x20180508
|
||||
|
||||
#include <acpi/acconfig.h>
|
||||
#include <acpi/actypes.h>
|
||||
|
@@ -245,6 +245,10 @@ typedef u64 acpi_physical_address;
|
||||
#define acpi_spinlock void *
|
||||
#endif
|
||||
|
||||
#ifndef acpi_raw_spinlock
|
||||
#define acpi_raw_spinlock acpi_spinlock
|
||||
#endif
|
||||
|
||||
#ifndef acpi_semaphore
|
||||
#define acpi_semaphore void *
|
||||
#endif
|
||||
|
@@ -20,14 +20,16 @@
|
||||
#include <acpi/pcc.h>
|
||||
#include <acpi/processor.h>
|
||||
|
||||
/* Only support CPPCv2 for now. */
|
||||
#define CPPC_NUM_ENT 21
|
||||
#define CPPC_REV 2
|
||||
/* Support CPPCv2 and CPPCv3 */
|
||||
#define CPPC_V2_REV 2
|
||||
#define CPPC_V3_REV 3
|
||||
#define CPPC_V2_NUM_ENT 21
|
||||
#define CPPC_V3_NUM_ENT 23
|
||||
|
||||
#define PCC_CMD_COMPLETE_MASK (1 << 0)
|
||||
#define PCC_ERROR_MASK (1 << 2)
|
||||
|
||||
#define MAX_CPC_REG_ENT 19
|
||||
#define MAX_CPC_REG_ENT 21
|
||||
|
||||
/* CPPC specific PCC commands. */
|
||||
#define CMD_READ 0
|
||||
@@ -91,6 +93,8 @@ enum cppc_regs {
|
||||
AUTO_ACT_WINDOW,
|
||||
ENERGY_PERF,
|
||||
REFERENCE_PERF,
|
||||
LOWEST_FREQ,
|
||||
NOMINAL_FREQ,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -104,6 +108,8 @@ struct cppc_perf_caps {
|
||||
u32 nominal_perf;
|
||||
u32 lowest_perf;
|
||||
u32 lowest_nonlinear_perf;
|
||||
u32 lowest_freq;
|
||||
u32 nominal_freq;
|
||||
};
|
||||
|
||||
struct cppc_perf_ctrls {
|
||||
|
@@ -102,6 +102,7 @@
|
||||
|
||||
#define acpi_cache_t struct kmem_cache
|
||||
#define acpi_spinlock spinlock_t *
|
||||
#define acpi_raw_spinlock raw_spinlock_t *
|
||||
#define acpi_cpu_flags unsigned long
|
||||
|
||||
/* Use native linux version of acpi_os_allocate_zeroed */
|
||||
@@ -119,6 +120,10 @@
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_acquire_object
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_thread_id
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_lock
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_raw_lock
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_delete_raw_lock
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_acquire_raw_lock
|
||||
#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_release_raw_lock
|
||||
|
||||
/*
|
||||
* OSL interfaces used by debugger/disassembler
|
||||
|
@@ -90,6 +90,36 @@ static inline acpi_thread_id acpi_os_get_thread_id(void)
|
||||
lock ? AE_OK : AE_NO_MEMORY; \
|
||||
})
|
||||
|
||||
|
||||
#define acpi_os_create_raw_lock(__handle) \
|
||||
({ \
|
||||
raw_spinlock_t *lock = ACPI_ALLOCATE(sizeof(*lock)); \
|
||||
if (lock) { \
|
||||
*(__handle) = lock; \
|
||||
raw_spin_lock_init(*(__handle)); \
|
||||
} \
|
||||
lock ? AE_OK : AE_NO_MEMORY; \
|
||||
})
|
||||
|
||||
static inline acpi_cpu_flags acpi_os_acquire_raw_lock(acpi_raw_spinlock lockp)
|
||||
{
|
||||
acpi_cpu_flags flags;
|
||||
|
||||
raw_spin_lock_irqsave(lockp, flags);
|
||||
return flags;
|
||||
}
|
||||
|
||||
static inline void acpi_os_release_raw_lock(acpi_raw_spinlock lockp,
|
||||
acpi_cpu_flags flags)
|
||||
{
|
||||
raw_spin_unlock_irqrestore(lockp, flags);
|
||||
}
|
||||
|
||||
static inline void acpi_os_delete_raw_lock(acpi_raw_spinlock handle)
|
||||
{
|
||||
ACPI_FREE(handle);
|
||||
}
|
||||
|
||||
static inline u8 acpi_os_readable(void *pointer, acpi_size length)
|
||||
{
|
||||
return TRUE;
|
||||
|
Reference in New Issue
Block a user