Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Nicholas Piggin and committed by
Michael Ellerman
7058f4b1 a3f1a39a

+5 -11
+5 -1
arch/powerpc/include/asm/plpar_wrappers.h
··· 28 28 29 29 static inline long cede_processor(void) 30 30 { 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); 32 36 } 33 37 34 38 static inline long extended_cede_processor(unsigned long latency_hint)
-10
arch/powerpc/platforms/pseries/lpar.c
··· 1840 1840 unsigned long flags; 1841 1841 unsigned int *depth; 1842 1842 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 - 1850 1843 local_irq_save(flags); 1851 1844 1852 1845 depth = this_cpu_ptr(&hcall_trace_depth); ··· 1860 1867 { 1861 1868 unsigned long flags; 1862 1869 unsigned int *depth; 1863 - 1864 - if (opcode == H_CEDE) 1865 - return; 1866 1870 1867 1871 local_irq_save(flags); 1868 1872