All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Kyle McMartin <kyle@mcmartin.ca>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com
Subject: Re: [PATCH] x86: merge asm-x86/alternative.h
Date: Fri, 18 Jan 2008 00:02:05 -0500	[thread overview]
Message-ID: <479032CD.9040306@zytor.com> (raw)
In-Reply-To: <20080118050336.GC974@phobos.i.cabal.ca>

Kyle McMartin wrote:
> Straightforward merge. Kind of a pity that gas doesn't really have the
> concept of a "long" (long is 4-bytes for some reason.) Nor is it able to
> pad to a non-power of two boundary (for struct alignment) to get rid
> of the struct alt_instr padding.
> 
> Build tested on i386, i386 with lguest & xen paravirt enabled, and
> x86_64. Boot tested on x86_64.
> 
> 
> diff --git a/include/asm-x86/alternative.h b/include/asm-x86/alternative.h
> index 9eef6a3..7047a0f 100644
> --- a/include/asm-x86/alternative.h
> +++ b/include/asm-x86/alternative.h
> @@ -1,5 +1,168 @@
> -#ifdef CONFIG_X86_32
> -# include "alternative_32.h"
> +#ifndef _X86_ALTERNATIVE_H
> +#define _X86_ALTERNATIVE_H
> +
> +#ifdef __KERNEL__
> +
> +#include <linux/types.h>
> +#include <linux/stddef.h>
> +
> +#ifdef CONFIG_X86_64
> +# define ALT_ASMPTR	".quad"
> +# define ALT_ALIGN	"8"
> +# define ALT_INSTR_PAD	5
>  #else
> -# include "alternative_64.h"
> +# define ALT_ASMPTR	".long"
> +# define ALT_ALIGN	"4"
> +# define ALT_INSTR_PAD	1
>  #endif

Please use existing macros from <asm/asm.h> (in the x86 tree.)

	-hpa

  reply	other threads:[~2008-01-18  5:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-18  5:03 [PATCH] x86: merge asm-x86/alternative.h Kyle McMartin
2008-01-18  5:02 ` H. Peter Anvin [this message]
2008-01-18  5:14   ` Kyle McMartin

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=479032CD.9040306@zytor.com \
    --to=hpa@zytor.com \
    --cc=kyle@mcmartin.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.