Commit 8e2308c1 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branches 'acpica', 'acpi-osl' and 'acpi-tables'

Merge ACPICA updates, an ACPI OS service layer (OSL) update and
assorted updates related to parsing ACPI tables for 7.1-rc1:

 - Update maintainers information regarding ACPICA (Rafael Wysocki)

 - Replace strncpy() with strscpy_pad() in acpi_ut_safe_strncpy() (Kees
   Cook)

 - Trigger an ordered system power off after encountering a fatal error
   operator in AML (Armin Wolf)

 - Enable ACPI FPDT parsing on LoongArch (Xi Ruoyao)

 - Remove the temporary stop-gap acpi_pptt_cache_v1_full structure from
   the ACPI PPTT parser (Ben Horgan)

 - Add support for exposing ACPI FPDT subtables FBPT and S3PT (Nate
   DeSimone)

* acpica:
  ACPICA: Update maintainers information
  ACPICA: Replace strncpy() with strscpy_pad() in acpi_ut_safe_strncpy()

* acpi-osl:
  ACPI: OSL: Poweroff when encountering a fatal ACPI error

* acpi-tables:
  ACPI: tables: Enable FPDT on LoongArch
  Documentation: ABI: add FBPT and S3PT entries to sysfs-firmware-acpi
  ACPI: FPDT: expose FBPT and S3PT subtables via sysfs
  ACPI: PPTT: Remove duplicate structure, acpi_pptt_cache_v1_full
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -41,6 +41,12 @@ Description:
				platform runtime firmware S3 resume, just prior to
				handoff to the OS waking vector. In nanoseconds.

		FBPT: The raw binary contents of the Firmware Basic Boot
			Performance Table (FBPT) subtable.

		S3PT: The raw binary contents of the S3 Performance Table
			(S3PT) subtable.

What:		/sys/firmware/acpi/bgrt/
Date:		January 2012
Contact:	Matthew Garrett <mjg@redhat.com>
+8 −0
Original line number Diff line number Diff line
@@ -190,6 +190,14 @@ Kernel parameters
			unusable.  The "log_buf_len" parameter may be useful
			if you need to capture more output.

	acpi.poweroff_on_fatal=	[ACPI]
			{0 | 1}
			Causes the system to poweroff when the ACPI bytecode signals
			a fatal error. The default value of this setting is 1.
			Overriding this value should only be done for diagnosing
			ACPI firmware problems, as the system might behave erratically
			after having encountered a fatal ACPI error.

	acpi_enforce_resources=	[ACPI]
			{ strict | lax | no }
			Check for resource conflicts between native drivers
+1 −1
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ F: drivers/firmware/efi/cper*
ACPI COMPONENT ARCHITECTURE (ACPICA)
M:	"Rafael J. Wysocki" <rafael@kernel.org>
M:	Robert Moore <robert.moore@intel.com>
M:	Saket Dumbre <saket.dumbre@intel.com>
L:	linux-acpi@vger.kernel.org
L:	acpica-devel@lists.linux.dev
S:	Supported
+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ config ACPI_SPCR_TABLE

config ACPI_FPDT
	bool "ACPI Firmware Performance Data Table (FPDT) support"
	depends on X86_64 || ARM64
	depends on X86_64 || ARM64 || LOONGARCH
	help
	  Enable support for the Firmware Performance Data Table (FPDT).
	  This table provides information on the timing of the system
+28 −0
Original line number Diff line number Diff line
@@ -141,6 +141,9 @@ static const struct attribute_group boot_attr_group = {
	.name = "boot",
};

static BIN_ATTR(FBPT, 0400, sysfs_bin_attr_simple_read, NULL, 0);
static BIN_ATTR(S3PT, 0400, sysfs_bin_attr_simple_read, NULL, 0);

static struct kobject *fpdt_kobj;

#if defined CONFIG_X86 && defined CONFIG_PHYS_ADDR_T_64BIT
@@ -254,9 +257,34 @@ static int fpdt_process_subtable(u64 address, u32 subtable_type)
			break;
		}
	}

	if (subtable_type == SUBTABLE_FBPT) {
		bin_attr_FBPT.private = subtable_header;
		bin_attr_FBPT.size = length;
		result = sysfs_create_bin_file(fpdt_kobj, &bin_attr_FBPT);
		if (result)
			pr_warn("Failed to create FBPT sysfs attribute.\n");
	} else if (subtable_type == SUBTABLE_S3PT) {
		bin_attr_S3PT.private = subtable_header;
		bin_attr_S3PT.size = length;
		result = sysfs_create_bin_file(fpdt_kobj, &bin_attr_S3PT);
		if (result)
			pr_warn("Failed to create S3PT sysfs attribute.\n");
	}

	return 0;

err:
	if (bin_attr_FBPT.private) {
		sysfs_remove_bin_file(fpdt_kobj, &bin_attr_FBPT);
		bin_attr_FBPT.private = NULL;
	}

	if (bin_attr_S3PT.private) {
		sysfs_remove_bin_file(fpdt_kobj, &bin_attr_S3PT);
		bin_attr_S3PT.private = NULL;
	}

	if (record_boot)
		sysfs_remove_group(fpdt_kobj, &boot_attr_group);

Loading