Hugh Dickins 292f86f005 [POWERPC] Make mmiowb's io_sync preempt safe
If mmiowb() is always used prior to releasing spinlock as Doc suggests,
then it's safe against preemption; but I'm not convinced that's always
the case.  If preemption occurs between sync and get_paca()->io_sync = 0,
I believe there's no problem.  But in the unlikely event that gcc does
the store relative to another register than r13 (as it did with current),
then there's a small danger of setting another cpu's io_sync to 0, after
it had just set it to 1.  Rewrite ppc64 mmiowb to prevent that.

The remaining io_sync assignments in io.h all get_paca()->io_sync = 1,
which is harmless even if preempted to the wrong cpu (the context switch
itself syncs); and those in spinlock.h are while preemption is disabled.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-11-01 14:52:49 +11:00
..
2006-01-09 14:49:54 +11:00
2005-09-28 15:42:53 +10:00
2006-11-01 14:52:48 +11:00
2006-09-20 14:06:18 +10:00
2006-10-07 22:08:26 +10:00
2006-10-07 22:08:26 +10:00
2006-02-15 15:32:22 -08:00
2006-10-07 22:08:26 +10:00
2006-06-30 18:20:44 +02:00
2006-09-14 07:07:18 +10:00
2006-07-03 15:27:00 -07:00
2006-08-24 10:07:23 +10:00
2006-09-26 08:48:51 -07:00
2006-06-30 18:20:44 +02:00
2006-07-07 20:19:15 +10:00
2006-10-25 11:54:18 +10:00
2005-10-31 13:37:12 +11:00
2005-11-03 16:24:25 +11:00
2006-06-29 16:58:06 -07:00
2005-11-03 16:02:23 +11:00
2006-03-25 09:41:40 -08:00
2006-06-21 15:01:32 +10:00
2005-11-01 14:36:55 +11:00
2006-10-25 11:54:18 +10:00
2006-10-25 11:54:18 +10:00
2005-11-03 16:59:17 +11:00