From: Keith Owens <kaos@ocs.com.au>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] Cleanup include/asm-ia64/offsets.h - take 2
Date: Mon, 30 Apr 2001 23:20:33 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590693005493@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590693005486@msgid-missing>
On Mon, 30 Apr 2001 16:51:46 -0600,
Don Dugger <n0ano@valinux.com> wrote:
>The number of defines is not the issue. This issue is that with
>the current system these defines are only defined once. If you
>create two different definitions that must match then I can
>guarantee that some time in the future the definitions will get
>out of sync and we'll spend an inordinate amount of time tracking
>down a glitch that never would have occurred if we'd kept with
>the current scheme of generating `offsets.h'.
Why is defining a field twice an issue? Both the C and asm definitions
are defined as offsets of fields within a structure by name. Neither
the structure name nor the field names are ever going to change,
switch_stack is as critical a structure as you can get. Do you really
expect this definition to change?
#define IA64_SWITCH_STACK_B0_OFFSET (offsetof(struct switch_stack, b0))
Other architectures accept that they need different definitions for C
and asm. In fact ix86 is even worse, it has these hard coded lines in
arch/i386/kernel/entry.S and everybody lives with it.
/*
* these are offsets into the task-struct.
*/
state = 0
flags = 4
sigpending = 8
addr_limit = 12
exec_domain = 16
need_resched = 20
tsk_ptrace = 24
processor = 52
>If the only solution you can come up with is to create multiple
>definitions then I'm with David, let's just keep the current scheme.
The current scheme relies on users manually running make dep after any
change that might affect the offsets of the fields generated by
print-offsets. Make any change that affects the size of struct
task_struct (including config changes), forget to run make dep and your
kernel build is useless. Relying on *every* user to manually run make
dep after any patch or config change that *might* affect offsets.h is
unacceptable.
You have a choice between a clean kbuild that requires 11 #defines that
will never change or the existing method which relies on human
intervention. The current scheme is an bomb waiting to go off.
next prev parent reply other threads:[~2001-04-30 23:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-28 2:49 [Linux-ia64] Cleanup include/asm-ia64/offsets.h Keith Owens
2001-04-28 2:55 ` David Mosberger
2001-04-28 3:20 ` Keith Owens
2001-04-30 4:57 ` [Linux-ia64] Cleanup include/asm-ia64/offsets.h - take 2 Keith Owens
2001-04-30 15:00 ` David Mosberger
2001-04-30 22:31 ` Keith Owens
2001-04-30 22:51 ` Don Dugger
2001-04-30 23:20 ` Keith Owens [this message]
2001-05-01 8:36 ` Doug Rabson
2001-05-07 18:08 ` David Mosberger
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=marc-linux-ia64-105590693005493@msgid-missing \
--to=kaos@ocs.com.au \
--cc=linux-ia64@vger.kernel.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