public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: Russell King <rmk@arm.linux.org.uk>,
	ralf@linux-mips.org, Andrew Morton <akpm@osdl.org>,
	Andi Kleen <ak@suse.de>
Cc: linux-arch@vger.kernel.org
Subject: Re: Fw: [PATCH] abstract type/size specification for assembly
Date: Wed, 08 Feb 2006 17:11:30 +0100	[thread overview]
Message-ID: <43EA2641.76F0.0078.0@novell.com> (raw)
In-Reply-To: <20060201083243.GB24893@flint.arm.linux.org.uk>

[-- Attachment #1: Type: text/plain, Size: 798 bytes --]

Attached an updated patch.

>>> Russell King <rmk@arm.linux.org.uk> 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

[-- Attachment #2: linux-2.6.16-rc2-end-endproc.patch --]
[-- Type: text/plain, Size: 2507 bytes --]

From: Jan Beulich <jbeulich@novell.com>

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 <jbeulich@novell.com>

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
 

  parent reply	other threads:[~2006-02-08 16:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-31 22:31 Fw: [PATCH] abstract type/size specification for assembly Andrew Morton
2006-02-01  7:36 ` Andi Kleen
2006-02-01  8:32   ` Russell King
2006-02-01  8:49     ` Andi Kleen
2006-02-01  9:09       ` Russell King
2006-02-01 11:40     ` Jan Beulich
2006-02-08 16:11     ` Jan Beulich [this message]
2006-02-01 13:50 ` Ralf Baechle

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=43EA2641.76F0.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=rmk@arm.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox