From patchwork Thu Mar 12 17:38:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 45746 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DA4F2214BF for ; Thu, 12 Mar 2015 17:42:54 +0000 (UTC) Received: by wggx13 with SMTP id x13sf12753549wgg.0 for ; Thu, 12 Mar 2015 10:42:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=CnJ68GTBoxbo6lawKEoZs5Ew36Gpuf47PKTLHKzk7jo=; b=AgO4+g07r9Vg80r4zWno57ESjgx7m/4iiESbmZoUUKVzv1PI1+hpZnTLSHNDdmLzg4 frCiOikAjUWaaWG6KTrtZu8cj7DTgX+zlPVD4kb4WlT7rzxy4bAI4ifjW+RvQuWZjbba H4ZMSSMTJoe4N93vVOlzR1aqfq8Knwse7+8E4ZQG+e2/PTk0kDkTLIdKyaDXc38Ws/nl 9a4qUJ3RDZS+kGGgn0Ci+19JzfPOubanZrsqvqmBYq0KkEcxpiSpiadbkZnu9XjNWXHq TDsV4Cf+8bzCrrSnfs99H8NFpnA96PVesLuiwvdPthw3F7T5PruMPKWODrNtU5PP/cHi lYXg== X-Gm-Message-State: ALoCoQkHwShaYM98U6LMtWipZAniidWLVFS96bcfyu3fiAK/Ch/u9tBO1bvtcob5n3sIRAVLXONX X-Received: by 10.152.28.137 with SMTP id b9mr6563741lah.8.1426182174177; Thu, 12 Mar 2015 10:42:54 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.48 with SMTP id t16ls296361lal.55.gmail; Thu, 12 Mar 2015 10:42:53 -0700 (PDT) X-Received: by 10.152.10.209 with SMTP id k17mr10425432lab.50.1426182173812; Thu, 12 Mar 2015 10:42:53 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id ej8si4841426lad.141.2015.03.12.10.42.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Mar 2015 10:42:53 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by labhs14 with SMTP id hs14so16961683lab.5 for ; Thu, 12 Mar 2015 10:42:53 -0700 (PDT) X-Received: by 10.152.30.103 with SMTP id r7mr36776130lah.76.1426182173710; Thu, 12 Mar 2015 10:42:53 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp383389lbj; Thu, 12 Mar 2015 10:42:52 -0700 (PDT) X-Received: by 10.66.254.68 with SMTP id ag4mr92495515pad.39.1426182171821; Thu, 12 Mar 2015 10:42:51 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ln1si3269190pab.99.2015.03.12.10.42.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Mar 2015 10:42:51 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YW76q-00073u-RO; Thu, 12 Mar 2015 17:41:24 +0000 Received: from mail-wi0-f175.google.com ([209.85.212.175]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YW74h-0004Ji-MN for linux-arm-kernel@lists.infradead.org; Thu, 12 Mar 2015 17:39:12 +0000 Received: by widex7 with SMTP id ex7so22379870wid.1 for ; Thu, 12 Mar 2015 10:38:49 -0700 (PDT) X-Received: by 10.194.158.234 with SMTP id wx10mr91021953wjb.23.1426181929699; Thu, 12 Mar 2015 10:38:49 -0700 (PDT) Received: from ards-macbook-pro.local (45.Red-83-50-109.dynamicIP.rima-tde.net. [83.50.109.45]) by mx.google.com with ESMTPSA id m9sm14081659wiz.24.2015.03.12.10.38.47 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Mar 2015 10:38:48 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, arnd@arndb.de, linux@arm.linux.org.uk, nico@linaro.org Subject: [RFT/RFC PATCH 6/6] ARM: keep .text and .fixup regions together Date: Thu, 12 Mar 2015 18:38:12 +0100 Message-Id: <1426181892-15440-7-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1426181892-15440-1-git-send-email-ard.biesheuvel@linaro.org> References: <1426181892-15440-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150312_103911_917139_72EC590C X-CRM114-Status: UNSURE ( 8.79 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.175 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.212.175 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Ard Biesheuvel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Fixup snippets are put into a dedicated section so that they don't bloat cache lines with instructions that are usually not executed. But there is no reason to put all these snippets together at the far end of the .text output region, where the branch instruction they contain could go out of range if the kernel grows in size. Instead, emit .text and .fixup regions together for each input object. They should still be out of the way, but not so far that they go out of range. Signed-off-by: Ard Biesheuvel Acked-by: Nicolas Pitre --- Note that the TEXT_TEXT macro will emit *(.text) again but this should be harmless. arch/arm/kernel/vmlinux.lds.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 2e7b2220ef5f..01630c38fd6c 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -108,13 +108,13 @@ SECTIONS *(.exception.text) __exception_text_end = .; IRQENTRY_TEXT +#ifdef CONFIG_MMU + *(.text .fixup) +#endif TEXT_TEXT SCHED_TEXT LOCK_TEXT KPROBES_TEXT -#ifdef CONFIG_MMU - *(.fixup) -#endif *(.gnu.warning) *(.glue_7) *(.glue_7t)