From patchwork Tue Apr 23 20:20:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 2480001 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 DC232DF2E5 for ; Tue, 23 Apr 2013 20:20:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754232Ab3DWUUS (ORCPT ); Tue, 23 Apr 2013 16:20:18 -0400 Received: from mout.gmx.net ([212.227.17.20]:55873 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754198Ab3DWUUR (ORCPT ); Tue, 23 Apr 2013 16:20:17 -0400 Received: from mailout-de.gmx.net ([10.1.76.27]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0M4EgP-1Ulr8m2KMl-00rrNb for ; Tue, 23 Apr 2013 22:20:15 +0200 Received: (qmail invoked by alias); 23 Apr 2013 20:20:15 -0000 Received: from p54AD11D8.dip0.t-ipconnect.de (EHLO p100.box) [84.173.17.216] by mail.gmx.net (mp027) with SMTP; 23 Apr 2013 22:20:15 +0200 X-Authenticated: #1045983 X-Provags-ID: V01U2FsdGVkX1+nSi4BKvynzkJp0AuQttUxF5tF+koJ3SAj/tbaiO NdygSOdlgtjFjm Date: Tue, 23 Apr 2013 22:20:11 +0200 From: Helge Deller To: linux-parisc@vger.kernel.org, James Bottomley , John David Anglin Subject: [PATCH] parisc: disable -mlong-calls compiler option for kernel modules Message-ID: <20130423202011.GA7252@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 commit 87622023a2071f81037c92d34ab20ed062e53ea5 Author: Helge Deller Date: Tue Apr 23 15:59:45 2013 +0200 parisc: disable -mlong-calls compiler option for kernel modules CONFIG_MLONGCALLS was introduced in commit ec758f98328da3eb933a25dc7a2eed01ef44d849 to overcome linker issues when linking huge linux kernels (e.g. with many modules linked in). But in the kernel module loader there is no support yet for the new relocation types, which is why modules built with -mlong-calls can't be loaded. Furthermore, for modules long calls are not really necessary, since we already use stub sections which resolve long distance calls. So, let's just disable this compiler option when compiling kernel modules. 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/Makefile b/arch/parisc/Makefile index 01d95e2..c9259b5 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile @@ -65,8 +65,10 @@ ifndef CONFIG_FUNCTION_TRACER 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 +# link a too big vmlinux executable). Not enabled for building modules. +ifdef CONFIG_MLONGCALLS +KBUILD_CFLAGS_KERNEL += -mlong-calls +endif # select which processor to optimise for cflags-$(CONFIG_PA7100) += -march=1.1 -mschedule=7100