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: 9986 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id A303323E1B for ; Fri, 13 Jul 2012 10:19:27 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id 732D0A18241 for ; Fri, 13 Jul 2012 10:19:27 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id z12so3670584ghb.11 for ; Fri, 13 Jul 2012 03:19:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=E9yTu11wNKpaH4QPZsA1FdZoIal2QGv6XbGSEqSob7c=; b=cU62YFTZLMV/du4eCEL5YXNY+MKnmYYh6+PgSZlIwB572aYMWlobp+d/YqohnCF+X+ F0TWjvNsciNNJjCvdUV9Za1XCnuRn40xEJACVjSO8MpzxfHjHPPkhjHfWLNVabW/HvoA 4RyKfClkFKfnQ8bkvmSTRqxnqGOzzGVF33G+7vdv4wr/Xm0apKN25gL2GNnvQOWDCKUW Dfbpmq8jo8BpJXoVu/eJ/V+mLPZHoWDA7MLoIMa1hTMNSU+Ywu1w/jYfHE80EJ5aasPp SXdbqRhTK9J8S5H7lt+7H6VaQMNoNONW/vOtoOGP7SmSc2MMRXxn9M8Xk/2Kfa5wCDWD Ixyg== Received: by 10.50.163.99 with SMTP id yh3mr376733igb.53.1342174767014; Fri, 13 Jul 2012 03:19:27 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.241.2 with SMTP id lc2csp13706ibb; Fri, 13 Jul 2012 03:19:26 -0700 (PDT) Received: by 10.66.76.134 with SMTP id k6mr1024023paw.58.1342174766301; Fri, 13 Jul 2012 03:19:26 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id ni6si11918446pbc.183.2012.07.13.03.19.26 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Jul 2012 03:19:26 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) smtp.mail=anton.vorontsov@linaro.org Received: by mail-pb0-f50.google.com with SMTP id rr4so6369802pbb.37 for ; Fri, 13 Jul 2012 03:19:26 -0700 (PDT) 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 Cc: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Colin Cross , John Stultz , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, patches@linaro.org, kernel-team@android.com, kgdb-bugreport@lists.sourceforge.net 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: ALoCoQnwEwASNXDl4bPxqkWvMEyrB39arkvL8DGKD2jQZ1qQ5+P294PotLrhmggFwvP+VoTX6XLv 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