From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423382AbbD2OqD (ORCPT ); Wed, 29 Apr 2015 10:46:03 -0400 Received: from mail-bn1on0137.outbound.protection.outlook.com ([157.56.110.137]:21440 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1423153AbbD2Op5 (ORCPT ); Wed, 29 Apr 2015 10:45:57 -0400 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; X-WSS-ID: 0NNKP08-08-IRI-02 X-M-MSG: Message-ID: <5540EE97.70202@amd.com> Date: Wed, 29 Apr 2015 09:45:43 -0500 From: Suravee Suthikulpanit User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Arnd Bergmann , CC: , , , , , , , , , , , Subject: Re: [PATCH 2/2] ACPI / scan: Parse _CCA and setup device coherency References: <1430315049-4663-1-git-send-email-Suravee.Suthikulpanit@amd.com> <1430315049-4663-3-git-send-email-Suravee.Suthikulpanit@amd.com> <5542288.z0SSOZ4xV7@wuerfel> In-Reply-To: <5542288.z0SSOZ4xV7@wuerfel> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.222;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(428002)(189002)(479174004)(24454002)(199003)(164054003)(51704005)(377454003)(46102003)(101416001)(77096005)(33656002)(47776003)(65806001)(62966003)(77156002)(64126003)(92566002)(86362001)(5001770100001)(65956001)(4001350100001)(87936001)(50466002)(2950100001)(106466001)(76176999)(50986999)(83506001)(54356999)(105586002)(23746002)(36756003);DIR:OUT;SFP:1102;SCL:1;SRVR:CO1PR02MB078;H:atltwp02.amd.com;FPR:;SPF:None;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO1PR02MB078; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:CO1PR02MB078;BCL:0;PCL:0;RULEID:;SRVR:CO1PR02MB078; X-Forefront-PRVS: 05610E64EE X-OriginatorOrg: amd4.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2015 14:45:47.8762 (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: CO1PR02MB078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/29/2015 09:03 AM, Arnd Bergmann wrote: > On Wednesday 29 April 2015 08:44:09 Suravee Suthikulpanit wrote: >> + device->flags.cca_seen = 1; >> + } else if (IS_ENABLED(CONFIG_ACPI_MUST_HAVE_CCA)) { >> + /* >> + * Architecture has specified that if the device >> + * can do DMA, it must have ACPI _CCA object. >> + * Here, there could be two cases: >> + * 1. Not DMA-able device. >> + * 2. DMA-able device, but missing _CCA object. >> + * >> + * In both cases, we will default to dma non-coherent. >> + */ >> + cca = 0; >> + } else { >> + /* >> + * If architecture does not specify that device must >> + * specify ACPI _CCA (e.g. x86), we default to use >> + * dma coherent. >> + */ >> + cca = 1; >> + } >> > > What does it mean here if a device does DMA but is not coherent? Do you > have an example of a server that needs this? > > Can we please make the default for ARM64 cca=1 as well? > > Arnd > Actually, I am trying to implement the logic for when missing _CCA to be consistent with the behavior when the devicetree entry does not specify "dma-coherent" property. IIUC, in such case, Linux will default to using non-coherent DMA. Thanks, Suravee