Commit 7281a59c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'platform-drivers-x86-v5.18-2' of...

Merge tag 'platform-drivers-x86-v5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform drivers fixes from Hans de Goede:

 - Documentation and compilation warning fixes

 - Kconfig dep fixes

 - Misc small code cleanups

* tag 'platform-drivers-x86-v5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/x86: amd-pmc: Fix compilation without CONFIG_SUSPEND
  platform/x86: acerhdf: Cleanup str_starts_with()
  Documentation/ABI: sysfs-class-firmware-attributes: Misc. cleanups
  Documentation/ABI: sysfs-class-firmware-attributes: Fix Sphinx errors
  Documentation/ABI: sysfs-driver-intel_sdsi: Fix sphinx warnings
  platform/x86: barco-p50-gpio: Fix duplicate included linux/io.h
  platform/x86: samsung-laptop: Fix an unsigned comparison which can never be negative
  platform/x86: think-lmi: certificate support clean ups
parents ce522ba9 753ee989
Loading
Loading
Loading
Loading
+26 −22
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ Description:
					    <value>[ForceIf:<attribute>=<value>]
					    <value>[ForceIfNot:<attribute>=<value>]

					For example:
					For example::

					    LegacyOrom/dell_value_modifier has value:
						    Disabled[ForceIf:SecureBoot=Enabled]
@@ -212,7 +212,7 @@ Description:
		the next boot.

		Lenovo specific class extensions
		------------------------------
		--------------------------------

		On Lenovo systems the following additional settings are available:

@@ -246,9 +246,7 @@ Description:
					that is being referenced (e.g hdd0, hdd1 etc)
					This attribute defaults to device 0.

		certificate:
		signature:
		save_signature:
		certificate, signature, save_signature:
					These attributes are used for certificate based authentication. This is
					used in conjunction with a signing server as an alternative to password
					based authentication.
@@ -257,21 +255,26 @@ Description:
					The attributes can be displayed to check the stored value.

					Some usage examples:
					Installing a certificate to enable feature:
						echo <supervisor password > authentication/Admin/current_password
						echo <signed certificate> > authentication/Admin/certificate

					Updating the installed certificate:
						echo <signature> > authentication/Admin/signature
						echo <signed certificate> > authentication/Admin/certificate
						Installing a certificate to enable feature::

							echo "supervisor password" > authentication/Admin/current_password
							echo "signed certificate" > authentication/Admin/certificate

						Updating the installed certificate::

					Removing the installed certificate:
						echo <signature> > authentication/Admin/signature
						echo '' > authentication/Admin/certificate
							echo "signature" > authentication/Admin/signature
							echo "signed certificate" > authentication/Admin/certificate

					Changing a BIOS setting:
						echo <signature> > authentication/Admin/signature
						echo <save signature> > authentication/Admin/save_signature
						Removing the installed certificate::

							echo "signature" > authentication/Admin/signature
							echo "" > authentication/Admin/certificate

						Changing a BIOS setting::

							echo "signature" > authentication/Admin/signature
							echo "save signature" > authentication/Admin/save_signature
							echo Enable > attribute/PasswordBeep/current_value

					You cannot enable certificate authentication if a supervisor password
@@ -288,9 +291,10 @@ Description:
		certificate_to_password:
					Write only attribute used to switch from certificate based authentication
					back to password based.
					Usage:
						echo <signature> > authentication/Admin/signature
						echo <password> > authentication/Admin/certificate_to_password
					Usage::

						echo "signature" > authentication/Admin/signature
						echo "password" > authentication/Admin/certificate_to_password


What:		/sys/class/firmware-attributes/*/attributes/pending_reboot
@@ -345,7 +349,7 @@ Description:

		    # echo "factory" > /sys/class/firmware-attributes/*/device/attributes/reset_bios
		    # cat /sys/class/firmware-attributes/*/device/attributes/reset_bios
		    # builtinsafe lastknowngood [factory] custom
		    builtinsafe lastknowngood [factory] custom

		Note that any changes to this attribute requires a reboot
		for changes to take effect.
+10 −8
Original line number Diff line number Diff line
@@ -13,8 +13,9 @@ Description:
		Should the operation fail, one of the following error codes
		may be returned:

		==========	=====
		Error Code	Cause
	        ----------	-----
		==========	=====
		EIO		General mailbox failure. Log may indicate cause.
		EBUSY		Mailbox is owned by another agent.
		EPERM		SDSI capability is not enabled in hardware.
@@ -24,6 +25,7 @@ Description:
				exceeds what may be written.
		ESPIPE		Seeking is not allowed.
		ETIMEDOUT	Failure to complete mailbox transaction in time.
		==========	=====

What:		/sys/bus/auxiliary/devices/intel_vsec.sdsi.X/guid
Date:		Feb 2022
+3 −18
Original line number Diff line number Diff line
@@ -584,21 +584,6 @@ static struct platform_driver acerhdf_driver = {
	.remove = acerhdf_remove,
};

