All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org, ralf@linux-mips.org,
	linux-kernel@vger.kernel.org, rostedt@goodmis.org,
	jbaron@redhat.com
Cc: David Daney <ddaney@caviumnetworks.com>,
	David Miller <davem@davemloft.net>
Subject: [PATCH v2 1/2] jump label: Make arch_jump_label_text_poke_early() optional
Date: Mon,  4 Oct 2010 11:56:54 -0700	[thread overview]
Message-ID: <1286218615-24011-2-git-send-email-ddaney@caviumnetworks.com> (raw)
In-Reply-To: <1286218615-24011-1-git-send-email-ddaney@caviumnetworks.com>

For the forthcoming MIPS jump label support,
arch_jump_label_text_poke_early() is unneeded as the MIPS NOP
instruction is already optimal.

Supply a default implementation that does nothing.  Flag x86 and SPARC
as having arch_jump_label_text_poke_early().

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Jason Baron <jbaron@redhat.com>
Cc: David Miller <davem@davemloft.net>
---
 arch/sparc/include/asm/jump_label.h |    1 +
 arch/x86/include/asm/jump_label.h   |    1 +
 include/linux/jump_label.h          |    6 ++++++
 3 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/sparc/include/asm/jump_label.h b/arch/sparc/include/asm/jump_label.h
index 62e66d7..9aa82d7 100644
--- a/arch/sparc/include/asm/jump_label.h
+++ b/arch/sparc/include/asm/jump_label.h
@@ -6,6 +6,7 @@
 #include <linux/types.h>
 #include <asm/system.h>
 
+#define HAVE_ARCH_JUMP_LABEL_TEXT_POKE_EARLY
 #define JUMP_LABEL_NOP_SIZE 4
 
 #define JUMP_LABEL(key, label)					\
diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_label.h
index f52d42e..169cfd8 100644
--- a/arch/x86/include/asm/jump_label.h
+++ b/arch/x86/include/asm/jump_label.h
@@ -6,6 +6,7 @@
 #include <linux/types.h>
 #include <asm/nops.h>
 
+#define HAVE_ARCH_JUMP_LABEL_TEXT_POKE_EARLY
 #define JUMP_LABEL_NOP_SIZE 5
 
 # define JUMP_LABEL_INITIAL_NOP ".byte 0xe9 \n\t .long 0\n\t"
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
index b72cd9f..e98ad3a 100644
--- a/include/linux/jump_label.h
+++ b/include/linux/jump_label.h
@@ -20,7 +20,13 @@ extern struct jump_entry __stop___jump_table[];
 
 extern void arch_jump_label_transform(struct jump_entry *entry,
 				 enum jump_label_type type);
+
+#ifdef HAVE_ARCH_JUMP_LABEL_TEXT_POKE_EARLY
 extern void arch_jump_label_text_poke_early(jump_label_t addr);
+#else
+static inline void arch_jump_label_text_poke_early(jump_label_t addr) {}
+#endif
+
 extern void jump_label_update(unsigned long key, enum jump_label_type type);
 extern void jump_label_apply_nops(struct module *mod);
 extern int jump_label_text_reserved(void *start, void *end);
-- 
1.7.2.2


  reply	other threads:[~2010-10-04 18:57 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-04 18:56 [PATCH v2 0/2] jump label: Add MIPS architecture support David Daney
2010-10-04 18:56 ` David Daney [this message]
2010-10-04 18:56 ` [PATCH v2 2/2] jump label: Add MIPS support David Daney
2010-10-06 23:00   ` Ralf Baechle
2010-10-07  1:26     ` David Daney
2010-10-15 20:09 [PATCH 0/9] [GIT PULL] jump label: various updates Steven Rostedt
2010-10-15 20:09 ` [PATCH 1/9] jump label/x86: Move arch_init_ideal_nop5 later Steven Rostedt
2010-10-15 20:09 ` [PATCH 2/9] tracing/x86: No need to disable interrupts when calling arch_init_ideal_nop5 Steven Rostedt
2010-10-15 20:09 ` [PATCH 3/9] jump label: Fix module __init section race Steven Rostedt
2010-10-16  2:09   ` Steven Rostedt
2010-10-16  6:23     ` Ingo Molnar
2010-10-16 16:23       ` Steven Rostedt
2010-10-18 14:14         ` Jason Baron
2010-10-15 20:09 ` [PATCH 4/9] jump label: Fix deadlock b/w jump_label_mutex vs. text_mutex Steven Rostedt
2010-10-15 20:55   ` Peter Zijlstra
2010-10-16  2:16     ` Steven Rostedt
2010-10-16  2:25     ` Steven Rostedt
2010-10-16  4:21       ` Steven Rostedt
2010-10-15 20:09 ` [PATCH 5/9] jump label: Add register_jump_label_key/unregister_jump_label_key Steven Rostedt
2010-10-15 20:58   ` Peter Zijlstra
2010-10-16  2:11     ` Steven Rostedt
2010-10-15 21:03   ` Peter Zijlstra
2010-10-15 21:09     ` Steven Rostedt
2010-10-15 21:13       ` Peter Zijlstra
2010-10-18 12:05         ` Peter Zijlstra
2010-10-18 14:03           ` Jason Baron
2010-10-18 14:07             ` Peter Zijlstra
2010-10-15 20:09 ` [PATCH 6/9] jump label: Move jump table to r/w section Steven Rostedt
2010-10-15 20:09 ` [PATCH 7/9] jump label: Add docs Steven Rostedt
2010-10-15 20:09 ` [PATCH 8/9] jump label: Make arch_jump_label_text_poke_early() optional Steven Rostedt
2010-10-15 21:06   ` Peter Zijlstra
2010-10-15 21:08     ` Steven Rostedt
2010-10-15 21:22       ` David Daney
2010-10-15 21:35         ` Steven Rostedt
2010-10-15 21:38           ` David Daney
2010-10-16  1:08             ` Steven Rostedt
2010-10-30 10:40   ` [tip:perf/urgent] " tip-bot for Steven Rostedt
2010-10-15 20:09 ` [PATCH 9/9] jump label: Add MIPS support Steven Rostedt
2010-10-15 20:17 ` [PATCH 0/9] [GIT PULL] jump label: various updates Steven Rostedt
2010-10-16  1:10 ` Steven Rostedt

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=1286218615-24011-2-git-send-email-ddaney@caviumnetworks.com \
    --to=ddaney@caviumnetworks.com \
    --cc=davem@davemloft.net \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=rostedt@goodmis.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.