Chris Metcalf f862eefec0 tile: use a more conservative __my_cpu_offset in CONFIG_PREEMPT
It turns out the kernel relies on barrier() to force a reload of the
percpu offset value.  Since we can't easily modify the definition of
barrier() to include "tp" as an output register, we instead provide a
definition of __my_cpu_offset as extended assembly that includes a fake
stack read to hazard against barrier(), forcing gcc to know that it
must reread "tp" and recompute anything based on "tp" after a barrier.

This fixes observed hangs in the slub allocator when we are looping
on a percpu cmpxchg_double.

A similar fix for ARMv7 was made in June in change 509eb76ebf97.

Cc: stable@vger.kernel.org
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2013-09-30 10:34:41 -04:00
..
2013-09-06 13:06:25 -04:00
2013-09-03 14:53:29 -04:00
2013-09-06 13:06:25 -04:00
2013-09-06 13:06:25 -04:00
2013-09-03 14:53:29 -04:00
2013-08-30 11:56:38 -04:00
2013-08-30 10:20:13 -04:00
2012-03-20 21:48:30 +08:00
2013-09-03 14:53:29 -04:00
2013-08-30 11:56:50 -04:00
2013-08-13 16:26:01 -04:00
2013-08-30 11:55:53 -04:00
2012-05-25 12:48:25 -04:00
2013-09-03 14:51:26 -04:00
2012-07-24 15:27:32 +08:00
2013-08-30 11:55:53 -04:00
2013-08-13 16:26:21 -04:00
2013-09-13 11:15:24 -04:00
2013-09-13 11:15:24 -04:00
2013-09-13 11:15:24 -04:00
2013-09-03 14:53:29 -04:00
2013-08-12 14:46:18 -04:00
2013-09-03 14:53:29 -04:00
2012-03-28 18:30:03 +01:00
2013-09-03 14:53:29 -04:00
2013-08-13 16:26:05 -04:00
2013-02-14 09:21:15 -05:00
2013-08-13 16:26:21 -04:00