Message ID | 1484193253-25307-8-git-send-email-oohall@gmail.com |
---|---|
State | Accepted |
Headers | show |
On Thu, Jan 12, 2017 at 02:54:07PM +1100, Oliver O'Halloran wrote: > The the P9 Radix TLB management instructions use an arbitrary "AP" field > that specifies the actual page size. The values used in the AP field are > processor dependent and needs to be passed in via the devicetree by > firmware. This patch adds the property for P9 based systems that boot > via the HDAT path. > > Signed-off-by: Oliver O'Halloran <oohall@gmail.com> > --- > hdata/cpu-common.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/hdata/cpu-common.c b/hdata/cpu-common.c > index 491eab84a91c..528f008251f4 100644 > --- a/hdata/cpu-common.c > +++ b/hdata/cpu-common.c > @@ -78,6 +78,10 @@ struct dt_node * add_core_common(struct dt_node *cpus, > dt_add_property_cells(cpu, "ibm,processor-page-sizes", > 0xc, 0x10, 0x18, 0x22); > > + if (proc_gen == proc_gen_p9) > + dt_add_property_cells(cpu, "ibm,processor-radix-AP-encodings", > + 0x0000000c, 0xa0000010, 0x20000015, 0x4000001e); > + Should this addition be ibm,pa-features dependent? That way we don't have to worry about proc_gen and in the future? But that might be too much complexity for this patchset Balbir Singh.
On Fri, Jan 13, 2017 at 2:09 PM, Balbir Singh <bsingharora@gmail.com> wrote: > On Thu, Jan 12, 2017 at 02:54:07PM +1100, Oliver O'Halloran wrote: >> The the P9 Radix TLB management instructions use an arbitrary "AP" field >> that specifies the actual page size. The values used in the AP field are >> processor dependent and needs to be passed in via the devicetree by >> firmware. This patch adds the property for P9 based systems that boot >> via the HDAT path. >> >> Signed-off-by: Oliver O'Halloran <oohall@gmail.com> >> --- >> hdata/cpu-common.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/hdata/cpu-common.c b/hdata/cpu-common.c >> index 491eab84a91c..528f008251f4 100644 >> --- a/hdata/cpu-common.c >> +++ b/hdata/cpu-common.c >> @@ -78,6 +78,10 @@ struct dt_node * add_core_common(struct dt_node *cpus, >> dt_add_property_cells(cpu, "ibm,processor-page-sizes", >> 0xc, 0x10, 0x18, 0x22); >> >> + if (proc_gen == proc_gen_p9) >> + dt_add_property_cells(cpu, "ibm,processor-radix-AP-encodings", >> + 0x0000000c, 0xa0000010, 0x20000015, 0x4000001e); >> + > > Should this addition be ibm,pa-features dependent? That way we don't have to > worry about proc_gen and in the future? But that might be too much complexity > for this patchset It probably should depend on pa-features. A more general cleanup of cpu-common.c is going to happen at some point in the future, but for now I think we should just keep it simple and use proc_gen.
Oliver O'Halloran <oohall@gmail.com> writes: > The the P9 Radix TLB management instructions use an arbitrary "AP" field > that specifies the actual page size. The values used in the AP field are > processor dependent and needs to be passed in via the devicetree by > firmware. This patch adds the property for P9 based systems that boot > via the HDAT path. > > Signed-off-by: Oliver O'Halloran <oohall@gmail.com> It'd be good to patch doc/device-tree/ to document this. I'll take this patch as is though... but by reading this email you are bound by the agreement to send documentation patches. :D
On Sun, Jan 15, 2017 at 12:46 PM, Stewart Smith <stewart@linux.vnet.ibm.com> wrote: > Oliver O'Halloran <oohall@gmail.com> writes: >> The the P9 Radix TLB management instructions use an arbitrary "AP" field >> that specifies the actual page size. The values used in the AP field are >> processor dependent and needs to be passed in via the devicetree by >> firmware. This patch adds the property for P9 based systems that boot >> via the HDAT path. >> >> Signed-off-by: Oliver O'Halloran <oohall@gmail.com> > > It'd be good to patch doc/device-tree/ to document this. > > I'll take this patch as is though... but by reading this email you are > bound by the agreement to send documentation patches. :D I think it's in PAPR, but documenting it in skiboot would probably be a good idea. > > -- > Stewart Smith > OPAL Architect, IBM. >
diff --git a/hdata/cpu-common.c b/hdata/cpu-common.c index 491eab84a91c..528f008251f4 100644 --- a/hdata/cpu-common.c +++ b/hdata/cpu-common.c @@ -78,6 +78,10 @@ struct dt_node * add_core_common(struct dt_node *cpus, dt_add_property_cells(cpu, "ibm,processor-page-sizes", 0xc, 0x10, 0x18, 0x22); + if (proc_gen == proc_gen_p9) + dt_add_property_cells(cpu, "ibm,processor-radix-AP-encodings", + 0x0000000c, 0xa0000010, 0x20000015, 0x4000001e); + /* Page size encodings appear to be the same for P7 and P8 */ dt_add_property_cells(cpu, "ibm,segment-page-sizes", 0x0c, 0x000, 3, 0x0c, 0x0000, /* 4K seg 4k pages */
The the P9 Radix TLB management instructions use an arbitrary "AP" field that specifies the actual page size. The values used in the AP field are processor dependent and needs to be passed in via the devicetree by firmware. This patch adds the property for P9 based systems that boot via the HDAT path. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> --- hdata/cpu-common.c | 4 ++++ 1 file changed, 4 insertions(+)