Skip to content

Commit 7058f4b

Browse files
npigginmpe
authored andcommitted
powerpc/pseries: use notrace hcall variant for H_CEDE idle
Rather than special-case H_CEDE in the hcall trace wrappers, make the idle H_CEDE call use plpar_hcall_norets_notrace(). Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20210508101455.1578318-4-npiggin@gmail.com
1 parent a3f1a39 commit 7058f4b

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

arch/powerpc/include/asm/plpar_wrappers.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ static inline void set_cede_latency_hint(u8 latency_hint)
2828

2929
static inline long cede_processor(void)
3030
{
31-
return plpar_hcall_norets(H_CEDE);
31+
/*
32+
* We cannot call tracepoints inside RCU idle regions which
33+
* means we must not trace H_CEDE.
34+
*/
35+
return plpar_hcall_norets_notrace(H_CEDE);
3236
}
3337

3438
static inline long extended_cede_processor(unsigned long latency_hint)

arch/powerpc/platforms/pseries/lpar.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,13 +1840,6 @@ notrace void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
18401840
unsigned long flags;
18411841
unsigned int *depth;
18421842

1843-
/*
1844-
* We cannot call tracepoints inside RCU idle regions which
1845-
* means we must not trace H_CEDE.
1846-
*/
1847-
if (opcode == H_CEDE)
1848-
return;
1849-
18501843
local_irq_save(flags);
18511844

18521845
depth = this_cpu_ptr(&hcall_trace_depth);
@@ -1868,9 +1861,6 @@ notrace void __trace_hcall_exit(long opcode, long retval, unsigned long *retbuf)
18681861
unsigned long flags;
18691862
unsigned int *depth;
18701863

1871-
if (opcode == H_CEDE)
1872-
return;
1873-
18741864
local_irq_save(flags);
18751865

18761866
depth = this_cpu_ptr(&hcall_trace_depth);

0 commit comments

Comments
 (0)