From patchwork Fri Jan 17 08:04:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 3502411 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A8081C02DC for ; Fri, 17 Jan 2014 08:05:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DED7320179 for ; Fri, 17 Jan 2014 08:05:29 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 27A0020122 for ; Fri, 17 Jan 2014 08:05:28 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W44QQ-0004wt-Fx; Fri, 17 Jan 2014 08:05:10 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W44QJ-0001lq-PG; Fri, 17 Jan 2014 08:05:03 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W44QF-0001ko-Qi for linux-arm-kernel@lists.infradead.org; Fri, 17 Jan 2014 08:05:01 +0000 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MZJ008GFD3LFMA0@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 17 Jan 2014 17:04:33 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.51]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 8D.31.10364.014E8D25; Fri, 17 Jan 2014 17:04:32 +0900 (KST) X-AuditID: cbfee690-b7f266d00000287c-8b-52d8e41028c1 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 24.9C.29263.014E8D25; Fri, 17 Jan 2014 17:04:32 +0900 (KST) Received: from DOJG1HAN03 ([12.23.120.99]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MZJ0070LD3K2412@mmp2.samsung.com>; Fri, 17 Jan 2014 17:04:32 +0900 (KST) From: Jingoo Han To: 'Catalin Marinas' Subject: [PATCH] arm64: mm: use ubfm for dcache_line_size Date: Fri, 17 Jan 2014 17:04:32 +0900 Message-id: <000301cf135a$c1390e40$43ab2ac0$%han@samsung.com> MIME-version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac8TWsEIoyXAgsu8TTarE4KhEWSpzg== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrAIsWRmVeSWpSXmKPExsVy+t8zY12BJzeCDNq/WVu8X9bDaHF54SVW i02Pr7FavPx4gsWBxWPNvDWMHpuX1Hv0bVnFGMAcxWWTkpqTWZZapG+XwJWxp/0Uc8FltorT y1azNjCuZO1i5OSQEDCRuDnvGTuELSZx4d56ti5GLg4hgWWMEqv2T2aGKTqzbi8zRGI6o0TT 0VeMEM4vRomO6yeZQKrYBNQkvnw5DDZKREBfYvGVG0ArODiYBYolXvabgISFBSwlnpz4xwJi swioSlx738gIYvMK2EpMvPiXDcIWlPgx+R5YDbOAlsT6nceZIGx5ic1r3jKDjJQQUJd49FcX YpOexNqLb5ghSkQk9r14B3aahMAmdomNV46zQuwSkPg2+RALRK+sxKYDUH9JShxccYNlAqPY LCSbZyHZPAvJ5llIVixgZFnFKJpak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ba34GJOO3Z9y3IO79oJ+gLme5W+LShXecv775ev5KqnIhGz5beJ802blrm9gNH9 9pe7Yf+3rFr78O2v6kKjhzemX//CZf/ymonCot4Cncm25V2rXhrW7MxN0hDqtWd0+KrEUpyR aKjFXFScCADQxDOIIAMAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140117_030500_078538_B15B0DF8 X-CRM114-Status: UNSURE ( 7.98 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.2 (-------) Cc: 'Jingoo Han' , 'Will Deacon' , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.5 required=5.0 tests=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 Use 'ubfm' for the bitfield move instruction; thus, single instruction can be used instead of two instructions, when getting the minimum D-cache line size from CTR_EL0 register. Signed-off-by: Jingoo Han --- arch/arm64/mm/proc-macros.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/mm/proc-macros.S b/arch/arm64/mm/proc-macros.S index 8957b82..c31f41e 100644 --- a/arch/arm64/mm/proc-macros.S +++ b/arch/arm64/mm/proc-macros.S @@ -38,8 +38,7 @@ */ .macro dcache_line_size, reg, tmp mrs \tmp, ctr_el0 // read CTR - lsr \tmp, \tmp, #16 - and \tmp, \tmp, #0xf // cache line size encoding + ubfm \tmp, \tmp, #0x16, 0x19 // cache line size encoding mov \reg, #4 // bytes per word lsl \reg, \reg, \tmp // actual cache line size .endm