* [PATCH] - SPARSEMEM - Change pfn to unsigned long
@ 2005-06-01 16:41 Jack Steiner
2005-06-03 14:53 ` Andy Whitcroft
0 siblings, 1 reply; 2+ messages in thread
From: Jack Steiner @ 2005-06-01 16:41 UTC (permalink / raw)
To: linux-ia64
The latest 2.6.12-rc5-mm2 will not boot on large SGI systems. "pfn"
was assigned to an "int". Large systems overflow an int.
Trivial fix & it works ok now.....
Signed-off-by: Jack Steiner <steiner@sgi.com>
Index: linux/mm/page_alloc.c
=================================--- linux.orig/mm/page_alloc.c 2005-05-26 10:32:26.804141634 -0500
+++ linux/mm/page_alloc.c 2005-06-01 11:28:43.338491345 -0500
@@ -1731,8 +1731,8 @@ void __init memmap_init_zone(unsigned lo
unsigned long start_pfn)
{
struct page *page;
- int end_pfn = start_pfn + size;
- int pfn;
+ unsigned long end_pfn = start_pfn + size;
+ unsigned long pfn;
for (pfn = start_pfn; pfn < end_pfn; pfn++, page++) {
if (!early_pfn_valid(pfn))
Index: linux/mm/sparse.c
=================================--- linux.orig/mm/sparse.c 2005-05-26 10:32:26.816836797 -0500
+++ linux/mm/sparse.c 2005-06-01 10:29:24.435883417 -0500
@@ -124,7 +124,7 @@ void sparse_init(void)
* set. If this is <=0, then that means that the passed-in
* map was not consumed and must be freed.
*/
-int sparse_add_one_section(int start_pfn, int nr_pages, struct page *map)
+int sparse_add_one_section(unsigned long start_pfn, int nr_pages, struct page *map)
{
struct mem_section *ms = __pfn_to_section(start_pfn);
--
Thanks
Jack Steiner (steiner@sgi.com) 651-683-5302
Principal Engineer SGI - Silicon Graphics, Inc.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] - SPARSEMEM - Change pfn to unsigned long
2005-06-01 16:41 [PATCH] - SPARSEMEM - Change pfn to unsigned long Jack Steiner
@ 2005-06-03 14:53 ` Andy Whitcroft
0 siblings, 0 replies; 2+ messages in thread
From: Andy Whitcroft @ 2005-06-03 14:53 UTC (permalink / raw)
To: linux-ia64
Seems we arn't using unsigned long everywhere in sparsemem. Tested on
my test boxes. Thanks to Jack for finding this.
Andrew please apply to -mm.
-apw
== 8< =The latest 2.6.12-rc5-mm2 will not boot on large SGI systems. "pfn"
was assigned to an "int". Large systems overflow an int.
Trivial fix & it works ok now.....
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
diffstat sparsemem-change-pfn-to-unsigned-long
---
page_alloc.c | 4 ++--
sparse.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff -upN reference/mm/page_alloc.c current/mm/page_alloc.c
--- reference/mm/page_alloc.c
+++ current/mm/page_alloc.c
@@ -1731,8 +1731,8 @@ void __init memmap_init_zone(unsigned lo
unsigned long start_pfn)
{
struct page *page;
- int end_pfn = start_pfn + size;
- int pfn;
+ unsigned long end_pfn = start_pfn + size;
+ unsigned long pfn;
for (pfn = start_pfn; pfn < end_pfn; pfn++, page++) {
if (!early_pfn_valid(pfn))
diff -upN reference/mm/sparse.c current/mm/sparse.c
--- reference/mm/sparse.c
+++ current/mm/sparse.c
@@ -124,7 +124,7 @@ void sparse_init(void)
* set. If this is <=0, then that means that the passed-in
* map was not consumed and must be freed.
*/
-int sparse_add_one_section(int start_pfn, int nr_pages, struct page *map)
+int sparse_add_one_section(unsigned long start_pfn, int nr_pages, struct page *map)
{
struct mem_section *ms = __pfn_to_section(start_pfn);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-06-03 14:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-01 16:41 [PATCH] - SPARSEMEM - Change pfn to unsigned long Jack Steiner
2005-06-03 14:53 ` Andy Whitcroft
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox