mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Herbert Rosmanith <kernel@wildsau.enemy.org>
Cc: linux-kernel@vger.kernel.org, torvalds@osdl.org
Subject: Re: [PATCH] struct thread_struct, asm-i386/processor.h: wrong datatype?
Date: Mon, 6 Jun 2005 10:16:26 +0200	[thread overview]
Message-ID: <20050606081626.GA15699@elte.hu> (raw)
In-Reply-To: <200506041601.j54G1nrq022039@wildsau.enemy.org>


* Herbert Rosmanith <kernel@wildsau.enemy.org> wrote:

> 
> or better: 
> 
> > -       unsigned long   fs;
> > -       unsigned long   gs;
> > +       unsigned short  fs;
> > +       unsigned short  gs;
> >  /* Hardware debugging registers */
> >         unsigned long   debugreg[8];  /* %%db0-7 debug registers */
> >  /* fault info */
> 
> + unsigned short fs, __fsh; 
> + unsigned short gs, __gsh; 
> 
> which is also done this way the structure above, the TSS. I don't know 
> why it's done this way, but I guess it's probably better pad with 16 
> bits to avoid potential problems with 32bit movl which might overwrite 
> portions of the next field.

no. 'struct thread_struct' is the 'soft' thread-state structure. We 
store data in the most convenient (and best performing) format - word 
size in this case. The 'hard' data structure is 'struct tss_struct' - 
where we of course define things in the way the CPU expects it.

	Ingo

  reply	other threads:[~2005-06-06  8:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-04 15:43 Herbert Rosmanith
2005-06-04 16:01 ` Herbert Rosmanith
2005-06-06  8:16   ` Ingo Molnar [this message]
2005-06-08 21:08     ` Herbert Rosmanith

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=20050606081626.GA15699@elte.hu \
    --to=mingo@elte.hu \
    --cc=kernel@wildsau.enemy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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

all inboxes | Powered by JetHome®