Commit bcca84d3 authored by Ankur Arora's avatar Ankur Arora Committed by lishusen
Browse files

arm64: support cpuidle-haltpoll

virt inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IB7PU3


CVE: NA

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

Add architectural support for the cpuidle-haltpoll driver by defining
arch_haltpoll_*(). Also define ARCH_CPUIDLE_HALTPOLL to allow
cpuidle-haltpoll to be selected.

Tested-by: default avatarHaris Okanovic <harisokn@amazon.com>
Tested-by: default avatarMisono Tomohiro <misono.tomohiro@fujitsu.com>
Signed-off-by: default avatarAnkur Arora <ankur.a.arora@oracle.com>
Signed-off-by: default avatarlishusen <lishusen2@huawei.com>
parent 54db5447
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2618,6 +2618,12 @@ config ARCH_HIBERNATION_HEADER
config ARCH_SUSPEND_POSSIBLE
	def_bool y

config ARCH_CPUIDLE_HALTPOLL
	bool "Enable selection of the cpuidle-haltpoll driver"
	help
	  cpuidle-haltpoll allows for adaptive polling based on
	  current load before entering the idle state.

endmenu # "Power management options"

menu "CPU Power Management"
+20 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */

#ifndef _ARCH_HALTPOLL_H
#define _ARCH_HALTPOLL_H

static inline void arch_haltpoll_enable(unsigned int cpu) { }
static inline void arch_haltpoll_disable(unsigned int cpu) { }

static inline bool arch_haltpoll_want(bool force)
{
	/*
	 * Enabling haltpoll requires KVM support for arch_haltpoll_enable(),
	 * arch_haltpoll_disable().
	 *
	 * Given that that's missing right now, only allow force loading for
	 * haltpoll.
	 */
	return force;
}
#endif