forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/li…
…nux/kernel/git/tip/linux-2.6-tip * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (107 commits) perf stat: Add more cache-miss percentage printouts perf stat: Add -d -d and -d -d -d options to show more CPU events ftrace/kbuild: Add recordmcount files to force full build ftrace: Add self-tests for multiple function trace users ftrace: Modify ftrace_set_filter/notrace to take ops ftrace: Allow dynamically allocated function tracers ftrace: Implement separate user function filtering ftrace: Free hash with call_rcu_sched() ftrace: Have global_ops store the functions that are to be traced ftrace: Add ops parameter to ftrace_startup/shutdown functions ftrace: Add enabled_functions file ftrace: Use counters to enable functions to trace ftrace: Separate hash allocation and assignment ftrace: Create a global_ops to hold the filter and notrace hashes ftrace: Use hash instead for FTRACE_FL_FILTER ftrace: Replace FTRACE_FL_NOTRACE flag with a hash of ignored functions perf bench, x86: Add alternatives-asm.h wrapper x86, 64-bit: Fix copy_[to/from]_user() checks for the userspace address limit x86, mem: memset_64.S: Optimize memset by enhanced REP MOVSB/STOSB x86, mem: memmove_64.S: Optimize memmove by enhanced REP MOVSB/STOSB ...
- Loading branch information
Showing
78 changed files
with
4,024 additions
and
1,711 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
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_S390_JUMP_LABEL_H | ||
#define _ASM_S390_JUMP_LABEL_H | ||
|
||
#include <linux/types.h> | ||
|
||
#define JUMP_LABEL_NOP_SIZE 6 | ||
|
||
#ifdef CONFIG_64BIT | ||
#define ASM_PTR ".quad" | ||
#define ASM_ALIGN ".balign 8" | ||
#else | ||
#define ASM_PTR ".long" | ||
#define ASM_ALIGN ".balign 4" | ||
#endif | ||
|
||
static __always_inline bool arch_static_branch(struct jump_label_key *key) | ||
{ | ||
asm goto("0: brcl 0,0\n" | ||
".pushsection __jump_table, \"aw\"\n" | ||
ASM_ALIGN "\n" | ||
ASM_PTR " 0b, %l[label], %0\n" | ||
".popsection\n" | ||
: : "X" (key) : : label); | ||
return false; | ||
label: | ||
return true; | ||
} | ||
|
||
typedef unsigned long 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,59 @@ | ||
/* | ||
* Jump label s390 support | ||
* | ||
* Copyright IBM Corp. 2011 | ||
* Author(s): Jan Glauber <[email protected]> | ||
*/ | ||
#include <linux/module.h> | ||
#include <linux/uaccess.h> | ||
#include <linux/stop_machine.h> | ||
#include <linux/jump_label.h> | ||
#include <asm/ipl.h> | ||
|
||
#ifdef HAVE_JUMP_LABEL | ||
|
||
struct insn { | ||
u16 opcode; | ||
s32 offset; | ||
} __packed; | ||
|
||
struct insn_args { | ||
unsigned long *target; | ||
struct insn *insn; | ||
ssize_t size; | ||
}; | ||
|
||
static int __arch_jump_label_transform(void *data) | ||
{ | ||
struct insn_args *args = data; | ||
int rc; | ||
|
||
rc = probe_kernel_write(args->target, args->insn, args->size); | ||
WARN_ON_ONCE(rc < 0); | ||
return 0; | ||
} | ||
|
||
void arch_jump_label_transform(struct jump_entry *entry, | ||
enum jump_label_type type) | ||
{ | ||
struct insn_args args; | ||
struct insn insn; | ||
|
||
if (type == JUMP_LABEL_ENABLE) { | ||
/* brcl 15,offset */ | ||
insn.opcode = 0xc0f4; | ||
insn.offset = (entry->target - entry->code) >> 1; | ||
} else { | ||
/* brcl 0,0 */ | ||
insn.opcode = 0xc004; | ||
insn.offset = 0; | ||
} | ||
|
||
args.target = (void *) entry->code; | ||
args.insn = &insn; | ||
args.size = JUMP_LABEL_NOP_SIZE; | ||
|
||
stop_machine(__arch_jump_label_transform, &args, NULL); | ||
} | ||
|
||
#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
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
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
Oops, something went wrong.