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: Suravee Suthikulpanit X-Patchwork-Id: 7458151 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 6232B9F37F for ; Wed, 21 Oct 2015 15:56:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 755922056D for ; Wed, 21 Oct 2015 15:56:12 +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 861972056C for ; Wed, 21 Oct 2015 15:56:11 +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 1Zovik-0006Dp-8m; Wed, 21 Oct 2015 15:54:34 +0000 Received: from mail-bl2on0065.outbound.protection.outlook.com ([65.55.169.65] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zovhh-00053h-62 for linux-arm-kernel@lists.infradead.org; Wed, 21 Oct 2015 15:53:30 +0000 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 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; 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 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: , , , , 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+w0y1aLp8aegIr0IDtJGYxxtpTqXmwB2yB/VMKpmZ/MAwYF8UHi2PBHkxysISeB7TJfM8SsUetiuSNbNDnnMOakaCY+SnicU/yntmiwH38at6sUomGE/Dr6jMyPwNCfJL1evkOQuk/9CODXGc9klKoe0cL6LkcSa3biopcJhTwjpeYkTKoVt/sO/BGmZ2oQXZIpvGxx9xTsY47++nO2OBwiZQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR12MB0709; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0709; 20:IZqjWXaqPu2VQVfU+s0S1cwHwLvEmB+WxyqrGLw4+EPCMDPCPjLNSSCJnclY7plwo0ku0WCDJii1qKG8Le6cK/L2weaCuo8rcos1YaNpieyJYZofiqwej6V6YxDxohMMBtS3B2tPVAOtKxebHxybWAoRcYUb5aWuUwWCJBC16bjzI4vNtPzNrqhnvWcykPg2VdxpsLG3Dh0etwm8MSLUnP51EkCF+Iof96wpI1lWBOqoLMTUoJByPE751+GYg2TI7VnxzRnCIMjUaABcu2CmU1tWi0OtxEuWhyO/M7Lo7PwY/T9KJYLPbg2RweejIG27tXdEDWsljp6Oumwbfk3Glo0lhtnrE9imM0ol/lov+40MVos59n/A7mJh9EnF2F52wdJ5rIWOYX8sVGLdJNtZuRI9WpRobpuxT9312fh7UdAe6SBahfY4tcJnVn4O27Co+kkv1JclL50sJGpyyDLK6McWFu6Aiztcx+mewMRbhQz0oYKCR1+xOsqfI9bJTQWZ; 4:qgZSc5b42/jxufPUqlskUGb/R25OvsXkclNCCnN0bcW+c2DNG/xCT3L1X2Eimt0fUwXL3G6s8qb97c5F35JzTnQc2looNG6h8BiJktxNkZIMVUGZ9frJza341BVX8glVehRpx6ZVUfr9gRYv1P/fG16Pz3SzOZ2cvSgntEX2l5h8ZSEYLXDhSSR9HwEeFV+K4WJkZxn8p8Tx8ZVl320JQ7ip1eU/EUNrqdXb700eaTPZIVuOQdQxW6Mf9k/Lilg1vkdFNx8xQAr32AHugrD2yOCdv/EojwT5OyoM866XL8bFq7iWwgChBkckySECoTAVOIu176ywnbTiYu1wd3howd2msyjitJZnS4ApgVB1ihnoUynEh2eClc6Wr9yMUZq4 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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d7HdzsjW8VX7ePUExi/jVOtBZ5BNM6XuYEjYI8Ll3o3?= =?us-ascii?Q?3sOYU5V8GHplNUlP8u4wfRP8+9EMB2K/glNsRG+5FlOq/aIyZmwt8XGn6Hza?= =?us-ascii?Q?OqPBE+hBQv+fghFm8Rc8FHHtIBI3Zd9h4/BJgoBDBslsFNwbXZ4eMpw0pRrD?= =?us-ascii?Q?y4=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0709; 5:nX4LXHq5lV0oV4T0MbPGv3ukP9a+lMcT7BjTZiIZbdc/cz+xQ18RA2NBahOpiIfnOv3OIHSvhLNAeajR1s7zXloMuO5d01ahCzBVuDbpv8APmzhRE5+1jeakeApoZK8E0bX+lYl387cn8D7CWReNTw==; 24:wYcVebMA34/QpmWoUBVq9RSR9eohpF0OorLAvp2MTjajyTG5/2YS/sl1n4/x6g7+UYFWTxyA6os21LuW5RnrDrgemsHiCe1dBISv5ennRUk=; 20:33q8wDDn/A5Np4COH5UJSS3MZznAcoRKnXNda1rpA6F7Frkab9UZqNqI7BnoxJDabzgwAg1fafaWL3pxnVVTS8vTzM9iF/9o1AL5ddoG1NSvjAv9Sm2pkeDqZoqVAbEPvxIV7lYpn+qjINHG02uMFF0PDx2HHqm6m/j0UX5xuGD/kpVzpFArzwlx2U3/LA6AKeCoFPhkjDuCKbH+A1+V7tdzQcyIGeXvKfbLxV/SSHcclUt9+VohjTT17XsVCwgm SpamDiagnosticOutput: 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151021_085329_637783_C2CD4B5E X-CRM114-Status: GOOD ( 13.85 ) 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, linux-acpi@vger.kernel.org, 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 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);