From: Zachary Amsden <zach@vmware.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andi Kleen <ak@muc.de>,
kvm-devel <kvm-devel@lists.sourceforge.net>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/3] i386: use x86_64's desc_def.h
Date: Wed, 18 Jul 2007 09:19:45 -0700 [thread overview]
Message-ID: <469E3DA1.3010600@vmware.com> (raw)
In-Reply-To: <1184743422.10380.114.camel@localhost.localdomain>
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
next prev parent reply other threads:[~2007-07-18 16:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-18 7:22 [PATCH 1/3] Standardize x86_64's desc_defs.h in preparation for exposure to i386 Rusty Russell
[not found] ` <1184743355.10380.112.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-07-18 7:23 ` [PATCH 2/3] i386: use x86_64's desc_def.h Rusty Russell
[not found] ` <1184743422.10380.114.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-07-18 7:30 ` [PATCH 3/3] i386: Replace struct Xgt_desc_struct with struct desc_ptr Rusty Russell
[not found] ` <1184743812.10380.120.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-07-21 1:33 ` Chris Wright
2007-07-18 16:19 ` Zachary Amsden [this message]
[not found] ` <469E3DA1.3010600-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2007-07-18 23:27 ` [PATCH 2/3] i386: use x86_64's desc_def.h Rusty Russell
[not found] ` <1184801261.10380.174.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-07-18 23:29 ` Rusty Russell
[not found] ` <1184801383.10380.176.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-07-21 1:32 ` Chris Wright
2007-07-19 0:00 ` Andi Kleen
2007-07-18 9:03 ` [PATCH 1/3] Standardize x86_64's desc_defs.h in preparation for exposure to i386 Andi Kleen
[not found] ` <20070718090302.GA67073-h9bWGtP8wOw@public.gmane.org>
2007-07-18 11:44 ` Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=469E3DA1.3010600@vmware.com \
--to=zach@vmware.com \
--cc=ak@muc.de \
--cc=akpm@linux-foundation.org \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox