2011-03-03 10:55:35

by Jan Beulich

[permalink] [raw]
Subject: [PATCH] x86: work around old gas bug (try 2)

Add extra parentheses around a couple of definitions introduced by
"x86: Cleanup vector usage" and used in assembly macro arguments, and
remove spaces. Without that old (2.16.1) gas would see more macro
arguments than were actually specified.

Signed-off-by: Jan Beulich <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Shaohua Li <[email protected]>

---
arch/x86/include/asm/irq_vectors.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

--- tip-20110303.orig/arch/x86/include/asm/irq_vectors.h
+++ tip-20110303/arch/x86/include/asm/irq_vectors.h
@@ -126,14 +126,14 @@

/* up to 32 vectors used for spreading out TLB flushes: */
#if NR_CPUS <= 32
-# define NUM_INVALIDATE_TLB_VECTORS NR_CPUS
+# define NUM_INVALIDATE_TLB_VECTORS (NR_CPUS)
#else
-# define NUM_INVALIDATE_TLB_VECTORS 32
+# define NUM_INVALIDATE_TLB_VECTORS (32)
#endif

-#define INVALIDATE_TLB_VECTOR_END 0xee
+#define INVALIDATE_TLB_VECTOR_END (0xee)
#define INVALIDATE_TLB_VECTOR_START \
- (INVALIDATE_TLB_VECTOR_END - NUM_INVALIDATE_TLB_VECTORS + 1)
+ (INVALIDATE_TLB_VECTOR_END-NUM_INVALIDATE_TLB_VECTORS+1)

#define NR_VECTORS 256




2011-03-03 10:58:09

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH] x86: work around old gas bug (try 2)


* Jan Beulich <[email protected]> wrote:

> Add extra parentheses around a couple of definitions introduced by
> "x86: Cleanup vector usage" and used in assembly macro arguments, and
> remove spaces. Without that old (2.16.1) gas would see more macro
> arguments than were actually specified.
>
> Signed-off-by: Jan Beulich <[email protected]>
> Cc: Andrew Morton <[email protected]>
> Cc: Shaohua Li <[email protected]>

Wondering, have you managed to test this with 2.16, or should i wait for akpm's
testing before applying it?

Thanks,

Ingo

2011-03-03 11:24:33

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] x86: work around old gas bug (try 2)

On Thu, 3 Mar 2011 11:57:55 +0100 Ingo Molnar <[email protected]> wrote:

>
> * Jan Beulich <[email protected]> wrote:
>
> > Add extra parentheses around a couple of definitions introduced by
> > "x86: Cleanup vector usage" and used in assembly macro arguments, and
> > remove spaces. Without that old (2.16.1) gas would see more macro
> > arguments than were actually specified.
> >
> > Signed-off-by: Jan Beulich <[email protected]>
> > Cc: Andrew Morton <[email protected]>
> > Cc: Shaohua Li <[email protected]>
>
> Wondering, have you managed to test this with 2.16, or should i wait for akpm's
> testing before applying it?
>

arch/x86/kernel/entry_64.S compiles successfully with that patch.

2011-03-03 11:52:40

by Jan Beulich

[permalink] [raw]
Subject: [tip:x86/mm] x86: Work around old gas bug

Commit-ID: d04c579f971bf7d995db1ef7a7161c0143068859
Gitweb: http://git.kernel.org/tip/d04c579f971bf7d995db1ef7a7161c0143068859
Author: Jan Beulich <[email protected]>
AuthorDate: Thu, 3 Mar 2011 10:55:29 +0000
Committer: Ingo Molnar <[email protected]>
CommitDate: Thu, 3 Mar 2011 12:47:08 +0100

x86: Work around old gas bug

Add extra parentheses around a couple of definitions introduced
by "x86: Cleanup vector usage" and used in assembly macro
arguments, and remove spaces. Without that old (2.16.1) gas
would see more macro arguments than were actually specified.

Reported-and-tested-by: Andrew Morton <[email protected]>
Signed-off-by: Jan Beulich <[email protected]>
Cc: Shaohua Li <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/include/asm/irq_vectors.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h
index 4980f48..6e976ee 100644
--- a/arch/x86/include/asm/irq_vectors.h
+++ b/arch/x86/include/asm/irq_vectors.h
@@ -126,14 +126,14 @@

/* up to 32 vectors used for spreading out TLB flushes: */
#if NR_CPUS <= 32
-# define NUM_INVALIDATE_TLB_VECTORS NR_CPUS
+# define NUM_INVALIDATE_TLB_VECTORS (NR_CPUS)
#else
-# define NUM_INVALIDATE_TLB_VECTORS 32
+# define NUM_INVALIDATE_TLB_VECTORS (32)
#endif

-#define INVALIDATE_TLB_VECTOR_END 0xee
+#define INVALIDATE_TLB_VECTOR_END (0xee)
#define INVALIDATE_TLB_VECTOR_START \
- (INVALIDATE_TLB_VECTOR_END - NUM_INVALIDATE_TLB_VECTORS + 1)
+ (INVALIDATE_TLB_VECTOR_END-NUM_INVALIDATE_TLB_VECTORS+1)

#define NR_VECTORS 256