[PATCH] Fix compile breakage caused by asmlinkage_protect

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>
Cc: Jakub Jelinek <jakub@...>, Dave Jones <davej@...>, <drepper@...>, <mingo@...>, <tglx@...>, <linux-kernel@...>, Roland McGrath <roland@...>, Martin Schwidefsky <schwidefsky@...>
Date: Friday, April 11, 2008 - 7:46 am

From: Heiko Carstens <heiko.carstens@de.ibm.com>

git commit 54a015104136974262afa4b8ddd943ea70dec8a2
"asmlinkage_protect replaces prevent_tail_call" causes this build failure
on s390:

  AS      arch/s390/kernel/entry64.o
In file included from arch/s390/kernel/entry64.S:14:
include/linux/linkage.h:34: error: syntax error in macro parameter list
make[1]: *** [arch/s390/kernel/entry64.o] Error 1
make: *** [arch/s390/kernel] Error 2

So just surround the new define with an #ifndef __ASSEMBLY__ to prevent
any side effects on asm code.

Cc: Roland McGrath <roland@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 include/linux/linkage.h |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-2.6/include/linux/linkage.h
===================================================================
--- linux-2.6.orig/include/linux/linkage.h
+++ linux-2.6/include/linux/linkage.h
@@ -30,9 +30,11 @@
  * protection to work (ie no more work that the compiler might
  * end up needing stack temporaries for).
  */
+#ifndef __ASSEMBLY__
 #ifndef asmlinkage_protect
 # define asmlinkage_protect(n, ret, args...)	do { } while (0)
 #endif
+#endif
 
 #ifndef __ALIGN
 #define __ALIGN		.align 4,0x90
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] asmlinkage_protect replaces prevent_tail_call, Roland McGrath, (Thu Apr 10, 6:37 pm)
[PATCH] Fix compile breakage caused by asmlinkage_protect, Heiko Carstens, (Fri Apr 11, 7:46 am)
Re: [PATCH] Fix compile breakage caused by asmlinkage_protect, Martin Schwidefsky, (Fri Apr 11, 12:03 pm)