Commit 7eb5476f authored by Michael Ellerman's avatar Michael Ellerman Committed by Paul Mackerras

[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: default avatarMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 0e5e39bf
...@@ -473,8 +473,6 @@ static unsigned long __init build_iSeries_Memory_Map(void) ...@@ -473,8 +473,6 @@ static unsigned long __init build_iSeries_Memory_Map(void)
printk("HPT absolute addr = %016lx, size = %dK\n", printk("HPT absolute addr = %016lx, size = %dK\n",
chunk_to_addr(hptFirstChunk), hptSizeChunks * 256); chunk_to_addr(hptFirstChunk), hptSizeChunks * 256);
ppc64_pft_size = __ilog2(hptSizePages * HW_PAGE_SIZE);
/* /*
* The actual hashed page table is in the hypervisor, * The actual hashed page table is in the hypervisor,
* we have no direct access * 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,6 +858,11 @@ void dt_prop_u64_list(struct iseries_flat_dt *dt, char *name, u64 *data, int n)
dt_prop(dt, name, (char *)data, sizeof(u64) * n); dt_prop(dt, name, (char *)data, sizeof(u64) * n);
} }
void dt_prop_u32_list(struct iseries_flat_dt *dt, char *name, u32 *data, int n)
{
dt_prop(dt, name, (char *)data, sizeof(u32) * n);
}
void dt_prop_empty(struct iseries_flat_dt *dt, char *name) void dt_prop_empty(struct iseries_flat_dt *dt, char *name)
{ {
dt_prop(dt, name, NULL, 0); dt_prop(dt, name, NULL, 0);
...@@ -871,6 +874,7 @@ void dt_cpus(struct iseries_flat_dt *dt) ...@@ -871,6 +874,7 @@ void dt_cpus(struct iseries_flat_dt *dt)
unsigned char *p; unsigned char *p;
unsigned int i, index; unsigned int i, index;
struct IoHriProcessorVpd *d; struct IoHriProcessorVpd *d;
u32 pft_size[2];
/* yuck */ /* yuck */
snprintf(buf, 32, "PowerPC,%s", cur_cpu_spec->cpu_name); snprintf(buf, 32, "PowerPC,%s", cur_cpu_spec->cpu_name);
...@@ -881,6 +885,9 @@ void dt_cpus(struct iseries_flat_dt *dt) ...@@ -881,6 +885,9 @@ void dt_cpus(struct iseries_flat_dt *dt)
dt_prop_u32(dt, "#address-cells", 1); dt_prop_u32(dt, "#address-cells", 1);
dt_prop_u32(dt, "#size-cells", 0); dt_prop_u32(dt, "#size-cells", 0);
pft_size[0] = 0; /* NUMA CEC cookie, 0 for non NUMA */
pft_size[1] = __ilog2(HvCallHpt_getHptPages() * HW_PAGE_SIZE);
for (i = 0; i < NR_CPUS; i++) { for (i = 0; i < NR_CPUS; i++) {
if (paca[i].lppaca.dyn_proc_status >= 2) if (paca[i].lppaca.dyn_proc_status >= 2)
continue; continue;
...@@ -907,6 +914,8 @@ void dt_cpus(struct iseries_flat_dt *dt) ...@@ -907,6 +914,8 @@ void dt_cpus(struct iseries_flat_dt *dt)
dt_prop_u32(dt, "reg", i); dt_prop_u32(dt, "reg", i);
dt_prop_u32_list(dt, "ibm,pft-size", pft_size, 2);
dt_end_node(dt); dt_end_node(dt);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment