1. 18 Oct, 2018 11 commits
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-property' and 'acpi-sbs' · 0a1875ad
      Rafael J. Wysocki authored
      * acpi-property:
        ACPI / property: Switch to bitmap_zalloc()
      
      * acpi-sbs:
        ACPI / SBS: Fix rare oops when removing modules
        ACPI / SBS: Fix GPE storm on recent MacBookPro's
      0a1875ad
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-soc', 'acpi-processor', 'acpi-pmic', 'acpi-cppc' and 'acpi-tad' · 1f825f74
      Rafael J. Wysocki authored
      * acpi-soc:
        ACPI / LPSS: Resume BYT/CHT I2C controllers from resume_noirq
        ACPI / LPSS: Add a device link from the GPU to the BYT I2C5 controller
        ACPI / LPSS: Add a device link from the GPU to the CHT I2C7 controller
        ACPI / LPSS: Make acpi_lpss_find_device() also find PCI devices
        ACPI / LPSS: Make hid_uid_match helper accept a NULL uid argument
        ACPI / LPSS: Make hid_uid_match helper take an acpi_device as first argument
        ACPI / LPSS: Exclude I2C busses shared with PUNIT from pmc_atom_d3_mask
        ACPI / LPSS: Add alternative ACPI HIDs for Cherry Trail DMA controllers
      
      * acpi-processor:
        ACPI / processor: Fix the return value of acpi_processor_ids_walk()
      
      * acpi-pmic:
        ACPI / PMIC: Convert drivers to use SPDX identifier
        ACPI / PMIC: Sort headers alphabetically
      
      * acpi-cppc:
        mailbox: PCC: handle parse error
      
      * acpi-tad:
        ACPI: TAD: Add low-level support for real time capability
      1f825f74
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-init', 'acpi-osl', 'acpi-bus', 'acpi-tables' and 'acpi-misc' · bd371e08
      Rafael J. Wysocki authored
      * acpi-init:
        ACPI: probe ECDT before loading AML tables regardless of module-level code flag
      
      * acpi-osl:
        ACPI / OSL: Use 'jiffies' as the time bassis for acpi_os_get_timer()
      
      * acpi-bus:
        ACPI / glue: Split dev_is_platform() out of module for wide use
      
      * acpi-tables:
        ACPI/PPTT: Handle architecturally unknown cache types
        drivers: base: cacheinfo: Do not populate sysfs for unknown cache types
      
      * acpi-misc:
        ACPI: remove redundant 'default n' from Kconfig
        ACPI: custom_method: remove meaningless null check before debugfs_remove()
      bd371e08
    • Rafael J. Wysocki's avatar
      Merge branch 'acpica' · 3c88a889
      Rafael J. Wysocki authored
      * acpica:
        ACPICA: Remove acpi_gbl_group_module_level_code and only use acpi_gbl_execute_tables_as_methods instead
        ACPICA: AML Parser: fix parse loop to correctly skip erroneous extended opcodes
        ACPICA: AML interpreter: add region addresses in global list during initialization
        ACPICA: Update version to 20181003
        ACPICA: Never run _REG on system_memory and system_IO
        ACPICA: Split large interpreter file
        ACPICA: Update for field unit access
        ACPICA: Rename some of the Field Attribute defines
        ACPICA: Update for generic_serial_bus and attrib_raw_process_bytes protocol
      3c88a889
    • Hans de Goede's avatar
      ACPI / scan: Create platform device for INT33FE ACPI nodes · 589edb56
      Hans de Goede authored
      Bay and Cherry Trail devices with a Dollar Cove or Whiskey Cove PMIC
      have an ACPI node with a HID of INT33FE which is a "virtual" battery
      device implementing a standard ACPI battery interface which depends upon
      a proprietary, undocument OpRegion called BMOP. Since we do have docs
      for the actual fuel-gauges used on these boards we instead use native
      fuel-gauge drivers talking directly to the fuel-gauge ICs on boards which
      rely on this INT33FE device for their battery monitoring.
      
      On boards with a Dollar Cove PMIC the INT33FE device's resources (_CRS)
      describe a non-existing I2C client at address 0x6b with a bus-speed of
      100KHz. This is a problem on some boards since there are actual devices
      on that same bus which need a speed of 400KHz to function properly.
      
      This commit adds the INT33FE HID to the list of devices with I2C resources
      which should be enumerated as a platform-device rather then letting the
      i2c-core instantiate an i2c-client matching the first I2C resource,
      so that its bus-speed will not influence the max speed of the I2C bus.
      This fixes e.g. the touchscreen not working on the Teclast X98 II Plus.
      
      The INT33FE device on boards with a Whiskey Cove PMIC is somewhat special.
      Its first I2C resource is for a secondary I2C address of the PMIC itself,
      which is already described in an ACPI device with an INT34D3 HID.
      
      But it has 3 more I2C resources describing 3 other chips for which we do
      need to instantiate I2C clients and which need device-connections added
      between them for things to work properly. This special case is handled by
      the drivers/platform/x86/intel_cht_int33fe.c code.
      
      Before this commit that code was binding to the i2c-client instantiated
      for the secondary I2C address of the PMIC, since we now instantiate a
      platform device for the INT33FE device instead, this commit also changes
      the intel_cht_int33fe driver from an i2c driver to a platform driver.
      
      This also brings the intel_cht_int33fe drv inline with how we instantiate
      multiple i2c clients from a single ACPI device in other cases, as done
      by the drivers/platform/x86/i2c-multi-instantiate.c code.
      Reported-and-tested-by: default avatarAlexander Meiler <alex.meiler@protonmail.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      589edb56
    • Bart Van Assche's avatar
      ACPI / OSL: Use 'jiffies' as the time bassis for acpi_os_get_timer() · 83b2348e
      Bart Van Assche authored
      Since acpi_os_get_timer() may be called after the timer subsystem has
      been suspended, use the jiffies counter instead of ktime_get(). This
      patch avoids that the following warning is reported during hibernation:
      
      WARNING: CPU: 0 PID: 612 at kernel/time/timekeeping.c:751 ktime_get+0x116/0x120
      RIP: 0010:ktime_get+0x116/0x120
      Call Trace:
       acpi_os_get_timer+0xe/0x30
       acpi_ds_exec_begin_control_op+0x175/0x1de
       acpi_ds_exec_begin_op+0x2c7/0x39a
       acpi_ps_create_op+0x573/0x5e4
       acpi_ps_parse_loop+0x349/0x1220
       acpi_ps_parse_aml+0x25b/0x6da
       acpi_ps_execute_method+0x327/0x41b
       acpi_ns_evaluate+0x4e9/0x6f5
       acpi_ut_evaluate_object+0xd9/0x2f2
       acpi_rs_get_method_data+0x8f/0x114
       acpi_walk_resources+0x122/0x1b6
       acpi_pci_link_get_current.isra.2+0x157/0x280
       acpi_pci_link_set+0x32f/0x4a0
       irqrouter_resume+0x58/0x80
       syscore_resume+0x84/0x380
       hibernation_snapshot+0x20c/0x4f0
       hibernate+0x22d/0x3a6
       state_store+0x99/0xa0
       kobj_attr_store+0x37/0x50
       sysfs_kf_write+0x87/0xa0
       kernfs_fop_write+0x1a5/0x240
       __vfs_write+0xd2/0x410
       vfs_write+0x101/0x250
       ksys_write+0xab/0x120
       __x64_sys_write+0x43/0x50
       do_syscall_64+0x71/0x220
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Fixes: 164a08ce (ACPICA: Dispatcher: Introduce timeout mechanism for infinite loop detection)
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      References: https://lists.01.org/pipermail/lkp/2018-April/008406.htmlSigned-off-by: default avatarBart Van Assche <bvanassche@acm.org>
      Cc: 4.16+ <stable@vger.kernel.org> # 4.16+
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      83b2348e
    • Erik Schmauss's avatar
      ACPI: probe ECDT before loading AML tables regardless of module-level code flag · d737f333
      Erik Schmauss authored
      It was discovered that AML tables were loaded before or after the
      ECDT depending on acpi_gbl_execute_tables_as_methods. According to
      the ACPI spec, the ECDT should be loaded before the namespace is
      populated by loading AML tables (DSDT and SSDT). Since the ECDT
      should be loaded early in the boot process, this change moves the
      ECDT probing to acpi_early_init.
      Signed-off-by: default avatarErik Schmauss <erik.schmauss@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d737f333
    • Erik Schmauss's avatar
      ACPICA: Remove acpi_gbl_group_module_level_code and only use... · 08930d56
      Erik Schmauss authored
      ACPICA: Remove acpi_gbl_group_module_level_code and only use acpi_gbl_execute_tables_as_methods instead
      
      acpi_gbl_group_module_level_code and acpi_gbl_execute_tables_as_methods were
      used to enable different table load behavior. The different table
      load behaviors are as follows:
      
      A.) acpi_gbl_group_module_level_code enabled the legacy approach where
          ASL if statements are executed after the namespace object has
          been loaded.
      B.) acpi_gbl_execute_tables_as_methods is currently used to enable the
          table load to be a method invocation. This meaning that ASL If
          statements are executed in-line rather than deferred until after
          the ACPI namespace has been populated. This is the correct
          behavior and option A will be removed in the future.
      
      We do not support a table load behavior where these variables are
      assigned the same value. In otherwords, we only support option A or B
      and do not need acpi_gbl_group_module_level_code to enable A. From now on,
      acpi_gbl_execute_tables_as_methods == 0 enables option A and
      acpi_gbl_execute_tables_as_methods == 1 enables option B.
      
      Note: option A is expected to be removed in the future and option B
      will become the only supported table load behavior.
      Signed-off-by: default avatarErik Schmauss <erik.schmauss@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      08930d56
    • Erik Schmauss's avatar
      ACPICA: AML Parser: fix parse loop to correctly skip erroneous extended opcodes · c64baa3a
      Erik Schmauss authored
      AML opcodes come in two lengths: 1-byte opcodes and 2-byte, extended opcodes.
      If an error occurs due to illegal opcodes during table load, the AML parser
      needs to continue loading the table. In order to do this, it needs to skip
      parsing of the offending opcode and operands associated with that opcode.
      
      This change fixes the AML parse loop to correctly skip parsing of incorrect
      extended opcodes. Previously, only the short opcodes were skipped correctly.
      Signed-off-by: default avatarErik Schmauss <erik.schmauss@intel.com>
      Cc: All applicable <stable@vger.kernel.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c64baa3a
    • Erik Schmauss's avatar
      ACPICA: AML interpreter: add region addresses in global list during initialization · 4abb951b
      Erik Schmauss authored
      The table load process omitted adding the operation region address
      range to the global list. This omission is problematic because the OS
      queries the global list to check for address range conflicts before
      deciding which drivers to load. This commit may result in warning
      messages that look like the following:
      
      [    7.871761] ACPI Warning: system_IO range 0x00000428-0x0000042F conflicts with op_region 0x00000400-0x0000047F (\PMIO) (20180531/utaddress-213)
      [    7.871769] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
      
      However, these messages do not signify regressions. It is a result of
      properly adding address ranges within the global address list.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=200011Tested-by: default avatarJean-Marc Lenoir <archlinux@jihemel.com>
      Signed-off-by: default avatarErik Schmauss <erik.schmauss@intel.com>
      Cc: All applicable <stable@vger.kernel.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4abb951b
    • Rafael J. Wysocki's avatar
      ACPI: TAD: Add low-level support for real time capability · 3230b2b3
      Rafael J. Wysocki authored
      Add low-level support for the (optional) real time capability of the
      ACPI Time and Alarm Device (TAD) to the ACPI TAD driver.
      
      This allows the real time to be acquired or set via sysfs with the
      help of the _GRT and _SRT methods of the TAD, respectively.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      3230b2b3
  2. 15 Oct, 2018 1 commit
  3. 14 Oct, 2018 2 commits
  4. 13 Oct, 2018 11 commits
  5. 12 Oct, 2018 15 commits