From: Dave Kleikamp Date: Fri, 7 Aug 2015 21:34:03 +0000 (-0500) Subject: sparc64: vdso: simplify cpu_relax X-Git-Tag: v4.1.12-92~279^2^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c3b28895ed346242efde62d61dc5048bb01b6d18;p=users%2Fjedix%2Flinux-maple.git sparc64: vdso: simplify cpu_relax Orabug: 20861959 Create a simpler cpu_relax for the VDSO object. The pause_3insn_patch section introduces relocatable code that prevents the vdso from building. Signed-off-by: Dave Kleikamp (cherry picked from commit edb2ed24d0e4a250ef432cf1fb7c0532817728d3) --- diff --git a/arch/sparc/include/asm/processor_64.h b/arch/sparc/include/asm/processor_64.h index 6924bdefe148..ebb6fea53b84 100644 --- a/arch/sparc/include/asm/processor_64.h +++ b/arch/sparc/include/asm/processor_64.h @@ -205,6 +205,13 @@ unsigned long get_wchan(struct task_struct *task); * To make a long story short, we are trying to yield the current cpu * strand during busy loops. */ +#ifdef BUILD_VDSO +#define cpu_relax() asm volatile("\n99:\n\t" \ + "rd %%ccr, %%g0\n\t" \ + "rd %%ccr, %%g0\n\t" \ + "rd %%ccr, %%g0\n\t" \ + ::: "memory") +#else /* ! BUILD_VDSO */ #define cpu_relax() asm volatile("\n99:\n\t" \ "rd %%ccr, %%g0\n\t" \ "rd %%ccr, %%g0\n\t" \ @@ -216,6 +223,7 @@ unsigned long get_wchan(struct task_struct *task); "nop\n\t" \ ".previous" \ ::: "memory") +#endif #define cpu_relax_lowlatency() cpu_relax() /* Prefetch support. This is tuned for UltraSPARC-III and later.