forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/ke…
…rnel/git/rostedt/linux-2.6-trace into perf/core
- Loading branch information
Showing
33 changed files
with
843 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#ifndef _ASM_SPARC_JUMP_LABEL_H | ||
#define _ASM_SPARC_JUMP_LABEL_H | ||
|
||
#ifdef __KERNEL__ | ||
|
||
#include <linux/types.h> | ||
#include <asm/system.h> | ||
|
||
#define JUMP_LABEL_NOP_SIZE 4 | ||
|
||
#define JUMP_LABEL(key, label) \ | ||
do { \ | ||
asm goto("1:\n\t" \ | ||
"nop\n\t" \ | ||
"nop\n\t" \ | ||
".pushsection __jump_table, \"a\"\n\t"\ | ||
".word 1b, %l[" #label "], %c0\n\t" \ | ||
".popsection \n\t" \ | ||
: : "i" (key) : : label);\ | ||
} while (0) | ||
|
||
#endif /* __KERNEL__ */ | ||
|
||
typedef u32 jump_label_t; | ||
|
||
struct jump_entry { | ||
jump_label_t code; | ||
jump_label_t target; | ||
jump_label_t key; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#include <linux/kernel.h> | ||
#include <linux/types.h> | ||
#include <linux/mutex.h> | ||
#include <linux/cpu.h> | ||
|
||
#include <linux/jump_label.h> | ||
#include <linux/memory.h> | ||
|
||
#ifdef HAVE_JUMP_LABEL | ||
|
||
void arch_jump_label_transform(struct jump_entry *entry, | ||
enum jump_label_type type) | ||
{ | ||
u32 val; | ||
u32 *insn = (u32 *) (unsigned long) entry->code; | ||
|
||
if (type == JUMP_LABEL_ENABLE) { | ||
s32 off = (s32)entry->target - (s32)entry->code; | ||
|
||
#ifdef CONFIG_SPARC64 | ||
/* ba,pt %xcc, . + (off << 2) */ | ||
val = 0x10680000 | ((u32) off >> 2); | ||
#else | ||
/* ba . + (off << 2) */ | ||
val = 0x10800000 | ((u32) off >> 2); | ||
#endif | ||
} else { | ||
val = 0x01000000; | ||
} | ||
|
||
get_online_cpus(); | ||
mutex_lock(&text_mutex); | ||
*insn = val; | ||
flushi(insn); | ||
mutex_unlock(&text_mutex); | ||
put_online_cpus(); | ||
} | ||
|
||
void arch_jump_label_text_poke_early(jump_label_t addr) | ||
{ | ||
u32 *insn_p = (u32 *) (unsigned long) addr; | ||
|
||
*insn_p = 0x01000000; | ||
flushi(insn_p); | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#ifndef _ASM_X86_JUMP_LABEL_H | ||
#define _ASM_X86_JUMP_LABEL_H | ||
|
||
#ifdef __KERNEL__ | ||
|
||
#include <linux/types.h> | ||
#include <asm/nops.h> | ||
|
||
#define JUMP_LABEL_NOP_SIZE 5 | ||
|
||
# define JUMP_LABEL_INITIAL_NOP ".byte 0xe9 \n\t .long 0\n\t" | ||
|
||
# define JUMP_LABEL(key, label) \ | ||
do { \ | ||
asm goto("1:" \ | ||
JUMP_LABEL_INITIAL_NOP \ | ||
".pushsection __jump_table, \"a\" \n\t"\ | ||
_ASM_PTR "1b, %l[" #label "], %c0 \n\t" \ | ||
".popsection \n\t" \ | ||
: : "i" (key) : : label); \ | ||
} while (0) | ||
|
||
#endif /* __KERNEL__ */ | ||
|
||
#ifdef CONFIG_X86_64 | ||
typedef u64 jump_label_t; | ||
#else | ||
typedef u32 jump_label_t; | ||
#endif | ||
|
||
struct jump_entry { | ||
jump_label_t code; | ||
jump_label_t target; | ||
jump_label_t key; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.