ACPI updates for 5.12-rc1

- Update ACPICA code in the kernel to upstream revision 20201113
    with changes as follows:
 
    * Remove the MTMR (Mid-Timer) table (Al Stone).
    * Remove the VRTC table (Al Stone).
    * Add type casts for string functions (Bob Moore).
    * Update all copyrights to 2021 (Bob Moore).
    * Fix exception code class checks (Maximilian Luz).
    * Clean up exception code class checks (Maximilian Luz).
    * Fix -Wfallthrough (Nick Desaulniers).
 
  - Add support for setting and reading global profile of the platform
    along with documentation (Mark Pearson, Hans de Goede, Jiaxun Yang).
 
  - Fix fwnode properties matching and clean up the code handling
    device properties and its documentation (Rafael Wysocki, Andy
    Shevchenko).
 
  - Clean up ACPI-based device enumeration code (Rafael Wysocki).
 
  - Clean up the CPPC support library code (Ionela Voinescu).
 
  - Clean up the APEI support code (Yang Li, Yazen Ghannam).
 
  - Update GPIO-related properties documentation (Flavio Suligoi).
 
  - Consolidate and clean up the printing of messages in several
    places (Rafael Wysocki).
 
  - Fix error code path in configfs handling code (Qinglang Miao).
 
  - Use DEVICE_ATTR_<RW|RO|WO> macros where applicable (Dwaipayan Ray).
 
  - Replace tests for !ACPI_FAILURE with tests for ACPI_SUCCESS in
    multiple places (Bjorn Helgaas).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmAqu2wSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxyWYQAIGKknnitF3TxHyXj5Ka+RQXlvygYAZo
 9rQHy9EwUjkWpEiMZf87haWr3bp3EY1y7CnSdYiL9JgRJP9bqXI4ZQO8R2vXpV03
 NJ46NO7/qNGF1dp5Zbt/QSObkk1yloqNPzU3gH/yo+xNHEc0OzjD9roJr7QA1Oes
 ibCCmSG9mpMOVdNCzwIK+hiY6IdQCWIQyY/DZwTaf66U1+ZVTLsWNtVWzADNOKIz
 DcXW54LZAt7c8kNcwwRxqAac+JOQ/RWBpvnexwgPEV82blad/+nd9egHlTjiEJCl
 fxBmnMNqRcClrgo5SCvJNh1Z17d3bzhPUbF1K2RMiim2JSRXAZxK8euxVGTff2zI
 SKsgFcOqLPHYtM0po5V7fgYCRnk6M1aI44s26JCei5hSM1TrlwddKIuR/D42/73O
 F4TCGmkJMEUFltkpUAqo4gqoZcB7TZW/YX7pjy59yNw0VP8mGQSu+xU1SEdvasTg
 XYbVeFUoDe6QLGqu8ukDq7GeXnV16t6Q2b2A+RxmFaKFZGGUH+IPKQp1XbGLnhnM
 JKirrQnwwHqCZOu7D4LoSOgUvHYIF7B+nTA10QA5liq3XvYwjszFOG79cBImSaeV
 jxx7rgoZ55H45gfB2kQE6OwO7RmFZ4bEB4/k/Oav7ewOPFiY5hrxJt2OIaJYLE87
 pcGH533ZlBoS
 =WpL7
 -----END PGP SIGNATURE-----

Merge tag 'acpi-5.12-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 upstream revision
  20210105, fix and clean up the handling of device properties, add
  support for setting global profile of the platform, clean up device
  enumeration, the CPPC library, the APEI support and more, update the
  documentation, consolidate the printing of messages in several places
  and make assorted janitorial changes.

  Specifics:

   - Update ACPICA code in the kernel to upstream revision 20201113 with
     changes as follows:

      * Remove the MTMR (Mid-Timer) table (Al Stone).
      * Remove the VRTC table (Al Stone).
      * Add type casts for string functions (Bob Moore).
      * Update all copyrights to 2021 (Bob Moore).
      * Fix exception code class checks (Maximilian Luz).
      * Clean up exception code class checks (Maximilian Luz).
      * Fix -Wfallthrough (Nick Desaulniers).

   - Add support for setting and reading global profile of the platform
     along with documentation (Mark Pearson, Hans de Goede, Jiaxun
     Yang).

   - Fix fwnode properties matching and clean up the code handling
     device properties and its documentation (Rafael Wysocki, Andy
     Shevchenko).

   - Clean up ACPI-based device enumeration code (Rafael Wysocki).

   - Clean up the CPPC support library code (Ionela Voinescu).

   - Clean up the APEI support code (Yang Li, Yazen Ghannam).

   - Update GPIO-related properties documentation (Flavio Suligoi).

   - Consolidate and clean up the printing of messages in several places
     (Rafael Wysocki).

   - Fix error code path in configfs handling code (Qinglang Miao).

   - Use DEVICE_ATTR_<RW|RO|WO> macros where applicable (Dwaipayan Ray).

   - Replace tests for !ACPI_FAILURE with tests for ACPI_SUCCESS in
     multiple places (Bjorn Helgaas)"

