All of lore.kernel.org
 help / color / mirror / Atom feed
From: "tip-bot for H. Peter Anvin" <hpa@linux.intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	castet.matthieu@free.fr, tglx@linutronix.de,
	sfr@canb.auug.org.au, hpa@linux.intel.com, rjw@sisk.pl
Subject: [tip:x86/trampoline] x86: Make the GDT_ENTRY() macro in <asm/segment.h> safe for assembly
Date: Fri, 18 Feb 2011 05:19:52 GMT	[thread overview]
Message-ID: <tip-014eea518af3d141e276664cf40ef3da899eba35@git.kernel.org> (raw)
In-Reply-To: <4D5DFBE4.7090104@intel.com>

Commit-ID:  014eea518af3d141e276664cf40ef3da899eba35
Gitweb:     http://git.kernel.org/tip/014eea518af3d141e276664cf40ef3da899eba35
Author:     H. Peter Anvin <hpa@linux.intel.com>
AuthorDate: Mon, 14 Feb 2011 18:33:55 -0800
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Thu, 17 Feb 2011 21:05:13 -0800

x86: Make the GDT_ENTRY() macro in <asm/segment.h> safe for assembly

Make the GDT_ENTRY() macro in  <asm/segment.h> safe for use in
assembly code by guarding the ULL suffixes with _AC() macros.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
LKML-Reference: <4D5DFBE4.7090104@intel.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Matthieu Castet <castet.matthieu@free.fr>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/x86/include/asm/segment.h |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h
index 231f1c1..cd84f72 100644
--- a/arch/x86/include/asm/segment.h
+++ b/arch/x86/include/asm/segment.h
@@ -1,14 +1,16 @@
 #ifndef _ASM_X86_SEGMENT_H
 #define _ASM_X86_SEGMENT_H
 
+#include <linux/const.h>
+
 /* Constructor for a conventional segment GDT (or LDT) entry */
 /* This is a macro so it can be used in initializers */
 #define GDT_ENTRY(flags, base, limit)			\
-	((((base)  & 0xff000000ULL) << (56-24)) |	\
-	 (((flags) & 0x0000f0ffULL) << 40) |		\
-	 (((limit) & 0x000f0000ULL) << (48-16)) |	\
-	 (((base)  & 0x00ffffffULL) << 16) |		\
-	 (((limit) & 0x0000ffffULL)))
+	((((base)  & _AC(0xff000000,ULL)) << (56-24)) |	\
+	 (((flags) & _AC(0x0000f0ff,ULL)) << 40) |	\
+	 (((limit) & _AC(0x000f0000,ULL)) << (48-16)) |	\
+	 (((base)  & _AC(0x00ffffff,ULL)) << 16) |	\
+	 (((limit) & _AC(0x0000ffff,ULL))))
 
 /* Simple and small GDT entries for booting only */
 

  parent reply	other threads:[~2011-02-18  5:20 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-18  4:56 [RFC] x86: Unify allocation of low memory trampolines H. Peter Anvin
2011-02-18  5:19 ` [tip:x86/trampoline] x86, trampoline: Common infrastructure for " tip-bot for H. Peter Anvin
2011-02-18 12:16   ` Brian Gerst
2011-02-19  1:25     ` [tip:x86/trampoline] x86-64, trampoline: Remove unused variable tip-bot for H. Peter Anvin
2011-08-23 19:05   ` [tip:x86/trampoline] x86, trampoline: Common infrastructure for low memory trampolines Tony Luck
2011-08-23 19:12     ` H. Peter Anvin
2011-08-23 20:26       ` [PATCH] x86: remove some noise from boot log when starting cpus Luck, Tony
2012-02-20 16:08         ` Borislav Petkov
2012-02-22 10:33           ` Ingo Molnar
2012-02-22 10:57             ` Borislav Petkov
2012-02-22 11:29               ` Ingo Molnar
2012-02-22 18:06                 ` [PATCH/resubmit] x86: Remove " Luck, Tony
2012-02-22 18:25                   ` [tip:x86/cpu] " tip-bot for Luck, Tony
2012-02-22 20:34                   ` [tip:x86/debug] x86/debug: Remove ancient debugging " tip-bot for Luck, Tony
2011-02-18  5:19 ` [tip:x86/trampoline] x86, trampoline: Use the unified trampoline setup for ACPI wakeup tip-bot for H. Peter Anvin
2011-03-09 22:41   ` matthieu castet
2011-03-10  0:07     ` Rafael J. Wysocki
2011-02-18  5:19 ` tip-bot for H. Peter Anvin [this message]
2011-02-18  5:20 ` [tip:x86/trampoline] x86, reboot: Move the real-mode reboot code to an assembly file tip-bot for H. Peter Anvin
2011-02-18 12:31   ` Brian Gerst
2011-02-18 17:42     ` H. Peter Anvin
2011-02-19  1:25     ` [tip:x86/trampoline] x86, reboot: Fix the use of passed arguments in 32-bit BIOS reboot tip-bot for H. Peter Anvin
2011-04-29 15:16   ` [tip:x86/trampoline] x86, reboot: Move the real-mode reboot code to an assembly file Alexey Zaytsev
2011-04-29 16:09     ` H. Peter Anvin

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=tip-014eea518af3d141e276664cf40ef3da899eba35@git.kernel.org \
    --to=hpa@linux.intel.com \
    --cc=castet.matthieu@free.fr \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rjw@sisk.pl \
    --cc=sfr@canb.auug.org.au \
    --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.