]> Git Repo - linux.git/commitdiff
Merge tag 'acpi-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
authorLinus Torvalds <[email protected]>
Mon, 30 Mar 2020 22:17:04 +0000 (15:17 -0700)
committerLinus Torvalds <[email protected]>
Mon, 30 Mar 2020 22:17:04 +0000 (15:17 -0700)
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()
  ...

1  2 
Documentation/admin-guide/kernel-parameters.txt
drivers/acpi/ec.c
drivers/acpi/internal.h
include/acpi/acpixf.h

index 6a0822c98e1ddd59b7862e08234db88e0f7fecec,83ba095b3cded01f0fa97f8f586ba05e2bd08777..4e3885e381792d8dac4079440712352b287692a4
        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.
                        A valid base address must be provided, and the serial
                        port must already be setup and configured.
  
 +              ec_imx21,<addr>
 +              ec_imx6q,<addr>
 +                      Start an early, polled-mode, output-only console on the
 +                      Freescale i.MX UART at the specified address. The UART
 +                      must already be setup and configured.
 +
                ar3700_uart,<addr>
                        Start an early, polled-mode console on the
                        Armada 3700 serial port at the specified
                        can be changed at run time by the max_graph_depth file
                        in the tracefs tracing directory. default: 0 (no limit)
  
 +      fw_devlink=     [KNL] Create device links between consumer and supplier
 +                      devices by scanning the firmware to infer the
 +                      consumer/supplier relationships. This feature is
 +                      especially useful when drivers are loaded as modules as
 +                      it ensures proper ordering of tasks like device probing
 +                      (suppliers first, then consumers), supplier boot state
 +                      clean up (only after all consumers have probed),
 +                      suspend/resume & runtime PM (consumers first, then
 +                      suppliers).
 +                      Format: { off | permissive | on | rpm }
 +                      off --  Don't create device links from firmware info.
 +                      permissive -- Create device links from firmware info
 +                              but use it only for ordering boot state clean
 +                              up (sync_state() calls).
 +                      on --   Create device links from firmware info and use it
 +                              to enforce probe and suspend/resume ordering.
 +                      rpm --  Like "on", but also use to order runtime PM.
 +
        gamecon.map[2|3]=
                        [HW,JOY] Multisystem joystick and NES/SNES/PSX pad
                        support via parallel port (up to 5 devices per port)
                        provided by tboot because it makes the system
                        vulnerable to DMA attacks.
                nobounce [Default off]
 -                      Disable bounce buffer for unstrusted devices such as
 +                      Disable bounce buffer for untrusted devices such as
                        the Thunderbolt devices. This will treat the untrusted
                        devices as the trusted ones, hence might expose security
                        risks of DMA attacks.
                        No delay
  
        ip=             [IP_PNP]
 -                      See Documentation/filesystems/nfs/nfsroot.txt.
 +                      See Documentation/admin-guide/nfs/nfsroot.rst.
  
        ipcmni_extend   [KNL] Extend the maximum number of unique System V
                        IPC identifiers from 32,768 to 16,777,216.
                        <name>,<region-number>[,<base>,<size>,<buswidth>,<altbuswidth>]
  
        mtdparts=       [MTD]
 -                      See drivers/mtd/cmdlinepart.c.
 +                      See drivers/mtd/parsers/cmdlinepart.c
  
        multitce=off    [PPC]  This parameter disables the use of the pSeries
                        firmware feature for updating multiple TCE entries
                        Default value is 0.
  
        nfsaddrs=       [NFS] Deprecated.  Use ip= instead.
 -                      See Documentation/filesystems/nfs/nfsroot.txt.
 +                      See Documentation/admin-guide/nfs/nfsroot.rst.
  
        nfsroot=        [NFS] nfs root filesystem for disk-less boxes.
 -                      See Documentation/filesystems/nfs/nfsroot.txt.
 +                      See Documentation/admin-guide/nfs/nfsroot.rst.
  
        nfsrootdebug    [NFS] enable nfsroot debugging messages.
 -                      See Documentation/filesystems/nfs/nfsroot.txt.
 +                      See Documentation/admin-guide/nfs/nfsroot.rst.
  
        nfs.callback_nr_threads=
                        [NFSv4] set the total number of threads that the
                        This can be set from sysctl after boot.
                        See Documentation/admin-guide/sysctl/vm.rst for details.
  
 -      of_devlink      [OF, KNL] Create device links between consumer and
 -                      supplier devices by scanning the devictree to infer the
 -                      consumer/supplier relationships.  A consumer device
 -                      will not be probed until all the supplier devices have
 -                      probed successfully.
 -
        ohci1394_dma=early      [HW] enable debugging via the ohci1394 driver.
                        See Documentation/debugging-via-ohci1394.txt for more
                        info.
                        Format: <integer>
  
                        A nonzero value instructs the soft-lockup detector
 -                      to panic the machine when a soft-lockup occurs. This
 -                      is also controlled by CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC
 -                      which is the respective build-time switch to that
 -                      functionality.
 +                      to panic the machine when a soft-lockup occurs. It is
 +                      also controlled by the kernel.softlockup_panic sysctl
 +                      and CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC, which is the
 +                      respective build-time switch to that functionality.
  
        softlockup_all_cpu_backtrace=
                        [KNL] Should the soft-lockup detector generate
