From: George Beshers <gbeshers@redhat.com> Date: Thu, 31 Jul 2008 15:34:15 -0400 Subject: [IA64] Correct pernodesize calculation Message-id: 20080731192820.4411.95392.sendpatchset@dhcp-100-2-194.bos.redhat.com O-Subject: [RHEL5.3 PATCH 19/19] [IA64] Correct pernodesize calculation. Bugzilla: 455308 RH-Acked-by: Prarit Bhargava <prarit@redhat.com> [IA64] Correct pernodesize calculation. BZ#455308 Upstream: http://git.kernel.org/?p=linux/kernel/git/aegl/linux-2.6.git;a=commitdiff;h=41bd26d67c41e325c6b9e56aadfe9dad8af9a565 A simple fix. The existing pernodesize reservation is not taking into account a second array of pg_data_t structures. This is normally not important because the PAGE_ALIGN macro reserves adequate space. I made the compute_pernodesize steps in the same order as the fill_pernode steps to make the correlation more clear. Signed-off-by: Robin Holt <holt@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com> diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index 97641ee..49bbf44 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c @@ -124,6 +124,7 @@ static unsigned long __meminit compute_pernodesize(int node) pernodesize += node * L1_CACHE_BYTES; pernodesize += L1_CACHE_ALIGN(sizeof(pg_data_t)); pernodesize += L1_CACHE_ALIGN(sizeof(struct ia64_node_data)); + pernodesize += L1_CACHE_ALIGN(sizeof(pg_data_t)); pernodesize = PAGE_ALIGN(pernodesize); return pernodesize; }