aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/iseries
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2006-01-10 23:27:24 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-10 23:35:40 -0500
commit7eb5476f68cd6c6e7a065083e1741a72a666ac6d (patch)
tree83218231b0675fe7746218c235d23c120b7b8846 /arch/powerpc/platforms/iseries
parent0e5e39bfd811be4612a23242353b426ac6438e03 (diff)
[PATCH] powerpc: Add ibm,pft-size to iSeries device tree
To make iSeries just a teensy bit less special, create ibm,pft-size properties in the iSeries device tree. We can then rely on htab_dt_scan_pftsize() to set ppc64_pft_size for us. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/iseries')
-rw-r--r--arch/powerpc/platforms/iseries/setup.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
index 25cdebdf6f2e..9dea9f5f9301 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -473,8 +473,6 @@ static unsigned long __init build_iSeries_Memory_Map(void)
473 printk("HPT absolute addr = %016lx, size = %dK\n", 473 printk("HPT absolute addr = %016lx, size = %dK\n",
474 chunk_to_addr(hptFirstChunk), hptSizeChunks * 256); 474 chunk_to_addr(hptFirstChunk), hptSizeChunks * 256);
475 475
476 ppc64_pft_size = __ilog2(hptSizePages * HW_PAGE_SIZE);
477
478 /* 476 /*
479 * The actual hashed page table is in the hypervisor, 477 * The actual hashed page table is in the hypervisor,
480 * we have no direct access 478 * we have no direct access
@@ -860,6 +858,11 @@ void dt_prop_u64_list(struct iseries_flat_dt *dt, char *name, u64 *data, int n)
860 dt_prop(dt, name, (char *)data, sizeof(u64) * n); 858 dt_prop(dt, name, (char *)data, sizeof(u64) * n);
861} 859}
862 860
861void dt_prop_u32_list(struct iseries_flat_dt *dt, char *name, u32 *data, int n)
862{
863 dt_prop(dt, name, (char *)data, sizeof(u32) * n);
864}
865
863void dt_prop_empty(struct iseries_flat_dt *dt, char *name) 866void dt_prop_empty(struct iseries_flat_dt *dt, char *name)
864{ 867{
865 dt_prop(dt, name, NULL, 0); 868 dt_prop(dt, name, NULL, 0);
@@ -871,6 +874,7 @@ void dt_cpus(struct iseries_flat_dt *dt)
871 unsigned char *p; 874 unsigned char *p;
872 unsigned int i, index; 875 unsigned int i, index;
873 struct IoHriProcessorVpd *d; 876 struct IoHriProcessorVpd *d;
877 u32 pft_size[2];
874 878
875 /* yuck */ 879 /* yuck */
876 snprintf(buf, 32, "PowerPC,%s", cur_cpu_spec->cpu_name); 880 snprintf(buf, 32, "PowerPC,%s", cur_cpu_spec->cpu_name);
@@ -881,6 +885,9 @@ void dt_cpus(struct iseries_flat_dt *dt)
881 dt_prop_u32(dt, "#address-cells", 1); 885 dt_prop_u32(dt, "#address-cells", 1);
882 dt_prop_u32(dt, "#size-cells", 0); 886 dt_prop_u32(dt, "#size-cells", 0);
883 887
888 pft_size[0] = 0; /* NUMA CEC cookie, 0 for non NUMA */
889 pft_size[1] = __ilog2(HvCallHpt_getHptPages() * HW_PAGE_SIZE);
890
884 for (i = 0; i < NR_CPUS; i++) { 891 for (i = 0; i < NR_CPUS; i++) {
885 if (paca[i].lppaca.dyn_proc_status >= 2) 892 if (paca[i].lppaca.dyn_proc_status >= 2)
886 continue; 893 continue;
@@ -907,6 +914,8 @@ void dt_cpus(struct iseries_flat_dt *dt)
907 914
908 dt_prop_u32(dt, "reg", i); 915 dt_prop_u32(dt, "reg", i);
909 916
917 dt_prop_u32_list(dt, "ibm,pft-size", pft_size, 2);
918
910 dt_end_node(dt); 919 dt_end_node(dt);
911 } 920 }
912 921