diff --combined drivers/acpi/ec.c
index 9b9094b0b73f0f3128c1f0d78241a277f763e772,9c7410588a2787cc9b310b2338c86f0592577fe2..4816df520f727d28e8d5937fb1f0b6d389f66b30
@@@ -182,7 -182,6 +182,6 @@@ static bool boot_ec_is_ecdt = false
  static struct workqueue_struct *ec_wq;
  static struct workqueue_struct *ec_query_wq;
  
- static int EC_FLAGS_QUERY_HANDSHAKE; /* Needs QR_EC issued when SCI_EVT set */
  static int EC_FLAGS_CORRECT_ECDT; /* Needs ECDT port address correction */
  static int EC_FLAGS_IGNORE_DSDT_GPE; /* Needs ECDT GPE as correction setting */
  static int EC_FLAGS_CLEAR_ON_RESUME; /* Needs acpi_ec_clear() on boot/resume */
@@@ -690,21 -689,9 +689,9 @@@ static void advance_transaction(struct 
                        wakeup = true;
                }
                goto out;
-       } else {
-               if (EC_FLAGS_QUERY_HANDSHAKE &&
-                   !(status & ACPI_EC_FLAG_SCI) &&
-                   (t->command == ACPI_EC_COMMAND_QUERY)) {
-                       ec_transaction_transition(ec, ACPI_EC_COMMAND_POLL);
-                       t->rdata[t->ri++] = 0x00;
-                       ec_transaction_transition(ec, ACPI_EC_COMMAND_COMPLETE);
-                       ec_dbg_evt("Command(%s) completed by software",
-                                  acpi_ec_cmd_string(ACPI_EC_COMMAND_QUERY));
-                       wakeup = true;
-               } else if ((status & ACPI_EC_FLAG_IBF) == 0) {
-                       acpi_ec_write_cmd(ec, t->command);
-                       ec_transaction_transition(ec, ACPI_EC_COMMAND_POLL);
-               } else
-                       goto err;
+       } else if (!(status & ACPI_EC_FLAG_IBF)) {
+               acpi_ec_write_cmd(ec, t->command);
+               ec_transaction_transition(ec, ACPI_EC_COMMAND_POLL);
                goto out;
        }
  err:
@@@ -1427,57 -1414,45 +1414,45 @@@ ec_parse_device(acpi_handle handle, u3
        return AE_CTRL_TERMINATE;
  }
  
