bpf_this_cpu_ptr(&pcpu_hot))->preempt_count;
#elif defined(bpf_target_arm64)
return bpf_get_current_task_btf()->thread_info.preempt.count;
+#elif defined(bpf_target_powerpc)
+ return bpf_get_current_task_btf()->thread_info.preempt_count;
#endif
return 0;
}
* Report whether it is in interrupt context. Only works on the following archs:
* * x86
* * arm64
+ * * powerpc64
*/
static inline int bpf_in_interrupt(void)
{
* Report whether it is in NMI context. Only works on the following archs:
* * x86
* * arm64
+ * * powerpc64
*/
static inline int bpf_in_nmi(void)
{
* Report whether it is in hard IRQ context. Only works on the following archs:
* * x86
* * arm64
+ * * powerpc64
*/
static inline int bpf_in_hardirq(void)
{
* Report whether it is in softirq context. Only works on the following archs:
* * x86
* * arm64
+ * * powerpc64
*/
static inline int bpf_in_serving_softirq(void)
{
* Report whether it is in task context. Only works on the following archs:
* * x86
* * arm64
+ * * powerpc64
*/
static inline int bpf_in_task(void)
{