numam-dpdk/lib/eal/ppc/rte_power_intrinsics.c
Anatoly Burakov 66834f2974 eal: add power monitor for multiple events
Use RTM and WAITPKG instructions to perform a wait-for-writes similar to
what UMWAIT does, but without the limitation of having to listen for
just one event. This works because the optimized power state used by the
TPAUSE instruction will cause a wake up on RTM transaction abort, so if
we add the addresses we're interested in to the read-set, any write to
those addresses will wake us up.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: David Hunt <david.hunt@intel.com>
2021-07-09 21:13:13 +02:00

52 lines
873 B
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2021 Intel Corporation
*/
#include "rte_power_intrinsics.h"
/**
* This function is not supported on PPC64.
*/
int
rte_power_monitor(const struct rte_power_monitor_cond *pmc,
const uint64_t tsc_timestamp)
{
RTE_SET_USED(pmc);
RTE_SET_USED(tsc_timestamp);
return -ENOTSUP;
}
/**
* This function is not supported on PPC64.
*/
int
rte_power_pause(const uint64_t tsc_timestamp)
{
RTE_SET_USED(tsc_timestamp);
return -ENOTSUP;
}
/**
* This function is not supported on PPC64.
*/
int
rte_power_monitor_wakeup(const unsigned int lcore_id)
{
RTE_SET_USED(lcore_id);
return -ENOTSUP;
}
int
rte_power_monitor_multi(const struct rte_power_monitor_cond pmc[],
const uint32_t num, const uint64_t tsc_timestamp)
{
RTE_SET_USED(pmc);
RTE_SET_USED(num);
RTE_SET_USED(tsc_timestamp);
return -ENOTSUP;
}