Skip to content

Commit 43352b6

Browse files
author
Fox Snowpatch
committed
1 parent 274bab1 commit 43352b6

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tools/testing/selftests/bpf/bpf_experimental.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,8 @@ static inline int get_preempt_count(void)
645645
bpf_this_cpu_ptr(&pcpu_hot))->preempt_count;
646646
#elif defined(bpf_target_arm64)
647647
return bpf_get_current_task_btf()->thread_info.preempt.count;
648+
#elif defined(bpf_target_powerpc)
649+
return bpf_get_current_task_btf()->thread_info.preempt_count;
648650
#endif
649651
return 0;
650652
}
@@ -653,6 +655,7 @@ static inline int get_preempt_count(void)
653655
* Report whether it is in interrupt context. Only works on the following archs:
654656
* * x86
655657
* * arm64
658+
* * powerpc64
656659
*/
657660
static inline int bpf_in_interrupt(void)
658661
{
@@ -672,6 +675,7 @@ static inline int bpf_in_interrupt(void)
672675
* Report whether it is in NMI context. Only works on the following archs:
673676
* * x86
674677
* * arm64
678+
* * powerpc64
675679
*/
676680
static inline int bpf_in_nmi(void)
677681
{
@@ -682,6 +686,7 @@ static inline int bpf_in_nmi(void)
682686
* Report whether it is in hard IRQ context. Only works on the following archs:
683687
* * x86
684688
* * arm64
689+
* * powerpc64
685690
*/
686691
static inline int bpf_in_hardirq(void)
687692
{
@@ -692,6 +697,7 @@ static inline int bpf_in_hardirq(void)
692697
* Report whether it is in softirq context. Only works on the following archs:
693698
* * x86
694699
* * arm64
700+
* * powerpc64
695701
*/
696702
static inline int bpf_in_serving_softirq(void)
697703
{
@@ -710,6 +716,7 @@ static inline int bpf_in_serving_softirq(void)
710716
* Report whether it is in task context. Only works on the following archs:
711717
* * x86
712718
* * arm64
719+
* * powerpc64
713720
*/
714721
static inline int bpf_in_task(void)
715722
{

0 commit comments

Comments
 (0)