* tag 'acpi-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (44 commits)
  ACPI: property: Satisfy kernel doc validator (part 2)
  ACPI: property: Satisfy kernel doc validator (part 1)
  ACPI: property: Make acpi_node_prop_read() static
  ACPI: property: Remove dead code
  ACPI: property: Fix fwnode string properties matching
  ACPI: OSL: Clean up printing messages
  ACPI: OSL: Rework acpi_check_resource_conflict()
  ACPI: APEI: ERST: remove unneeded semicolon
  ACPI: thermal: Clean up printing messages
  ACPI: video: Clean up printing messages
  ACPI: button: Clean up printing messages
  ACPI: battery: Clean up printing messages
  ACPI: AC: Clean up printing messages
  ACPI: bus: Drop ACPI_BUS_COMPONENT which is not used any more
  ACPI: utils: Clean up printing messages
  ACPI: scan: Clean up printing messages
  ACPI: bus: Clean up printing messages
  ACPI: PM: Clean up printing messages
  ACPI: power: Clean up printing messages
  ACPI: APEI: Add is_generic_error() to identify GHES sources
  ...
This commit is contained in:
Linus Torvalds 2021-02-20 21:50:59 -08:00
commit 3c8f504b3a
218 changed files with 950 additions and 792 deletions

View file

@ -3,7 +3,7 @@
*
* Name: acbuffer.h - Support for buffers returned by ACPI predefined names
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/

View file

@ -3,7 +3,7 @@
*
* Name: acconfig.h - Global configuration constants
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/

View file

