Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760134AbYARBFo (ORCPT ); Thu, 17 Jan 2008 20:05:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757985AbYARBFV (ORCPT ); Thu, 17 Jan 2008 20:05:21 -0500 Received: from terminus.zytor.com ([198.137.202.10]:50343 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757339AbYARBFU (ORCPT ); Thu, 17 Jan 2008 20:05:20 -0500 Message-ID: <478FF9F3.9030604@zytor.com> Date: Thu, 17 Jan 2008 19:59:31 -0500 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Harvey Harrison CC: Ingo Molnar , LKML , Thomas Gleixner Subject: Re: [PATCH] x86: Use v8086_mode helper, trivial unification References: <1200611078.5724.46.camel@brick> <478FDE76.3070309@zytor.com> <1200612389.5724.63.camel@brick> In-Reply-To: <1200612389.5724.63.camel@brick> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1122 Lines: 37 Harvey Harrison wrote: > > Sorry, missed that detail in ptrace.h, I notice now. > > Is there some better way this could be organized, would the following > be an improvement, as opposed to two long ifdef sections? > > Patch will follow if you think it's a good idea. It is actually quite a bit easier to read. > > static inline unsigned long stack_pointer(struct pt_regs *regs) > { > #ifdef CONFIG_X86_32 > return (unsigned long)regs; > #else > return regs->sp; > #endif > } This one is kind of strange. In particular, the 32-bit definition isn't exactly what one would expect. It makes me concerned that it actually refers to two different kinds of stack pointers? > /* still need a define here, as one is long and one is unsigned long. > * but this is another target for unification I guess. */ > #define regs_return_value(regs) ((regs)->ax) Indeed... -hpa -- 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/