linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [V4 PATCH 0/6] ACPI: Introduce support for _CCA object
@ 2015-05-15 21:23 Suravee Suthikulpanit
  2015-05-15 21:23 ` [V4 PATCH 1/6] ACPI / scan: Parse _CCA and setup device coherency Suravee Suthikulpanit
                   ` (5 more replies)
  0 siblings, 6 replies; 32+ messages in thread
From: Suravee Suthikulpanit @ 2015-05-15 21:23 UTC (permalink / raw)
  To: rjw, lenb, catalin.marinas, will.deacon, bhelgaas,
	thomas.lendacky, herbert, davem, arnd
  Cc: msalter, hanjun.guo, al.stone, grant.likely, leo.duran,
	linux-arm-kernel, linux-acpi, linux-kernel, linaro-acpi, netdev,
	linux-crypto, Suravee Suthikulpanit

This patch series introduce support for _CCA object, which is currently
used mainly by ARM64 platform to specify DMA coherency attribute for
devices when booting with ACPI.

A copy of ACPIv6 can be found here:
    http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf

This patch also introduces 2 new APIS:
    1. acpi_dma_is_coherent() as part of ACPI API.
    2. device_dma_is_coherent() as part of unified device property API.

This simplifies the logic in device drivers to determine device coherency
attribute regardless of booting with DT vs ACPI.

This has been tested on AMD-Seattle platform, which implements _CCA 
object as described in the AMD Opteron A1100 Series Processor ACPI Porting Guide:

http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/Seattle_ACPI_Guide.pdf

