Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422838AbbEVWkK (ORCPT ); Fri, 22 May 2015 18:40:10 -0400 Received: from v094114.home.net.pl ([79.96.170.134]:53309 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1422707AbbEVWkI (ORCPT ); Fri, 22 May 2015 18:40:08 -0400 From: "Rafael J. Wysocki" To: Suravee Suthikulanit Cc: lenb@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, thomas.lendacky@amd.com, herbert@gondor.apana.org.au, davem@davemloft.net, arnd@arndb.de, msalter@redhat.com, hanjun.guo@linaro.org, al.stone@linaro.org, grant.likely@linaro.org, leo.duran@amd.com, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, netdev@vger.kernel.org, linux-crypto@vger.kernel.org Subject: Re: [V5 PATCH 1/5] ACPI / scan: Parse _CCA and setup device coherency Date: Sat, 23 May 2015 01:05:30 +0200 Message-ID: <2939517.7sXtxU6TkU@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.0.0+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <555FAC8F.4010306@amd.com> References: <1432159758-4486-1-git-send-email-Suravee.Suthikulpanit@amd.com> <1815824.lIg0NQ97lU@vostro.rjw.lan> <555FAC8F.4010306@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1808 Lines: 49 On Friday, May 22, 2015 05:24:15 PM Suravee Suthikulanit wrote: > Not sure if this went out earlier. So I am resending. > > On 5/22/15 16:56, Rafael J. Wysocki wrote: > >> diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c > >> >index 39c485b..b9657af 100644 > >> >--- a/drivers/acpi/glue.c > >> >+++ b/drivers/acpi/glue.c > >> >@@ -13,6 +13,7 @@ > >> > #include > >> > #include > >> > #include > >> >+#include > >> > > >> > #include "internal.h" > >> > > >> >@@ -167,6 +168,7 @@ int acpi_bind_one(struct device *dev, struct acpi_device *acpi_dev) > >> > struct list_head *physnode_list; > >> > unsigned int node_id; > >> > int retval = -EINVAL; > >> >+ bool coherent; > >> > > >> > if (has_acpi_companion(dev)) { > >> > if (acpi_dev) { > >> >@@ -223,6 +225,9 @@ int acpi_bind_one(struct device *dev, struct acpi_device *acpi_dev) > >> > if (!has_acpi_companion(dev)) > >> > ACPI_COMPANION_SET(dev, acpi_dev); > >> > > >> >+ if (acpi_check_dma(acpi_dev, &coherent)) > >> >+ arch_setup_dma_ops(dev, 0, 0, NULL, coherent); > >> >+ > > Well, so is this going to work for PCI too after all? > > > > No, as Bjorn suggested, PCI changes for setting DMA coherent from _CCA > (patch 3/6 in V4) will be submitted separately. We are working on > cleaning up and up-streaming the PCI ACPI support for ARM64. OK, but acpi_bind_one() is called for PCI devices too. Won't that be a problem? -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/