Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756883AbXLHMnS (ORCPT ); Sat, 8 Dec 2007 07:43:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753575AbXLHMnH (ORCPT ); Sat, 8 Dec 2007 07:43:07 -0500 Received: from smtp.cs.aau.dk ([130.225.194.6]:52583 "EHLO smtp.cs.aau.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753501AbXLHMnF (ORCPT ); Sat, 8 Dec 2007 07:43:05 -0500 Subject: Re: [PATCH 1/6] indirect: use asmlinkage in i386 syscall table prototype From: Simon Holm =?ISO-8859-1?Q?Th=F8gersen?= To: Zach Brown Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Ingo Molnar , Ulrich Drepper , Arjan van de Ven , Andrew Morton , Alan Cox , Evgeniy Polyakov , "David S. Miller" , Suparna Bhattacharya , Davide Libenzi , Jens Axboe , Thomas Gleixner , Dan Williams , Jeff Moyer , suresh.b.siddha@intel.com In-Reply-To: <11969832193635-git-send-email-zach.brown@oracle.com> References: <1196983219534-git-send-email-zach.brown@oracle.com> <11969832193635-git-send-email-zach.brown@oracle.com> Content-Type: text/plain; charset=utf-8 Date: Sat, 08 Dec 2007 13:40:25 +0100 Message-Id: <1197117625.19335.3.camel@odie.local> Mime-Version: 1.0 X-Mailer: Evolution 2.12.2 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1427 Lines: 36 tor, 06 12 2007 kl. 15:20 -0800, skrev Zach Brown: > call_indirect() was using the wrong calling convention for the system call > handlers. system call handlers would get mixed up arguments. > > Signed-off-by: Zach Brown > > diff --git a/include/asm-x86/indirect_32.h b/include/asm-x86/indirect_32.h > index a1b72ac..e3dea8e 100644 > --- a/include/asm-x86/indirect_32.h > +++ b/include/asm-x86/indirect_32.h > @@ -15,8 +15,8 @@ struct indirect_registers { > > static inline long call_indirect(struct indirect_registers *regs) > { > - extern long (*sys_call_table[]) (__u32, __u32, __u32, __u32, __u32, __u32); > - > + extern asmlinkage long (*sys_call_table[])(long, long, long, This should be something like below instead, otherwise gcc wont parse asmlinkage as being an attribute of the function signature. extern long (asmlinkage *sys_call_table[])(long, long, long, I don't now if it has changed with recent gcc versions, this works for me with 4.2.0. > + long, long, long); > return sys_call_table[INDIRECT_SYSCALL(regs)](regs->ebx, regs->ecx, > regs->edx, regs->esi, > regs->edi, regs->ebp); Simon Holm Thøgersen -- 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/