From patchwork Wed Oct 21 15:52:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Suthikulpanit, Suravee" X-Patchwork-Id: 55388 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lf0-f69.google.com (mail-lf0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id BDBE323024 for ; Wed, 21 Oct 2015 15:53:38 +0000 (UTC) Received: by lffy185 with SMTP id y185sf19567455lff.2 for ; Wed, 21 Oct 2015 08:53:37 -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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type :spamdiagnosticoutput:spamdiagnosticmetadata:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=YeO36ALtPY63H9ICinuCZw+IgpaNFrUd57mp260H4EQ=; b=g8gUU8fhv4Az8dDcJsbX+8C/DBjY4I9pxBuOO1PIySRUPmXq7SH14VZXODucY4zHJe 1z/+nO+Yk6VkO0oOAdOBKOPRfvT6nmvngRqMzchwlUi0IIdkiHjwIjKvMMw+P/oCSAl2 9s0Ao2ttp9AwaXd+OYA4xqj1floNoLVAfxy0eMHMorUZAu+7PeKt4wdI1CPvdViNbJ2f yydG08Nwid2LhPtoU8jIbAPRzWW/sjWWyIT5g+JvJperRLcsV7VsckT4msGA/sh24IcA hVHtX/kkOfCbTenytJ5CbMs+I6Pr9JqU/RMFqe5cp/Yn7qZL7X2X13tjJrHHunasPut6 sWdQ== X-Gm-Message-State: ALoCoQnhoyfBtyLDeKw5VCskdIlUV46ye51HRAfxhT9H/gHwjMEvNXi7tqZpX8museK0gEyl8xPU X-Received: by 10.194.248.131 with SMTP id ym3mr2380269wjc.7.1445442817719; Wed, 21 Oct 2015 08:53:37 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.168.129 with SMTP id r123ls218244lfe.75.gmail; Wed, 21 Oct 2015 08:53:37 -0700 (PDT) X-Received: by 10.112.141.7 with SMTP id rk7mr5431792lbb.82.1445442817387; Wed, 21 Oct 2015 08:53:37 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id xp1si6847497lbb.134.2015.10.21.08.53.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Oct 2015 08:53:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbbes7 with SMTP id es7so41772883lbb.2 for ; Wed, 21 Oct 2015 08:53:37 -0700 (PDT) X-Received: by 10.112.17.34 with SMTP id l2mr5887349lbd.117.1445442817033; Wed, 21 Oct 2015 08:53:37 -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 w3csp66389lbq; Wed, 21 Oct 2015 08:53:36 -0700 (PDT) X-Received: by 10.68.68.233 with SMTP id z9mr11472301pbt.132.1445442815921; Wed, 21 Oct 2015 08:53:35 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dz5si14170095pab.108.2015.10.21.08.53.35; Wed, 21 Oct 2015 08:53:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755585AbbJUPxR (ORCPT + 28 others); Wed, 21 Oct 2015 11:53:17 -0400 Received: from mail-bl2on0074.outbound.protection.outlook.com ([65.55.169.74]:44576 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755443AbbJUPxK (ORCPT ); Wed, 21 Oct 2015 11:53:10 -0400 Received: from CY1PR12CA0059.namprd12.prod.outlook.com (10.163.230.27) by BY2PR12MB0709.namprd12.prod.outlook.com (10.163.113.19) with Microsoft SMTP Server (TLS) id 15.1.300.14; Wed, 21 Oct 2015 15:53:05 +0000 Received: from BY2NAM03FT004.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::203) by CY1PR12CA0059.outlook.office365.com (2a01:111:e400:c42b::27) with Microsoft SMTP Server (TLS) id 15.1.306.13 via Frontend Transport; Wed, 21 Oct 2015 15:53:05 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from atltwp02.amd.com (165.204.84.222) by BY2NAM03FT004.mail.protection.outlook.com (10.152.84.66) with Microsoft SMTP Server id 15.1.306.8 via Frontend Transport; Wed, 21 Oct 2015 15:53:04 +0000 X-WSS-ID: 0NWKUSD-08-0A1-02 X-M-MSG: Received: from satlvexedge02.amd.com (satlvexedge02.amd.com [10.177.96.29]) (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 296FABD8902; Wed, 21 Oct 2015 11:53:01 -0400 (EDT) Received: from SATLEXDAG04.amd.com (10.181.40.9) by SATLVEXEDGE02.amd.com (10.177.96.29) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 21 Oct 2015 10:53:12 -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:53:02 -0400 From: Suravee Suthikulpanit To: , , , , CC: , , , , , , , , Suravee Suthikulpanit Subject: [PATCH V4 6/8] device property: acpi: Remove unused DMA APIs Date: Wed, 21 Oct 2015 08:52:09 -0700 Message-ID: <1445442731-28819-7-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.222; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(428002)(199003)(189002)(101416001)(50226001)(36756003)(50986999)(76176999)(11100500001)(5007970100001)(5001770100001)(5008740100001)(47776003)(46102003)(64706001)(97736004)(19580395003)(50466002)(189998001)(86362001)(53416004)(87936001)(19580405001)(106466001)(229853001)(5003940100001)(2950100001)(92566002)(2201001)(48376002)(105586002)(77096005)(5003600100002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR12MB0709; H:atltwp02.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0709; 2:LXvWLeSa2d7SfkGeYh2IgDY2cqPpiGjzXpO7tJrq6bp2h+obCHtf8VcudT27KLfEjSbH0ubXNJxSTfSv8/EC0xvaY6sXrEG4YOheNwmB4lcQvWX0Ycx54+U+369Azs/TNk24Tq7zBW1ZREmINwpUy9lpnmipFn8SAs1qwgZz3yA=; 3:4Uqe8UNktFHsMdEoZKdWVSzerCByj62RSoSxDh3XnUoY9gRhNADDl82R6HoNDpI+04zFZ7jlNraAmTCDpdF0GXfWqEUZ017ryBCnrxKz4LonjYTEg1zfOhkpkkYrrt44K6tX6rJwzjGKS+h6xM2/thCuvZ9KfgRLXuniZ7yx3J+EGY0D+0rbufViq2Yop5vchPlMlYZEsi/YI+1mIeia0PBZyPRb1fFPgFwAAMmY+mZqM2S0tmgTCA6CMnL5HApB; 25:CTPGxGhe0WvnSpzmvFgjbVnK0jPSq0+nP5tqGWLuiOrCGZVIuifEZo1McICfR+w0y1aLp8aegIr0IDtJGYxxt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5OyoM866XL8bFq7iWwgChBkckySECoTAVOIu176ywnbTiYu1wd3howd2msyjitJZnS4ApgVB1ihnoUynEh2eClc6Wr9yMUZq4 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(102115026); SRVR:BY2PR12MB0709; BCL:0; PCL:0; RULEID:; SRVR:BY2PR12MB0709; X-Forefront-PRVS: 073631BD3D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR12MB0709; 23:R48KUe8KmtzeSVKRSkMU4q1jUk5M2TcsoElfHviNw?= =?us-ascii?Q?g5v89K4yc5nVHWLWH3XJ5mKwiP2Uhyaqy1jwftXKBqeQdlSBnRm6z4zNW1TJ?= =?us-ascii?Q?aXOHXPMSPSWdwCIVAOSYa0T3dO0vot1oCLbgNEMTOp0GY0gHmJIf7ec2eXhd?= =?us-ascii?Q?kEXMujTWJNmoL3ROfPXVcWwyuH0Sk2mhbHL4Me2GMdGE2wKeHWN3M61o5fJc?= =?us-ascii?Q?JklS0nhwr0S74UAA36mW+Cn7yEw3NNbpxmbdqmWvqgb8/Y0K+cXljXzyQIkS?= =?us-ascii?Q?emH78CsahDx9i/mu84h8h9wjwoSz65PsEjYEyD4PsxGUAldWgB9iZ4I9PoXQ?= =?us-ascii?Q?GiHMGXbr3Y9VRSIg5sJ0KMpw7x5R2nIlZgbGujcXXJ8fAd6rM0jn3dQWpHir?= =?us-ascii?Q?+O4R3/fxew+4wQ5NzPhVvR/GjGPZg70nxiqYw7mFqLi7q1ilmVBD/2PppBS5?= =?us-ascii?Q?Bxq5c5QrNSsWnm9MTQZxGrmykFqxvxMNd2C9N6/CKaAGhGY047/Lsyo0uVNB?= =?us-ascii?Q?jWiNl/ummA0KCosZSg8tpDCOxQFVjTl0/PkMgjktxDiYDKaLeWiich86Xxa1?= =?us-ascii?Q?XML2fda8l4z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nosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2015 15:53:04.7945 (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.222]; Helo=[atltwp02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0709 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.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.179 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , These DMA APIs are replaced with the newer versions, which return the enum dev_dma_attr. So, we can safely remove them. Signed-off-by: Suravee Suthikulpanit CC: Rafael J. Wysocki --- drivers/base/property.c | 13 ------------- include/acpi/acpi_bus.h | 34 ---------------------------------- include/linux/acpi.h | 5 ----- include/linux/property.h | 2 -- 4 files changed, 54 deletions(-) diff --git a/drivers/base/property.c b/drivers/base/property.c index baac186..c79611e 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -534,19 +534,6 @@ unsigned int device_get_child_node_count(struct device *dev) } EXPORT_SYMBOL_GPL(device_get_child_node_count); -bool device_dma_is_coherent(struct device *dev) -{ - bool coherent = false; - - if (IS_ENABLED(CONFIG_OF) && dev->of_node) - coherent = of_dma_is_coherent(dev->of_node); - else - acpi_check_dma(ACPI_COMPANION(dev), &coherent); - - return coherent; -} -EXPORT_SYMBOL_GPL(device_dma_is_coherent); - bool device_dma_supported(struct device *dev) { /* For DT, this is always supported. diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 13417d0..273b909 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -378,40 +378,6 @@ struct acpi_device { void (*remove)(struct acpi_device *); }; -static inline bool acpi_check_dma(struct acpi_device *adev, bool *coherent) -{ - bool ret = false; - - if (!adev) - return ret; - - /** - * Currently, we only support _CCA=1 (i.e. coherent_dma=1) - * This should be equivalent to specifyig dma-coherent for - * a device in OF. - * - * For the case when _CCA=0 (i.e. coherent_dma=0 && cca_seen=1), - * There are two cases: - * 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 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, - * and fallback to arch-specific default handling. - * - * See acpi_init_coherency() for more info. - */ - if (adev->flags.coherent_dma || - (adev->flags.cca_seen && IS_ENABLED(CONFIG_ARM64))) { - ret = true; - if (coherent) - *coherent = adev->flags.coherent_dma; - } - return ret; -} - static inline bool is_acpi_node(struct fwnode_handle *fwnode) { return fwnode && fwnode->type == FWNODE_ACPI; diff --git a/include/linux/acpi.h b/include/linux/acpi.h index c47892c..08bd395 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -564,11 +564,6 @@ static inline int acpi_device_modalias(struct device *dev, return -ENODEV; } -static inline bool acpi_check_dma(struct acpi_device *adev, bool *coherent) -{ - return false; -} - static inline bool acpi_dma_supported(struct acpi_device *adev) { return false; diff --git a/include/linux/property.h b/include/linux/property.h index bde8de3..8b69a88 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -170,8 +170,6 @@ struct property_set { void device_add_property_set(struct device *dev, struct property_set *pset); -bool device_dma_is_coherent(struct device *dev); - bool device_dma_supported(struct device *dev); enum dev_dma_attr device_get_dma_attr(struct device *dev);