mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Cc: rjw@rjwysocki.net, lenb@kernel.org, will.deacon@arm.com,
	thomas.lendacky@amd.com, herbert@gondor.apana.org.au,
	davem@davemloft.net, arnd@arndb.de, al.stone@linaro.org,
	linaro-acpi@lists.linaro.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	leo.duran@amd.com, hanjun.guo@linaro.org, msalter@redhat.com,
	grant.likely@linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-crypto@vger.kernel.org
Subject: Re: [V3 PATCH 2/5] arm64 : Introduce support for ACPI _CCA object
Date: Mon, 11 May 2015 18:12:29 +0100	[thread overview]
Message-ID: <20150511171229.GK18655@e104818-lin.cambridge.arm.com> (raw)
In-Reply-To: <1431045436-8690-3-git-send-email-Suravee.Suthikulpanit@amd.com>

On Thu, May 07, 2015 at 07:37:13PM -0500, Suravee Suthikulpanit wrote:
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 4269dba..c7227e8 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -1,5 +1,6 @@
>  config ARM64
>  	def_bool y
> +	select ACPI_CCA_REQUIRED if ACPI
>  	select ACPI_GENERIC_GSI if ACPI
>  	select ACPI_REDUCED_HARDWARE_ONLY if ACPI
>  	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
> @@ -19,6 +20,7 @@ config ARM64
>  	select ARM_GIC_V2M if PCI_MSI
>  	select ARM_GIC_V3
>  	select ARM_GIC_V3_ITS if PCI_MSI
> +	select ARM64_SUPPORT_ACPI_CCA_ZERO if ACPI

As per the other sub-thread, I don't think we need this option at all.

> diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h
> index 9437e3d..f0d6d0b 100644
> --- a/arch/arm64/include/asm/dma-mapping.h
> +++ b/arch/arm64/include/asm/dma-mapping.h
> @@ -18,6 +18,7 @@
>  
>  #ifdef __KERNEL__
>  
> +#include <linux/acpi.h>
>  #include <linux/types.h>
>  #include <linux/vmalloc.h>
>  
> @@ -28,13 +29,23 @@
>  
>  #define DMA_ERROR_CODE	(~(dma_addr_t)0)
>  extern struct dma_map_ops *dma_ops;
> +extern struct dma_map_ops dummy_dma_ops;
>  
>  static inline struct dma_map_ops *__generic_dma_ops(struct device *dev)
>  {
> -	if (unlikely(!dev) || !dev->archdata.dma_ops)
> +	if (unlikely(!dev))
>  		return dma_ops;
> -	else
> +	else if (dev->archdata.dma_ops)
>  		return dev->archdata.dma_ops;
> +	else if (acpi_disabled)
> +		return dma_ops;
> +
> +	/*
> +	 * When ACPI is enabled, if arch_set_dma_ops is not called,
> +	 * we will disable device DMA capability by setting it
> +	 * to dummy_dma_ops.
> +	 */
> +	return &dummy_dma_ops;
>  }

The code looks fine to me but Arnd had some comments that I didn't fully
understand (dropping dummy_map_ops in favour of simply setting dma_mask
to NULL; I don't think the existing swiotlb ops would behave in a way
that always return NULL).

-- 
Catalin

  parent reply	other threads:[~2015-05-11 17:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08  0:37 [V3 PATCH 0/5] ACPI: Introduce support for " Suravee Suthikulpanit
2015-05-08  0:37 ` [V3 PATCH 1/5] ACPI / scan: Parse _CCA and setup device coherency Suravee Suthikulpanit
2015-05-08 20:53   ` Rafael J. Wysocki
2015-05-11 16:16     ` Catalin Marinas
2015-05-12  1:20       ` Rafael J. Wysocki
2015-05-12 15:06         ` Suravee Suthikulanit
2015-05-08  0:37 ` [V3 PATCH 2/5] arm64 : Introduce support for ACPI _CCA object Suravee Suthikulpanit
2015-05-08 20:55   ` Rafael J. Wysocki
2015-05-11 17:12   ` Catalin Marinas [this message]
2015-05-08  0:37 ` [V3 PATCH 3/5] device property: Introduces device_dma_is_coherent() Suravee Suthikulpanit
2015-05-08  4:12   ` santosh.shilimkar
2015-05-08 20:49     ` Rafael J. Wysocki
2015-05-08 20:27       ` santosh shilimkar
2015-05-08 20:58         ` Rafael J. Wysocki
2015-05-08 20:36           ` santosh shilimkar
2015-05-08  0:37 ` [V3 PATCH 4/5] crypto: ccp - Unify coherency checking logic with device_dma_is_coherent() Suravee Suthikulpanit
2015-05-08  0:37 ` [V3 PATCH 5/5] amd-xgbe: " Suravee Suthikulpanit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150511171229.GK18655@e104818-lin.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=Suravee.Suthikulpanit@amd.com \
    --cc=al.stone@linaro.org \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=grant.likely@linaro.org \
    --cc=hanjun.guo@linaro.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=lenb@kernel.org \
    --cc=leo.duran@amd.com \
    --cc=linaro-acpi@lists.linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=msalter@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=thomas.lendacky@amd.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®