Rusty Russell wrote: > The main effect is to change the definition of "struct desc_struct" to > a union of more complex types. >
Yay! Someone finally killed it. Every time I tried to kill it, I ended up off in the weeds chasing some bug. > > diff -r 656f3ff2c9ce arch/i386/kernel/process.c > @@ -880,21 +880,8 @@ asmlinkage int sys_set_thread_area(struc > * Get the current Thread-Local Storage area: > */ > > -#define GET_BASE(desc) ( \ > - (((desc)->a >> 16) & 0x0000ffff) | \ > - (((desc)->b << 16) & 0x00ff0000) | \ > - ( (desc)->b & 0xff000000) ) > - > -#define GET_LIMIT(desc) ( \ > - ((desc)->a & 0x0ffff) | \ > - ((desc)->b & 0xf0000) ) > - > -#define GET_32BIT(desc) (((desc)->b >> 22) & 1) > -#define GET_CONTENTS(desc) (((desc)->b >> 10) & 3) > -#define GET_WRITABLE(desc) (((desc)->b >> 9) & 1) > -#define GET_LIMIT_PAGES(desc) (((desc)->b >> 23) & 1) > -#define GET_PRESENT(desc) (((desc)->b >> 15) & 1) > -#define GET_USEABLE(desc) (((desc)->b >> 20) & 1) > +#define GET_CONTENTS(desc) (((desc)->raw32.b >> 10) & 3) > +#define GET_WRITABLE(desc) (((desc)->raw32.b >> 9) & 1) > > diff -r 656f3ff2c9ce arch/i386/kernel/ptrace.c > --- a/arch/i386/kernel/ptrace.c Wed Jul 18 16:21:04 2007 +1000 > +++ b/arch/i386/kernel/ptrace.c Wed Jul 18 16:21:06 2007 +1000 > @@ -283,22 +283,8 @@ ptrace_get_thread_area(struct task_struc > /* > * Get the current Thread-Local Storage area: > */ > - > -#define GET_BASE(desc) ( \ > - (((desc)->a >> 16) & 0x0000ffff) | \ > - (((desc)->b << 16) & 0x00ff0000) | \ > - ( (desc)->b & 0xff000000) ) > - > -#define GET_LIMIT(desc) ( \ > - ((desc)->a & 0x0ffff) | \ > - ((desc)->b & 0xf0000) ) > - > -#define GET_32BIT(desc) (((desc)->b >> 22) & 1) > -#define GET_CONTENTS(desc) (((desc)->b >> 10) & 3) > -#define GET_WRITABLE(desc) (((desc)->b >> 9) & 1) > -#define GET_LIMIT_PAGES(desc) (((desc)->b >> 23) & 1) > -#define GET_PRESENT(desc) (((desc)->b >> 15) & 1) > -#define GET_USEABLE(desc) (((desc)->b >> 20) & 1) > +#define GET_CONTENTS(desc) (((desc)->raw32.b >> 10) & 3) > +#define GET_WRITABLE(desc) (((desc)->raw32.b >> 9) & 1) > You got rid of the duplicate definitions here, but then added new duplicates (GET_CONTENTS / WRITABLE). Can you stick them in desc.h? Zach ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel