Merge 4.9-rc3 into staging-next
This resolves a merge issue with drivers/staging/iio/accel/sca3000_core.c and we want the fixes all in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -194,6 +194,8 @@
|
||||
#define X86_FEATURE_PROC_FEEDBACK ( 7*32+ 9) /* AMD ProcFeedbackInterface */
|
||||
|
||||
#define X86_FEATURE_INTEL_PT ( 7*32+15) /* Intel Processor Trace */
|
||||
#define X86_FEATURE_AVX512_4VNNIW (7*32+16) /* AVX-512 Neural Network Instructions */
|
||||
#define X86_FEATURE_AVX512_4FMAPS (7*32+17) /* AVX-512 Multiply Accumulation Single precision */
|
||||
|
||||
/* Virtualization flags: Linux defined, word 8 */
|
||||
#define X86_FEATURE_TPR_SHADOW ( 8*32+ 0) /* Intel TPR Shadow */
|
||||
|
||||
@@ -98,6 +98,15 @@ int arch_decode_instruction(struct elf *elf, struct section *sec,
|
||||
*type = INSN_FP_SETUP;
|
||||
break;
|
||||
|
||||
case 0x8d:
|
||||
if (insn.rex_prefix.bytes &&
|
||||
insn.rex_prefix.bytes[0] == 0x48 &&
|
||||
insn.modrm.nbytes && insn.modrm.bytes[0] == 0x2c &&
|
||||
insn.sib.nbytes && insn.sib.bytes[0] == 0x24)
|
||||
/* lea %(rsp), %rbp */
|
||||
*type = INSN_FP_SETUP;
|
||||
break;
|
||||
|
||||
case 0x90:
|
||||
*type = INSN_NOP;
|
||||
break;
|
||||
|
||||
@@ -97,6 +97,19 @@ static struct instruction *next_insn_same_sec(struct objtool_file *file,
|
||||
return next;
|
||||
}
|
||||
|
||||
static bool gcov_enabled(struct objtool_file *file)
|
||||
{
|
||||
struct section *sec;
|
||||
struct symbol *sym;
|
||||
|
||||
list_for_each_entry(sec, &file->elf->sections, list)
|
||||
list_for_each_entry(sym, &sec->symbol_list, list)
|
||||
if (!strncmp(sym->name, "__gcov_.", 8))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#define for_each_insn(file, insn) \
|
||||
list_for_each_entry(insn, &file->insn_list, list)
|
||||
|
||||
@@ -713,6 +726,7 @@ static struct rela *find_switch_table(struct objtool_file *file,
|
||||
struct instruction *insn)
|
||||
{
|
||||
struct rela *text_rela, *rodata_rela;
|
||||
struct instruction *orig_insn = insn;
|
||||
|
||||
text_rela = find_rela_by_dest_range(insn->sec, insn->offset, insn->len);
|
||||
if (text_rela && text_rela->sym == file->rodata->sym) {
|
||||
@@ -733,10 +747,16 @@ static struct rela *find_switch_table(struct objtool_file *file,
|
||||
|
||||
/* case 3 */
|
||||
func_for_each_insn_continue_reverse(file, func, insn) {
|
||||
if (insn->type == INSN_JUMP_UNCONDITIONAL ||
|
||||
insn->type == INSN_JUMP_DYNAMIC)
|
||||
if (insn->type == INSN_JUMP_DYNAMIC)
|
||||
break;
|
||||
|
||||
/* allow small jumps within the range */
|
||||
if (insn->type == INSN_JUMP_UNCONDITIONAL &&
|
||||
insn->jump_dest &&
|
||||
(insn->jump_dest->offset <= insn->offset ||
|
||||
insn->jump_dest->offset > orig_insn->offset))
|
||||
break;
|
||||
|
||||
text_rela = find_rela_by_dest_range(insn->sec, insn->offset,
|
||||
insn->len);
|
||||
if (text_rela && text_rela->sym == file->rodata->sym)
|
||||
@@ -1034,34 +1054,6 @@ static int validate_branch(struct objtool_file *file,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool is_gcov_insn(struct instruction *insn)
|
||||
{
|
||||
struct rela *rela;
|
||||
struct section *sec;
|
||||
struct symbol *sym;
|
||||
unsigned long offset;
|
||||
|
||||
rela = find_rela_by_dest_range(insn->sec, insn->offset, insn->len);
|
||||
if (!rela)
|
||||
return false;
|
||||
|
||||
if (rela->sym->type != STT_SECTION)
|
||||
return false;
|
||||
|
||||
sec = rela->sym->sec;
|
||||
offset = rela->addend + insn->offset + insn->len - rela->offset;
|
||||
|
||||
list_for_each_entry(sym, &sec->symbol_list, list) {
|
||||
if (sym->type != STT_OBJECT)
|
||||
continue;
|
||||
|
||||
if (offset >= sym->offset && offset < sym->offset + sym->len)
|
||||
return (!memcmp(sym->name, "__gcov0.", 8));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool is_kasan_insn(struct instruction *insn)
|
||||
{
|
||||
return (insn->type == INSN_CALL &&
|
||||
@@ -1083,9 +1075,6 @@ static bool ignore_unreachable_insn(struct symbol *func,
|
||||
if (insn->type == INSN_NOP)
|
||||
return true;
|
||||
|
||||
if (is_gcov_insn(insn))
|
||||
return true;
|
||||
|
||||
/*
|
||||
* Check if this (or a subsequent) instruction is related to
|
||||
* CONFIG_UBSAN or CONFIG_KASAN.
|
||||
@@ -1146,6 +1135,19 @@ static int validate_functions(struct objtool_file *file)
|
||||
ignore_unreachable_insn(func, insn))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* gcov produces a lot of unreachable
|
||||
* instructions. If we get an unreachable
|
||||
* warning and the file has gcov enabled, just
|
||||
* ignore it, and all other such warnings for
|
||||
* the file.
|
||||
*/
|
||||
if (!file->ignore_unreachables &&
|
||||
gcov_enabled(file)) {
|
||||
file->ignore_unreachables = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
WARN_FUNC("function has unreachable instruction", insn->sec, insn->offset);
|
||||
warnings++;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ SOLIBEXT=so
|
||||
# The following works at least on fedora 23, you may need the next
|
||||
# line for other distros.
|
||||
ifneq (,$(wildcard /usr/sbin/update-java-alternatives))
|
||||
JDIR=$(shell /usr/sbin/update-java-alternatives -l | head -1 | cut -d ' ' -f 3)
|
||||
JDIR=$(shell /usr/sbin/update-java-alternatives -l | head -1 | awk '{print $$3}')
|
||||
else
|
||||
ifneq (,$(wildcard /usr/sbin/alternatives))
|
||||
JDIR=$(shell alternatives --display java | tail -1 | cut -d' ' -f 5 | sed 's%/jre/bin/java.%%g')
|
||||
|
||||
@@ -601,7 +601,8 @@ int hist_browser__run(struct hist_browser *browser, const char *help)
|
||||
u64 nr_entries;
|
||||
hbt->timer(hbt->arg);
|
||||
|
||||
if (hist_browser__has_filter(browser))
|
||||
if (hist_browser__has_filter(browser) ||
|
||||
symbol_conf.report_hierarchy)
|
||||
hist_browser__update_nr_entries(browser);
|
||||
|
||||
nr_entries = hist_browser__nr_entries(browser);
|
||||
|
||||
@@ -1895,7 +1895,6 @@ static int process_numa_topology(struct perf_file_section *section __maybe_unuse
|
||||
if (ph->needs_swap)
|
||||
nr = bswap_32(nr);
|
||||
|
||||
ph->env.nr_numa_nodes = nr;
|
||||
nodes = zalloc(sizeof(*nodes) * nr);
|
||||
if (!nodes)
|
||||
return -ENOMEM;
|
||||
@@ -1932,6 +1931,7 @@ static int process_numa_topology(struct perf_file_section *section __maybe_unuse
|
||||
|
||||
free(str);
|
||||
}
|
||||
ph->env.nr_numa_nodes = nr;
|
||||
ph->env.numa_nodes = nodes;
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -136,8 +136,8 @@ do { \
|
||||
group [^,{}/]*[{][^}]*[}][^,{}/]*
|
||||
event_pmu [^,{}/]+[/][^/]*[/][^,{}/]*
|
||||
event [^,{}/]+
|
||||
bpf_object .*\.(o|bpf)
|
||||
bpf_source .*\.c
|
||||
bpf_object [^,{}]+\.(o|bpf)
|
||||
bpf_source [^,{}]+\.c
|
||||
|
||||
num_dec [0-9]+
|
||||
num_hex 0x[a-fA-F0-9]+
|
||||
|
||||
Reference in New Issue
Block a user