public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: virtualization@lists.osdl.org
Cc: Zachary Amsden <zach@vmware.com>,
	Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Xen-devel <xen-devel@lists.xensource.com>,
	Andrew Morton <akpm@osdl.org>, Dan Hecht <dhecht@vmware.com>,
	Dan Arai <arai@vmware.com>, Anne Holler <anne@vmware.com>,
	Pratap Subrahmanyam <pratap@vmware.com>,
	Christopher Li <chrisl@vmware.com>,
	Joshua LeVasseur <jtl@ira.uka.de>, Chris Wright <chrisw@osdl.org>,
	Rik Van Riel <riel@redhat.com>, Jyothy Reddy <jreddy@vmware.com>,
	Jack Lo <jlo@vmware.com>, Kip Macy <kmacy@fsmware.com>,
	Jan Beulich <jbeulich@novell.com>,
	Ky Srinivasan <ksrinivasan@novell.com>,
	Wim Coekaerts <wim.coekaerts@oracle.com>,
	Leendert van Doorn <leendert@watson.ibm.com>
Subject: Re: [RFC, PATCH 4/24] i386 Vmi inline implementation
Date: Wed, 22 Mar 2006 21:12:50 +0100	[thread overview]
Message-ID: <200603222112.52385.ak@suse.de> (raw)
In-Reply-To: <200603131802.k2DI22OK005657@zach-dev.vmware.com>

On Monday 13 March 2006 19:02, Zachary Amsden wrote:

> +#define MAKESTR(x)              #x
> +#define XSTR(x)                 MAKESTR(x)
> +#define XCONC(args...)		args
> +#define CONCSTR(x...)		#x
> +#define XCSTR(x...)		CONCSTR(x)

We have legions of these all over the tree. How about you put
them into some central file and gc a few?


> +/*
> + * Propagate these definitions as strings up to C code for convenient use
> + * in stringized assembler as pseudo-mnemonics; we must emit assembler
> + * directives to generate equates for the VMI_CALL_XXX symbols, since they
> + * will not be available otherwise to the assembler, and we can't emit
> + * the C versions of these functions from within an inline assembler
> + * string.
> + */
> +asm(".equ VMI_CALL_CUR, 0;\n\t");

The standard way to do this is to use asm-offsets.c



> +#define VDEF(call)						\
> +	asm (".equ VMI_CALL_" #call ", VMI_CALL_CUR;\n\t");	\
> +	asm (".equ VMI_CALL_CUR, VMI_CALL_CUR+1;\n\t");
> +VMI_CALLS

Hmmm? This doesn't look like something a header file should be doing.

How about you put that big list and the definition into a .c ?


> +#if defined(CONFIG_VMI_C_CONVENTION)

I don't think that file can be reviewed in any meaningful way before
you don't get rid of the macro mess and the unneeded calling conventions.


-Andi

  parent reply	other threads:[~2006-03-22 20:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-13 18:02 [RFC, PATCH 4/24] i386 Vmi inline implementation Zachary Amsden
2006-03-15 22:52 ` Pavel Machek
2006-03-15 23:56   ` Zachary Amsden
2006-03-22 20:12 ` Andi Kleen [this message]
2006-03-22 22:33   ` Zachary Amsden
  -- strict thread matches above, loose matches on Subject: below --
2006-03-13 18:41 Zachary Amsden

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=200603222112.52385.ak@suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=anne@vmware.com \
    --cc=arai@vmware.com \
    --cc=chrisl@vmware.com \
    --cc=chrisw@osdl.org \
    --cc=dhecht@vmware.com \
    --cc=jbeulich@novell.com \
    --cc=jlo@vmware.com \
    --cc=jreddy@vmware.com \
    --cc=jtl@ira.uka.de \
    --cc=kmacy@fsmware.com \
    --cc=ksrinivasan@novell.com \
    --cc=leendert@watson.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pratap@vmware.com \
    --cc=riel@redhat.com \
    --cc=torvalds@osdl.org \
    --cc=virtualization@lists.osdl.org \
    --cc=wim.coekaerts@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=zach@vmware.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