1. 28 7月, 2018 1 次提交
  2. 08 3月, 2018 2 次提交
    • L
      ACPI/IORT: Remove obsolete ACPI_IORT_SMMU_V3_CAVIUM_CN99XX define · 8dc12538
      Lorenzo Pieralisi 提交于
      To defeat ACPICA<->kernel merge order dependencies a preprocessor define
      value was introduced in the IORT compilation unit according to IORT
      revision C, IORT_SMMU_V3_CAVIUM_CN99XX, so that even if the value was
      not defined in ACPICA headers the IORT kernel layer would still be able
      to function and use it.
      
      Since commit 0c2021c0 ("ACPICA: IORT: Update SMMU models for
      revision C") finally added the define in ACPICA headers, as required by
      ACPICA IORT support, the preprocessor definition in the IORT kernel
      compilation unit has become obsolete and can be removed.
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NRobin Murphy <robin.murphy@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Hanjun Guo <hanjun.guo@linaro.org>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      8dc12538
    • L
      ACPI/IORT: Remove temporary iort_get_id_mapping_index() ACPICA guard · 6c475063
      Lorenzo Pieralisi 提交于
      In IORT issue C SMMUv3 IORT nodes gained an additional field (DeviceID
      mapping index) so that the SMMUv3 can describe its MSI interrupts.
      
      Referring to it in the kernel requires ACPICA changes and in order
      to prevent kernel<->ACPICA dependencies kernel code depending on the
      SMMUv3 DeviceID mapping index field was guarded with an ACPICA version
      conditional.
      
      ACPICA changes introducing DeviceID mapping index in the IORT structs
      were integrated in the kernel with:
      
      commit 4c106aa4 ("ACPICA: iasl: Add SMMUv3 device ID mapping index
      support")
      
      so the temporary ACPICA guard has become stale and can be removed.
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NHanjun Guo <hanjun.guo@linaro.org>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Hanjun Guo <hanjun.guo@linaro.org>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      6c475063
  3. 14 2月, 2018 1 次提交
  4. 16 10月, 2017 7 次提交
    • L
      ACPI/IORT: Enable SMMUv3/PMCG IORT MSI domain set-up · 65637901
      Lorenzo Pieralisi 提交于
      ITS specific mappings for SMMUv3/PMCG components can be retrieved
      through special index mapping entries introduced in IORT revision C.
      
      Introduce a new API iort_set_device_domain() to set the MSI domain for
      SMMUv3/PMCG nodes (extendable to any future IORT node requiring special
      index ITS mapping entries) that represent MSI through special index
      mappings in order to enable MSI support for the devices their nodes
      represent.
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NHanjun Guo <hanjun.guo@linaro.org>
      65637901
    • H
      ACPI/IORT: Add SMMUv3 specific special index mapping handling · 86456a3f
      Hanjun Guo 提交于
      IORT revision C introduced a mapping entry binding to describe ITS
      device ID mapping for SMMUv3 MSI interrupts.
      
      Enable the single mapping flag (ie that is used by SMMUv3 component for
      its special index mappings) for the SMMUv3 node in the IORT mapping API
      and add IORT code to handle special index mapping entry for the SMMUv3
      IORT nodes to enable their MSI interrupts. In case the ACPICA for
      SMMUv3 device ID mapping is not ready, use the ACPICA version as a guard
      for function iort_get_id_mapping_index().
      Signed-off-by: NHanjun Guo <hanjun.guo@linaro.org>
      [lorenzo.pieralisi@arm.com: patch split, typos fixing, rewrote the log]
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      86456a3f
    • H
      ACPI/IORT: Enable special index ITS group mappings for IORT nodes · 8c8df8dc
      Hanjun Guo 提交于
      IORT revision C introduced SMMUv3 and PMCG MSI support by adding
      specific mapping entries in the SMMUv3/PMCG subtables to retrieve
      the device ID and the ITS group it maps to for a given SMMUv3/PMCG
      IORT node.
      
      Introduce a mapping function (ie iort_get_id_mapping_index()), that
      for a given IORT node looks up if an ITS specific ID mapping entry
      exists and if so retrieve the corresponding mapping index in the IORT
      node mapping array.
      
      Since an ITS specific index mapping can be present for an IORT
      node that is not a leaf node (eg SMMUv3 - to describe its own
      ITS device ID) special handling is required for two steps mapping
      cases such as PCI/NamedComponent--->SMMUv3--->ITS because the SMMUv3
      ITS specific index mapping entry should be skipped to prevent the
      IORT API from considering the mapping entry as a regular mapping one.
      
      If we take the following IORT topology example:
      
      |----------------------|
      |  Root Complex Node   |
      |----------------------|
      |    map entry[x]      |
      |----------------------|
      |       id value       |
      | output_reference     |
      |---|------------------|
          |
          |   |----------------------|
          |-->|        SMMUv3        |
              |----------------------|
              |     SMMUv3 dev ID    |
              |     mapping index 0  |
              |----------------------|
              |      map entry[0]    |
              |----------------------|
              |       id value       |
              | output_reference-----------> ITS 1 (SMMU MSI domain)
              |----------------------|
              |      map entry[1]    |
              |----------------------|
              |       id value       |
              | output_reference-----------> ITS 2 (PCI MSI domain)
              |----------------------|
      
      where the SMMUv3 ITS specific mapping entry is index 0 and it
      represents the SMMUv3 ITS specific index mapping entry (describing its
      own ITS device ID), we need to skip that mapping entry while carrying
      out the Root Complex Node regular mappings to prevent erroneous
      translations.
      
      Reuse the iort_get_id_mapping_index() function to detect the ITS
      specific mapping index for a specific IORT node and skip it in the IORT
      mapping API (ie iort_node_map_id()) loop to prevent considering it a
      normal PCI/Named Component ID mapping entry.
      Signed-off-by: NHanjun Guo <hanjun.guo@linaro.org>
      [lorenzo.pieralisi@arm.com: split patch/rewrote commit log]
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      8c8df8dc
    • H
      ACPI/IORT: Look up IORT node through struct fwnode_handle pointer · 0a71d8b9
      Hanjun Guo 提交于
      Current IORT code provides a function (ie iort_get_fwnode())
      which looks up a struct fwnode_handle pointer through a
      struct acpi_iort_node pointer for SMMU components but it
      lacks a function that implements the reverse look-up, namely
      struct fwnode_handle* -> struct acpi_iort_node*.
      
      Devices that are not IORT named components cannot be retrieved through
      their associated IORT named component scan interface because they just
      are not represented in the ACPI namespace; the reverse look-up is
      therefore required for all platform devices that represent IORT nodes
      (eg SMMUs) so that the struct acpi_iort_node* can be retrieved from the
      struct device->fwnode pointer.
      Signed-off-by: NHanjun Guo <hanjun.guo@linaro.org>
      [lorenzo.pieralisi@arm.com: re-indented/rewrote the commit log]
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      0a71d8b9
    • L
      ACPI/IORT: Make platform devices initialization code SMMU agnostic · 896dd2c3
      Lorenzo Pieralisi 提交于
      The way current IORT code initializes platform devices for SMMU nodes
      is somewhat tied (mostly for naming convention) to the SMMU nodes
      themselves but it need not be in that it is completely generic and
      can easily be made so by structures renaming and code reshuffling.
      
      Rework IORT platform devices initialization code to make the functions
      and data structures SMMU agnostic.
      
      No functional changes intended.
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NHanjun Guo <hanjun.guo@linaro.org>
      Cc: Hanjun Guo <hanjun.guo@linaro.org>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      896dd2c3
    • L
      ACPI/IORT: Improve functions return type/storage class specifier indentation · e3d49392
      Lorenzo Pieralisi 提交于
      Some functions definition indentations are using a style that is frowned
      upon with return value type/storage class specifier in a separate line.
      
      Reindent the function definitions to fix them.
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NHanjun Guo <hanjun.guo@linaro.org>
      Cc: Hanjun Guo <hanjun.guo@linaro.org>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      e3d49392
    • L
      ACPI/IORT: Remove leftover ACPI_IORT_SMMU_V3_PXM_VALID guard · 75808131
      Lorenzo Pieralisi 提交于
      The conditional ACPI_IORT_SMMU_V3_PXM_VALID guard around
      arm_smmu_v3_set_proximity() was added to manage a cross tree
      ACPICA merge dependency; with ACPICA changes merged in:
      
      commit c9442300 ("ACPICA: iasl: Update to IORT SMMUv3
      disassembling")
      
      the guard has become useless. Remove it.
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NHanjun Guo <hanjun.guo@linaro.org>
      Cc: Hanjun Guo <hanjun.guo@linaro.org>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
      75808131
  5. 05 10月, 2017 1 次提交
    • L
      ACPI/IORT: Fix PCI ACS enablement · 37f6b42e
      Lorenzo Pieralisi 提交于
      commit f6810c15 ("iommu/arm-smmu: Clean up early-probing
      workarounds") removed kernel code that was allowing to initialize
      and probe the SMMU devices early (ie earlier than PCI devices, through
      linker script callback entries) in the boot process because it was not
      needed any longer in that the SMMU devices/drivers now support deferred
      probing.
      
      Since the SMMUs probe routines are also in charge of requesting global
      PCI ACS kernel enablement, commit f6810c15 ("iommu/arm-smmu: Clean
      up early-probing workarounds") also postponed PCI ACS enablement to
      SMMUs devices probe time, which is too late given that PCI devices needs
      to detect if PCI ACS is enabled to init the respective capability
      through the following call path:
      
      pci_device_add()
       -> pci_init_capabilities()
        -> pci_enable_acs()
      
      Add code in the ACPI IORT SMMU platform devices initialization path
      (that is called before ACPI PCI enumeration) to detect if there
      exists firmware mappings to map root complexes ids to SMMU ids
      and if so enable ACS for the system.
      
      Fixes: f6810c15 ("iommu/arm-smmu: Clean up early-probing workarounds")
      Reviewed-by: NRobin Murphy <robin.murphy@arm.com>
      Tested-by: NNate Watterson <nwatters@codeaurora.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Hanjun Guo <hanjun.guo@linaro.org>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Zhou Wang <wangzhou1@hisilicon.com>
      Cc: Alex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      37f6b42e
  6. 11 8月, 2017 1 次提交
  7. 08 8月, 2017 2 次提交
    • G
      ACPI/IORT: numa: Add numa node mapping for smmuv3 devices · 5fe0ce3b
      Ganapatrao Kulkarni 提交于
      ARM IORT specification(rev. C) has added  provision to define proximity
      domain in SMMUv3 IORT table. Adding required code to parse Proximity
      domain and set numa_node of smmv3 platform devices.
      Signed-off-by: NGanapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
      [lorenzo.pieralisi@arm.com: update pr_info()/commit log]
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      5fe0ce3b
    • R
      ACPI/IORT: Handle PCI aliases properly for IOMMUs · bc8648d4
      Robin Murphy 提交于
      When a PCI device has DMA quirks, we need to ensure that an upstream
      IOMMU knows about all possible aliases, since the presence of a DMA
      quirk does not preclude the device still also emitting transactions
      (e.g. MSIs) on its 'real' RID. Similarly, the rules for bridge aliasing
      are relatively complex, and some bridges may only take ownership of
      transactions under particular transient circumstances, leading again to
      multiple RIDs potentially being seen at the IOMMU for the given device.
      
      Take all this into account in iort_iommu_configure() by mapping every
      RID produced by the alias walk, not just whichever one comes out last.
      Since adding any more internal PTR_ERR() juggling would have confused me
      no end, a bit of refactoring happens in the process - we know where to
      find the ops if everything succeeded, so we're free to just pass regular
      error codes around up until then.
      
      CC: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      CC: Hanjun Guo <hanjun.guo@linaro.org>
      CC: Sudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
      [lorenzo.pieralisi@arm.com: tagged __get_pci_rid __maybe_unused]
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      bc8648d4
  8. 07 8月, 2017 2 次提交
  9. 24 6月, 2017 3 次提交
  10. 15 6月, 2017 1 次提交
  11. 30 5月, 2017 2 次提交
    • L
      ACPI/IORT: Move the check to get iommu_ops from translated fwspec · 4dac3210
      Lorenzo Pieralisi 提交于
      With IOMMU probe deferral, iort_iommu_configure can be called
      multiple times for the same device. Hence we have a check
      to see if the device's fwspec is already translated and return
      the iommu_ops from that directly. But the check is wrongly
      placed in iort_iommu_xlate, which breaks devices with multiple
      sids. Move the check to iort_iommu_configure.
      
      Fixes: 5a1bb638 ("drivers: acpi: Handle IOMMU lookup failure with deferred probing or error")
      Tested-by: NNate Watterson <nwatters@codeaurora.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      4dac3210
    • S
      ACPI/IORT: Ignore all errors except EPROBE_DEFER · 058f8c3f
      Sricharan R 提交于
      While deferring the probe of IOMMU masters, xlate and
      add_device callbacks called from iort_iommu_configure
      can pass back error values like -ENODEV, which means
      the IOMMU cannot be connected with that master for real
      reasons. Before the IOMMU probe deferral, all such errors
      were ignored. Now all those errors are propagated back,
      killing the master's probe for such errors. Instead ignore
      all the errors except EPROBE_DEFER, which is the only one
      of concern and let the master work without IOMMU, thus
      restoring the old behavior. Also make explicit that
      acpi_dma_configure handles only -EPROBE_DEFER from
      iort_iommu_configure.
      
      Fixes: 5a1bb638 ("drivers: acpi: Handle IOMMU lookup failure with deferred probing or error")
      Signed-off-by: NSricharan R <sricharan@codeaurora.org>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      058f8c3f
  12. 29 4月, 2017 1 次提交
    • L
      ACPI/IORT: Fix CONFIG_IOMMU_API dependency · d49f2ded
      Lorenzo Pieralisi 提交于
      The IOMMU probe deferral IORT rework had to add code in
      iort_iommu_configure() and iort_iommu_xlate() that requires
      the IOMMU_API to be selected in order to compile and work.
      
      Stub out the pieces of code that depend on CONFIG_IOMMU_API
      to be selected to prevent compilation failures such as:
      
      drivers/acpi/arm64/iort.c: In function 'iort_iommu_xlate':
      drivers/acpi/arm64/iort.c:647:22: error: 'struct iommu_fwspec' has no
      member named 'ops'
      
      by wrapping the code in static inline functions that provide a NOP
      implementation when CONFIG_IOMMU_API is not selected.
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Reported-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Sricharan R <sricharan@codeaurora.org>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      d49f2ded
  13. 20 4月, 2017 3 次提交
  14. 30 3月, 2017 2 次提交
  15. 29 3月, 2017 2 次提交
  16. 22 3月, 2017 3 次提交
  17. 10 2月, 2017 1 次提交
  18. 07 2月, 2017 2 次提交
    • D
      ACPI/IORT: Fix the error return code in iort_add_smmu_platform_device() · 5e5afa6c
      Dan Carpenter 提交于
      The function iort_add_smmu_platform_device() accidentally returns 0
      (ie PTR_ERR(pdev) where pdev == NULL) if platform_device_alloc() fails;
      fix the bug by returning a proper error value.
      
      Fixes: 846f0e9e ("ACPI/IORT: Add support for ARM SMMU platform devices creation")
      Acked-by: NHanjun Guo <hanjun.guo@linaro.org>
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      [lorenzo.pieralisi@arm.com: improved commit log]
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      5e5afa6c
    • L
      ACPI/IORT: Fix iort_node_get_id() mapping entries indexing · 030abd8a
      Lorenzo Pieralisi 提交于
      Commit 618f535a ("ACPI/IORT: Add single mapping function")
      introduced a function (iort_node_get_id()) to retrieve ids for IORT
      named components.
      
      The iort_node_get_id() takes an index as input to refer to a specific
      mapping entry in the named component IORT node mapping array.
      
      For a mapping entry at a given index, iort_node_get_id() should return
      the id value (through the id_out function parameter) and the IORT node
      output_reference (through function return value) the given mapping entry
      refers to.
      
      Technically output_reference values may differ for different map
      entries, (see diagram below - mapped id values may refer to different eg
      IORT SMMU nodes; the kernel may not be able to handle different
      output_reference values for a given named component but the IORT kernel
      layer should still report the IORT mappings as reported by firmware) but
      current code in iort_node_get_id() fails to use the index function
      parameter to return the correct output_reference value (ie it always
      returns the output_reference value of the first entry in the mapping
      array whilst using the index correctly to retrieve the id value from the
      respective entry).
      
      	|----------------------|
      	|     named component  |
      	|----------------------|
      	|      map entry[0]    |
      	|----------------------|
      	|       id value       |
      	| output_reference----------------> eg SMMU 1
      	|----------------------|
      	|      map entry[1]    |
      	|----------------------|
      	|       id value       |
      	| output_reference----------------> eg SMMU 2
      	|----------------------|
      		    .
      		    .
      		    .
      	|----------------------|
      	|      map entry[N]    |
      	|----------------------|
      	|       id value       |
      	| output_reference----------------> eg SMMU 1
      	|----------------------|
      
      Consequently the iort_node_get_id() function always returns the IORT
      node pointed at by the output_reference value of the first named
      component mapping array entry, irrespective of the index parameter,
      which is a bug.
      
      Update the map array entry pointer computation in iort_node_get_id() to
      take into account the index value, fixing the issue.
      
      Fixes: 618f535a ("ACPI/IORT: Add single mapping function")
      Reported-by: NHanjun Guo <hanjun.guo@linaro.org>
      Reviewed-by: NHanjun Guo <hanjun.guo@linaro.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Hanjun Guo <hanjun.guo@linaro.org>
      Cc: Sinan Kaya <okaya@codeaurora.org>
      Cc: Tomasz Nowicki <tn@semihalf.com>
      Cc: Nate Watterson <nwatters@codeaurora.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      030abd8a
  19. 06 12月, 2016 1 次提交
    • L
      ACPI/IORT: Make dma masks set-up IORT specific · 18b709be
      Lorenzo Pieralisi 提交于
      The introduction of acpi_dma_configure() allows to configure DMA
      and related IOMMU for any device that is DMA capable. To achieve
      that goal it ensures DMA masks are set-up to sane default values
      before proceeding with IOMMU and DMA ops configuration.
      
      On x86/ia64 systems, through acpi_bind_one(), acpi_dma_configure() is
      called for every device that has an ACPI companion, in that every device
      is considered DMA capable on x86/ia64 systems (ie acpi_get_dma_attr() API),
      which has the side effect of initializing dma masks also for
      pseudo-devices (eg CPUs and memory nodes) and potentially for devices
      whose dma masks were not set-up before the acpi_dma_configure() API was
      introduced, which may have noxious side effects.
      
      Therefore, in preparation for IORT firmware specific DMA masks set-up,
      wrap the default DMA masks set-up in acpi_dma_configure() inside an IORT
      specific wrapper that reverts to a NOP on x86/ia64 systems, restoring the
      default expected behaviour on x86/ia64 systems and keeping DMA default
      masks set-up on IORT based (ie ARM) arch configurations.
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NHanjun Guo <hanjun.guo@linaro.org>
      Tested-by: NHanjun Guo <hanjun.guo@linaro.org>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Hanjun Guo <hanjun.guo@linaro.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Tomasz Nowicki <tn@semihalf.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Sricharan R <sricharan@codeaurora.org>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      18b709be
  20. 29 11月, 2016 2 次提交
    • L
      ACPI/IORT: Introduce iort_iommu_configure · 643b8e4d
      Lorenzo Pieralisi 提交于
      DT based systems have a generic kernel API to configure IOMMUs
      for devices (ie of_iommu_configure()).
      
      On ARM based ACPI systems, the of_iommu_configure() equivalent can
      be implemented atop ACPI IORT kernel API, with the corresponding
      functions to map device identifiers to IOMMUs and retrieve the
      corresponding IOMMU operations necessary for DMA operations set-up.
      
      By relying on the iommu_fwspec generic kernel infrastructure,
      implement the IORT based IOMMU configuration for ARM ACPI systems
      and hook it up in the ACPI kernel layer that implements DMA
      configuration for a device.
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> [ACPI core]
      Reviewed-by: NTomasz Nowicki <tn@semihalf.com>
      Tested-by: NHanjun Guo <hanjun.guo@linaro.org>
      Tested-by: NTomasz Nowicki <tn@semihalf.com>
      Cc: Hanjun Guo <hanjun.guo@linaro.org>
      Cc: Tomasz Nowicki <tn@semihalf.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      643b8e4d
    • L
      ACPI/IORT: Add single mapping function · 618f535a
      Lorenzo Pieralisi 提交于
      The current IORT id mapping API requires components to provide
      an input requester ID (a Bus-Device-Function (BDF) identifier for
      PCI devices) to translate an input identifier to an output
      identifier through an IORT range mapping.
      
      Named components do not have an identifiable source ID therefore
      their respective input/output mapping can only be defined in
      IORT tables through single mappings, that provide a translation
      that does not require any input identifier.
      
      Current IORT interface for requester id mappings (iort_node_map_rid())
      is not suitable for components that do not provide a requester id,
      so it cannot be used for IORT named components.
      
      Add an interface to the IORT API to enable retrieval of id
      by allowing an indexed walk of the single mappings array for
      a given component, therefore completing the IORT mapping API.
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Reviewed-by: NTomasz Nowicki <tn@semihalf.com>
      Tested-by: NHanjun Guo <hanjun.guo@linaro.org>
      Tested-by: NTomasz Nowicki <tn@semihalf.com>
      Cc: Hanjun Guo <hanjun.guo@linaro.org>
      Cc: Tomasz Nowicki <tn@semihalf.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      618f535a