From patchwork Thu Jan 31 21:44:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 2075431 X-Patchwork-Delegate: deller@gmx.de Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C923CDF2E5 for ; Thu, 31 Jan 2013 21:44:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754028Ab3AaVof (ORCPT ); Thu, 31 Jan 2013 16:44:35 -0500 Received: from mout.gmx.net ([212.227.17.21]:52685 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753841Ab3AaVof (ORCPT ); Thu, 31 Jan 2013 16:44:35 -0500 Received: from mailout-de.gmx.net ([10.1.76.2]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0Lhhfz-1UnXua25qL-00mtZV for ; Thu, 31 Jan 2013 22:44:33 +0100 Received: (qmail invoked by alias); 31 Jan 2013 21:44:33 -0000 Received: from p54AD01F8.dip0.t-ipconnect.de (EHLO p100.box) [84.173.1.248] by mail.gmx.net (mp002) with SMTP; 31 Jan 2013 22:44:33 +0100 X-Authenticated: #1045983 X-Provags-ID: V01U2FsdGVkX1+vs6Z+VFWvo2qfK14/Uu32hbNrcggb38DAw0D/3e l531ciB4WAerMv Date: Thu, 31 Jan 2013 22:44:28 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org, James Bottomley Subject: [PATCH] parisc: add CONFIG_MLONGCALLS option to enable linkage of huge vmlinux executables Message-ID: <20130131214428.GA8928@p100.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Y-GMX-Trusted: 0 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org When building a 64bit kernel which includes all necessary drivers and filesystems the vmlinux kernel often gets so huge, that the linker won't be able to resolve the branch stubs. This patch overcomes this limit by providing an option to compile the kernel with the -mlong-calls compiler option. Signed-off-by: Helge Deller --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index b77feff..3df1c35 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -161,6 +161,23 @@ config PREFETCH def_bool y depends on PA8X00 || PA7200 +config MLONGCALLS + bool "Enable the -mlong-calls compiler option for big kernels" + def_bool y if (!MODULES) + depends on PA8X00 + help + If you configure the kernel to include many drivers built-in instead + as modules, the kernel executable may become too big, so that the + linker will not be able to resolve some long branches and fails to link + your vmlinux kernel. In that case enabling this option will help you + to overcome this limit by using the -mlong-calls compiler option. + + Usually you want to say N here, unless you e.g. want to build + a kernel which includes all necessary drivers built-in and which can + be used for TFTP booting without the need to have an initrd ramdisk. + + Enabling this option will probably slow down your kernel. + config 64BIT bool "64-bit kernel" depends on PA8X00 diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 5707f1a..ed9a14c 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile @@ -65,6 +64,10 @@ ifndef CONFIG_FUNCTION_TRACER cflags-y += -ffunction-sections endif +# Use long jumps instead of long branches (needed if your linker fails to +# link a too big vmlinux executable) +cflags-$(CONFIG_MLONGCALLS) += -mlong-calls + # select which processor to optimise for cflags-$(CONFIG_PA7100) += -march=1.1 -mschedule=7100 cflags-$(CONFIG_PA7200) += -march=1.1 -mschedule=7200