
/* auto-generated by gen_syscalls.py, don't edit */
#ifndef Z_INCLUDE_SYSCALLS_PSCI_H
#define Z_INCLUDE_SYSCALLS_PSCI_H


#ifndef _ASMLANGUAGE

#include <syscall_list.h>
#include <syscall.h>

#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic push
#endif

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif

#ifdef __cplusplus
extern "C" {
#endif

extern uint32_t z_impl_psci_get_version(const struct device * dev);
static inline uint32_t psci_get_version(const struct device * dev)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		return (uint32_t) arch_syscall_invoke1(*(uintptr_t *)&dev, K_SYSCALL_PSCI_GET_VERSION);
	}
#endif
	compiler_barrier();
	return z_impl_psci_get_version(dev);
}


extern int z_impl_psci_cpu_off(const struct device * dev, uint32_t state);
static inline int psci_cpu_off(const struct device * dev, uint32_t state)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		return (int) arch_syscall_invoke2(*(uintptr_t *)&dev, *(uintptr_t *)&state, K_SYSCALL_PSCI_CPU_OFF);
	}
#endif
	compiler_barrier();
	return z_impl_psci_cpu_off(dev, state);
}


extern int z_impl_psci_cpu_on(const struct device * dev, unsigned long cpuid, unsigned long entry_point);
static inline int psci_cpu_on(const struct device * dev, unsigned long cpuid, unsigned long entry_point)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		return (int) arch_syscall_invoke3(*(uintptr_t *)&dev, *(uintptr_t *)&cpuid, *(uintptr_t *)&entry_point, K_SYSCALL_PSCI_CPU_ON);
	}
#endif
	compiler_barrier();
	return z_impl_psci_cpu_on(dev, cpuid, entry_point);
}


extern int z_impl_psci_affinity_info(const struct device * dev, unsigned long target_affinity, unsigned long lowest_affinity_level);
static inline int psci_affinity_info(const struct device * dev, unsigned long target_affinity, unsigned long lowest_affinity_level)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		return (int) arch_syscall_invoke3(*(uintptr_t *)&dev, *(uintptr_t *)&target_affinity, *(uintptr_t *)&lowest_affinity_level, K_SYSCALL_PSCI_AFFINITY_INFO);
	}
#endif
	compiler_barrier();
	return z_impl_psci_affinity_info(dev, target_affinity, lowest_affinity_level);
}


#ifdef __cplusplus
}
#endif

#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic pop
#endif

#endif
#endif /* include guard */
