Explorar o código

arch/tile: fix bug in delay_backoff()

We were carefully computing a value to use for the number of loops
to spin for, and then ignoring it.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Chris Metcalf %!s(int64=13) %!d(string=hai) anos
pai
achega
444eef1ba4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      arch/tile/lib/spinlock_common.h

+ 1 - 1
arch/tile/lib/spinlock_common.h

@@ -60,5 +60,5 @@ static void delay_backoff(int iterations)
 	loops += __insn_crc32_32(stack_pointer, get_cycles_low()) &
 		(loops - 1);
 
-	relax(1 << exponent);
+	relax(loops);
 }