mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 08:56:48 +07:00
csky: Add perf support for C-SKY
This adds basic perf support for all C-SKY CPUs. Hardware events are only supported by 807/810/860. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
This commit is contained in:
parent
6256734f91
commit
f50fd2d852
@ -35,6 +35,7 @@ config CSKY
|
||||
select HAVE_KERNEL_GZIP
|
||||
select HAVE_KERNEL_LZO
|
||||
select HAVE_KERNEL_LZMA
|
||||
select HAVE_PERF_EVENTS
|
||||
select HAVE_C_RECORDMCOUNT
|
||||
select HAVE_DMA_API_DEBUG
|
||||
select HAVE_DMA_CONTIGUOUS
|
||||
@ -43,7 +44,7 @@ config CSKY
|
||||
select OF
|
||||
select OF_EARLY_FLATTREE
|
||||
select OF_RESERVED_MEM
|
||||
select PERF_USE_VMALLOC
|
||||
select PERF_USE_VMALLOC if CPU_CK610
|
||||
select RTC_LIB
|
||||
select TIMER_OF
|
||||
select USB_ARCH_HAS_EHCI
|
||||
@ -150,6 +151,19 @@ config CPU_CK860
|
||||
select CPU_HAS_FPUV2
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "C-SKY PMU type"
|
||||
depends on PERF_EVENTS
|
||||
depends on CPU_CK807 || CPU_CK810 || CPU_CK860
|
||||
|
||||
config CPU_PMU_NONE
|
||||
bool "None"
|
||||
|
||||
config CSKY_PMU_V1
|
||||
bool "Performance Monitoring Unit Ver.1"
|
||||
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Power Manager Instruction (wait/doze/stop)"
|
||||
default CPU_PM_NONE
|
||||
|
7
arch/csky/include/asm/perf_event.h
Normal file
7
arch/csky/include/asm/perf_event.h
Normal file
@ -0,0 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
|
||||
|
||||
#ifndef __ASM_CSKY_PERF_EVENT_H
|
||||
#define __ASM_CSKY_PERF_EVENT_H
|
||||
|
||||
#endif /* __ASM_PERF_EVENT_ELF_H */
|
@ -8,6 +8,7 @@ obj-$(CONFIG_MODULES) += module.o
|
||||
obj-$(CONFIG_SMP) += smp.o
|
||||
obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o
|
||||
obj-$(CONFIG_STACKTRACE) += stacktrace.o
|
||||
obj-$(CONFIG_CSKY_PMU_V1) += perf_event.o
|
||||
|
||||
ifdef CONFIG_FUNCTION_TRACER
|
||||
CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
|
||||
|
1031
arch/csky/kernel/perf_event.c
Normal file
1031
arch/csky/kernel/perf_event.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user