Message ID | 1446072654-5608-2-git-send-email-Suravee.Suthikulpanit@amd.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Rafael Wysocki |
Headers | show
Return-Path: <linux-acpi-owner@kernel.org> X-Original-To: patchwork-linux-acpi@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 B4F45BEEA4 for <patchwork-linux-acpi@patchwork.kernel.org>; Wed, 28 Oct 2015 22:54:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BDDCA20979 for <patchwork-linux-acpi@patchwork.kernel.org>; Wed, 28 Oct 2015 22:54:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C14FB20957 for <patchwork-linux-acpi@patchwork.kernel.org>; Wed, 28 Oct 2015 22:54:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756536AbbJ1WyE (ORCPT <rfc822;patchwork-linux-acpi@patchwork.kernel.org>); Wed, 28 Oct 2015 18:54:04 -0400 Received: from mail-bn1bn0100.outbound.protection.outlook.com ([157.56.110.100]:2176 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751447AbbJ1WvQ (ORCPT <rfc822;linux-acpi@vger.kernel.org>); Wed, 28 Oct 2015 18:51:16 -0400 Received: from CY1PR1201CA0041.namprd12.prod.outlook.com (10.169.17.179) by CY1PR12MB0714.namprd12.prod.outlook.com (10.163.238.20) with Microsoft SMTP Server (TLS) id 15.1.312.18; Wed, 28 Oct 2015 22:51:13 +0000 Received: from DM3NAM03FT010.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::202) by CY1PR1201CA0041.outlook.office365.com (2a01:111:e400:5b9a::51) with Microsoft SMTP Server (TLS) id 15.1.312.18 via Frontend Transport; Wed, 28 Oct 2015 22:51:13 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.221) smtp.mailfrom=amd.com; arm.com; dkim=none (message not signed) header.d=none; arm.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from atltwp01.amd.com (165.204.84.221) by DM3NAM03FT010.mail.protection.outlook.com (10.152.82.65) with Microsoft SMTP Server id 15.1.318.9 via Frontend Transport; Wed, 28 Oct 2015 22:51:12 +0000 X-WSS-ID: 0NWYCTB-07-6DE-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 atltwp01.amd.com (Axway MailGate 5.3.1) with ESMTPS id 2C00ECAE635; Wed, 28 Oct 2015 18:51:10 -0400 (EDT) Received: from SATLEXDAG03.amd.com (10.181.40.7) by satlvexedge01.amd.com (10.177.96.28) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 28 Oct 2015 17:51:24 -0500 Received: from ssuthiku-fedora-lt.amd.com (10.180.168.240) by satlexdag03.amd.com (10.181.40.7) with Microsoft SMTP Server id 14.3.266.1; Wed, 28 Oct 2015 18:51:10 -0400 From: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> To: <bhelgaas@google.com>, <rjw@rjwysocki.net>, <lenb@kernel.org>, <catalin.marinas@arm.com>, <will.deacon@arm.com> CC: <hanjun.guo@linaro.org>, <thomas.lendacky@amd.com>, <herbert@gondor.apana.org.au>, <davem@davemloft.net>, <linux-acpi@vger.kernel.org>, <linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, Jeremy Linton <jeremy.linton@arm.com>, Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>, Rob Herring <robh+dt@kernel.org> Subject: [PATCH V5 1/9] ACPI: Honor ACPI _CCA attribute setting Date: Wed, 28 Oct 2015 15:50:46 -0700 Message-ID: <1446072654-5608-2-git-send-email-Suravee.Suthikulpanit@amd.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1446072654-5608-1-git-send-email-Suravee.Suthikulpanit@amd.com> References: <1446072654-5608-1-git-send-email-Suravee.Suthikulpanit@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.221; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(428002)(189002)(199003)(36756003)(2201001)(87936001)(189998001)(229853001)(19580395003)(2950100001)(86362001)(19580405001)(5003600100002)(76176999)(50226001)(50986999)(105586002)(50466002)(101416001)(48376002)(97736004)(5001770100001)(5003940100001)(47776003)(106466001)(5007970100001)(5008740100001)(92566002)(11100500001)(77096005)(53416004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0714; H:atltwp01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0714; 2:gJckfi8SE9NIaS2mwRMqd15e0bUCOjhtvaGnEQwHec0+sgUBXUH6whBZULu0bPee9YKWUz4AEzs4Lioh+JruFOsNq3OR2oKpGcT1yM2VBkn7vMf9DGglD4AaOnFP4j/+RRgaJPe6mBZJIH16eCZkYKI7A66J27QRUTQuhErMhos=; 3:A26evO0rndaaxupfrovFVhOIcmw4zbp2537Q0jWSZMZrbzbUuDKxkeqR2HzfBN3NOG7f1+7eSy7Tqam8eNRNvZkRfhWgCqip+gAytRxAtjOlgCyTaOXR1L56R8yaLEtjNrvlOaVQTlOM3DU2x0yccGkxg7S/E6qypbSPZW9hVhyXPpOz0SZroQR29JBvnv/Oau6LBT07Ea49kidDmVRWW+wdcnCG3Isgo5mThEH36E+eSj+t8bTyV/utQIoJN/m9; 25:VJkf4COQQV9sF/1hJyzKmvOhBhfMhpjch04Ns0F0LXx42rXjn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hJGtDXjcxPbgdqDufoUFPR6zWznPo5rvC1dw/tx9WvgeT9vkDI0Hf2n80k6M30maoD4IohX1pJIkZWRlDJ/F3J2c/ijJClh/dl6luQQkR4LgLUZ3XSPAzsm7+LXFiR/xbwXkW+gkY0F6ofZePodAWQhesNFSvBIR63JiheiymSDE1g== X-Microsoft-Antispam-PRVS: <CY1PR12MB07148D157D525EB9390ED240F3210@CY1PR12MB0714.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(10201501046)(3002001)(102215026); SRVR:CY1PR12MB0714; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0714; X-Forefront-PRVS: 0743E8D0A6 X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0714; 23:VnlWE1mAdRJOud4hlQejH53XTBxBY/8ak9SOaw+Akug/2lbuYjenoiK7jVktSDpMNgaSxIELSkF/vtPPy2nilhDG2P6ZlYKYUYFszR2WEkZf+0a89EZidpCb906rF7XhctQFnXMt6Wqn77274GcXVAoKSmGItp8tjZGNDYz03aeRbf96MSVUypW/66F8lMVDCLOVSNC7n56zRChitAJnGHNBpsnrpW7BtW2ckJyHU48yAVKNrpFup350eQCQ1LN2Fbi/PsAvNdBX7PjwzkBqQ/QEb4f3qu36ss1pJRYxhXW0cm7mtfzAtvNtro76jxEJPeSKdYmxTfvM2irP+y5JX3rxH2mXG/NLOUuX3mtJBIugqoCJoL8g/0SnWKiv/rKRL0l3ZPrt8imzMTFCcQ4x2J1EeC5+WhByoNzTcwqaUYY8KBCCn4fhwB9IDjU15+HngBL47SmtNRodhYySueJU7sStUlsI+z/bDhq7rigU2BUCqIQSGwvmuFoY1zrNoN1zaCH2dTZqHexQupzGMw/t2c0VNY06bRtF8ukYynr8ez3J0wANose24OiCyt+lo70Vgl1uH54R+UT4JFrMj4W/iYO9WSasGaIWlUc7s3Ra/11z5IwKVnkL5jm9AOuQ8R5tGvM59ljwpx/pHnaAComytyeqooeqtbongLt3Hga/LLGzj78v+mQsqU2cEwFE1tIFJH6VE90zhCv1Yst1XcrT0mL8PjN8JpCnHf63n2bb8tCDu1rHu/QWKAIFqDhkUyTi2+r8TLj4qA0xmKhLmIFx7Jpo5mVaVJLsVgq9r5VgYhD4xN/qlzyO28vti6AkG+MAkhvwSLXYeaxZi0P8uNWq4vUuurSxBOnOka4JkZlmZ/oKKzMIyYvNEzq9FJXGds3ICL/PscMH6vOXGj+SXcWyhlJ7GPelGLiLVWI7khVfx zT5tttqHBUwFvW5Zk3Hh2u4 X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0714; 5:q4T5WQhM+8WctIVAPyGOhemyZLG3EKzNp57idHUE9JFvQQysorzcgSfV109FZ1L2hAswYiNUgOHuaOdWC3ZgaGVVeI2eguTTeA4zXoYgwnmBNPlW+VvwGYC+zWdYWl6AwBPQvgW1lkBpWBVbzXIOZw==; 24:rxBA3XPDovVITv+vI3ZDfIiz891XJ1qqAE+mIPFYQhiRYj4FlhkaH3n4h+K7BXYj8k2mbhJ28We/vbEmiP24Qx2AUv2k+ZsQIiejju4u9m8=; 20:u8wsSKM2xS+z9AV0WjbGS4Cx59vOz+BwGzYOelhS9w0cfKfAUhMg0ckWCn3TKVqv7RgvLBkocP1hvfRsv9GQ+A7+KPr4/0x1nqE7oQNBSk0KbZwcZEwO7oDDCEXbx4VQWx81EyKPUHWubz1XNvjfgNy7f2/Nsjx29U6G3JnVsQbDcVCOkA6rbHboKikc4PvTMuB//7wqBpEBsPzLkablseJwRRZFZiwdpk2T51PD8Yu1J0ZPAUPd2aw+ZZmVV18C SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2015 22:51:12.3625 (UTC) X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.221]; Helo=[atltwp01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0714 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: <linux-acpi.vger.kernel.org> X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 |
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index d11eff8..0f131d2 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -407,7 +407,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, @@ -415,7 +415,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;