android_kernel_xiaomi_sm8350/drivers/firmware
Yinghai Lu 3b0fde0fac 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>
2009-06-16 19:47:28 -07:00
..
dcdbas.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
dcdbas.h dcdbas: export functionality for use in other drivers 2009-01-08 08:31:12 -08:00
dell_rbu.c dell_rbu: use scnprintf() instead of less secure sprintf() 2009-01-17 14:27:18 -08:00
dmi_scan.c [libata] ahci: Restore SB600 SATA controller 64 bit DMA 2009-06-10 11:05:00 -04:00
dmi-id.c dmi: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:42 -08:00
edd.c edd: fix incorrect return of 1 from module_init 2008-06-06 11:29:09 -07:00
efivars.c Kobject: convert drivers/* from kobject_unregister() to kobject_put() 2008-01-24 20:40:40 -08:00
iscsi_ibft_find.c iscsi_ibft_find: fix modpost warning 2008-07-30 09:41:44 -07:00
iscsi_ibft.c ibft: fix the display of a few fields in the NIC attribute structure in sysfs 2009-05-02 15:36:10 -07:00
Kconfig sysfs: add /sys/firmware/memmap 2008-07-08 17:55:41 +02:00
Makefile sysfs: add /sys/firmware/memmap 2008-07-08 17:55:41 +02:00
memmap.c firmware_map: fix hang with x86/32bit 2009-06-16 19:47:28 -07:00
pcdp.c
pcdp.h