public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zachary Amsden <zach@vmware.com>
To: Jeff Dike <jdike@addtoit.com>
Cc: linux-kernel@vger.kernel.org, Chris Wright <chrisw@osdl.org>,
	akpm@osdl.org, chrisl@vmware.com, pratap@vmware.com,
	virtualization@lists.osdl.org
Subject: Re: [RFC] [PATCH] Split host arch headers for UML's benefit
Date: Tue, 16 Aug 2005 10:46:56 -0700	[thread overview]
Message-ID: <43022690.1090209@vmware.com> (raw)
In-Reply-To: <20050816154201.GA6733@ccure.user-mode-linux.org>

Jeff Dike wrote:

>The patch below fixes the recent UML compilation failure in -rc5-mm1
>without making the UML build reach further into the i386 headers.  It
>splits the i386 ptrace.h and system.h into UML-usable and UML-unusable
>pieces.  
>
>The string "abi" is in there because I did ptrace.h first, and that
>involves separating the ptrace ABI stuff from everything else (if
>pt_regs is not considered part of the abi).  However, the system.h
>split is between random stuff that UML can use and random stuff that
>it can't.  So, perhaps better names would be -uml or -userspace or
>something.
>

I like this approach.  In general, it seems beneficial to split these 
into ABI and kernel implementation.  Also, this stuff eventually works 
its way into userspace headers.  It is not really clear which asm-xxx 
kernel headers are valid to include in userspace.  There are definitely 
multiple classes of things in the kernel header files : ABI definitions, 
user-useful macros and inlines, and things that are privately useful the 
kernel.  The ptrace split seems quite well defined here; the system 
split is a little less obvious, but I don't object to the way you have 
done it.

I've always wondered why we didn't have memory barriers in either 
asm/atomic.h or asm/barrier.h; system.h seems to just have a mixed bag 
of goodies.

Two things about the system.h split - do you use arch_align_stack()?.  
Also, do you use the alternative instruction replacement functionality, 
or do you just need the macro?  If you don't actually implement 
instruction replacement, it seems you could more easily redefine these to be

#define alternative(oldinstr, newinstr, feature) \
    asm volatile(oldinstr) ::: "memory")

Zach

  reply	other threads:[~2005-08-16 17:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-16 15:42 [RFC] [PATCH] Split host arch headers for UML's benefit Jeff Dike
2005-08-16 17:46 ` Zachary Amsden [this message]
2005-08-17 16:59   ` Jeff Dike

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=43022690.1090209@vmware.com \
    --to=zach@vmware.com \
    --cc=akpm@osdl.org \
    --cc=chrisl@vmware.com \
    --cc=chrisw@osdl.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pratap@vmware.com \
    --cc=virtualization@lists.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