Skip to content
Commit af6c7e1f authored by Andy Shevchenko's avatar Andy Shevchenko
Browse files

platform/x86: intel_pmc_ipc: Don't map non-used optional resources



The intel_pmc_ipc driver has a placeholder for all possible resources
that may have been provided by ACPI. Since there are few optional ones,
the driver still uses them and binds to wrong ranges in resource tree:

  # grep intel_punit_ipc /proc/iomem
  00000000-00000000 : intel_punit_ipc
    00000000-00000000 : intel_punit_ipc
      00000000-00000000 : intel_punit_ipc
        00000000-00000000 : intel_punit_ipc

This leads to issues with resource management during inserting and
removing modules, such as intel_pmc_ipc itself, which can't be inserted
anymore after first removal.

Count the actual resources provided and supply only them to the child device.

This is a real fix of the commit 8cc7fb4a

  ("intel_pmc_ipc: update acpi resource structure for Punit")

that also fixes a symptoms described in the commit 6cc8cbbc

  ("platform/x86: intel_punit_ipc: Fix resource ioremap warning")

that is going to be reverted afterwards.

Reported-by: default avatarJunxiao Chang <junxiao.chang@intel.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Qipeng Zha <qipeng.zha@intel.com>
Cc: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Reviewed-by: default avatarKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
parent 9eac0d75
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment