From patchwork Fri Jul 13 10:16:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 1194971 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 8CBC63FC4C for ; Fri, 13 Jul 2012 10:35:29 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Spd87-0004zz-3o; Fri, 13 Jul 2012 10:29:47 +0000 Received: from mail-pb0-f49.google.com ([209.85.160.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SpcyH-0002wG-Ai for linux-arm-kernel@lists.infradead.org; Fri, 13 Jul 2012 10:19:46 +0000 Received: by mail-pb0-f49.google.com with SMTP id rq13so5962037pbb.36 for ; Fri, 13 Jul 2012 03:19:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=E9yTu11wNKpaH4QPZsA1FdZoIal2QGv6XbGSEqSob7c=; b=f2waNhIH4pKyuBVVdlJ1lTvQstG/0XiBCBZBg0iU8X6bUaUKoHSgD+wYEKUti2CG92 gntq2ictXT02rjNjD8wWsSGE23JmEGa4Tnk1n2TxEUN3nCvpU750vDAyzwOeaXJwTxjW VpxrW57oKxjZFbV0ARVU1QN0PIVstGKntE2fcpiaCQ3G1RhipjE4BNoZY5qBxyj//VTY ZznTumuOTwoDmVubbjIoJa/vACp6zv7XML10y4H4YOY9Dw+7lhbs3jm0+WIzFH+6ALUP 1Pfu5AZRoAt+aeH1bGSsZ6KWIcV1Gyb38XsTuoNFIWQwDC5HKFrGONYfpDBr0CFsxfhV V33w== Received: by 10.68.222.40 with SMTP id qj8mr2158080pbc.139.1342174765920; Fri, 13 Jul 2012 03:19:25 -0700 (PDT) Received: from localhost (c-71-204-165-222.hsd1.ca.comcast.net. [71.204.165.222]) by mx.google.com with ESMTPS id oi5sm4452696pbb.39.2012.07.13.03.19.24 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Jul 2012 03:19:25 -0700 (PDT) From: Anton Vorontsov To: Russell King , Jason Wessel Subject: [PATCH 8/8] ARM: Get rid of .LCcralign local label usage in alignment_trap macro Date: Fri, 13 Jul 2012 03:16:48 -0700 Message-Id: <1342174608-22407-8-git-send-email-anton.vorontsov@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <20120713101605.GA16139@lizard> References: <20120713101605.GA16139@lizard> X-Gm-Message-State: ALoCoQmS4w79WDNKp1kMJKowEYQATQMA8yNPiy9WHwT5cm719TRQt0lQaAVwANzpeunXN71828gA X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.49 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, kgdb-bugreport@lists.sourceforge.net, linux-kernel@vger.kernel.org, =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , John Stultz , Colin Cross , kernel-team@android.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This makes the code more izolated. The downside of this is that we now have an additional branch and the code itself is 8 bytes longer. But on the bright side, this new layout can be more cache friendly since cr_alignment address might be already in the cache line (not that I measured anything, it's just fun to think about it). Signed-off-by: Anton Vorontsov --- arch/arm/kernel/entry-armv.S | 2 -- arch/arm/kernel/entry-header.S | 6 +++++- arch/arm/kernel/kgdb_fiq_entry.S | 3 --- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 6aeb9b8..6b04ab5 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -266,8 +266,6 @@ __pabt_svc: ENDPROC(__pabt_svc) .align 5 -.LCcralign: - .word cr_alignment #ifdef MULTI_DABORT .LCprocfns: .word processor diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S index c3c09ac..5a05e7f 100644 --- a/arch/arm/kernel/entry-header.S +++ b/arch/arm/kernel/entry-header.S @@ -38,9 +38,13 @@ .macro alignment_trap, rtemp #ifdef CONFIG_ALIGNMENT_TRAP - ldr \rtemp, .LCcralign + ldr \rtemp, 1f ldr \rtemp, [\rtemp] mcr p15, 0, \rtemp, c1, c0 + b 2f +1: + .word cr_alignment +2: #endif .endm diff --git a/arch/arm/kernel/kgdb_fiq_entry.S b/arch/arm/kernel/kgdb_fiq_entry.S index 7be3726..e7c05fc 100644 --- a/arch/arm/kernel/kgdb_fiq_entry.S +++ b/arch/arm/kernel/kgdb_fiq_entry.S @@ -18,9 +18,6 @@ .text -@ This is needed for usr_entry/alignment_trap -.LCcralign: - .long cr_alignment .LCdohandle: .long kgdb_fiq_do_handle