From patchwork Tue Aug 25 17:33:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 7072361 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@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 DB2FDC05AC for ; Tue, 25 Aug 2015 17:36:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 02BA320881 for ; Tue, 25 Aug 2015 17:36:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EBFD82087F for ; Tue, 25 Aug 2015 17:36:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755838AbbHYRdz (ORCPT ); Tue, 25 Aug 2015 13:33:55 -0400 Received: from mail-by2on0112.outbound.protection.outlook.com ([207.46.100.112]:9920 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751400AbbHYRdw (ORCPT ); Tue, 25 Aug 2015 13:33:52 -0400 X-Greylist: delayed 22918 seconds by postgrey-1.27 at vger.kernel.org; Tue, 25 Aug 2015 13:33:51 EDT Received: from BLUPR0201MB1490.namprd02.prod.outlook.com (10.163.119.156) by BLUPR0201MB1539.namprd02.prod.outlook.com (10.163.119.26) with Microsoft SMTP Server (TLS) id 15.1.243.23; Tue, 25 Aug 2015 17:33:49 +0000 Received: from BY1PR0201CA0014.namprd02.prod.outlook.com (10.160.191.152) by BLUPR0201MB1490.namprd02.prod.outlook.com (10.163.119.156) with Microsoft SMTP Server (TLS) id 15.1.243.23; Tue, 25 Aug 2015 17:33:48 +0000 Received: from BN1AFFO11OLC003.protection.gbl (2a01:111:f400:7c10::191) by BY1PR0201CA0014.outlook.office365.com (2a01:111:e400:4814::24) with Microsoft SMTP Server (TLS) id 15.1.256.15 via Frontend Transport; Tue, 25 Aug 2015 17:33:48 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.222) smtp.mailfrom=amd.com; arm.com; dkim=none (message not signed) header.d=none; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from atltwp02.amd.com (165.204.84.222) by BN1AFFO11OLC003.mail.protection.outlook.com (10.58.53.74) with Microsoft SMTP Server id 15.1.249.14 via Frontend Transport; Tue, 25 Aug 2015 17:33:47 +0000 X-WSS-ID: 0NTNFG6-08-21Y-02 X-M-MSG: Received: from satlvexedge01.amd.com (satlvexedge01.amd.com [10.177.96.28]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by atltwp02.amd.com (Axway MailGate 5.3.1) with ESMTPS id 2BDA2D16006; Tue, 25 Aug 2015 13:33:42 -0400 (EDT) Received: from SATLEXDAG01.amd.com (10.181.40.3) by satlvexedge01.amd.com (10.177.96.28) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 25 Aug 2015 12:33:54 -0500 Received: from ssuthiku-fedora-lt.amd.com (10.180.168.240) by SATLEXDAG01.amd.com (10.181.40.3) with Microsoft SMTP Server id 14.3.195.1; Tue, 25 Aug 2015 13:33:45 -0400 From: Suravee Suthikulpanit To: , , , , CC: , , , , , Jeremy Linton , Suravee Suthikulpanit , Rob Herring Subject: [PATCH V2 1/4] Honor ACPI _CCA attribute setting Date: Wed, 26 Aug 2015 00:33:26 +0700 Message-ID: <1440524009-5359-2-git-send-email-Suravee.Suthikulpanit@amd.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1440524009-5359-1-git-send-email-Suravee.Suthikulpanit@amd.com> References: <1440524009-5359-1-git-send-email-Suravee.Suthikulpanit@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11OLC003; 1:UDF/zMBpUhqyDfDT1MVFjwvlQ0WpNymSU7lSeOYDpnHoEMKkz099U9f6z3O8kUDR5MsrCx+ZrsWP1KPBaebjw9RRz9bVSBXVxdsGhXwa5SCUoEgSc9dkd1po5LicUWLxZke65cortkvkOQyzcL8sZzxM+KPQU1xGSedINZLXqOqkVnGSVYr9Gxu2r9ihCAN8xlrFRrmc+aJZFJi2GDGHSxewT2z81aM1D+p5cFrH0s/ANrcc01vZETQqjS/TFk4vgEUatrxRo08SrredhRtmw4psmSmnB1KRVR82ozNeR4GVIT6r/9rAFlvYnrOlzgU+tSDYqkEMIZyGTs2nV+/MBisnwCYuur5AhtK69Uj+gPNj8vSWEqHa9fK1WKRmLJFo X-Forefront-Antispam-Report: CIP:165.204.84.222; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(428002)(3050300001)(189002)(199003)(19580405001)(4001540100001)(64706001)(47776003)(19580395003)(2201001)(50986999)(48376002)(5007970100001)(229853001)(5001830100001)(106466001)(50466002)(105586002)(76176999)(97736004)(5001770100001)(101416001)(5003600100002)(5001860100001)(86362001)(77096005)(189998001)(77156002)(68736005)(62966003)(2950100001)(46102003)(87936001)(50226001)(92566002)(53416004)(36756003)(5003940100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR0201MB1490; H:atltwp02.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0201MB1490; 2:W0UdVE2PKK6iyhSYHI27uiizJR7tYptBVAX1ksvdNk36REJalbN6wnn1G25Gi5pHRYidD52b7R1XXk+DzHXVW/GB4naFApfXrCiP1aVmK6rhSzM35nAnhF8DdvFs4yfrVqWAUk+erUYgY6OtYRa2jB83yct5hkPXKcggv5z9Zmk=; 3:lvUskChG07MwJ2eCzp0KlGYB0IsMRpEuc7r0r9HeqriDKMOQCA9+3rqM4h4KkkfBSojjmlsqbtJqsBzUpZbgXL1IhBzCSQhQaAf00tePeMC3JMvhHwcOrWqTP5DW2Whq0t8J7dbG1+ZhyF8aadxKadEZypGtQL6TcRQvlSbKUjYPMODMPcZeaBfAndlJTjygcfqUb8WqXGM+rvvm6hcBtCgDlj/gThCo4Rx27JWqER4ilOzykHFYiDI/McdlwGTt; 25:KDqarqqFNZRCdm47TqqT+QmurYqxd9qBDyD0vlV247il8O5F/ucE5vI7VwqyFrkBahXMdi5Lx1KbFAlt6O5BMPW1KzzUlAUXeR1B6I6CyptmjFo+cS/20XhnyvGDQ9SIxg3Jq2lWqoUZNMAtZodc47J75vEtjxPE9Dxgab8iJV/JJ6n1YBp3X9Lm/HL65sw21D6mlFUg9UU1t7QZQASWZ7VpIOuKuoXqcIQvX4Pwfyxz8mZZ1TSNl4EmLgm0TT2TeAJJ7Rz8hAA///LrEj510w== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0201MB1490; UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0201MB1539; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0201MB1490; 20:E//zTFqVBZuc8bCXeewU2q4xTPum/glxN+wsMnJGWJNddIsNTYQiGXlTnOR6NJNvtAJQTfGKpmtdcJrG6AOwYJQn5tABT/gMgoPPLG0HWiPpl6Dk6rteYj2u5YSxJDDr5ihubwn8eqtimy/ECmWFSHHHJoxgRhFngcMPi2k58zQ9Skun11CP2OpPGdT0utilANVfIq/JeIMLM2uaHQObJmEz79SIEpng/E+hPInqFKaB30YQA/I+0CnmOI1zpkP72aopNQU7yMmVnOWgMuSeQojnnZeEFt6ygL9Re4jXkPCiJXDRdT5OlTohK1jotSTMTgNKivjZOTT5+QOJhPP9ibIKogMu/QEaI1y4rX0jHKySFpRV32ieyZ7BAF09Ez3E1Y/SdyZz6Nf61wZ9zoH2tRmHrGpYwYb2TQEugspmkR4cvVz2dTARV8RjQKudkrNjsQWABtfD1qsCf68ydGcOE4eMM3L176sXTxPozXOMwQXOFZwVTFO2JW/yx8R+tZ8m; 4:c76rGVNBjPYPoh9t+zTtDN3GAqBOrcjUclo4Cqgx5KdhFSJPlmtHKMkNKDE/LvLp1u2XDtnrUbtdrI2pAKMYJUH9kqu9VaOJxu4d+UVebMwfyZ8rc1CvYShupOHdTF9OqQQbBx57aQJwF6lPfXqjfpvbVqnbrl5S6m3Qs2FsJnYLTOzqi8U3RAjMJg7SY+dzJFBp/7rJwCvKTXutDKgswI7iQpVrwRvCTByGaelFUtLrLMb8Iczasl//juhe23+uPQZSDkdriLezjj5vmzyxGpzQ+BkHbaAVfKtxtFI9bXy3gnvMvaj4tFs20TjCSflSgVqeIUuLCVuEFA/svlXX+g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(8121501046)(5005006)(3002001); SRVR:BLUPR0201MB1490; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0201MB1490; X-Forefront-PRVS: 06793E740F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0201MB1490; 23:yLDl3XL0jpWgXt5jG07Mw3aegPCM0FBOV98WO+g?= =?us-ascii?Q?PhRATSfStaKRL63edpufmogOwT3e/wcJE1f4/GB0p303jcEJRbYPQsDHGlxE?= =?us-ascii?Q?VJzVo1oX8ADIazcEVhgydfJqWdvHmYWIqdnMeSN5FVi3bVMUCQHNXgnYUEMW?= =?us-ascii?Q?RbARIcUTaERbifhEIM5rz6nqPsk84xW3r52+BcB4fyrqz933UIqqvrp/OX78?= =?us-ascii?Q?CFH5ZgnPh5qJY7b6h9RQn7gNiT0/grht4LXvxP0J5dDpssgvNZ5w8wdoHN8p?= =?us-ascii?Q?iNxnk7XwCji4JijgYOyB3MWqpDgehIwn50wzgZGoFreetTfllYxj27THR6rR?= =?us-ascii?Q?lBeTsE+opGJGN65qeDxKsHFxoKX0k3saG6fi8huBZnu4HTRx3XDn0J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w==; 24:eEwhxRhXtFsw0q5L1xkr2WelRhZfbOvT3XmhLjgG2GShqDKmciyZlDj33UsVwOxRKs220gHuaBB0SmiftpGF0xx4Qg8uhqlpvv0Az03Ny6Q=; 20:pEoROFjmNqYArZqUhuGFgIbfNqyXM2HmTsWbRXqan1+VKmGjfWR/vTCZSVxrK6ir1OoLHwVPLXjuh+R4e/3DTg== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2015 17:33:47.7403 (UTC) X-MS-Exchange-CrossTenant-Id: fde4dada-be84-483f-92cc-e026cbee8e96 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fde4dada-be84-483f-92cc-e026cbee8e96; Ip=[165.204.84.222]; Helo=[atltwp02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0201MB1490 X-Microsoft-Exchange-Diagnostics: 1; BLUPR0201MB1539; 2:E7OQERu++YofQ6z/oR+spjQGeqgp0m7+OHowSrkb4BGY1klkV0Cc6yoIiGAj9KhRYQiiNrdX9bZMM5agZRmQXJZBjqh/CJtOShJZTFPCACcEfghtMLQX2Hvj6jqwqqyW0YX6l+9CKvaC/H14iXWVZMS31F7C0GxayJyDwj73/QM=; 3:rEy9tLtddccfS30K+DRCMZRDtr6dqqELtoUe2tlQDleR1sqFvbvozBdGm6tN16uL0eGRqVxssLffy7MGRZBOge9L9kE00I4Q86sJqtaDUHWOofRU8gFdYgq9u8BzLvAesg0ys2qUHqDdlm4MIFaq++JKoWvYj+Fhxgtonf/61NirpL4bLZDZ7B4guU5HhIY0YH33M+aPN1bx+SNBpkg66aqW/azInwLj+Z2vZhHD79NYRqRG07YZ3f27nlvysKy8; 25:fD8OE7Hfn/k/NTgmDcZzEmg7o/ZeRJ6AkBELNGVK9DqdTDNX0GJ9ws6Welb87wDIKZkjdhR+pBvL52cKR7ZWUqIupejOtK/lirPJBRoBqg9n/2wgIlbue/NcMdNxFjT3SS1tdKObtKHXY55YYvRt7KIGAqZJpBhn+C7Sbyfn0RfKHW1HWjAjqF/U70T8KnYRAHYN1vsJZD5ftgUovOB/7N8CBjZeQR6uLvQQH4dhwZ48u0avrQZn6cWqu7hwGNZYEfqzFv+HqLhlrPGxoKEb1g==; 23:7DtZJjtnPFjBIRD8nyjVrx/dc+RHG6DLfif9KJ/M79vCXaobSK4r/1vNT48nZdbrgZXOtnYMkg49SdiSlXd6nXvyX/yL7x1wNbG0a11CzLo45uI+Nl4tqwvqtidiJUfePwGbo5HlbwtxRvK23D4mwjBY9W744OrbAhJm8WOufgWS+bOI2qFcO6lqpuSipc0q X-OriginatorOrg: amd.com Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 From: Jeremy Linton ACPI configurations can now mark devices as noncoherent, support that choice. NOTE: This is required to support USB on ARM Juno Development Board. Signed-off-by: Jeremy Linton Signed-off-by: Suravee Suthikulpanit CC: Bjorn Helgaas CC: Catalin Marinas CC: Rob Herring CC: Will Deacon CC: Rafael J. Wysocki --- 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;