- static void install_gpe_event_handler(struct acpi_ec *ec)
- {
-       acpi_status status =
-               acpi_install_gpe_raw_handler(NULL, ec->gpe,
-                                            ACPI_GPE_EDGE_TRIGGERED,
-                                            &acpi_ec_gpe_handler,
-                                            ec);
-       if (ACPI_SUCCESS(status)) {
-               /* This is not fatal as we can poll EC events */
-               set_bit(EC_FLAGS_EVENT_HANDLER_INSTALLED, &ec->flags);
-               acpi_ec_leave_noirq(ec);
-               if (test_bit(EC_FLAGS_STARTED, &ec->flags) &&
-                   ec->reference_count >= 1)
-                       acpi_ec_enable_gpe(ec, true);
-       }
- }
- /* ACPI reduced hardware platforms use a GpioInt specified in _CRS. */
- static int install_gpio_irq_event_handler(struct acpi_ec *ec,
-                                         struct acpi_device *device)
+ static bool install_gpe_event_handler(struct acpi_ec *ec)
  {
-       int irq = acpi_dev_gpio_irq_get(device, 0);
-       int ret;
-       if (irq < 0)
-               return irq;
+       acpi_status status;
  
-       ret = request_irq(irq, acpi_ec_irq_handler, IRQF_SHARED,
-                         "ACPI EC", ec);
+       status = acpi_install_gpe_raw_handler(NULL, ec->gpe,
+                                             ACPI_GPE_EDGE_TRIGGERED,
+                                             &acpi_ec_gpe_handler, ec);
+       if (ACPI_FAILURE(status))
+               return false;
  
-       /*
-        * Unlike the GPE case, we treat errors here as fatal, we'll only
-        * implement GPIO polling if we find a case that needs it.
-        */
-       if (ret < 0)
-               return ret;
+       if (test_bit(EC_FLAGS_STARTED, &ec->flags) && ec->reference_count >= 1)
+               acpi_ec_enable_gpe(ec, true);
  
-       ec->irq = irq;
-       set_bit(EC_FLAGS_EVENT_HANDLER_INSTALLED, &ec->flags);
-       acpi_ec_leave_noirq(ec);
+       return true;
+ }
  
-       return 0;
+ static bool install_gpio_irq_event_handler(struct acpi_ec *ec)
+ {
+       return request_irq(ec->irq, acpi_ec_irq_handler, IRQF_SHARED,
+                          "ACPI EC", ec) >= 0;
  }
  
- /*
-  * Note: This function returns an error code only when the address space
-  *       handler is not installed, which means "not able to handle
-  *       transactions".
+ /**
+  * ec_install_handlers - Install service callbacks and register query methods.
+  * @ec: Target EC.
+  * @device: ACPI device object corresponding to @ec.
+  *
+  * Install a handler for the EC address space type unless it has been installed
+  * already.  If @device is not NULL, also look for EC query methods in the
+  * namespace and register them, and install an event (either GPE or GPIO IRQ)
+  * handler for the EC, if possible.
+  *
+  * Return:
+  * -ENODEV if the address space handler cannot be installed, which means
+  *  "unable to handle transactions",
+  * -EPROBE_DEFER if GPIO IRQ acquisition needs to be deferred,
+  * or 0 (success) otherwise.
   */
- static int ec_install_handlers(struct acpi_ec *ec, struct acpi_device *device,
-                              bool handle_events)
+ static int ec_install_handlers(struct acpi_ec *ec, struct acpi_device *device)
  {
        acpi_status status;
  
                                                            &acpi_ec_space_handler,
                                                            NULL, ec);
                if (ACPI_FAILURE(status)) {
-                       if (status == AE_NOT_FOUND) {
-                               /*
-                                * Maybe OS fails in evaluating the _REG
-                                * object. The AE_NOT_FOUND error will be
-                                * ignored and OS * continue to initialize
-                                * EC.
-                                */
-                               pr_err("Fail in evaluating the _REG object"
-                                       " of EC device. Broken bios is suspected.\n");
-                       } else {
-                               acpi_ec_stop(ec, false);
-                               return -ENODEV;
-                       }
+                       acpi_ec_stop(ec, false);
+                       return -ENODEV;
                }
                set_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags);
        }
  
