summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0009-mm-nobootmem-fix-sign-extend-problem-in-__free_pages.patch
diff options
context:
space:
mode:
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.patch49
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 @@
1From 06ae235e974156cc9304c169f89bba4d6ea4f6e4 Mon Sep 17 00:00:00 2001
2From: Russ Anderson <rja@sgi.com>
3Date: Thu, 10 May 2012 13:01:46 -0700
4Subject: [PATCH 09/56] mm: nobootmem: fix sign extend problem in
5 __free_pages_memory()
6
7commit 6bc2e853c6b46a6041980d58200ad9b0a73a60ff upstream.
8
9Systems with 8 TBytes of memory or greater can hit a problem where only
10the the first 8 TB of memory shows up. This is due to "int i" being
11smaller than "unsigned long start_aligned", causing the high bits to be
12dropped.
13
14The fix is to change `i' to unsigned long to match start_aligned
15and end_aligned.
16
17Thanks to Jack Steiner for assistance tracking this down.
18
19Signed-off-by: Russ Anderson <rja@sgi.com>
20Cc: Jack Steiner <steiner@sgi.com>
21Cc: Johannes Weiner <hannes@cmpxchg.org>
22Cc: Tejun Heo <tj@kernel.org>
23Cc: David S. Miller <davem@davemloft.net>
24Cc: Yinghai Lu <yinghai@kernel.org>
25Cc: Gavin Shan <shangw@linux.vnet.ibm.com>
26Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
27Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
28Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
29---
30 mm/nobootmem.c | 3 +--
31 1 files changed, 1 insertions(+), 2 deletions(-)
32
33diff --git a/mm/nobootmem.c b/mm/nobootmem.c
34index 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--
481.7.7.6
49