public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Gerst <bgerst@didntduck.org>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] asm offsets for i386
Date: Thu, 27 Mar 2003 13:11:41 -0500	[thread overview]
Message-ID: <3E833EDD.9050007@didntduck.org> (raw)
In-Reply-To: <200303271728.h2RHSDc28540@devserv.devel.redhat.com>

Pete Zaitcev wrote:
>>[Resend]
>>
>>This patch creates an asm-offsets.c file for i386, and removes the
>>hardcoded constants from several asm files.
>>
>>--
>>				Brian Gerst
> 
> 
> Doesn't seem to be worth the trouble because thread_info
> is a small structure, not embedded into a big structure
> as thread_struct was. DaveM removed the automatic
> offset generation on sparc64 and I am thinking to do
> the same on sparc.
> 
> I'm not surprised that nobody answered, the patch seems
> to be rather pointless.
> 
> We might want to add something like this:
> 
>     if (TI_CPU         != offsetof(struct thread_info, cpu) ||
>         TI_PREEMPT     != offsetof(struct thread_info, preempt_count) ||
>         TI_SOFTIRQ     != offsetof(struct thread_info, softirq_count) ||
>         TI_HARDIRQ     != offsetof(struct thread_info, hardirq_count))
>             thread_info_offsets_are_bolixed_linus();
> 
> It gives out an link time error.
> 
> -- Pete
> 

I already caught one bug with this, since someone recently added values 
to the feature flags array and didn't fix up the vendor id offset.  What 
you propose fails with some non-gcc compilers (Intel's compiler for 
example, which supports gcc extensions) that don't optimize it away.

--
				Brian Gerst


  reply	other threads:[~2003-03-27 18:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1048773360.3585.linux-kernel2news@redhat.com>
2003-03-27 17:28 ` [PATCH] asm offsets for i386 Pete Zaitcev
2003-03-27 18:11   ` Brian Gerst [this message]
2003-03-27 19:37     ` David S. Miller
2003-03-27 13:51 Brian Gerst
  -- strict thread matches above, loose matches on Subject: below --
2003-03-21 13:50 Brian Gerst
2003-03-19 23:58 Brian Gerst

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=3E833EDD.9050007@didntduck.org \
    --to=bgerst@didntduck.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zaitcev@redhat.com \
    /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