From patchwork Fri Mar 24 09:18:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 9642429 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 646AB6020B for ; Fri, 24 Mar 2017 09:19:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 508EC26E97 for ; Fri, 24 Mar 2017 09:19:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 430C0283ED; Fri, 24 Mar 2017 09:19:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2D9D26E97 for ; Fri, 24 Mar 2017 09:19:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934558AbdCXJTE (ORCPT ); Fri, 24 Mar 2017 05:19:04 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:32403 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934719AbdCXJTC (ORCPT ); Fri, 24 Mar 2017 05:19:02 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0ONB00IRUB7M9X60@mailout1.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 24 Mar 2017 09:18:58 +0000 (GMT) Received: from eusmges4.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170324091858eucas1p11c7c8b84280ebacdcb9aeb9b1eb73e94~uxtNollyA1871918719eucas1p1Q; Fri, 24 Mar 2017 09:18:58 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges4.samsung.com (EUCPMTA) with SMTP id BA.80.28517.184E4D85; Fri, 24 Mar 2017 09:18:57 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170324091857eucas1p1e7980473922826b7dba5f043be168e6a~uxtM7D2771872318723eucas1p1U; Fri, 24 Mar 2017 09:18:57 +0000 (GMT) X-AuditID: cbfec7f4-f79716d000006f65-2a-58d4e4816c14 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id C8.02.06687.EE4E4D85; Fri, 24 Mar 2017 09:20:46 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0ONB00ASHB7HUF30@eusync3.samsung.com>; Fri, 24 Mar 2017 09:18:57 +0000 (GMT) From: Marek Szyprowski To: iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Joerg Roedel , Krzysztof Kozlowski , Andrzej Hajda , Bartlomiej Zolnierkiewicz Subject: [PATCH] iommu/exynos: Don't open-code loop unrolling Date: Fri, 24 Mar 2017 10:18:44 +0100 Message-id: <1490347124-17937-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrNIsWRmVeSWpSXmKPExsWy7djP87qNT65EGDydqmtxa905VouNM9az WizYb23ROXsDu8X580Bixvl9TBZrj9xld2D3eHJwHpPHplWdbB6Tbyxn9OjbsorR4/MmuQDW KC6blNSczLLUIn27BK6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hBEsICthKtP6eC jWURUJV4/O0GUBEHB6+Ah8SNxVDb5CROHpvMOoGRewEjwypGkdTS4tz03GJDveLE3OLSvHS9 5PzcTYzA0Nx27OfmHYyXNgYfYhTgYFTi4Y2ouRQhxJpYVlyZe4hRgoNZSYRXdMWVCCHelMTK qtSi/Pii0pzU4kOMpkC7JzJLiSbnA+MmryTe0MTQ3NLQyNjCwtzISEmct+TDlXAhgfTEktTs 1NSC1CKYPiYOTqkGxszj87LfvJqhOvPcibkau2/PeSlyufDHYsOdV9xPPvVdV7U+ndmSgYmh dOmb5rPCB50uLZRbEzBP/fCLXOm1rxeazIvoZvCW2Par48ishVKfLKWCWKVX+R78G1sfkZfw 9Pzp2fdkOTnWOit1PF3xvumafET5Zp9s2Uwpt6AnlzYWhTILL2ZN8VFiKc5INNRiLipOBAA2 wbcZYwIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170324091857eucas1p1e7980473922826b7dba5f043be168e6a X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRs=?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRtT?= =?UTF-8?B?YW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170324091857eucas1p1e7980473922826b7dba5f043be168e6a X-RootMTR: 20170324091857eucas1p1e7980473922826b7dba5f043be168e6a References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP IOMMU domain allocation is not performance critical operation, so remove hand made optimisation of unrolled initialization loop and leave this to the compiler. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 48b5dabd06ce..2395478dde75 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -759,16 +759,8 @@ static struct iommu_domain *exynos_iommu_domain_alloc(unsigned type) goto err_counter; /* Workaround for System MMU v3.3 to prevent caching 1MiB mapping */ - for (i = 0; i < NUM_LV1ENTRIES; i += 8) { - domain->pgtable[i + 0] = ZERO_LV2LINK; - domain->pgtable[i + 1] = ZERO_LV2LINK; - domain->pgtable[i + 2] = ZERO_LV2LINK; - domain->pgtable[i + 3] = ZERO_LV2LINK; - domain->pgtable[i + 4] = ZERO_LV2LINK; - domain->pgtable[i + 5] = ZERO_LV2LINK; - domain->pgtable[i + 6] = ZERO_LV2LINK; - domain->pgtable[i + 7] = ZERO_LV2LINK; - } + for (i = 0; i < NUM_LV1ENTRIES; i++) + domain->pgtable[i] = ZERO_LV2LINK; handle = dma_map_single(dma_dev, domain->pgtable, LV1TABLE_SIZE, DMA_TO_DEVICE);