/* checks if str begins with start */
static int str_starts_with(const char *str, const char *start)
{
	unsigned long str_len = 0, start_len = 0;

	str_len = strlen(str);
	start_len = strlen(start);

	if (str_len >= start_len &&
			!strncmp(str, start, start_len))
		return 1;

	return 0;
}

/* check hardware */
static int __init acerhdf_check_hardware(void)
{
@@ -651,9 +636,9 @@ static int __init acerhdf_check_hardware(void)
		 * check if actual hardware BIOS vendor, product and version
		 * IDs start with the strings of BIOS table entry
		 */
		if (str_starts_with(vendor, bt->vendor) &&
				str_starts_with(product, bt->product) &&
				str_starts_with(version, bt->version)) {
		if (strstarts(vendor, bt->vendor) &&
		    strstarts(product, bt->product) &&
		    strstarts(version, bt->version)) {
			found = 1;
			break;
		}
+13 −1
Original line number Diff line number Diff line
@@ -160,8 +160,10 @@ MODULE_PARM_DESC(enable_stb, "Enable the STB debug mechanism");

static struct amd_pmc_dev pmc;
static int amd_pmc_send_cmd(struct amd_pmc_dev *dev, u32 arg, u32 *data, u8 msg, bool ret);
static int amd_pmc_write_stb(struct amd_pmc_dev *dev, u32 data);
static int amd_pmc_read_stb(struct amd_pmc_dev *dev, u32 *buf);
#ifdef CONFIG_SUSPEND
static int amd_pmc_write_stb(struct amd_pmc_dev *dev, u32 data);
#endif

static inline u32 amd_pmc_reg_read(struct amd_pmc_dev *dev, int reg_offset)
{
@@ -325,6 +327,7 @@ static int get_metrics_table(struct amd_pmc_dev *pdev, struct smu_metrics *table
	return 0;
}

#ifdef CONFIG_SUSPEND
static void amd_pmc_validate_deepest(struct amd_pmc_dev *pdev)
{
	struct smu_metrics table;
@@ -338,6 +341,7 @@ static void amd_pmc_validate_deepest(struct amd_pmc_dev *pdev)
		dev_dbg(pdev->dev, "Last suspend in deepest state for %lluus\n",
			 table.timein_s0i3_lastcapture);
}
#endif

#ifdef CONFIG_DEBUG_FS
static int smu_fw_info_show(struct seq_file *s, void *unused)
@@ -569,6 +573,7 @@ static int amd_pmc_send_cmd(struct amd_pmc_dev *dev, u32 arg, u32 *data, u8 msg,
	return rc;
}

#ifdef CONFIG_SUSPEND
static int amd_pmc_get_os_hint(struct amd_pmc_dev *dev)
{
	switch (dev->cpu_id) {
@@ -694,6 +699,7 @@ static struct acpi_s2idle_dev_ops amd_pmc_s2idle_dev_ops = {
	.prepare = amd_pmc_s2idle_prepare,
	.restore = amd_pmc_s2idle_restore,
};
#endif

static const struct pci_device_id pmc_pci_ids[] = {
	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_YC) },
@@ -733,6 +739,7 @@ static int amd_pmc_s2d_init(struct amd_pmc_dev *dev)
	return 0;
}

#ifdef CONFIG_SUSPEND
static int amd_pmc_write_stb(struct amd_pmc_dev *dev, u32 data)
{
	int err;
@@ -753,6 +760,7 @@ static int amd_pmc_write_stb(struct amd_pmc_dev *dev, u32 data)

	return 0;
}
#endif

static int amd_pmc_read_stb(struct amd_pmc_dev *dev, u32 *buf)
{
@@ -859,9 +867,11 @@ static int amd_pmc_probe(struct platform_device *pdev)

	amd_pmc_get_smu_version(dev);
	platform_set_drvdata(pdev, dev);
#ifdef CONFIG_SUSPEND
	err = acpi_register_lps0_dev(&amd_pmc_s2idle_dev_ops);
	if (err)
		dev_warn(dev->dev, "failed to register LPS0 sleep handler, expect increased power consumption\n");
#endif

	amd_pmc_dbgfs_register(dev);
	return 0;
@@ -875,7 +885,9 @@ static int amd_pmc_remove(struct platform_device *pdev)
{
	struct amd_pmc_dev *dev = platform_get_drvdata(pdev);

#ifdef CONFIG_SUSPEND
	acpi_unregister_lps0_dev(&amd_pmc_s2idle_dev_ops);
#endif
	amd_pmc_dbgfs_unregister(dev);
	pci_dev_put(dev->rdev);
	mutex_destroy(&dev->lock);
+0 −1
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@

#define pr_fmt(fmt)	KBUILD_MODNAME ": " fmt

#include <linux/io.h>
#include <linux/delay.h>
#include <linux/dmi.h>
#include <linux/err.h>
Loading