From patchwork Wed Oct 28 22:50:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Suthikulpanit, Suravee" X-Patchwork-Id: 55726 Delivered-To: patch@linaro.org Received: by 10.112.61.134 with SMTP id p6csp212934lbr; Wed, 28 Oct 2015 15:51:40 -0700 (PDT) X-Received: by 10.50.150.100 with SMTP id uh4mr5877050igb.36.1446072699571; Wed, 28 Oct 2015 15:51:39 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8si23642299igx.17.2015.10.28.15.51.39; Wed, 28 Oct 2015 15:51:39 -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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932748AbbJ1Wve (ORCPT + 28 others); Wed, 28 Oct 2015 18:51:34 -0400 Received: from mail-bl2on0054.outbound.protection.outlook.com ([65.55.169.54]:34400 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932588AbbJ1Wv2 (ORCPT ); Wed, 28 Oct 2015 18:51:28 -0400 Received: from SN1PR12CA0001.namprd12.prod.outlook.com (10.162.96.139) by BY2PR1201MB1077.namprd12.prod.outlook.com (10.164.168.9) with Microsoft SMTP Server (TLS) id 15.1.306.13; Wed, 28 Oct 2015 22:51:24 +0000 Received: from CO1NAM03FT011.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::202) by SN1PR12CA0001.outlook.office365.com (2a01:111:e400:5174::11) with Microsoft SMTP Server (TLS) id 15.1.312.18 via Frontend Transport; Wed, 28 Oct 2015 22:51:23 +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.318.9 via Frontend Transport; Wed, 28 Oct 2015 22:51:21 +0000 X-WSS-ID: 0NWYCTK-07-6DK-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 atltwp01.amd.com (Axway MailGate 5.3.1) with ESMTPS id 2A13CCAE635; Wed, 28 Oct 2015 18:51:20 -0400 (EDT) Received: from SATLEXDAG03.amd.com (10.181.40.7) by SATLVEXEDGE02.amd.com (10.177.96.29) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 28 Oct 2015 17:51:36 -0500 Received: from ssuthiku-fedora-lt.amd.com (10.180.168.240) by satlexdag03.amd.com (10.181.40.7) with Microsoft SMTP Server id 14.3.266.1; Wed, 28 Oct 2015 18:51:20 -0400 From: Suravee Suthikulpanit To: , , , , CC: , , , , , , , , Suravee Suthikulpanit Subject: [PATCH V5 6/9] device property: ACPI: Remove unused DMA APIs Date: Wed, 28 Oct 2015 15:50:51 -0700 Message-ID: <1446072654-5608-7-git-send-email-Suravee.Suthikulpanit@amd.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1446072654-5608-1-git-send-email-Suravee.Suthikulpanit@amd.com> References: <1446072654-5608-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)(199003)(189002)(105586002)(5007970100001)(92566002)(77096005)(5003600100002)(47776003)(50226001)(5008740100001)(50466002)(2950100001)(5001770100001)(229853001)(5003940100001)(87936001)(76176999)(19580405001)(97736004)(50986999)(53416004)(189998001)(19580395003)(106466001)(48376002)(2201001)(86362001)(36756003)(101416001)(575784001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR1201MB1077; H:atltwp01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2PR1201MB1077; 2:imq0OGdMjEiQEnsGZo18TE8Jovmz2M10AqQgtB6Tc7Kl93/eNqchwQQGR3VWz2OmU8QNkN5iBEcGFCTESjqPc/rRMs7S5nzm04f21zUlmwJSrTYBkqMxnZemDqvrItHh7+wSkOfAcnCAC785wPksCRmRWUiXiBHBeLdvgkDIq9U=; 3:Fhe3IFqy303vCdLmUjUgv2DP+Tnjm2F5X56TQJFj+nLVKpzDHH1QEnlchIOtQp2Xo5TimlRDXBFuqrgzm+5FoYPxH9kECOaj4/QOtp5ByL5cLK61hT/qVkdUn2JI1QRgTBlnaCL4ERnkCR2ATzpsaSwSFIY3cjIgROCJPfGX2lB5sgnYNhq5NgwLf81gj/mNHNZbMmDeJTsAobVRie/ipZ1sD8B6UV1ygOxZ3nfQcSMXeKJdK7kHh/js03wJzj4k; 25:wjywgtcFW7zf9rnNR7UErc1Yc3ewL6cKjGTHmUWRN6ItijVAfugUD/m7AWENuTL+DDMmKGEU4otapBhbdVyQBW/VjrXPdWjsl27xjOs4WocD+9IJHd7emrpPkG29OknK/MCO6NERNKr8eaVyaARTijtzpk0KlnhomZHmS9wxQE0TOhxfChGzaKZZ6pl9inTM2TR9zBsmJq0s+4Kp0h84g5iMgibX6Kgrt+UmVt9rY9IQ4zBdNS/gsRgrY+DUTcFqzw9Upy6s4LdJBLYP6v7h3w== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR1201MB1077; X-Microsoft-Exchange-Diagnostics: 1; BY2PR1201MB1077; 20:mzJn6hSAxLyA8woRLhAyIu2Gyg2/6BobNm3ErULni74Un2uH3vRWQvhw0p4YX9cO83NT2MTljLFYUsWC3SuTn9LyGPdnsY4z0F0Fi3FKCbttnlf3nc87n9mQoHB221SxmqCpywh6TrmoEBzc+QoeawK7/tk2inlrM1QjvJRvBA/SFZzQzDjkGl6aH2x6eFWIVCcASE8qN7NBdL4f4GHZvXNJchyXA38O+fkld6b1TzDFZlOFCoinDuGpEWmH2FzQJRIJApynZVl26I/PBrPy7fBi3SKmTQmvtcMbelZAJAPcym0BeVTbsAnHbJ5WHUwG+HaCVWHsFtPXlZGwO0QqI/ybrGTJ2Tu9dd19/Vc6Ff/4kMHTKOqJPeNkd/yTSCx53f3p4wHP5K8F9L4N7+S9xga30FKUqzZqZCoGzwLaQdp9Z6oIzx8S3vO6EBfxTprE1ffmUuP0ZRNt3nweDy+bUAE+aeCtd9MDPmgbfQtRqPuiWFqw8IXd50U/hf+4hVJ1; 4:+VqxXQbyzhce8BR8JCE9W0ihgIx3jtJ7CCS768vb0YJQCVDkQjF5+IcrZe37Popn/K8+FeoZG0fbt1wepv+UwK28tEXweBKWa4TYFkTTMHiYXPoT31Sve8A7XXqF7XFuLRTQ7hmrzbXq/rr31IootBw9bvHQMY3PEGsCBc0u+4SBG8h8nmFcu2WWAeZDlEjZ3lkN0nXToHL5G3BxDXpZWVU6nNdBmot4LtIS239RMOMQrjwgiPYxinXwJbkQFQxWfJz3crE6W6cku9vRjwb/DIVj5Ffnj64OiiMIPDwwf1zIgm8yQc0rSfOIFJNqsVY/TX69MzTraXGw0lzRky0BUhHCs5aR/hOFsfosriNmA8uHkyBpNgR3+bDZ/e+dJtREwQFCo5CDT9uvcpcuqmnuDQ== 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)(10201501046)(102215026); SRVR:BY2PR1201MB1077; BCL:0; PCL:0; RULEID:; SRVR:BY2PR1201MB1077; X-Forefront-PRVS: 0743E8D0A6 X-Microsoft-Exchange-Diagnostics: 1; BY2PR1201MB1077; 23:+7M2/UwKvI8IHnaLLrT6fM8QqmO7R7CtkOU1g9R5YpVSdDCNB4ZrtSMyt+CiNUsxUHeArMNfw+JKklxHRjiXDaU2WUn9Pi075iBnVixjBlhY/wVZGrVO3/QU3SnxhwyXZ40tYU79cQiI725Fw63NiOhatNl+a3YG0TaYExe+ae6QJ3xaBksD6/qESaeoiTOVrucq5i28DG0O4lLDyAZzZLvXlr5QmMdI9YXyJdj3vWPQMildEbHYLR3qGhhxvoaQ2yeyWoZcIghYNwWdiql1sS6WIz9YBYivNcJ3ad2+9jYLaYwXZXxTYuz1ppjHhhgnbM6xAA5ZhxAA/OfSrBJ+PUQTF1fYiohRFFNvpEvz87s70RLA9oa/MtQnkerkmYDKtYZF9jHYlUeCS3doVHnoOC3bsElfAODLCgDQmYR0Gbwta/i6gdqKc8u1bay/GoUf7k012UHQjs7xX9et6VKvjjyTt8Oes68qqoHXUH+UL0CAfw4zhnypEBacftryycuwip5F2eHXQxL0LJOlzc7xE64zyRxONxuaUxye9ytlT9wo6xRGmJ6a22JC59Qr449hKwNHft5oBgxmt9WvmQUGPyVxNQPLw6uyVA6JjdQxYDxUU5v4hBWqh7FnkcejJ2yjPPJRPTQYbFW29Invlbquk9yblsFpqUDFiewWNJNzBnh7WVRCVpz7TjFelrj1gB6p55pBN1E2gF2d7hH9t3fteYTM0sdANqDThf2L1j3Pw/+J5PiZvIb/DQ/KUnd/ZnEELKpvDcE5VRsP5egkLdWXqr/B1dTP/Xz7BuwD7l8ezXJRoeZoQhZyTHpqPVCla0Mv11FQc/EQ62kOKxB/Z2chIr29xPQTPIgldqcUP9TaV/CacujI3VaOeAtyO5Ytfwkn9ctgwBgaFdMj/esjKCR9uStwjOWsMen5XdrnRxgAK8I= X-Microsoft-Exchange-Diagnostics: 1; BY2PR1201MB1077; 5:u8tijmxpG20jTtM5/o8Xms2oNU1v+nz7xhU3dAcl9oTLLkBrNTaybyfP0uQlE9UfrAOpFiXtnW7S2B5x/9lcs9EjYrXz8k3V6UcnAx4zTPRo3GVXKtkv7lw92EbL6OqF0H4zOlXww7F/9oWVsAFvqQ==; 24:/4VCZP3BNL+mXT5fSdzOB2TikXveG+k4dkT7IhKZmZAe6tUw/xY63S5v9+SKma3Ylc1IM+BwXA13z2yX+ojoTV6rsern7XANkSbBE16K7qw=; 20:vSahqD1omMRmebvYetQJlCas2o0X2CovzayUM9gvpOeLteY/2B4aWhtbCixPoe34/jtfLjegML2k9Ady9B1o94Gyuu9UoSTayTNBq+TeuYELHcYj+Od8rSRa5ftyXSOcfj8m376ldpRzq2prPnSqFRYrQqvU/RsdPHXv7UaHZI0pvx8I7VoS9vXnlZCXN8zKEwz/D99PTVK7YO/Fq9eKeI/Hn9/oxly4MQ31pwTnhfHnyKO6nvZbqZ81jmN3S06L SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2015 22:51:21.7191 (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: BY2PR1201MB1077 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/base/property.c b/drivers/base/property.c index 05d57a2..1325ff2 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -598,19 +598,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 920b774..ad0a5ff 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -390,40 +390,6 @@ struct acpi_data_node { struct completion kobj_done; }; -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 6527920..fa2bbc0 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -593,11 +593,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 7200490..0a3705a 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -174,8 +174,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);