[dpdk-dev] [PATCH v10 2/9] eal: add power management intrinsics
Thomas Monjalon
thomas at monjalon.net
Thu Oct 29 18:39:19 CET 2020
27/10/2020 15:59, Liang Ma:
> +static inline uint64_t
> +__get_umwait_val(const volatile void *p, const uint8_t sz)
> +{
> + switch (sz) {
> + case sizeof(uint8_t):
> + return *(const volatile uint8_t *)p;
> + case sizeof(uint16_t):
> + return *(const volatile uint16_t *)p;
> + case sizeof(uint32_t):
> + return *(const volatile uint32_t *)p;
> + case sizeof(uint64_t):
> + return *(const volatile uint64_t *)p;
> + default:
> + /* this is an intrinsic, so we can't have any error handling */
> + RTE_ASSERT(0);
> + return 0;
> + }
> +}
This function is going to pollute the namespace.
I will fix it to __rte_power_get_umwait_val().
More information about the dev
mailing list