|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH RFC 4/8] sparc/jump_label: add arch_jump_label_transf
To: |
Steven Rostedt <rostedt@xxxxxxxxxxx> |
Subject: |
[Xen-devel] [PATCH RFC 4/8] sparc/jump_label: add arch_jump_label_transform_early() |
From: |
Jeremy Fitzhardinge <jeremy@xxxxxxxx> |
Date: |
Thu, 29 Sep 2011 16:26:34 -0700 |
Cc: |
Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jan Glauber <jang@xxxxxxxxxxxxxxxxxx>, Jason Baron <jbaron@xxxxxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, David Daney <david.daney@xxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Michael Ellerman <michael@xxxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx> |
Delivery-date: |
Thu, 29 Sep 2011 16:36:07 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<cover.1317338254.git.jeremy.fitzhardinge@xxxxxxxxxx> |
In-reply-to: |
<cover.1317338254.git.jeremy.fitzhardinge@xxxxxxxxxx> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<cover.1317338254.git.jeremy.fitzhardinge@xxxxxxxxxx> |
References: |
<cover.1317338254.git.jeremy.fitzhardinge@xxxxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
From: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
This allows jump-label entries to be modified early, in a pre-SMP
environment.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
Cc: David S. Miller <davem@xxxxxxxxxxxxx>
---
arch/sparc/kernel/jump_label.c | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/arch/sparc/kernel/jump_label.c b/arch/sparc/kernel/jump_label.c
index ea2dafc..d3dad25 100644
--- a/arch/sparc/kernel/jump_label.c
+++ b/arch/sparc/kernel/jump_label.c
@@ -8,8 +8,8 @@
#ifdef HAVE_JUMP_LABEL
-void arch_jump_label_transform(struct jump_entry *entry,
- enum jump_label_type type)
+static void __jump_label_transform(struct jump_entry *entry,
+ enum jump_label_type type)
{
u32 val;
u32 *insn = (u32 *) (unsigned long) entry->code;
@@ -28,20 +28,26 @@ void arch_jump_label_transform(struct jump_entry *entry,
val = 0x01000000;
}
- get_online_cpus();
- mutex_lock(&text_mutex);
*insn = val;
flushi(insn);
+}
+
+void arch_jump_label_transform(struct jump_entry *entry,
+ enum jump_label_type type)
+{
+ get_online_cpus();
+ mutex_lock(&text_mutex);
+
+ __jump_label_transform(entry, type);
+
mutex_unlock(&text_mutex);
put_online_cpus();
}
-void arch_jump_label_text_poke_early(jump_label_t addr)
+void __init arch_jump_label_transform_early(struct jump_entry *entry,
+ enum jump_label_type type)
{
- u32 *insn_p = (u32 *) (unsigned long) addr;
-
- *insn_p = 0x01000000;
- flushi(insn_p);
+ __jump_label_transform(entry, type);
}
#endif
--
1.7.6.2
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH RFC 0/8] jump-label: allow early jump_label_enable(), Jeremy Fitzhardinge
- [Xen-devel] [PATCH RFC 1/8] jump_label: use proper atomic_t initializer, Jeremy Fitzhardinge
- [Xen-devel] [PATCH RFC 3/8] x86/jump_label: add arch_jump_label_transform_early(), Jeremy Fitzhardinge
- [Xen-devel] [PATCH RFC 5/8] mips/jump_label: add arch_jump_label_transform_early(), Jeremy Fitzhardinge
- [Xen-devel] [PATCH RFC 6/8] powerpc/jump_label: add arch_jump_label_transform_early(), Jeremy Fitzhardinge
- [Xen-devel] [PATCH RFC 7/8] s390/jump-label: add arch_jump_label_transform_early(), Jeremy Fitzhardinge
- [Xen-devel] [PATCH RFC 2/8] jump_label: if a key has already been initialized, don't nop it out, Jeremy Fitzhardinge
- [Xen-devel] [PATCH RFC 8/8] jump_label: drop default arch_jump_label_transform_early, Jeremy Fitzhardinge
- [Xen-devel] [PATCH RFC 4/8] sparc/jump_label: add arch_jump_label_transform_early(),
Jeremy Fitzhardinge <=
- [Xen-devel] Re: [PATCH RFC 0/8] jump-label: allow early jump_label_enable(), Steven Rostedt
|
|
|
|
|