Commit 6d905081 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ACPI updates from Rafael Wysocki:

   - Update the ACPICA code in the kernel to the 20200214 upstream
     release including:

       * Fix to re-enable the sleep button after wakeup (Anchal
         Agarwal).

       * Fixes for mistakes in comments and typos (Bob Moore).

       * ASL-ASL+ converter updates (Erik Kaneda).

       * Type casting cleanups (Sven Barth).

   - Clean up the intialization of the EC driver and eliminate some dead
     code from it (Rafael Wysocki).

   - Clean up the quirk tables in the AC and battery drivers (Hans de
     Goede).

   - Fix the global lock handling on x86 to ignore unspecified bit
     positions in the global lock field (Jan Engelhardt).

   - Add a new "tiny" driver for ACPI button devices exposed by VMs to
     guest kernels to send signals directly to init (Josh Triplett).

   - Add a kernel parameter to disable ACPI BGRT on x86 (Alex Hung).

   - Make the ACPI PCI host bridge and fan drivers use scnprintf() to
     avoid potential buffer overflows (Takashi Iwai).

   - Clean up assorted pieces of code:

       * Reorder "asmlinkage" to make g++ happy (Alexey Dobriyan).

       * Drop unneeded variable initialization (Colin Ian King).

       * Add missing __acquires/__releases annotations (Jules Irenge).

       * Replace list_for_each_safe() with list_for_each_entry_safe()
         (chenqiwu)"

* tag 'acpi-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (31 commits)
  ACPICA: Update version to 20200214
  ACPI: PCI: Use scnprintf() for avoiding potential buffer overflow
  ACPI: fan: Use scnprintf() for avoiding potential buffer overflow
  ACPI: EC: Eliminate EC_FLAGS_QUERY_HANDSHAKE
  ACPI: EC: Do not clear boot_ec_is_ecdt in acpi_ec_add()
  ACPI: EC: Simplify acpi_ec_ecdt_start() and acpi_ec_init()
  ACPI: EC: Consolidate event handler installation code
  acpi/x86: ignore unspecified bit positions in the ACPI global lock field
  acpi/x86: add a kernel parameter to disable ACPI BGRT
  x86/acpi: make "asmlinkage" part first thing in the function definition
  ACPI: list_for_each_safe() -> list_for_each_entry_safe()
  ACPI: video: remove redundant assignments to variable result
  ACPI: OSL: Add missing __acquires/__releases annotations
  ACPI / battery: Cleanup Lenovo Ideapad Miix 320 DMI table entry
  ACPI / AC: Cleanup DMI quirk table
  ACPI: EC: Use fast path in acpi_ec_add() for DSDT boot EC
  ACPI: EC: Simplify acpi_ec_add()
  ACPI: EC: Drop AE_NOT_FOUND special case from ec_install_handlers()
  ACPI: EC: Avoid passing redundant argument to functions
  ACPI: EC: Avoid printing confusing messages in acpi_ec_setup()
  ...
parents 49835c15 1da28f03
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -450,6 +450,9 @@
	bert_disable	[ACPI]
			Disable BERT OS support on buggy BIOSes.

	bgrt_disable	[ACPI][X86]
			Disable BGRT to avoid flickering OEM logo.

	bttv.card=	[HW,V4L] bttv (bt848 + bt878 based grabber cards)
	bttv.radio=	Most important insmod options are available as
			kernel args too.
+10 −2
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ EXPORT_SYMBOL(acpi_disabled);
#define PREFIX			"ACPI: "

int acpi_noirq;				/* skip ACPI IRQ initialization */
int acpi_nobgrt;			/* skip ACPI BGRT */
int acpi_pci_disabled;		/* skip ACPI PCI scan and IRQ initialization */
EXPORT_SYMBOL(acpi_pci_disabled);

@@ -1619,7 +1620,7 @@ int __init acpi_boot_init(void)
	acpi_process_madt();

	acpi_table_parse(ACPI_SIG_HPET, acpi_parse_hpet);
	if (IS_ENABLED(CONFIG_ACPI_BGRT))
	if (IS_ENABLED(CONFIG_ACPI_BGRT) && !acpi_nobgrt)
		acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt);

	if (!acpi_noirq)
@@ -1671,6 +1672,13 @@ static int __init parse_acpi(char *arg)
}
early_param("acpi", parse_acpi);

static int __init parse_acpi_bgrt(char *arg)
{
	acpi_nobgrt = true;
	return 0;
}
early_param("bgrt_disable", parse_acpi_bgrt);

/* FIXME: Using pci= for an ACPI parameter is a travesty. */
static int __init parse_pci(char *arg)
{
@@ -1740,7 +1748,7 @@ int __acpi_acquire_global_lock(unsigned int *lock)
		new = (((old & ~0x3) + 2) + ((old >> 1) & 0x1));
		val = cmpxchg(lock, old, new);
	} while (unlikely (val != old));
	return (new < 3) ? -1 : 0;
	return ((new & 0x3) < 3) ? -1 : 0;
}

int __acpi_release_global_lock(unsigned int *lock)
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ unsigned long acpi_get_wakeup_address(void)
 *
 * Wrapper around acpi_enter_sleep_state() to be called by assmebly.
 */
acpi_status asmlinkage __visible x86_acpi_enter_sleep_state(u8 state)
asmlinkage acpi_status __visible x86_acpi_enter_sleep_state(u8 state)
{
	return acpi_enter_sleep_state(state);
}
+1 −1
Original line number Diff line number Diff line
@@ -19,4 +19,4 @@ extern void do_suspend_lowlevel(void);

extern int x86_acpi_suspend_lowlevel(void);

acpi_status asmlinkage x86_acpi_enter_sleep_state(u8 state);
asmlinkage acpi_status x86_acpi_enter_sleep_state(u8 state);
+24 −0
Original line number Diff line number Diff line
@@ -190,6 +190,30 @@ config ACPI_BUTTON
	  To compile this driver as a module, choose M here:
	  the module will be called button.

config ACPI_TINY_POWER_BUTTON
	tristate "Tiny Power Button Driver"
	depends on !ACPI_BUTTON
	help
	  This driver provides a tiny alternative to the ACPI Button driver.
	  The tiny power button driver only handles the power button. Rather
	  than notifying userspace via the input layer or a netlink event, this
	  driver directly signals the init process to shut down.

	  This driver is particularly suitable for cloud and VM environments,
	  which use a simulated power button to initiate a controlled poweroff,
	  but which may not want to run a separate userspace daemon to process
	  input events.

config ACPI_TINY_POWER_BUTTON_SIGNAL
	int "Tiny Power Button Signal"
	depends on ACPI_TINY_POWER_BUTTON
	default 38
	help
	  Default signal to send to init in response to the power button.

	  Likely values here include 38 (SIGRTMIN+4) to power off, or 2
	  (SIGINT) to simulate Ctrl+Alt+Del.

config ACPI_VIDEO
	tristate "Video"
	depends on X86 && BACKLIGHT_CLASS_DEVICE
Loading