Messages in this thread | | | Date | Wed, 26 Aug 2009 18:24:18 +0200 | From | Frederic Weisbecker <> | Subject | Re: [PATCH 2/4] Add NR_syscalls for x86_64 |
| |
On Wed, Aug 26, 2009 at 12:09:10PM -0400, Jason Baron wrote: > doesn't quite work, b/c the top of asm-offsets_64.c has a bunch of > includes, such as: <linux/sched.h>, which in turn include unistd.h at > a point in time where asm/asm-offests.h does not exist. > > However, a much simpler version of the previous patch I posted does do > the trick, below. I hope this version is more palatable? > > thanks, > > -Jason > > Signed-off-by: Jason Baron <jbaron@redhat.com>
Ah yeah, looks good!
> > diff --git a/arch/x86/include/asm/unistd_64.h b/arch/x86/include/asm/unistd_64.h > index 900e161..b9f3c60 100644 > --- a/arch/x86/include/asm/unistd_64.h > +++ b/arch/x86/include/asm/unistd_64.h > @@ -688,6 +688,12 @@ __SYSCALL(__NR_perf_counter_open, sys_perf_counter_open) > #endif /* __NO_STUBS */ > > #ifdef __KERNEL__ > + > +#ifndef COMPILE_OFFSETS > +#include <asm/asm-offsets.h> > +#define NR_syscalls (__NR_syscall_max + 1) > +#endif > + > /* > * "Conditional" syscalls > * > diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c > index 898ecc4..4a6aeed 100644 > --- a/arch/x86/kernel/asm-offsets_64.c > +++ b/arch/x86/kernel/asm-offsets_64.c > @@ -3,6 +3,7 @@ > * This code generates raw asm output which is post-processed to extract > * and format the required data. > */ > +#define COMPILE_OFFSETS > > #include <linux/crypto.h> > #include <linux/sched.h>
| |