aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-12 02:58:53 -0400
committerPaul Mackerras <paulus@samba.org>2005-10-12 02:58:53 -0400
commit3eac8c69d1ac1266327f4e29deb23716a12c6d30 (patch)
tree0f79bf41c9f7e9e72d7f2827c1810d3815d6f2af /arch/powerpc/kernel/prom.c
parentb6ec995a21a9428aef620b5adf46d047a18d88b8 (diff)
powerpc: Move default hash table size calculation to hash_utils_64.c
We weren't computing the size of the hash table correctly on iSeries because the relevant code in prom.c was #ifdef CONFIG_PPC_PSERIES. This moves the code to hash_utils_64.c, makes it unconditional, and cleans it up a bit. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/prom.c')
-rw-r--r--arch/powerpc/kernel/prom.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index ce0dff1caa80..c8d288457b4c 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -1323,26 +1323,6 @@ void __init early_init_devtree(void *params)
1323 */ 1323 */
1324 scan_flat_dt(early_init_dt_scan_cpus, NULL); 1324 scan_flat_dt(early_init_dt_scan_cpus, NULL);
1325 1325
1326#ifdef CONFIG_PPC_PSERIES
1327 /* If hash size wasn't obtained above, we calculate it now based on
1328 * the total RAM size
1329 */
1330 if (ppc64_pft_size == 0) {
1331 unsigned long rnd_mem_size, pteg_count;
1332
1333 /* round mem_size up to next power of 2 */
1334 rnd_mem_size = 1UL << __ilog2(systemcfg->physicalMemorySize);
1335 if (rnd_mem_size < systemcfg->physicalMemorySize)
1336 rnd_mem_size <<= 1;
1337
1338 /* # pages / 2 */
1339 pteg_count = max(rnd_mem_size >> (12 + 1), 1UL << 11);
1340
1341 ppc64_pft_size = __ilog2(pteg_count << 7);
1342 }
1343
1344 DBG("Hash pftSize: %x\n", (int)ppc64_pft_size);
1345#endif
1346 DBG(" <- early_init_devtree()\n"); 1326 DBG(" <- early_init_devtree()\n");
1347} 1327}
1348 1328