Linus Torvalds 43644679a1 x86: fix power-of-2 round_up/round_down macros
These macros had two bugs:
 - the type of the mask was not correctly expanded to the full size of
   the argument being expanded, resulting in possible loss of high bits
   when mixing types.
 - the alignment argument was evaluated twice, despite the macro looking
   like a fancy function (but it really does need to be a macro, since
   it works on arbitrary integer types)

Noticed by Peter Anvin, and with a fix that is a modification of his
suggestion (bug noticed by Yinghai Lu).

Cc: Peter Anvin <hpa@zytor.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-07-02 12:05:10 -07:00
..
2009-04-08 11:51:46 -07:00
2009-02-10 00:41:58 +01:00
2009-04-28 17:42:08 +02:00
2009-01-29 14:16:51 +01:00
2009-01-29 14:17:01 +01:00
2009-06-17 21:35:10 -07:00
2009-04-07 13:36:36 +02:00
2009-02-10 00:42:00 +01:00
2009-06-11 23:31:52 +02:00
2009-06-11 23:31:52 +02:00
2009-03-27 14:43:57 -04:00
2009-04-10 20:27:13 +02:00
2009-04-29 06:54:34 +01:00
2009-01-21 17:26:06 +09:00
2009-06-13 15:37:30 +02:00
2009-06-12 22:27:08 +09:30
2009-06-12 22:27:08 +09:30
2009-06-16 16:56:10 -07:00
2009-06-11 23:31:52 +02:00
2009-01-31 00:17:39 +05:30
2009-05-18 09:21:04 +02:00
2009-02-05 22:30:14 +01:00
2009-07-01 11:19:29 -07:00
2009-01-23 18:42:06 +01:00
2009-06-15 15:49:20 +02:00
2009-02-02 23:27:09 +05:30
2009-06-15 12:40:02 +02:00
2009-06-15 12:40:02 +02:00
2009-04-01 08:59:16 -07:00
2009-01-31 00:19:32 +05:30
2009-03-27 14:43:57 -04:00
2009-03-02 12:07:49 +01:00
2009-06-11 08:50:59 -07:00
2009-06-10 12:27:08 +03:00
2009-06-15 12:40:02 +02:00