Commit 198c414e authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branches 'acpi-processor', 'acpi-apei' and 'acpi-ec'

Merge ACPI processor driver changes, APEI changes and ACPI EC driver
changes for v5.20-rc1:

 - Drop leftover acpi_processor_get_limit_info() declaration (Riwen Lu).

 - Split out thermal initialization from ACPI PSS (Riwen Lu).

 - Annotate more functions in the ACPI CPU idle driver to live in the
   cpuidle section (Guilherme G. Piccoli).

 - Fix _EINJ vs "special purpose" EFI memory regions (Dan Williams).

 - Implement a better fix to avoid spamming the console with old error
   logs (Tony Luck).

 - Fix typo in a comment in the APEI code (Xiang wangx).

 - Clean up the ACPI EC driver after previous changes in it (Hans
   de Goede).

* acpi-processor:
  ACPI: processor: Drop leftover acpi_processor_get_limit_info() declaration
  ACPI: processor: Split out thermal initialization from ACPI PSS
  ACPI: processor/idle: Annotate more functions to live in cpuidle section

* acpi-apei:
  ACPI: APEI: Fix _EINJ vs EFI_MEMORY_SP
  ACPI: APEI: Better fix to avoid spamming the console with old error logs
  ACPI: APEI: Fix double word in a comment

* acpi-ec:
  ACPI: EC: Drop unused ident initializers from dmi_system_id tables
  ACPI: EC: Re-use boot_ec when possible even when EC_FLAGS_TRUST_DSDT_GPE is set
  ACPI: EC: Drop the EC_FLAGS_IGNORE_DSDT_GPE quirk
  ACPI: EC: Remove duplicate ThinkPad X1 Carbon 6th entry from DMI quirks
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -255,7 +255,6 @@ config ACPI_DOCK

config ACPI_CPU_FREQ_PSS
	bool
	select THERMAL

config ACPI_PROCESSOR_CSTATE
	def_bool y
@@ -287,6 +286,7 @@ config ACPI_PROCESSOR
	depends on X86 || IA64 || ARM64 || LOONGARCH
	select ACPI_PROCESSOR_IDLE
	select ACPI_CPU_FREQ_PSS if X86 || IA64 || LOONGARCH
	select THERMAL
	default y
	help
	  This driver adds support for the ACPI Processor package. It is required
+2 −3
Original line number Diff line number Diff line
@@ -109,10 +109,9 @@ obj-$(CONFIG_ACPI_PPTT) += pptt.o
obj-$(CONFIG_ACPI_PFRUT)	+= pfr_update.o pfr_telemetry.o

# processor has its own "processor." module_param namespace
processor-y			:= processor_driver.o
processor-y			:= processor_driver.o processor_thermal.o
processor-$(CONFIG_ACPI_PROCESSOR_IDLE) += processor_idle.o
processor-$(CONFIG_ACPI_CPU_FREQ_PSS)	+= processor_throttling.o	\
	processor_thermal.o
processor-$(CONFIG_ACPI_CPU_FREQ_PSS)	+= processor_throttling.o
processor-$(CONFIG_CPU_FREQ)	+= processor_perflib.o

obj-$(CONFIG_ACPI_PROCESSOR_AGGREGATOR) += acpi_pad.o
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
 * apei-base.c - ACPI Platform Error Interface (APEI) supporting
 * infrastructure
 *
 * APEI allows to report errors (for example from the chipset) to the
 * APEI allows to report errors (for example from the chipset) to
 * the operating system. This improves NMI handling especially. In
 * addition it supports error serialization and error injection.
 *
+23 −8
Original line number Diff line number Diff line
@@ -29,16 +29,26 @@

#undef pr_fmt
#define pr_fmt(fmt) "BERT: " fmt

#define ACPI_BERT_PRINT_MAX_RECORDS 5
#define ACPI_BERT_PRINT_MAX_LEN 1024

static int bert_disable;

/*
 * Print "all" the error records in the BERT table, but avoid huge spam to
 * the console if the BIOS included oversize records, or too many records.
 * Skipping some records here does not lose anything because the full
 * data is available to user tools in:
 *	/sys/firmware/acpi/tables/data/BERT
 */
static void __init bert_print_all(struct acpi_bert_region *region,
				  unsigned int region_len)
{
	struct acpi_hest_generic_status *estatus =
		(struct acpi_hest_generic_status *)region;
	int remain = region_len;
	int printed = 0, skipped = 0;
	u32 estatus_len;

	while (remain >= sizeof(struct acpi_bert_region)) {
@@ -46,24 +56,26 @@ static void __init bert_print_all(struct acpi_bert_region *region,
		if (remain < estatus_len) {
			pr_err(FW_BUG "Truncated status block (length: %u).\n",
			       estatus_len);
			return;
			break;
		}

		/* No more error records. */
		if (!estatus->block_status)
			return;
			break;

		if (cper_estatus_check(estatus)) {
			pr_err(FW_BUG "Invalid error record.\n");
			return;
			break;
		}

		if (estatus_len < ACPI_BERT_PRINT_MAX_LEN &&
		    printed < ACPI_BERT_PRINT_MAX_RECORDS) {
			pr_info_once("Error records from previous boot:\n");
		if (region_len < ACPI_BERT_PRINT_MAX_LEN)
			cper_estatus_print(KERN_INFO HW_ERR, estatus);
		else
			pr_info_once("Max print length exceeded, table data is available at:\n"
				     "/sys/firmware/acpi/tables/data/BERT");
			printed++;
		} else {
			skipped++;
		}

		/*
		 * Because the boot error source is "one-time polled" type,
@@ -75,6 +87,9 @@ static void __init bert_print_all(struct acpi_bert_region *region,
		estatus = (void *)estatus + estatus_len;
		remain -= estatus_len;
	}

	if (skipped)
		pr_info(HW_ERR "Skipped %d error records\n", skipped);
}

static int __init setup_bert_disable(char *str)
+2 −0
Original line number Diff line number Diff line
@@ -546,6 +546,8 @@ static int einj_error_inject(u32 type, u32 flags, u64 param1, u64 param2,
				!= REGION_INTERSECTS) &&
	     (region_intersects(base_addr, size, IORESOURCE_MEM, IORES_DESC_PERSISTENT_MEMORY)
				!= REGION_INTERSECTS) &&
	     (region_intersects(base_addr, size, IORESOURCE_MEM, IORES_DESC_SOFT_RESERVED)
				!= REGION_INTERSECTS) &&
	     !arch_is_platform_page(base_addr)))
		return -EINVAL;

Loading