From patchwork Wed Aug 12 21:51:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 7004201 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A5CC6C05AC for ; Wed, 12 Aug 2015 21:59:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D88912060E for ; Wed, 12 Aug 2015 21:59:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F1AE4205B1 for ; Wed, 12 Aug 2015 21:59:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZPdzs-0005ys-8v; Wed, 12 Aug 2015 21:55:44 +0000 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZPdzX-0004lw-NU for linux-arm-kernel@lists.infradead.org; Wed, 12 Aug 2015 21:55:25 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-34-21FNPnFGQSyE-cgwrr3TBA-1; Wed, 12 Aug 2015 22:52:07 +0100 Received: from mammon-v1.localdomain.com ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 12 Aug 2015 22:52:07 +0100 From: Jeremy Linton To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] Honor ACPI _CCA attribute setting Date: Wed, 12 Aug 2015 16:51:28 -0500 Message-Id: <1439416290-21228-2-git-send-email-jeremy.linton@arm.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1439416290-21228-1-git-send-email-jeremy.linton@arm.com> References: <1439416290-21228-1-git-send-email-jeremy.linton@arm.com> X-OriginalArrivalTime: 12 Aug 2015 21:52:07.0391 (UTC) FILETIME=[220646F0:01D0D549] X-MC-Unique: 21FNPnFGQSyE-cgwrr3TBA-1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150812_145524_255410_AF3738DD X-CRM114-Status: UNSURE ( 7.27 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rafael.j.wysocki@intel.com, Catalin.Marinas@arm.com, linux-usb@vger.kernel.org, Jeremy Linton , linux@prisktech.co.nz, linux-acpi@vger.kernel.org, stern@rowland.harvard.edu, suravee.suthikulpanit@amd.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ACPI configurations can now mark devices as noncoherent, support that choice. Signed-off-by: Jeremy Linton --- include/acpi/acpi_bus.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 83061ca..7ecb8e4 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -399,7 +399,7 @@ static inline bool acpi_check_dma(struct acpi_device *adev, bool *coherent) * case 1. Do not support and disable DMA. * case 2. Support but rely on arch-specific cache maintenance for * non-coherence DMA operations. - * Currently, we implement case 1 above. + * Currently, we implement case 2 above. * * For the case when _CCA is missing (i.e. cca_seen=0) and * platform specifies ACPI_CCA_REQUIRED, we do not support DMA, @@ -407,7 +407,8 @@ static inline bool acpi_check_dma(struct acpi_device *adev, bool *coherent) * * See acpi_init_coherency() for more info. */ - if (adev->flags.coherent_dma) { + if (adev->flags.coherent_dma || + (adev->flags.cca_seen && IS_ENABLED(CONFIG_ARM64))) { ret = true; if (coherent) *coherent = adev->flags.coherent_dma;