diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0009-mm-nobootmem-fix-sign-extend-problem-in-__free_pages.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0009-mm-nobootmem-fix-sign-extend-problem-in-__free_pages.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0009-mm-nobootmem-fix-sign-extend-problem-in-__free_pages.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0009-mm-nobootmem-fix-sign-extend-problem-in-__free_pages.patch new file mode 100644 index 00000000..c6208ebc --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0009-mm-nobootmem-fix-sign-extend-problem-in-__free_pages.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From 06ae235e974156cc9304c169f89bba4d6ea4f6e4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Russ Anderson <rja@sgi.com> | ||
3 | Date: Thu, 10 May 2012 13:01:46 -0700 | ||
4 | Subject: [PATCH 09/56] mm: nobootmem: fix sign extend problem in | ||
5 | __free_pages_memory() | ||
6 | |||
7 | commit 6bc2e853c6b46a6041980d58200ad9b0a73a60ff upstream. | ||
8 | |||
9 | Systems with 8 TBytes of memory or greater can hit a problem where only | ||
10 | the the first 8 TB of memory shows up. This is due to "int i" being | ||
11 | smaller than "unsigned long start_aligned", causing the high bits to be | ||
12 | dropped. | ||
13 | |||
14 | The fix is to change `i' to unsigned long to match start_aligned | ||
15 | and end_aligned. | ||
16 | |||
17 | Thanks to Jack Steiner for assistance tracking this down. | ||
18 | |||
19 | Signed-off-by: Russ Anderson <rja@sgi.com> | ||
20 | Cc: Jack Steiner <steiner@sgi.com> | ||
21 | Cc: Johannes Weiner <hannes@cmpxchg.org> | ||
22 | Cc: Tejun Heo <tj@kernel.org> | ||
23 | Cc: David S. Miller <davem@davemloft.net> | ||
24 | Cc: Yinghai Lu <yinghai@kernel.org> | ||
25 | Cc: Gavin Shan <shangw@linux.vnet.ibm.com> | ||
26 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
27 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
28 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
29 | --- | ||
30 | mm/nobootmem.c | 3 +-- | ||
31 | 1 files changed, 1 insertions(+), 2 deletions(-) | ||
32 | |||
33 | diff --git a/mm/nobootmem.c b/mm/nobootmem.c | ||
34 | index 7fa41b4..07c08c4 100644 | ||
35 | --- a/mm/nobootmem.c | ||
36 | +++ b/mm/nobootmem.c | ||
37 | @@ -83,8 +83,7 @@ void __init free_bootmem_late(unsigned long addr, unsigned long size) | ||
38 | |||
39 | static void __init __free_pages_memory(unsigned long start, unsigned long end) | ||
40 | { | ||
41 | - int i; | ||
42 | - unsigned long start_aligned, end_aligned; | ||
43 | + unsigned long i, start_aligned, end_aligned; | ||
44 | int order = ilog2(BITS_PER_LONG); | ||
45 | |||
46 | start_aligned = (start + (BITS_PER_LONG - 1)) & ~(BITS_PER_LONG - 1); | ||
47 | -- | ||
48 | 1.7.7.6 | ||
49 | |||