]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc64: vdso: simplify cpu_relax
authorDave Kleikamp <dave.kleikamp@oracle.com>
Fri, 7 Aug 2015 21:34:03 +0000 (16:34 -0500)
committerAllen Pais <allen.pais@oracle.com>
Tue, 15 Sep 2015 12:09:34 +0000 (17:39 +0530)
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 <dave.kleikamp@oracle.com>
(cherry picked from commit edb2ed24d0e4a250ef432cf1fb7c0532817728d3)

arch/sparc/include/asm/processor_64.h

index 6924bdefe148451c584f0a6b183b8a23b92bae05..ebb6fea53b842893c6debcdadc2c653b5c880186 100644 (file)
@@ -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.