From patchwork Wed Oct 21 15:52:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 7458041 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 715C39F4DD for ; Wed, 21 Oct 2015 15:55:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 93F7A208E1 for ; Wed, 21 Oct 2015 15:55:15 +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 978FA208DF for ; Wed, 21 Oct 2015 15:55:14 +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 1Zovhu-0005M2-T8; Wed, 21 Oct 2015 15:53:42 +0000 Received: from mail-by2on0060.outbound.protection.outlook.com ([207.46.100.60] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zovha-00051j-0G for linux-arm-kernel@lists.infradead.org; Wed, 21 Oct 2015 15:53:23 +0000 Received: from DM3PR12CA0026.namprd12.prod.outlook.com (10.164.12.164) by BLUPR12MB0706.namprd12.prod.outlook.com (10.163.218.144) with Microsoft SMTP Server (TLS) id 15.1.300.14; Wed, 21 Oct 2015 15:52:59 +0000 Received: from CO1NAM03FT011.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::202) by DM3PR12CA0026.outlook.office365.com (2a01:111:e400:599f::36) with Microsoft SMTP Server (TLS) id 15.1.306.13 via Frontend Transport; Wed, 21 Oct 2015 15:52:59 +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 CO1NAM03FT011.mail.protection.outlook.com (10.152.80.87) with Microsoft SMTP Server id 15.1.306.8 via Frontend Transport; Wed, 21 Oct 2015 15:52:57 +0000 X-WSS-ID: 0NWKUS8-07-H0R-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 299A8CAE655; Wed, 21 Oct 2015 11:52:55 -0400 (EDT) Received: from SATLEXDAG04.amd.com (10.181.40.9) by satlvexedge01.amd.com (10.177.96.28) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 21 Oct 2015 10:53:03 -0500 Received: from ssuthiku-fedora-lt.amd.com (10.180.168.240) by satlexdag04.amd.com (10.181.40.9) with Microsoft SMTP Server id 14.3.266.1; Wed, 21 Oct 2015 11:52:55 -0400 From: Suravee Suthikulpanit To: , , , , Subject: [PATCH V4 1/8] acpi: Honor ACPI _CCA attribute setting Date: Wed, 21 Oct 2015 08:52:04 -0700 Message-ID: <1445442731-28819-2-git-send-email-Suravee.Suthikulpanit@amd.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1445442731-28819-1-git-send-email-Suravee.Suthikulpanit@amd.com> References: <1445442731-28819-1-git-send-email-Suravee.Suthikulpanit@amd.com> MIME-Version: 1.0 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)(5007970100001)(97736004)(87936001)(86362001)(19580395003)(189998001)(5003600100002)(5003940100001)(19580405001)(2950100001)(105586002)(48376002)(77096005)(50226001)(46102003)(76176999)(5001770100001)(92566002)(11100500001)(36756003)(64706001)(50466002)(50986999)(5008740100001)(5001920100001)(229853001)(106466001)(47776003)(2201001)(101416001)(53416004); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR12MB0706; H:atltwp01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0706; 2:cZ1mMbzetUXvBTTfDmqJICbDCySel3Uhf4S0yDk/YoYn9tuxSOYJ8iuWHbA4Qd0lu1aTDc+SIAKoY4o9aRrrBQ1XrlUVLmWr0Hm6qKmd/gipbY46ZgJW+lzUDpPt2I/XlKKZkLFkl57wIs6iW84wF1XG8hqus3lA4nGVMiL33I0=; 3:XPLrfQ+H4mBiMFGiTj+NwuwmIrDAPxPoT/hStYh8hbqr8TfZbqR7hxa1GBu3zsO9t6W5ryFblwv93+ClEaZH8GhWwB3LSORTYZJGgbctNLTybQpLPevHOahurWLfp7OukVqGFpO5GehRZ9PKlOQBnkW2woRZA7tObIkXjrW0ezfzaOQw9iB+qtVlwSkABII4nj2/zb5b+Vz/+8ie4ykl0zKk0W5Dxh0lfsCcj1/eIgAgARyGGv0goevFHoHCuArS; 25:aP0JsBhEN7raO8KQpxb4/p1rY07uKVdjOm4Quju0PC74zsmznwpBNvtFHfrFMXOSR7wndRyOGuskXqbQwmJpw4OK8a6GcVZDF6H5rILMztkc6ev0pfCiFOPSwPPPmRFFfYSayvxiB4e9O8Ezb1Vrt1k4MXmB3cVAYdxjNIS8aOu7bN95D6rnDcTZ55ka8UCSBzMJ6Vq5y6sMl5uv7QDJgQwUaqK2iNMBLAOxZpA3vuKOUfv8HAN1WvPfdWlGpWCy0PfwETnDrtDBtjfdd5hObw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR12MB0706; X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0706; 20:rl4Kzo62REFFCsRasphtTw5Bl5PiGMJZT9Oe59v/B9zRGlTdrQS9H9Nd8Y7sCFYak2btt4LVKPF+FafrFDwYQwABoJFAwdFNxWETp2aYALoT2MgAcP1cMQxM3Wlgtjxx3Jl7m42uRqu43lJy2P2Z7r7UuVMZKyiPl8O5Z5BMfgS6bgcuXtpffWJ6F/uoE7pa9z+2jUrUjafkJWZwHFQGhYVX92sq7Bh4CW0dKew25XL5SVB0lzTi67AZhltVh78CFtO+f359+dJmUxM6jcsLEJ9u69+04vVafNBKsGYieLI4iulgjPY1CoR9j69DrJGFsIlydmav8kPDbGpvIwaq9VxxyI7eXvR8CLIUorR5mJT0IR89Jnjddv6fUberJKwR2opi8+Yg/FKJKpz9denj4tsMCFhsmFG5cVQI6/Qrv6Tn/Tw5aVrIsmTSddixEkAtnnitiz1pSv9nLxvrjqUKGxkEcS1bFfXKRR4+5TmQccKb7Gtk3b5ukGk1XzaXgGTH; 4:4/3cyaCKoktRvcTwnbWVWUpH9fdkTKw11iXLJY05pNxItwJol8FYh+C4063QFTHnW+L/g3VpikR3NqorUmFpuAtaaDYECGSkTBnmjNl6gTniIlbnIY76hxTyVNeJXdLQoKzMaFVKz230Zn1Szm/D//DdF+g7as4lxOaCplzaj/H8OF3ZwMIRTOvvJP3pmGGITxf/rI71bUjlaBmAjNMadKYWJVmaf0cWV7NNc1CUOY4sy7rXDNvK4OTkkkuc/bqldc5eslDr9Ie+yMZDdkchibAv6TJDGbUxDj49vZPZ+tpHYfOHLbB1VYUHrMDNYXkn7/qDTFLZPhRcu9haLrPrMhoFlZDQIPLYIolwyG1sgUyhD/Z+WWJGrbPXSWWWkRrb X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(3002001)(102115026); SRVR:BLUPR12MB0706; BCL:0; PCL:0; RULEID:; SRVR:BLUPR12MB0706; X-Forefront-PRVS: 073631BD3D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR12MB0706; 23:SsG1pSu5nz2OdCvwB0/nrOCL2xxKGdMeLKZzuy9+J?= =?us-ascii?Q?gsRm4X7T4c55EgDaEqNEo8E4WQAx3K60gE9QaLRbG3nwcHX/r42fJaz/eEIJ?= =?us-ascii?Q?p0URJIDcEXuH2z2jvY/lrabXFazwI2PwyX0hoq0Xx6ujcVj3/QfTAXP1Syrl?= =?us-ascii?Q?UqdGWwLyaYj3iQW4hl8zGxsnLpz4W2tgR7Jafp/OeNtpnkGe7okbacrB+78Y?= =?us-ascii?Q?8pDXeBJP/2L+NMXZxutefRVQpsr+Ckv0rIwmCUzzc2x/YKWd3S9RP8mEig1V?= =?us-ascii?Q?X01EfP8hFh3deB24kykYVX5V3OqmwVNnSeyh724ow5eNz3m37ZXGr/pG4ddt?= =?us-ascii?Q?wXmGXDONc95tmo39ApbXu3/TNq3Mcwv5/sa5VanOROI4t6TKxWfnPKPKkho2?= =?us-ascii?Q?sd8qC9w0eyAstPrk+zNzEM1IjYZtANgS0mBGb2WFdmxNnOu6zv8fR/P4rLSD?= =?us-ascii?Q?ZEfTpc56o5/a0LEPXN6i7CtgV1vJ65itax/hozTN7yHuZ/JgQFeT96liUG07?= =?us-ascii?Q?uYzgsmi1YO0wF4n3E+/p9aDisUc9292lgmtaCEovwNhDbIV5CW3+Q377LvOm?= =?us-ascii?Q?zTV38Hz7sQEEE833eacmSlaV7GZw/ZhscGGMRrs0noSgGDXEZKrYFURO3ci0?= =?us-ascii?Q?gEZoIZ1iL1KtQmEQpSqoLvhgUJ8pyfi8BUifuyPKFHLmZ06Wf9Bd3X9MOYWX?= =?us-ascii?Q?U7ptj2UlXJQP0ufCLd+xW4hII3qItjOGd9N5esXq76BiZPZCmox1VP29kuqS?= =?us-ascii?Q?0w5OhASF/VglMrhe3bd4LIuI7WG7YAyNp9qR9jqXZeoOvW+mWwOMO0KcGKP+?= =?us-ascii?Q?JadVTisqvdlUMcX8hZyYDjZZ4qo6qee9/bK93/lfevxMdjkvLdvARd4kPgxs?= =?us-ascii?Q?PIXbq3UdmoiN0yWTfGDwx2cv/+CKUaI1UHjAwzAcxmTjFCR704VLkMDv4pRy?= =?us-ascii?Q?CU4czUPAASXdeaE8L7KusxMylCwC4LCIqBmN4ahJgl8ulHpfMfdp+TbiDCxf?= =?us-ascii?Q?rCWac/l1A3M39OGK3kF+aIC?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0706; 5:Lt2JHrM2Thewi5F8olMmJSokHF//Cbo1fpcoQwYKPvnvOKfqDjI27zV9nM0pa0mQV36FCvQUNGoaJmZHqsVUW8Z0ku6IQLAYNgtdJbdiViaxIBR6iVmv+Ya7HQLv0XrME3RW22092IbQjtarIxQo+A==; 24:59ZHKOI8d8CCgD2VGjVTUwSyaBTJsXUcucz0Qxr48ZfppHRwo6YlN1ZWBrbC/4nSGv5NWZaS3tlKupCYbf21FMe1ngr/Y4U3mENzTyMff2w=; 20:ZxtEh1QzJ6ysSDHECu112/Lz3rd4zWkeZ83fl1ApdRpJRMMI5hEwG2p9Frf2+77PVqMx8xEJ86e8e0VmcNJcQNAF8VF3RueUFj8318LHRiaRk39MhXzV+KJ5fkbG8B3YBpg2lcduNRVVqVDF9MpZjqG5KyVs/g8KqyAYWnJHaRjmhI/H8dAjnKseMAp+0Uc1zNUHwQFlHzchuHsySDJsNL8Cd3VJ6f6Mtn8crPJIp07CNO26O9FCGSuhs3n6Ycd0 SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2015 15:52:57.8230 (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: BLUPR12MB0706 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151021_085322_206238_A96E34CE X-CRM114-Status: GOOD ( 11.94 ) X-Spam-Score: -1.9 (-) 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: thomas.lendacky@amd.com, herbert@gondor.apana.org.au, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Jeremy Linton , linux-acpi@vger.kernel.org, Rob Herring , hanjun.guo@linaro.org, Suravee Suthikulpanit , davem@davemloft.net, linux-arm-kernel@lists.infradead.org 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=BAD_ENC_HEADER,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 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 5ba8fb6..5a42204 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -395,7 +395,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, @@ -403,7 +403,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;