From 3234282f33b29d349bcada40204fc7c8fda7fe72 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 19 Oct 2010 14:52:26 +0100 Subject: x86, asm: Fix CFI macro invocations to deal with shortcomings in gas gas prior to (perhaps) 2.16.90 has problems with passing non- parenthesized expressions containing spaces to macros. Spaces, however, get inserted by cpp between any macro expanding to a number and a subsequent + or -. For the +, current x86 gas then removes the space again (future gas may not do so), but for the - the space gets retained and is then considered a separator between macro arguments. Fix the respective definitions for both the - and + cases, so that they neither contain spaces nor make cpp insert any (the latter by adding seemingly redundant parentheses). Signed-off-by: Jan Beulich LKML-Reference: <4CBDBEBA020000780001E05A@vpn.id2.novell.com> Cc: Alexander van Heukelum Signed-off-by: H. Peter Anvin --- Kbuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Kbuild') diff --git a/Kbuild b/Kbuild index e3737ad72b5..399593942a9 100644 --- a/Kbuild +++ b/Kbuild @@ -53,7 +53,7 @@ targets += arch/$(SRCARCH)/kernel/asm-offsets.s # Default sed regexp - multiline due to syntax constraints define sed-y "/^->/{s:->#\(.*\):/* \1 */:; \ - s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ + s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 (\2) /* \3 */:; \ s:->::; p;}" endef -- cgit v1.2.3 From a22dcdb0032c78c6b443f6897d7ac432a3b5a272 Mon Sep 17 00:00:00 2001 From: Alexander van Heukelum Date: Thu, 21 Oct 2010 23:30:49 +0200 Subject: x86, asm: Fix ancient-GAS workaround It turns out to generate something like this: printk ( ("<3>") "something"); The extra parentheses here break the UML compile. Change the sed-program to add the parentheses only for numbers. Reported-by: Ingo Molnar Signed-off-by: Alexander van Heukelum Acked-by: Jan Beulich LKML-Reference: <1287696649.20421.1401306095@webmail.messagingengine.com> Signed-off-by: Ingo Molnar --- Kbuild | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Kbuild') diff --git a/Kbuild b/Kbuild index 399593942a9..431f7ca2404 100644 --- a/Kbuild +++ b/Kbuild @@ -53,7 +53,8 @@ targets += arch/$(SRCARCH)/kernel/asm-offsets.s # Default sed regexp - multiline due to syntax constraints define sed-y "/^->/{s:->#\(.*\):/* \1 */:; \ - s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 (\2) /* \3 */:; \ + s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 (\2) /* \3 */:; \ + s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ s:->::; p;}" endef -- cgit v1.2.3 From 95a2f6f72d37762ba1b3d6c8031f66a6467a63df Mon Sep 17 00:00:00 2001 From: David Howells Date: Wed, 27 Oct 2010 17:28:32 +0100 Subject: Partially revert patch that encloses asm-offset.h numbers in brackets Partially revert patch: commit 3234282f33b29d349bcada40204fc7c8fda7fe72 Author: Jan Beulich Date: Tue Oct 19 14:52:26 2010 +0100 x86, asm: Fix CFI macro invocations to deal with shortcomings in gas This breaks MN10300 arch as this changes many instances of instructions similar to the following: MOV number,D0 which represents an immediate value load into: MOV (number),D0 which the assembler then interprets as a load from absolute address. arch/mn10300/kernel/entry.S:64: Error: Invalid opcode/operands arch/mn10300/kernel/entry.S:65: Error: junk at end of line, first unrecognized character is `0' arch/mn10300/kernel/entry.S:74: Error: Invalid opcode/operands arch/mn10300/kernel/entry.S:74: Error: junk at end of line, first unrecognized character is `1' arch/mn10300/kernel/entry.S:75: Error: Invalid opcode/operands arch/mn10300/kernel/entry.S:76: Error: junk at end of line, first unrecognized character is `0' cc: Jan Beulich cc: Alexander van Heukelum cc: H. Peter Anvin cc: Ingo Molnar Signed-off-by: David Howells --- Kbuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Kbuild') diff --git a/Kbuild b/Kbuild index 431f7ca2404..b00037ad7e0 100644 --- a/Kbuild +++ b/Kbuild @@ -53,7 +53,7 @@ targets += arch/$(SRCARCH)/kernel/asm-offsets.s # Default sed regexp - multiline due to syntax constraints define sed-y "/^->/{s:->#\(.*\):/* \1 */:; \ - s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 (\2) /* \3 */:; \ + s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \ s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ s:->::; p;}" endef -- cgit v1.2.3