* [PATCH] sparc64: Fix array size reported by vmemmap_populate()
@ 2010-04-03 20:41 Ben Hutchings
2010-04-03 20:50 ` David Miller
2010-04-03 20:58 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Ben Hutchings @ 2010-04-03 20:41 UTC (permalink / raw)
To: sparclinux
vmemmap_populate() attempts to report the used index and total size of
vmemmap_table, but it wrongly shifts the total size so that it is
always shown as 0.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/sparc/mm/init_64.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index aaebc48..b2831dc 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -2117,7 +2117,7 @@ int __meminit vmemmap_populate(struct page *start, unsigned long nr, int node)
"node=%d entry=%lu/%lu\n", start, block, nr,
node,
addr >> VMEMMAP_CHUNK_SHIFT,
- VMEMMAP_SIZE >> VMEMMAP_CHUNK_SHIFT);
+ VMEMMAP_SIZE);
}
}
return 0;
--
1.7.0.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] sparc64: Fix array size reported by vmemmap_populate()
2010-04-03 20:41 [PATCH] sparc64: Fix array size reported by vmemmap_populate() Ben Hutchings
@ 2010-04-03 20:50 ` David Miller
2010-04-03 20:58 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2010-04-03 20:50 UTC (permalink / raw)
To: sparclinux
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sat, 03 Apr 2010 21:41:20 +0100
> vmemmap_populate() attempts to report the used index and total size of
> vmemmap_table, but it wrongly shifts the total size so that it is
> always shown as 0.
>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
It's not the total, size, it's the total number of chunks that
the area supports.
So it's trying to say:
entry=${NUM_CHUNKS}/${MAX_CHUNKS}
So I think the printk statement is correct and if you check
you'll find that every other vmemmap supporting platform
has this same printk statement.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sparc64: Fix array size reported by vmemmap_populate()
2010-04-03 20:41 [PATCH] sparc64: Fix array size reported by vmemmap_populate() Ben Hutchings
2010-04-03 20:50 ` David Miller
@ 2010-04-03 20:58 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2010-04-03 20:58 UTC (permalink / raw)
To: sparclinux
From: David Miller <davem@davemloft.net>
Date: Sat, 03 Apr 2010 13:50:29 -0700 (PDT)
> From: Ben Hutchings <ben@decadent.org.uk>
> Date: Sat, 03 Apr 2010 21:41:20 +0100
>
>> vmemmap_populate() attempts to report the used index and total size of
>> vmemmap_table, but it wrongly shifts the total size so that it is
>> always shown as 0.
>>
>> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
>
> It's not the total, size, it's the total number of chunks that
> the area supports.
Nevermind, Ben's patch is right, I'll apply it.
VMEMMAP_SIZE is number of entries, not a size in bytes.
Further confusing things is that before the VMEMMAP_SIZE
bug fix the other month, the calculation was "correct"
:-)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-04-03 20:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-03 20:41 [PATCH] sparc64: Fix array size reported by vmemmap_populate() Ben Hutchings
2010-04-03 20:50 ` David Miller
2010-04-03 20:58 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.