From: Keith Owens <kaos@ocs.com.au>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] Cleanup include/asm-ia64/offsets.h
Date: Sat, 28 Apr 2001 03:20:00 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590693005488@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590693005486@msgid-missing>
On Fri, 27 Apr 2001 19:55:57 -0700,
David Mosberger <davidm@hpl.hp.com> wrote:
>>>>>> On Sat, 28 Apr 2001 12:49:29 +1000, Keith Owens <kaos@ocs.com.au> said:
>
> Keith> As part of my makefile rewrite for 2.5 I am cleaning up
> Keith> problems like this. The patch below deletes
> Keith> include/asm-ia64/offsets.h from the shipped tree, restricts
> Keith> its use to assembler code only and makes sure that assembler
> Keith> code always gets the latest offset values. C code is not a
> Keith> problem, the dependency system handles structure and config
> Keith> changes for C code.
>
>There is no way I'm going to duplicate those definitions for asm and C
>code. Please find a way to make the same file work for both C and
>asm.
Duplication is unavoidable. I could add lines like this to ptrace.h
#ifndef __ASSEMBLY__
#define IA64_SWITCH_STACK_AR_UNAT_OFFSET (offsetof(struct switch_stack, ar_unat))
#define IA64_SWITCH_STACK_AR_BSPSTORE_OFFSET (offsetof(struct switch_stack, ar_bspstore))
#endif
and to other C include files but it is still duplication, just moved
from .c files to a .h file.
Assembler is restricted in what it can include or uses the values in
pre-processor context where sizeof() does not work so it needs the
generated offsets. But generating offset.h breaks the kernel
dependency system so it needs explicit dependency information when
offsets.h is used. The only way to do that cleanly is to restrict its
use to assembler code.
next prev parent reply other threads:[~2001-04-28 3: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 [this message]
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
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-105590693005488@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