diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-06-16 18:31:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 22:47:28 -0400 |
commit | 3b0fde0fac19c180317eb0601b3504083f4b9bf5 (patch) | |
tree | 5458ec10f3c6759ec64c6fa27e12e692a575d07a /include/linux/firmware-map.h | |
parent | 021415468c889979117b1a07b96f7e36de33e995 (diff) |
firmware_map: fix hang with x86/32bit
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13484
Peer reported:
| The bug is introduced from kernel 2.6.27, if E820 table reserve the memory
| above 4G in 32bit OS(BIOS-e820: 00000000fff80000 - 0000000120000000
| (reserved)), system will report Int 6 error and hang up. The bug is caused by
| the following code in drivers/firmware/memmap.c, the resource_size_t is 32bit
| variable in 32bit OS, the BUG_ON() will be invoked to result in the Int 6
| error. I try the latest 32bit Ubuntu and Fedora distributions, all hit this
| bug.
|======
|static int firmware_map_add_entry(resource_size_t start, resource_size_t end,
| const char *type,
| struct firmware_map_entry *entry)
and it only happen with CONFIG_PHYS_ADDR_T_64BIT is not set.
it turns out we need to pass u64 instead of resource_size_t for that.
[akpm@linux-foundation.org: add comment]
Reported-and-tested-by: Peer Chen <pchen@nvidia.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/firmware-map.h')
-rw-r--r-- | include/linux/firmware-map.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/include/linux/firmware-map.h b/include/linux/firmware-map.h index cca686b39123..875451f1373a 100644 --- a/include/linux/firmware-map.h +++ b/include/linux/firmware-map.h | |||
@@ -24,21 +24,17 @@ | |||
24 | */ | 24 | */ |
25 | #ifdef CONFIG_FIRMWARE_MEMMAP | 25 | #ifdef CONFIG_FIRMWARE_MEMMAP |
26 | 26 | ||
27 | int firmware_map_add(resource_size_t start, resource_size_t end, | 27 | int firmware_map_add(u64 start, u64 end, const char *type); |
28 | const char *type); | 28 | int firmware_map_add_early(u64 start, u64 end, const char *type); |
29 | int firmware_map_add_early(resource_size_t start, resource_size_t end, | ||
30 | const char *type); | ||
31 | 29 | ||
32 | #else /* CONFIG_FIRMWARE_MEMMAP */ | 30 | #else /* CONFIG_FIRMWARE_MEMMAP */ |
33 | 31 | ||
34 | static inline int firmware_map_add(resource_size_t start, resource_size_t end, | 32 | static inline int firmware_map_add(u64 start, u64 end, const char *type) |
35 | const char *type) | ||
36 | { | 33 | { |
37 | return 0; | 34 | return 0; |
38 | } | 35 | } |
39 | 36 | ||
40 | static inline int firmware_map_add_early(resource_size_t start, | 37 | static inline int firmware_map_add_early(u64 start, u64 end, const char *type) |
41 | resource_size_t end, const char *type) | ||
42 | { | 38 | { |
43 | return 0; | 39 | return 0; |
44 | } | 40 | } |