Dongxu Sun (1): mbigen: vtimer: isolate mbigen vtimer funcs with macro
include/clocksource/arm_arch_timer.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
virt inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8MG11 CVE: NA
--------------------------------
use CONFIG_HISILICON_IRQ_MBIGEN to isolate mbigen vtimer funcs in ./include/clocksource/arm_arch_timer.h file.
Signed-off-by: Dongxu Sun sundongxu3@huawei.com --- include/clocksource/arm_arch_timer.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/include/clocksource/arm_arch_timer.h b/include/clocksource/arm_arch_timer.h index 16e59de1fc87..c4c5c44fdea5 100644 --- a/include/clocksource/arm_arch_timer.h +++ b/include/clocksource/arm_arch_timer.h @@ -8,6 +8,7 @@ #include <linux/bitops.h> #include <linux/timecounter.h> #include <linux/types.h> +#include <linux/bug.h>
#define ARCH_TIMER_TYPE_CP15 BIT(0) #define ARCH_TIMER_TYPE_MEM BIT(1) @@ -115,10 +116,29 @@ static inline bool vtimer_irqbypass_hw_support(struct arch_timer_kvm_info *info) return info->irqbypass_flag & VT_EXPANDDEV_PROBED; }
+#ifdef CONFIG_HISILICON_IRQ_MBIGEN + void vtimer_mbigen_set_vector(int cpu_id, u16 vpeid); bool vtimer_mbigen_get_active(int cpu_id); void vtimer_mbigen_set_auto_clr(int cpu_id, bool set); void vtimer_gic_set_auto_clr(int cpu_id, bool set); void vtimer_mbigen_set_active(int cpu_id, bool set);
+#else + +static inline void vtimer_mbigen_set_vector(int cpu_id, u16 vpeid) {} + +static inline bool vtimer_mbigen_get_active(int cpu_id) +{ + /* You really shouldn't get here.. */ + WARN_ON_ONCE(1); + return false; +} + +static inline void vtimer_mbigen_set_auto_clr(int cpu_id, bool set) {} +static inline void vtimer_gic_set_auto_clr(int cpu_id, bool set) {} +static inline void vtimer_mbigen_set_active(int cpu_id, bool set) {} + +#endif + #endif
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/3258 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/X...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/3258 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/X...