-       if (!handle_events)
+       if (!device)
                return 0;
  
+       if (ec->gpe < 0) {
+               /* ACPI reduced hardware platforms use a GpioInt from _CRS. */
+               int irq = acpi_dev_gpio_irq_get(device, 0);
+               /*
+                * Bail out right away for deferred probing or complete the
+                * initialization regardless of any other errors.
+                */
+               if (irq == -EPROBE_DEFER)
+                       return -EPROBE_DEFER;
+               else if (irq >= 0)
+                       ec->irq = irq;
+       }
        if (!test_bit(EC_FLAGS_QUERY_METHODS_INSTALLED, &ec->flags)) {
                /* Find and register all query methods */
                acpi_walk_namespace(ACPI_TYPE_METHOD, ec->handle, 1,
                set_bit(EC_FLAGS_QUERY_METHODS_INSTALLED, &ec->flags);
        }
        if (!test_bit(EC_FLAGS_EVENT_HANDLER_INSTALLED, &ec->flags)) {
-               if (ec->gpe >= 0) {
-                       install_gpe_event_handler(ec);
-               } else if (device) {
-                       int ret = install_gpio_irq_event_handler(ec, device);
-                       if (ret)
-                               return ret;
-               } else { /* No GPE and no GpioInt? */
-                       return -ENODEV;
+               bool ready = false;
+               if (ec->gpe >= 0)
+                       ready = install_gpe_event_handler(ec);
+               else if (ec->irq >= 0)
+                       ready = install_gpio_irq_event_handler(ec);
+               if (ready) {
+                       set_bit(EC_FLAGS_EVENT_HANDLER_INSTALLED, &ec->flags);
+                       acpi_ec_leave_noirq(ec);
                }
+               /*
+                * Failures to install an event handler are not fatal, because
+                * the EC can be polled for events.
+                */
        }
        /* EC is fully operational, allow queries */
        acpi_ec_enable_event(ec);
@@@ -1574,61 -1556,46 +1556,46 @@@ static void ec_remove_handlers(struct a
        }
  }
  
- static int acpi_ec_setup(struct acpi_ec *ec, struct acpi_device *device,
-                        bool handle_events)
+ static int acpi_ec_setup(struct acpi_ec *ec, struct acpi_device *device)
  {
        int ret;
  
-       ret = ec_install_handlers(ec, device, handle_events);
+       ret = ec_install_handlers(ec, device);
        if (ret)
                return ret;
  
        /* First EC capable of handling transactions */
-       if (!first_ec) {
+       if (!first_ec)
                first_ec = ec;
-               acpi_handle_info(first_ec->handle, "Used as first EC\n");
-       }
-       acpi_handle_info(ec->handle,
-                        "GPE=0x%x, IRQ=%d, EC_CMD/EC_SC=0x%lx, EC_DATA=0x%lx\n",
-                        ec->gpe, ec->irq, ec->command_addr, ec->data_addr);
-       return ret;
- }
  
- static bool acpi_ec_ecdt_get_handle(acpi_handle *phandle)
- {
-       struct acpi_table_ecdt *ecdt_ptr;
-       acpi_status status;
-       acpi_handle handle;
+       pr_info("EC_CMD/EC_SC=0x%lx, EC_DATA=0x%lx\n", ec->command_addr,
+               ec->data_addr);
  
-       status = acpi_get_table(ACPI_SIG_ECDT, 1,
-                               (struct acpi_table_header **)&ecdt_ptr);
-       if (ACPI_FAILURE(status))
-               return false;
-       status = acpi_get_handle(NULL, ecdt_ptr->id, &handle);
-       if (ACPI_FAILURE(status))
-               return false;
+       if (test_bit(EC_FLAGS_EVENT_HANDLER_INSTALLED, &ec->flags)) {
+               if (ec->gpe >= 0)
+                       pr_info("GPE=0x%x\n", ec->gpe);
+               else
+                       pr_info("IRQ=%d\n", ec->irq);
+       }
  
-       *phandle = handle;
-       return true;
+       return ret;
  }
  
  static int acpi_ec_add(struct acpi_device *device)
  {
-       struct acpi_ec *ec = NULL;
-       bool dep_update = true;
-       acpi_status status;
+       struct acpi_ec *ec;
        int ret;
  
        strcpy(acpi_device_name(device), ACPI_EC_DEVICE_NAME);
        strcpy(acpi_device_class(device), ACPI_EC_CLASS);
  
-       if (!strcmp(acpi_device_hid(device), ACPI_ECDT_HID)) {
-               boot_ec_is_ecdt = true;
+       if ((boot_ec && boot_ec->handle == device->handle) ||
+           !strcmp(acpi_device_hid(device), ACPI_ECDT_HID)) {
+               /* Fast path: this device corresponds to the boot EC. */
                ec = boot_ec;
-               dep_update = false;
        } else {
+               acpi_status status;
                ec = acpi_ec_alloc();
                if (!ec)
                        return -ENOMEM;
                status = ec_parse_device(device->handle, 0, ec, NULL);
                if (status != AE_CTRL_TERMINATE) {
                        ret = -EINVAL;
-                       goto err_alloc;
+                       goto err;
                }
  
                if (boot_ec && ec->command_addr == boot_ec->command_addr &&
                    ec->data_addr == boot_ec->data_addr) {
-                       boot_ec_is_ecdt = false;
                        /*
                         * Trust PNP0C09 namespace location rather than
                         * ECDT ID. But trust ECDT GPE rather than _GPE
                }
        }
  
-       ret = acpi_ec_setup(ec, device, true);
+       ret = acpi_ec_setup(ec, device);
        if (ret)
-               goto err_query;
+               goto err;
  
        if (ec == boot_ec)
                acpi_handle_info(boot_ec->handle,
-                                "Boot %s EC used to handle transactions and events\n",
+                                "Boot %s EC initialization complete\n",
                                 boot_ec_is_ecdt ? "ECDT" : "DSDT");
  
+       acpi_handle_info(ec->handle,
+                        "EC: Used to handle transactions and events\n");
        device->driver_data = ec;
  
        ret = !!request_region(ec->data_addr, 1, "EC data");
        ret = !!request_region(ec->command_addr, 1, "EC cmd");
        WARN(!ret, "Could not request EC cmd io port 0x%lx", ec->command_addr);
  
-       if (dep_update) {
-               /* Reprobe devices depending on the EC */
-               acpi_walk_dep_device_list(ec->handle);
-       }
+       /* Reprobe devices depending on the EC */
+       acpi_walk_dep_device_list(ec->handle);
        acpi_handle_debug(ec->handle, "enumerated.\n");
        return 0;
  
- err_query:
-       if (ec != boot_ec)
-               acpi_ec_remove_query_handlers(ec, true, 0);
- err_alloc:
+ err:
        if (ec != boot_ec)
                acpi_ec_free(ec);
        return ret;
  }
  
@@@ -1775,7 -1741,7 +1741,7 @@@ void __init acpi_ec_dsdt_probe(void
         * At this point, the GPE is not fully initialized, so do not to
         * handle the events.
         */
-       ret = acpi_ec_setup(ec, NULL, false);
+       ret = acpi_ec_setup(ec, NULL);
        if (ret) {
                acpi_ec_free(ec);
                return;
  }
  
  /*
-  * If the DSDT EC is not functioning, we still need to prepare a fully
-  * functioning ECDT EC first in order to handle the events.
-  * https://bugzilla.kernel.org/show_bug.cgi?id=115021
+  * acpi_ec_ecdt_start - Finalize the boot ECDT EC initialization.
+  *
+  * First, look for an ACPI handle for the boot ECDT EC if acpi_ec_add() has not
+  * found a matching object in the namespace.
+  *
+  * Next, in case the DSDT EC is not functioning, it is still necessary to
+  * provide a functional ECDT EC to handle events, so add an extra device object
+  * to represent it (see https://bugzilla.kernel.org/show_bug.cgi?id=115021).
+  *
+  * This is useful on platforms with valid ECDT and invalid DSDT EC settings,
+  * like ASUS X550ZE (see https://bugzilla.kernel.org/show_bug.cgi?id=196847).
   */
- static int __init acpi_ec_ecdt_start(void)
+ static void __init acpi_ec_ecdt_start(void)
  {
+       struct acpi_table_ecdt *ecdt_ptr;
        acpi_handle handle;
+       acpi_status status;
  
-       if (!boot_ec)
-               return -ENODEV;
-       /* In case acpi_ec_ecdt_start() is called after acpi_ec_add() */
-       if (!boot_ec_is_ecdt)
-               return -ENODEV;
+       /* Bail out if a matching EC has been found in the namespace. */
+       if (!boot_ec || boot_ec->handle != ACPI_ROOT_OBJECT)
+               return;
  
-       /*
-        * At this point, the namespace and the GPE is initialized, so
-        * start to find the namespace objects and handle the events.
-        *
-        * Note: ec->handle can be valid if this function is called after
-        * acpi_ec_add(), hence the fast path.
-        */
-       if (boot_ec->handle == ACPI_ROOT_OBJECT) {
-               if (!acpi_ec_ecdt_get_handle(&handle))
-                       return -ENODEV;
-               boot_ec->handle = handle;
-       }
+       /* Look up the object pointed to from the ECDT in the namespace. */
+       status = acpi_get_table(ACPI_SIG_ECDT, 1,
+                               (struct acpi_table_header **)&ecdt_ptr);
+       if (ACPI_FAILURE(status))
+               return;
  
-       /* Register to ACPI bus with PM ops attached */
-       return acpi_bus_register_early_device(ACPI_BUS_TYPE_ECDT_EC);
- }
+       status = acpi_get_handle(NULL, ecdt_ptr->id, &handle);
+       if (ACPI_FAILURE(status))
+               return;
  
- #if 0
- /*
-  * Some EC firmware variations refuses to respond QR_EC when SCI_EVT is not
-  * set, for which case, we complete the QR_EC without issuing it to the
-  * firmware.
-  * https://bugzilla.kernel.org/show_bug.cgi?id=82611
-  * https://bugzilla.kernel.org/show_bug.cgi?id=97381
-  */
- static int ec_flag_query_handshake(const struct dmi_system_id *id)
- {
-       pr_debug("Detected the EC firmware requiring QR_EC issued when SCI_EVT set\n");
-       EC_FLAGS_QUERY_HANDSHAKE = 1;
-       return 0;
+       boot_ec->handle = handle;
+       /* Add a special ACPI device object to represent the boot EC. */
+       acpi_bus_register_early_device(ACPI_BUS_TYPE_ECDT_EC);
  }
- #endif
  
  /*
   * On some hardware it is necessary to clear events accumulated by the EC during
@@@ -1962,7 -1919,7 +1919,7 @@@ void __init acpi_ec_ecdt_probe(void
         * At this point, the namespace is not initialized, so do not find
         * the namespace objects, or handle the events.
         */
-       ret = acpi_ec_setup(ec, NULL, false);
+       ret = acpi_ec_setup(ec, NULL);
        if (ret) {
                acpi_ec_free(ec);
                return;
@@@ -2037,11 -1994,6 +1994,11 @@@ void acpi_ec_set_gpe_wake_mask(u8 actio
                acpi_set_gpe_wake_mask(NULL, first_ec->gpe, action);
  }
  
 +bool acpi_ec_other_gpes_active(void)
 +{
 +      return acpi_any_gpe_status_set(first_ec ? first_ec->gpe : U32_MAX);
 +}
 +
  bool acpi_ec_dispatch_gpe(void)
  {
        u32 ret;
@@@ -2165,14 -2117,13 +2122,13 @@@ static const struct dmi_system_id acpi_
        { },
  };
  
int __init acpi_ec_init(void)
void __init acpi_ec_init(void)
  {
        int result;
-       int ecdt_fail, dsdt_fail;
  
        result = acpi_ec_init_workqueues();
        if (result)
-               return result;
+               return;
  
        /*
         * Disable EC wakeup on following systems to prevent periodic
                pr_debug("Disabling EC wakeup on suspend-to-idle\n");
        }
  
-       /* Drivers must be started after acpi_ec_query_init() */
-       dsdt_fail = acpi_bus_register_driver(&acpi_ec_driver);
-       /*
-        * Register ECDT to ACPI bus only when PNP0C09 probe fails. This is
-        * useful for platforms (confirmed on ASUS X550ZE) with valid ECDT
-        * settings but invalid DSDT settings.
-        * https://bugzilla.kernel.org/show_bug.cgi?id=196847
-        */
-       ecdt_fail = acpi_ec_ecdt_start();
-       return ecdt_fail && dsdt_fail ? -ENODEV : 0;
+       /* Driver must be registered after acpi_ec_init_workqueues(). */
+       acpi_bus_register_driver(&acpi_ec_driver);
+       acpi_ec_ecdt_start();
  }
  
  /* EC driver currently not unloadable */
diff --combined drivers/acpi/internal.h
index d44c591c4ee4d5c3623d84b83c8a84f1460f8505,43411a7457cd7f4520eb80bd05aa73d724db616d..e387517d3354605b7f248e55ebf04d3356379959
@@@ -190,7 -190,7 +190,7 @@@ extern struct acpi_ec *first_ec
  /* External interfaces use first EC only, so remember */
  typedef int (*acpi_ec_query_func) (void *data);
  
int acpi_ec_init(void);
void acpi_ec_init(void);
  void acpi_ec_ecdt_probe(void);
  void acpi_ec_dsdt_probe(void);
  void acpi_ec_block_transactions(void);
@@@ -202,7 -202,6 +202,7 @@@ void acpi_ec_remove_query_handler(struc
  
  #ifdef CONFIG_PM_SLEEP
  void acpi_ec_flush_work(void);
 +bool acpi_ec_other_gpes_active(void);
  bool acpi_ec_dispatch_gpe(void);
  #endif
  
diff --combined include/acpi/acpixf.h
index a50d6dea44c377b9f99a9497b1d2097a65df6b38,f7fd67dafd36358fb7a256f1ea8745b27e6015e2..87fc14e97d2b11dd16cdd4ceeec2d3a60373069f
@@@ -12,7 -12,7 +12,7 @@@
  
  /* Current ACPICA subsystem version in YYYYMMDD format */
  
- #define ACPI_CA_VERSION                 0x20200110
+ #define ACPI_CA_VERSION                 0x20200214
  
  #include <acpi/acconfig.h>
  #include <acpi/actypes.h>
@@@ -752,7 -752,7 +752,7 @@@ ACPI_HW_DEPENDENT_RETURN_UINT32(u32 acp
  ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void))
  ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void))
  ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_wakeup_gpes(void))
 -ACPI_HW_DEPENDENT_RETURN_UINT32(u32 acpi_any_gpe_status_set(void))
 +ACPI_HW_DEPENDENT_RETURN_UINT32(u32 acpi_any_gpe_status_set(u32 gpe_skip_number))
  ACPI_HW_DEPENDENT_RETURN_UINT32(u32 acpi_any_fixed_event_status_set(void))
  
  ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
This page took 0.108795 seconds and 4 git commands to generate.