未验证 提交 143d2271 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!625 AMD: Fix build warning.

Merge Pull Request from: @haochengxie 
 
This PR fixes below build warnings:
WARNING: modpost: EXPORT symbol "__SCT__perf_lopwr_cb" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: modpost: EXPORT symbol "__SCT__perf_lopwr_cb" [vmlinux] version generation failed, symbol will not be versioned. 
 
Link:https://gitee.com/openeuler/kernel/pulls/625 

Reviewed-by: Wei Li <liwei391@huawei.com> 
Reviewed-by: Jialin Zhang <zhangjialin11@huawei.com> 
Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> 
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <asm/cpufeature.h> #include <asm/cpufeature.h>
#include "../perf_event.h" #include "../perf_event.h"
#include <linux/static_call.h>
#define BRS_POISON 0xFFFFFFFFFFFFFFFEULL /* mark limit of valid entries */ #define BRS_POISON 0xFFFFFFFFFFFFFFFEULL /* mark limit of valid entries */
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <asm/apicdef.h> #include <asm/apicdef.h>
#include <asm/apic.h> #include <asm/apic.h>
#include <asm/nmi.h> #include <asm/nmi.h>
#include <linux/static_call.h>
#include "../perf_event.h" #include "../perf_event.h"
......
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
#ifndef _ASM_X86_PERF_EVENT_H #ifndef _ASM_X86_PERF_EVENT_H
#define _ASM_X86_PERF_EVENT_H #define _ASM_X86_PERF_EVENT_H
#ifndef __GENKSYMS__
#include <linux/static_call.h>
#endif
/* /*
* Performance event hw details: * Performance event hw details:
...@@ -556,27 +553,6 @@ static inline void intel_pt_handle_vmx(int on) ...@@ -556,27 +553,6 @@ static inline void intel_pt_handle_vmx(int on)
#if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_AMD) #if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_AMD)
extern void amd_pmu_enable_virt(void); extern void amd_pmu_enable_virt(void);
extern void amd_pmu_disable_virt(void); extern void amd_pmu_disable_virt(void);
#if defined(CONFIG_PERF_EVENTS_AMD_BRS)
#define PERF_NEEDS_LOPWR_CB 1
/*
* architectural low power callback impacts
* drivers/acpi/processor_idle.c
* drivers/acpi/acpi_pad.c
*/
extern void perf_amd_brs_lopwr_cb(bool lopwr_in);
DECLARE_STATIC_CALL(perf_lopwr_cb, perf_amd_brs_lopwr_cb);
static inline void perf_lopwr_cb(bool lopwr_in)
{
static_call_mod(perf_lopwr_cb)(lopwr_in);
}
#endif /* PERF_NEEDS_LOPWR_CB */
#else #else
static inline void amd_pmu_enable_virt(void) { } static inline void amd_pmu_enable_virt(void) { }
static inline void amd_pmu_disable_virt(void) { } static inline void amd_pmu_disable_virt(void) { }
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/acpi.h> #include <linux/acpi.h>
#include <linux/perf_event.h> #include <linux/perf_event.h>
#include <linux/perf_event_lopwr.h>
#include <asm/mwait.h> #include <asm/mwait.h>
#include <xen/xen.h> #include <xen/xen.h>
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <linux/cpuidle.h> #include <linux/cpuidle.h>
#include <linux/cpu.h> #include <linux/cpu.h>
#include <linux/perf_event.h> #include <linux/perf_event.h>
#include <linux/perf_event_lopwr.h>
#include <acpi/processor.h> #include <acpi/processor.h>
/* /*
......
...@@ -1626,11 +1626,4 @@ extern void __weak arch_perf_update_userpage(struct perf_event *event, ...@@ -1626,11 +1626,4 @@ extern void __weak arch_perf_update_userpage(struct perf_event *event,
struct perf_event_mmap_page *userpg, struct perf_event_mmap_page *userpg,
u64 now); u64 now);
#ifndef PERF_NEEDS_LOPWR_CB
static inline void perf_lopwr_cb(bool mode)
{
}
#endif
#endif /* _LINUX_PERF_EVENT_H */ #endif /* _LINUX_PERF_EVENT_H */
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _PERF_EVENT_LOPWR_H
#define _PERF_EVENT_LOPWR_H
#include <linux/static_call.h>
#if defined(CONFIG_PERF_EVENTS_AMD_BRS)
#define PERF_NEEDS_LOPWR_CB 1
/*
* architectural low power callback impacts
* drivers/acpi/processor_idle.c
* drivers/acpi/acpi_pad.c
*/
extern void perf_amd_brs_lopwr_cb(bool lopwr_in);
DECLARE_STATIC_CALL(perf_lopwr_cb, perf_amd_brs_lopwr_cb);
static inline void perf_lopwr_cb(bool lopwr_in)
{
static_call_mod(perf_lopwr_cb)(lopwr_in);
}
#endif /* PERF_NEEDS_LOPWR_CB */
#ifndef PERF_NEEDS_LOPWR_CB
static inline void perf_lopwr_cb(bool mode)
{
}
#endif
#endif /*_PERF_EVENT_LOPWR_H*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册