Attached an updated patch.

>>> Russell King <[EMAIL PROTECTED]> 01.02.06 09:32:43 >>>
On Wed, Feb 01, 2006 at 08:36:09AM +0100, Andi Kleen wrote:
> On Tuesday 31 January 2006 23:31, Andrew Morton wrote:
> > 
> > OK?
> 
> Yes.

No.

> > +#define ENDPROC(name) \
> > +  .type name, @function; \
> > +  END(name)
> > +#define END(name) \
> > +  .size name, .-name

@ is the comment character on ARM, so this can't go here - we use

        .type name, %function

instead.  Interestingly, the info pages for as seem to indicate that
there's a number of alternatives - maybe the most benign one should
be used, iow:

        .type name, "function"

or alternatively make ENDPROC arch-overridable.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/ 
 maintainer of:  2.6 Serial core
From: Jan Beulich <[EMAIL PROTECTED]>

Updated patch, to provide abstraction for generating type and size information
of assembly routines and data, while permitting architectures to override
these defaults.

Signed-Off-By: Jan Beulich <[EMAIL PROTECTED]>

diff -Npru /home/jbeulich/tmp/linux-2.6.16-rc2/include/asm-ia64/linkage.h 
2.6.16-rc2-end-endproc/include/asm-ia64/linkage.h
--- /home/jbeulich/tmp/linux-2.6.16-rc2/include/asm-ia64/linkage.h      
2006-01-03 04:21:10.000000000 +0100
+++ 2.6.16-rc2-end-endproc/include/asm-ia64/linkage.h   2006-02-06 
12:00:44.000000000 +0100
@@ -1,6 +1,14 @@
 #ifndef __ASM_LINKAGE_H
 #define __ASM_LINKAGE_H
 
+#ifndef __ASSEMBLY__
+
 #define asmlinkage CPP_ASMLINKAGE __attribute__((syscall_linkage))
 
+#else
+
+#include <asm/asmmacro.h>
+
+#endif
+
 #endif
diff -Npru /home/jbeulich/tmp/linux-2.6.16-rc2/include/asm-mips/linkage.h 
2.6.16-rc2-end-endproc/include/asm-mips/linkage.h
--- /home/jbeulich/tmp/linux-2.6.16-rc2/include/asm-mips/linkage.h      
2006-01-03 04:21:10.000000000 +0100
+++ 2.6.16-rc2-end-endproc/include/asm-mips/linkage.h   2006-02-06 
12:01:44.000000000 +0100
@@ -1,6 +1,8 @@
 #ifndef __ASM_LINKAGE_H
 #define __ASM_LINKAGE_H
 
-/* Nothing to see here... */
+#ifdef __ASSEMBLY__
+#include <asm/asm.h>
+#endif
 
 #endif
diff -Npru /home/jbeulich/tmp/linux-2.6.16-rc2/include/asm-v850/linkage.h 
2.6.16-rc2-end-endproc/include/asm-v850/linkage.h
--- /home/jbeulich/tmp/linux-2.6.16-rc2/include/asm-v850/linkage.h      
2006-01-03 04:21:10.000000000 +0100
+++ 2.6.16-rc2-end-endproc/include/asm-v850/linkage.h   2006-02-06 
12:03:21.000000000 +0100
@@ -1,6 +1,8 @@
 #ifndef __ASM_LINKAGE_H
 #define __ASM_LINKAGE_H
 
-/* Nothing to see here... */
+#ifdef __ASSEMBLY__
+#include <asm/asm.h>
+#endif
 
 #endif
diff -Npru /home/jbeulich/tmp/linux-2.6.16-rc2/include/linux/linkage.h 
2.6.16-rc2-end-endproc/include/linux/linkage.h
--- /home/jbeulich/tmp/linux-2.6.16-rc2/include/linux/linkage.h 2006-01-03 
04:21:10.000000000 +0100
+++ 2.6.16-rc2-end-endproc/include/linux/linkage.h      2006-02-06 
12:04:32.000000000 +0100
@@ -28,17 +28,27 @@
 #define ALIGN __ALIGN
 #define ALIGN_STR __ALIGN_STR
 
+#ifndef ENTRY
 #define ENTRY(name) \
   .globl name; \
   ALIGN; \
   name:
+#endif
 
 #define KPROBE_ENTRY(name) \
   .section .kprobes.text, "ax"; \
-  .globl name; \
-  ALIGN; \
-  name:
+  ENTRY(name)
 
+#ifndef END
+#define END(name) \
+  .size name, .-name
+#endif
+
+#ifndef ENDPROC
+#define ENDPROC(name) \
+  .type name, @function; \
+  END(name)
+#endif
 
 #endif
 

Reply via email to