@ -3,7 +3,7 @@
*
* Name: acexcep.h - Exception codes returned by the ACPI subsystem
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/
@ -59,11 +59,11 @@ struct acpi_exception_info {
#define AE_OK (acpi_status) 0x0000
#define ACPI_ENV_EXCEPTION(status) (status & AE_CODE_ENVIRONMENTAL)
#define ACPI_AML_EXCEPTION(status) (status & AE_CODE_AML)
#define ACPI_PROG_EXCEPTION(status) (status & AE_CODE_PROGRAMMER)
#define ACPI_TABLE_EXCEPTION(status) (status & AE_CODE_ACPI_TABLES)
#define ACPI_CNTL_EXCEPTION(status) (status & AE_CODE_CONTROL)
#define ACPI_ENV_EXCEPTION(status) (((status) & AE_CODE_MASK) == AE_CODE_ENVIRONMENTAL)
#define ACPI_AML_EXCEPTION(status) (((status) & AE_CODE_MASK) == AE_CODE_AML)
#define ACPI_PROG_EXCEPTION(status) (((status) & AE_CODE_MASK) == AE_CODE_PROGRAMMER)
#define ACPI_TABLE_EXCEPTION(status) (((status) & AE_CODE_MASK) == AE_CODE_ACPI_TABLES)
#define ACPI_CNTL_EXCEPTION(status) (((status) & AE_CODE_MASK) == AE_CODE_CONTROL)
/*
* Environmental exceptions

View file

@ -3,7 +3,7 @@
*
* Name: acnames.h - Global names and strings
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/

View file

@ -3,7 +3,7 @@
*
* Name: acoutput.h -- debug output
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/

View file

@ -3,7 +3,7 @@
*
* Name: acpi.h - Master public include file used to interface to ACPICA
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/

View file

@ -15,19 +15,12 @@
* Please update drivers/acpi/debug.c and Documentation/firmware-guide/acpi/debug.rst
* if you add to this list.
*/
#define ACPI_BUS_COMPONENT 0x00010000
#define ACPI_AC_COMPONENT 0x00020000
#define ACPI_BATTERY_COMPONENT 0x00040000
#define ACPI_BUTTON_COMPONENT 0x00080000
#define ACPI_SBS_COMPONENT 0x00100000
#define ACPI_FAN_COMPONENT 0x00200000
#define ACPI_PCI_COMPONENT 0x00400000
#define ACPI_POWER_COMPONENT 0x00800000
#define ACPI_CONTAINER_COMPONENT 0x01000000
#define ACPI_SYSTEM_COMPONENT 0x02000000
#define ACPI_THERMAL_COMPONENT 0x04000000
#define ACPI_MEMORY_DEVICE_COMPONENT 0x08000000
#define ACPI_VIDEO_COMPONENT 0x10000000
#define ACPI_PROCESSOR_COMPONENT 0x20000000
/*

View file

@ -5,7 +5,7 @@
* interfaces must be implemented by OSL to interface the
* ACPI components to the host operating system.
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/

View file

@ -3,7 +3,7 @@
*
* Name: acpixf.h - External interfaces to the ACPI subsystem
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/
@ -12,7 +12,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x20201113
#define ACPI_CA_VERSION 0x20210105
#include <acpi/acconfig.h>
#include <acpi/actypes.h>

View file

@ -3,7 +3,7 @@
*
* Name: acrestyp.h - Defines, types, and structures for resource descriptors
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/

View file

@ -3,7 +3,7 @@
*
* Name: actbl.h - Basic ACPI Table Definitions
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/

View file

@ -3,7 +3,7 @@
*
* Name: actbl1.h - Additional ACPI table definitions
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/

View file

@ -3,7 +3,7 @@
*
* Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec)
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/
@ -33,7 +33,6 @@
#define ACPI_SIG_MPST "MPST" /* Memory Power State Table */
#define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */
#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
#define ACPI_SIG_MTMR "MTMR" /* MID Timer table */
#define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */
#define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */
#define ACPI_SIG_PDTT "PDTT" /* Platform Debug Trigger Table */
@ -935,29 +934,6 @@ struct acpi_table_msdm {
struct acpi_table_header header; /* Common ACPI table header */
};
/*******************************************************************************
*
* MTMR - MID Timer Table
* Version 1
*
* Conforms to "Simple Firmware Interface Specification",
* Draft 0.8.2, Oct 19, 2010
* NOTE: The ACPI MTMR is equivalent to the SFI MTMR table.
*
******************************************************************************/
struct acpi_table_mtmr {
struct acpi_table_header header; /* Common ACPI table header */
};
/* MTMR entry */
struct acpi_mtmr_entry {
struct acpi_generic_address physical_address;
u32 frequency;
u32 irq;
};
/*******************************************************************************
*
* NFIT - NVDIMM Interface Table (ACPI 6.0+)

View file

@ -3,7 +3,7 @@
*
* Name: actbl3.h - ACPI Table Definitions
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/
@ -33,7 +33,6 @@
#define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
#define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */
#define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
#define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */
#define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */
#define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
#define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */
@ -484,28 +483,6 @@ struct acpi_table_uefi {
u16 data_offset; /* Offset of remaining data in table */
};
/*******************************************************************************
*
* VRTC - Virtual Real Time Clock Table
* Version 1
*
* Conforms to "Simple Firmware Interface Specification",
* Draft 0.8.2, Oct 19, 2010
* NOTE: The ACPI VRTC is equivalent to The SFI MRTC table.
*
******************************************************************************/
struct acpi_table_vrtc {
struct acpi_table_header header; /* Common ACPI table header */
};
/* VRTC entry */
struct acpi_vrtc_entry {
struct acpi_generic_address physical_address;
u32 irq;
};
/*******************************************************************************
*
* WAET - Windows ACPI Emulated devices Table

View file

@ -3,7 +3,7 @@
*
* Name: actypes.h - Common data types for the entire ACPI subsystem
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/
@ -1286,4 +1286,10 @@ typedef enum {
#define ACPI_OPT_END -1
/* Definitions for explicit fallthrough */
#ifndef ACPI_FALLTHROUGH
#define ACPI_FALLTHROUGH do {} while(0)
#endif
#endif /* __ACTYPES_H__ */

View file

@ -3,7 +3,7 @@
*
* Name: acuuid.h - ACPI-related UUID/GUID definitions
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/

View file

@ -39,7 +39,7 @@ struct cpc_reg {
u8 bit_width;
u8 bit_offset;
u8 access_width;
u64 __iomem address;
u64 address;
} __packed;
/*

View file

@ -3,7 +3,7 @@
*
* Name: acenv.h - Host and compiler configuration
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/

View file

@ -3,7 +3,7 @@
*
* Name: acenvex.h - Extra host and compiler configuration
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/

View file

@ -3,7 +3,7 @@
*
* Name: acgcc.h - GCC specific defines, etc.
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/
@ -54,4 +54,19 @@ typedef __builtin_va_list va_list;
#define ACPI_USE_NATIVE_MATH64
/* GCC did not support __has_attribute until 5.1. */
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
/*
* Explictly mark intentional explicit fallthrough to silence
* -Wimplicit-fallthrough in GCC 7.1+.
*/
#if __has_attribute(__fallthrough__)
#define ACPI_FALLTHROUGH __attribute__((__fallthrough__))
#endif
#endif /* __ACGCC_H__ */

View file

@ -3,7 +3,7 @@
*
* Name: acgccex.h - Extra GCC specific defines, etc.
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/

View file

@ -3,7 +3,7 @@
*
* Name: acintel.h - VC specific defines, etc.
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/

View file

@ -3,7 +3,7 @@
*
* Name: aclinux.h - OS specific defines, etc. for Linux
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/

View file

@ -3,7 +3,7 @@
*
* Name: aclinuxex.h - Extra OS specific defines, etc. for Linux
*
* Copyright (C) 2000 - 2020, Intel Corp.
* Copyright (C) 2000 - 2021, Intel Corp.
*
*****************************************************************************/

View file

@ -1124,14 +1124,6 @@ acpi_data_add_props(struct acpi_device_data *data, const guid_t *guid,
int acpi_node_prop_get(const struct fwnode_handle *fwnode, const char *propname,
void **valptr);
int acpi_dev_prop_read_single(struct acpi_device *adev,
const char *propname, enum dev_prop_type proptype,
void *val);
int acpi_node_prop_read(const struct fwnode_handle *fwnode,
const char *propname, enum dev_prop_type proptype,
void *val, size_t nval);
int acpi_dev_prop_read(const struct acpi_device *adev, const char *propname,
enum dev_prop_type proptype, void *val, size_t nval);
struct fwnode_handle *acpi_get_next_subnode(const struct fwnode_handle *fwnode,
struct fwnode_handle *child);
@ -1233,30 +1225,6 @@ static inline int acpi_node_prop_get(const struct fwnode_handle *fwnode,
return -ENXIO;
}
static inline int acpi_dev_prop_read_single(const struct acpi_device *adev,
const char *propname,
enum dev_prop_type proptype,
void *val)
{
return -ENXIO;
}
static inline int acpi_node_prop_read(const struct fwnode_handle *fwnode,
const char *propname,
enum dev_prop_type proptype,
void *val, size_t nval)
{
return -ENXIO;
}
static inline int acpi_dev_prop_read(const struct acpi_device *adev,
const char *propname,
enum dev_prop_type proptype,
void *val, size_t nval)
{
return -ENXIO;
}
static inline struct fwnode_handle *
acpi_get_next_subnode(const struct fwnode_handle *fwnode,
struct fwnode_handle *child)

View file

@ -0,0 +1,41 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Platform profile sysfs interface
*
* See Documentation/ABI/testing/sysfs-platform_profile.rst for more
* information.
*/
#ifndef _PLATFORM_PROFILE_H_
#define _PLATFORM_PROFILE_H_
#include <linux/bitops.h>
/*
* If more options are added please update profile_names
* array in platform-profile.c and sysfs-platform-profile.rst
* documentation.
*/
enum platform_profile_option {
PLATFORM_PROFILE_LOW_POWER,
PLATFORM_PROFILE_COOL,
PLATFORM_PROFILE_QUIET,
PLATFORM_PROFILE_BALANCED,
PLATFORM_PROFILE_PERFORMANCE,
PLATFORM_PROFILE_LAST, /*must always be last */
};
struct platform_profile_handler {
unsigned long choices[BITS_TO_LONGS(PLATFORM_PROFILE_LAST)];
int (*profile_get)(struct platform_profile_handler *pprof,
enum platform_profile_option *profile);
int (*profile_set)(struct platform_profile_handler *pprof,
enum platform_profile_option profile);
};
int platform_profile_register(struct platform_profile_handler *pprof);
int platform_profile_remove(void);
void platform_profile_notify(void);
#endif /*_PLATFORM_PROFILE_H_*/