1. 13 Feb, 2019 6 commits
  2. 12 Feb, 2019 25 commits
  3. 11 Feb, 2019 6 commits
  4. 08 Feb, 2019 3 commits
    • Pierre-Louis Bossart's avatar
      ASoC: Intel: Skylake: set .ignore_module_refcount field in component · e0771fc9
      Pierre-Louis Bossart authored
      There is no risk of the module being removed while the platform
      components are in use. This solves the problem of the snd_soc_skl
      module not being removable with rmmod
      Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      e0771fc9
    • Pierre-Louis Bossart's avatar
      ASoC: core: don't increase component module refcount unconditionally · b450b878
      Pierre-Louis Bossart authored
      The ASoC core has for the longest time increased the module reference
      counts, even before the transition to the component model. This is
      probably fine on most platforms, but it introduces a deadlock case on
      Intel devices with the Skylake and SOF drivers which cannot be removed
      due to their reference counts being modified by the core.
      
      In these 2 cases, the PCI or ACPI driver .probe creates a platform
      device to let the machine driver .probe register the audio
      card. Conversely the PCI or ACPI driver .remove will unregister the
      platform device which results in the card being removed by the machine
      driver .remove.
      
      With ascii art, this can be represented as
      
      modprobe
      snd_soc_skl/
      soc-pci-dev/sof-acpci-dev  ----------> pci/acpi probe
             ^                                    |
             |                     ---------------|
             |                    |               |
             |                    V               V
          increase            register        register machine
          refcount            component       platform_device
             ^                                    |
             |                                    |
             |                                    V
          component <----   register card  <---- probe
          probe
      
      The issue is that by playing with the component's module reference
      counts during the card registration, it's no longer possible to remove
      the module which controls the component. This can be shown, e.g. with
      the following error:
      
      root@plb-XPS-13-9350:~# lsmod | grep snd_soc_skl
      snd_soc_skl           110592  1
      
      root@plb-XPS-13-9350:~# rmmod snd_soc_skl
      rmmod: ERROR: Module snd_soc_skl is in use
      
      Increasing the reference count during the component probe is not
      useful. If the PCI/ACPI module is removed, the card will be removed
      anyway.
      
      To avoid breaking existing platforms and allowing Intel platforms to
      safely deal with module load/unload cases, this patch introduces a
      flag which needs to be set during the component initialization. This
      is a strictly opt-in capability that should only be used when the
      handling of the component module does not require a reference count
      increase to prevent removal during use.
      
      Note that this solution is not directly applicable to the legacy
      Atom/SST driver, which uses a different device hierarchy. There are
      however additional refcount issues which prevent the ACPI driver from
      being removed. This is a different issue which would need a different
      patch.
      Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      b450b878
    • Andy Shevchenko's avatar
      gpiolib: acpi: Introduce ACPI_GPIO_QUIRK_ONLY_GPIOIO · 4d1f7a6e
      Andy Shevchenko authored
      New quirk enforces search for GPIO based on its type,
      i.e. iterate over GpioIo resources only.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Tested-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      4d1f7a6e