• Andy Shevchenko's avatar
    platform/x86: intel_pmc_ipc: Don't map non-used optional resources · af6c7e1f
    Andy Shevchenko authored
    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>
    af6c7e1f
intel_pmc_ipc.c 24.1 KB