From patchwork Mon Jul 30 11:58:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 1254421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id C1839DF24C for ; Mon, 30 Jul 2012 12:18:41 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SvorA-00007c-HT; Mon, 30 Jul 2012 12:13:52 +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 1Svofo-0006Hz-DL for linux-arm-kernel@lists.infradead.org; Mon, 30 Jul 2012 12:02:08 +0000 Received: by mail-pb0-f49.google.com with SMTP id rq13so10575041pbb.36 for ; Mon, 30 Jul 2012 05:02:03 -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=Yr7Ymo1am8lpzaV2IDakVeTDAh9vVj0juMEfWJxtRzJHzz78/ScCKsiXTcde4jXcm1 hRcH7KIzjZcWD+H6/PPc059xz04pdNXbJDTbMm7QR1YON6BQBvY5/3AeCItLhDiTpwEA hrcoE+A4GroofbGdZKnaJRv+GwCSGyN/TmeYpcT8BPk6it9ZNLcF4kZDnhQeQUESqhfv 9X4yjlDY5DklY2Mq0O96rNU5ctxbM79uy6rBOd1g7AO0MFF+/BCuMnQ9kkY4CNwJhtwh UqTs4z1dy2WZ0WZUnV291+BA8+XtDVMERl/zdTWymLtVCVdhymFLnHz/U+fBvLwR47f1 oMNw== Received: by 10.68.221.106 with SMTP id qd10mr35302049pbc.42.1343649723484; Mon, 30 Jul 2012 05:02:03 -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 qi8sm7815511pbc.36.2012.07.30.05.02.02 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 Jul 2012 05:02:03 -0700 (PDT) From: Anton Vorontsov To: Russell King , Jason Wessel , Greg Kroah-Hartman , Alan Cox Subject: [PATCH 11/11] ARM: Get rid of .LCcralign local label usage in alignment_trap macro Date: Mon, 30 Jul 2012 04:58:20 -0700 Message-Id: <1343649500-18491-11-git-send-email-anton.vorontsov@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <20120730115719.GA5742@lizard> References: <20120730115719.GA5742@lizard> X-Gm-Message-State: ALoCoQljvA423rsuIqAKLKAizvpHnBm8LKopE0qx+Hr1FAjRdtxFEG0UKgqy4/Z0hr2yhXCxeqfy X-Spam-Note: CRM114 invocation failed X-Spam-Note: SpamAssassin invocation failed 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