mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Ingo Molnar <mingo@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86: fix usage of .section .sched.text in assembler code
Date: Mon, 28 Jan 2008 19:52:36 +0100	[thread overview]
Message-ID: <20080128185236.GA2391@uranus.ravnborg.org> (raw)
In-Reply-To: <20080128101333.GB24010@elte.hu>

On Mon, Jan 28, 2008 at 11:13:34AM +0100, Ingo Molnar wrote:
> 
> > It would be better to have a definition we could use from assembler 
> > code but I did not find a suitable header file for it.
> 
> hm, include/asm-x86/linkage.h?
No - it is for general use so it should live in include/linux/*
Suggestion:

diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index ff203dd..4ac87bf 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -48,6 +48,15 @@
   END(name);		 \
   .popsection
 
+#define SCHED_ENTRY(name)				\
+	.pushsection .sched.text, "ax", %progbits;	\
+	ENTRY(name)
+
+#define SCHED_END(name)	\
+	END(name);	\
+	.popsection
+
+
 #ifndef END
 #define END(name) \
   .size name, .-name

Note - the use of '%' is due to '@' is a comment identifier on arm
and '%' seems to works across all arch's assemblers.

> 
> btw., i guess this in include/linux/linkage.h:
> 
> #ifndef __ALIGN
> #define __ALIGN         .align 4,0x90
> #define __ALIGN_STR     ".align 4,0x90"
> #endif
> 
> is an x86-ism (0x90 is the x86 NOP instruction) that should move into 
> include/asm-x86/linkge.h and the default filler should be 0x00 instead?
To specialized for my knowledge..

	Sam

      reply	other threads:[~2008-01-28 18:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-26 22:53 Sam Ravnborg
2008-01-28 10:13 ` Ingo Molnar
2008-01-28 18:52   ` Sam Ravnborg [this message]

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=20080128185236.GA2391@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome