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: "Suthikulpanit, Suravee" X-Patchwork-Id: 55391 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id E4D4323024 for ; Wed, 21 Oct 2015 15:54:49 +0000 (UTC) Received: by wiclg3 with SMTP id lg3sf22265796wic.3 for ; Wed, 21 Oct 2015 08:54:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:mime-version:spamdiagnosticoutput :spamdiagnosticmetadata:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:cc:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=4/stt/jnS1k+hsWiDR49gvkFKhD/Jz1kHKMo4aTJAh4=; b=HEGG/CO3SeHaZ5fAljqe065Ue550FpfwLcJ1BWcohy+l58N1DTzaLUXcVrbZwTMa2Z LePRdzPjfbLDcPVvhfOlU6kECqf84VLEp/FbQgnmNMPVUlVmUf6I8NR6/AKjTnQtxI3m NKcIIqQHZdoBwSGeijYtCFSXn1gFu/RzIepVVTjtMxU1/XI+SAg0gawoXzz3CBXDnc1U 7AIyds7QJKDHwjea1mDDfmirsuVmoNgbHXxr5IbILO15vj8qQcUjcoJcRY3TxqVEcgY2 PCUHD4jw8K+OH2j890ELTvydIQFzRIgHH25MgR7WD3m3uGmqRcBpPZ68Ju0MDWQsIOPL jhHw== X-Gm-Message-State: ALoCoQm2C/4lXEz1rLBsK23neJZN42RbFzzagifGVhvS3p7pcgI5Yyl9Rn0DJpC+RftAb2m988dd X-Received: by 10.112.145.201 with SMTP id sw9mr1006228lbb.13.1445442889238; Wed, 21 Oct 2015 08:54:49 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.147.16 with SMTP id v16ls157057lfd.63.gmail; Wed, 21 Oct 2015 08:54:49 -0700 (PDT) X-Received: by 10.25.149.139 with SMTP id x133mr3126417lfd.53.1445442889072; Wed, 21 Oct 2015 08:54:49 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id g133si6855877lfb.151.2015.10.21.08.54.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Oct 2015 08:54:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by lbcao8 with SMTP id ao8so41698420lbc.3 for ; Wed, 21 Oct 2015 08:54:49 -0700 (PDT) X-Received: by 10.112.64.72 with SMTP id m8mr5595025lbs.41.1445442888925; Wed, 21 Oct 2015 08:54:48 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp66994lbq; Wed, 21 Oct 2015 08:54:48 -0700 (PDT) X-Received: by 10.66.160.194 with SMTP id xm2mr11191691pab.111.1445442887975; Wed, 21 Oct 2015 08:54:47 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id c10si14134927pat.217.2015.10.21.08.54.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Oct 2015 08:54:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; 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 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/+8ie4ykl0zKk0W5Dx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F+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/a0LEPXN6i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aRk39MhXzV+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-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [207.46.100.60 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [207.46.100.60 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: suravee.suthikulpanit@amd.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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;