Files
linux/drivers/char
Jim Bos 726f22c83d Fix gcc 4.5.1 miscompiling drivers/char/i8k.c (again)
commit 22d3243de8 upstream.

The fix in commit 6b4e81db25 ("i8k: Tell gcc that *regs gets
clobbered") to work around the gcc miscompiling i8k.c to add "+m
(*regs)" caused register pressure problems and a build failure.

Changing the 'asm' statement to 'asm volatile' instead should prevent
that and works around the gcc bug as well, so we can remove the "+m".

[ Background on the gcc bug: a memory clobber fails to mark the function
  the asm resides in as non-pure (aka "__attribute__((const))"), so if
  the function does nothing else that triggers the non-pure logic, gcc
  will think that that function has no side effects at all. As a result,
  callers will be mis-compiled.

  Adding the "+m" made gcc see that it's not a pure function, and so
  does "asm volatile". The problem was never really the need to mark
  "*regs" as changed, since the memory clobber did that part - the
  problem was just a bug in the gcc "pure" function analysis  - Linus ]

Signed-off-by: Jim Bos <jim876@xs4all.nl>
Acked-by: Jakub Jelinek <jakub@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-09 15:54:59 -07:00
..
2011-05-09 15:54:54 -07:00
2009-06-11 08:51:01 -07:00
2009-09-24 07:21:03 -07:00
2009-07-12 12:22:34 -07:00
2005-04-16 15:20:36 -07:00
2008-06-20 14:05:55 -06:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2008-12-13 11:25:49 -08:00
2009-10-01 16:11:16 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2008-10-20 08:52:41 -07:00
2008-12-13 09:12:07 +00:00
2009-10-04 15:05:10 -07:00
2008-07-20 17:12:36 -07:00
2005-04-16 15:20:36 -07:00
2010-12-09 13:26:36 -08:00
2009-06-18 11:16:55 +10:00
2009-09-15 08:42:00 -07:00
2008-02-07 08:42:25 -08:00
2009-09-23 07:39:29 -07:00
2009-07-12 12:22:34 -07:00
2008-04-30 08:29:43 -07:00
2009-07-12 12:22:34 -07:00
2009-07-12 12:22:34 -07:00
2007-02-12 09:48:30 -08:00
2009-06-18 13:03:54 -07:00
2009-10-11 11:20:58 -07:00
2010-02-09 04:50:58 -08:00
2010-04-26 07:41:19 -07:00
2005-04-16 15:20:36 -07:00
2009-09-19 13:13:37 -07:00
2008-07-20 17:12:38 -07:00
2009-07-12 12:22:34 -07:00
2009-02-22 09:23:02 -08:00
2009-06-11 08:51:01 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2008-07-20 17:12:38 -07:00
2009-07-12 12:22:34 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2009-09-01 01:13:31 -07:00
2009-09-01 01:13:31 -07:00
2009-09-01 01:13:31 -07:00
2009-07-03 15:45:29 +01:00
2008-04-30 23:15:34 +02:00
2009-06-11 08:51:02 -07:00
2009-09-19 13:13:35 -07:00
2009-09-19 13:13:35 -07:00