“aec809fc63f61a85e4300bb70081fbe6b492171c”上不存在“drivers/i2c/i2c-core-base.c”
提交 085aba2d 编写于 作者: N Namhyung Kim 提交者: Zheng Zengkai

perf symbol: Remove arch__symbols__fixup_end()

stable inclusion
from stable-v5.10.114
commit 2d74f61787e6ddb0b5423feb916712f7a290e04d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5IY1V

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2d74f61787e6ddb0b5423feb916712f7a290e04d

--------------------------------

commit a5d20d42 upstream.

Now the generic code can handle kallsyms fixup properly so no need to
keep the arch-functions anymore.

Fixes: 3cf6a32f ("perf symbols: Fix symbol size calculation condition")
Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
Acked-by: NIan Rogers <irogers@google.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.garry@huawei.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: Will Deacon <will@kernel.org>
Cc: linux-s390@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20220416004048.1514900-4-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 e650bea0
perf-y += header.o perf-y += header.o
perf-y += machine.o
perf-y += perf_regs.o perf-y += perf_regs.o
perf-y += tsc.o perf-y += tsc.o
perf-y += kvm-stat.o perf-y += kvm-stat.o
......
// SPDX-License-Identifier: GPL-2.0
#include <stdio.h>
#include <string.h>
#include "debug.h"
#include "symbol.h"
/* On arm64, kernel text segment start at high memory address,
* for example 0xffff 0000 8xxx xxxx. Modules start at a low memory
* address, like 0xffff 0000 00ax xxxx. When only samll amount of
* memory is used by modules, gap between end of module's text segment
* and start of kernel text segment may be reach 2G.
* Therefore do not fill this gap and do not assign it to the kernel dso map.
*/
#define SYMBOL_LIMIT (1 << 12) /* 4K */
void arch__symbols__fixup_end(struct symbol *p, struct symbol *c)
{
if ((strchr(p->name, '[') && strchr(c->name, '[') == NULL) ||
(strchr(p->name, '[') == NULL && strchr(c->name, '[')))
/* Limit range of last symbol in module and kernel */
p->end += SYMBOL_LIMIT;
else
p->end = c->start;
pr_debug4("%s sym:%s end:%#lx\n", __func__, p->name, p->end);
}
...@@ -34,19 +34,3 @@ int arch__fix_module_text_start(u64 *start, u64 *size, const char *name) ...@@ -34,19 +34,3 @@ int arch__fix_module_text_start(u64 *start, u64 *size, const char *name)
return 0; return 0;
} }
/* On s390 kernel text segment start is located at very low memory addresses,
* for example 0x10000. Modules are located at very high memory addresses,
* for example 0x3ff xxxx xxxx. The gap between end of kernel text segment
* and beginning of first module's text segment is very big.
* Therefore do not fill this gap and do not assign it to the kernel dso map.
*/
void arch__symbols__fixup_end(struct symbol *p, struct symbol *c)
{
if (strchr(p->name, '[') == NULL && strchr(c->name, '['))
/* Last kernel symbol mapped to end of page */
p->end = roundup(p->end, page_size);
else
p->end = c->start;
pr_debug4("%s sym:%s end:%#lx\n", __func__, p->name, p->end);
}
...@@ -101,11 +101,6 @@ static int prefix_underscores_count(const char *str) ...@@ -101,11 +101,6 @@ static int prefix_underscores_count(const char *str)
return tail - str; return tail - str;
} }
void __weak arch__symbols__fixup_end(struct symbol *p, struct symbol *c)
{
p->end = c->start;
}
const char * __weak arch__normalize_symbol_name(const char *name) const char * __weak arch__normalize_symbol_name(const char *name)
{ {
return name; return name;
......
...@@ -230,7 +230,6 @@ const char *arch__normalize_symbol_name(const char *name); ...@@ -230,7 +230,6 @@ const char *arch__normalize_symbol_name(const char *name);
#define SYMBOL_A 0 #define SYMBOL_A 0
#define SYMBOL_B 1 #define SYMBOL_B 1
void arch__symbols__fixup_end(struct symbol *p, struct symbol *c);
int arch__compare_symbol_names(const char *namea, const char *nameb); int arch__compare_symbol_names(const char *namea, const char *nameb);
int arch__compare_symbol_names_n(const char *namea, const char *nameb, int arch__compare_symbol_names_n(const char *namea, const char *nameb,
unsigned int n); unsigned int n);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册