Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262151AbVANU5k (ORCPT ); Fri, 14 Jan 2005 15:57:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262111AbVANU5f (ORCPT ); Fri, 14 Jan 2005 15:57:35 -0500 Received: from nikam-dmz.ms.mff.cuni.cz ([195.113.20.16]:12212 "EHLO nikam.ms.mff.cuni.cz") by vger.kernel.org with ESMTP id S262143AbVANU4w (ORCPT ); Fri, 14 Jan 2005 15:56:52 -0500 Date: Fri, 14 Jan 2005 21:56:51 +0100 From: Jan Hubicka To: Tigran Aivazian Cc: linux-kernel@vger.kernel.org, discuss@x86-64.org Subject: Re: [discuss] booting a kernel compiled with -mregparm=0 Message-ID: <20050114205651.GE17263@kam.mff.cuni.cz> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1457 Lines: 33 > Hello, > > I am trying to boot a 2.6.x kernel (on x86_64) compiled with -mregparm=0 > and it does not boot, i.e. hangs at the very first stage. > > I know this breaks ABI/x86_64 but the reason I need to compile such a > kernel is because kdb on x86_64 cannot show the function arguments and the > only way to make it work that I found was to pass all arguments on the > stack (then kdb works fine and shows correct values for all arguments). > But obviously the module and the kernel need to match, otherwise it will > panic easily; and so I have to use the same argument passing convention in > the kernel. This is obviously for debugging only, nobody would ever ship > such "incorrectly" compiled module anywhere. > > So, I have to find a "boundary" between the parts of the kernel that can > be safely compiled with -mregparm=0 and which must stay as they are. Any > ideas as to what to do in this situation? Actually -mregparm=0 is not supposed to be even accepted by x86-64 compiler (I've disabled the function attribute but apparently missed this one) and even if GCC produced valid code by miracle, you will get into trouble with hand written assembly. Honza > > Kind regards > Tigran > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/