Changes from V3 (https://lkml.org/lkml/2015/5/7/1004):
    * Remove ARCH64_SUPPORT_ACPI_CCA_ZERO and just use CONFIG_ARM64.
      (per Catalin and Rafael)
    * Do not need to call arch_setup_dma_ops() for acpi_device->dev.
      (per Rafael)
    * [3/6] (New) We also need to call arch_setup_dma_ops() for pci
      devices and check the CCA of the host bridge. Similar logic
      exists for OF. So, I refactor of_pci_dma_configure() to
      the more generic version pci_dma_configure(), and add support
      for ACPI.

Changes from V2 (https://lkml.org/lkml/2015/5/5/510):
    * Reword ACPI_MUST_HAVE_CCA to ACPI_CCA_REQUIRED (per Rafael)
    * Reword ACPI_SUPPORT_CCA_ZERO to ARCH64_SUPPORT_ACPI_CCA_ZERO
      (per Rafael and Arnd)
    * Misc code styling clean up (per Rafael)
    * Only print missing _CCA warning message in debug mode.
    * Refactor logic in acpi_setup_device_dma() into
      if acpi_dma_is_supported() then call arch_setup_dma_ops().
    * Do not allocate device dma_mask if !acpi_dma_is_supported()
      (per Arnd).
    * Re-use the dummy functions with the same signature.

Changes from V1 (https://lkml.org/lkml/2015/4/29/290):
    * Remove supports for 32-bit ARM since doesn't currently
      supporting ACPI (Per Catalin suggestions.)
    * Do not call arch_setup_dma_ops() and when _CCA is missing.
      (per Arnd suggestion)
    * Add CONFIG_ACPI_SUPPORT_CCA_ZERO kernel config flag to
      allow architectures to specify the behavior when _CCA=0.
    * Add dummy_dma_ops for ARM64 (per Catalin suggestions).
    * Fixed build error when ACPI is not configured by defining
      acpi_dma_is_coherent() for when CONFIG_ACPI is not set.
    * Introduce device_dma_is_coherent().
    * Use device_dma_is_coherent in crypto/ccp and amd-xgbe driver.

Changes from RFC: (https://lkml.org/lkml/2015/4/1/389)
    * New logic for deriving and propagating coherent attribute from
      parent devices. (by Mark)
    * Introducing acpi_dma_is_coherent() API (Per Tom suggestion)
    * Introducing CONFIG_ACPI_MUST_HAVE_CCA kernel configuration.
    * Rebased to linux-4.1-rc1

Suravee Suthikulpanit (6):
  ACPI / scan: Parse _CCA and setup device coherency
  arm64 : Introduce support for ACPI _CCA object
  pci: Generic function for setting up PCI device DMA coherency
  device property: Introduces device_dma_is_coherent()
  crypto: ccp - Unify coherency checking logic with
    device_dma_is_coherent()
  amd-xgbe: Unify coherency checking logic with device_dma_is_coherent()

 arch/arm64/Kconfig                        |  1 +
 arch/arm64/include/asm/dma-mapping.h      | 18 +++++-
 arch/arm64/mm/dma-mapping.c               | 92 +++++++++++++++++++++++++++++++
 drivers/acpi/Kconfig                      |  3 +
 drivers/acpi/acpi_platform.c              | 10 +++-
 drivers/acpi/scan.c                       | 40 ++++++++++++++
 drivers/base/property.c                   | 12 ++++
 drivers/crypto/ccp/ccp-platform.c         | 60 +-------------------
 drivers/net/ethernet/amd/xgbe/xgbe-main.c | 27 +--------
 drivers/of/of_pci.c                       | 20 -------
 drivers/pci/probe.c                       | 35 +++++++++++-
 include/acpi/acpi_bus.h                   | 32 ++++++++++-
 include/linux/acpi.h                      | 10 ++++
 include/linux/of_pci.h                    |  3 -
 include/linux/property.h                  |  2 +
 15 files changed, 249 insertions(+), 116 deletions(-)

-- 
2.1.0


^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2015-05-21 13:24 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-15 21:23 [V4 PATCH 0/6] ACPI: Introduce support for _CCA object Suravee Suthikulpanit
2015-05-15 21:23 ` [V4 PATCH 1/6] ACPI / scan: Parse _CCA and setup device coherency Suravee Suthikulpanit
2015-05-15 23:53   ` Rafael J. Wysocki
2015-05-18 22:38     ` Suravee Suthikulanit
2015-05-19  0:28       ` Rafael J. Wysocki
2015-05-20 10:01   ` Catalin Marinas
2015-05-20 11:52     ` Suravee Suthikulanit
2015-05-20 12:04       ` [Linaro-acpi] " Arnd Bergmann
2015-05-21 13:01         ` Catalin Marinas
2015-05-21 13:24           ` Arnd Bergmann
2015-05-15 21:23 ` [V4 PATCH 2/6] arm64 : Introduce support for ACPI _CCA object Suravee Suthikulpanit
2015-05-16 11:48   ` Paul Bolle
2015-05-16 16:50     ` Suravee Suthikulpanit
2015-05-20 10:03   ` Catalin Marinas
2015-05-20 11:51     ` Suravee Suthikulanit
2015-05-15 21:23 ` [V4 PATCH 3/6] pci: Generic function for setting up PCI device DMA coherency Suravee Suthikulpanit
2015-05-15 23:59   ` Rafael J. Wysocki
2015-05-16 15:12     ` Suthikulpanit, Suravee
2015-05-20  9:24     ` Catalin Marinas
2015-05-20  9:27       ` Arnd Bergmann
2015-05-20  9:34         ` Catalin Marinas
2015-05-20 12:00           ` Suravee Suthikulanit
2015-05-20 12:02             ` [Linaro-acpi] " Arnd Bergmann
2015-05-20 20:46             ` Russell King - ARM Linux
2015-05-20  9:31       ` Catalin Marinas
2015-05-16 12:41   ` Bjorn Helgaas
2015-05-16 15:14     ` Suthikulpanit, Suravee
2015-05-15 21:23 ` [V4 PATCH 4/6] device property: Introduces device_dma_is_coherent() Suravee Suthikulpanit
2015-05-20 10:28   ` Will Deacon
2015-05-20 21:32     ` Suravee Suthikulanit
2015-05-15 21:23 ` [V4 PATCH 5/6] crypto: ccp - Unify coherency checking logic with device_dma_is_coherent() Suravee Suthikulpanit
2015-05-15 21:23 ` [V4 PATCH 6/6] amd-xgbe: " Suravee Suthikulpanit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).