[Skiboot] [PATCH v3 3/9] Device-Tree(DT) entry for per-chip HOMER offset
Daniel Axtens
dja at axtens.net
Sat Aug 15 12:33:37 AEST 2015
> Yes. Kernel side patchset is designed to have a generic driver code,
> which will parse the device tree and create nest pmu drivers.
> Kernel side patchset does not have any specific processor type
> checks, it only check for the device tree entries for the nest units
> created by OPAL side. This way kernel side will need no changes
> when a new nest unit is added or remove in the device tree.
>
This is not quite what I mean by a generic driver.
By a generic driver I mean a driver that uses an of_device_id table to
be automatically bound to devices in the device tree. I've found [1] to
be a very useful introduction.
If you can implement the kernel side as this, I think it will
dramatically simplify things: it will automatically do detection for
you, without you having to write code to to that in the kernel. It will
require you to add a compatible property in Skiboot, and may require
some changes to the structure, but I think it will be worth it.
Restructuring things this way might also allow you to remove some of the
static limits in your kernel side patches, which will help with forwards
compatibility.
The one possible complication that I was trying to explain but didn't do
a very good job of in my previous email is the fact that you have to
create PMU events, and I'm not sure if there are requirements on when in
bootup they are created. Looking at patch 6 in your v6 kernel side
patches, it looks like they don't need to be created really early, so
this might work...
Regards,
Daniel
[1] http://events.linuxfoundation.org/sites/events/files/slides/petazzoni-device-tree-dummies.pdf
> i.e, Today, OPAL side patchset creates device tree entries
> for nest units like MCS, PowerBus, Xlink and Alink. Tomorrow, if
> CAPP unit is added (by creating device tree entries) in OPAL side,
> kernel side will pick it up without any modifications. In the same way
> if we want to remove one of the units says Alink, OPAl side just
> need to remove device tree entries created for Alink.
>
> > hooking into the perf infrastructure in the kernel, but if it is
> > possible it'd be a much nicer solution.
>
> Kernel side patchset is intended for perf support. Cover letter
> in the kernel side patchset will explain the perf tool usage.
>
>
> On the 'compatible' property, Yes. we can add it to the device tree.
> But wondering how/when to use it, since kernel side does not
> have any 'processor type' checks currently and OPAL side
> patchset does not pass any data structures to kernel side.
>
> Maddy
>
> >
> > [1]
> > http://devicetree.org/Device_Tree_Usage#Understanding_the_compatible_Property
> >
> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 860 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/skiboot/attachments/20150815/fc224d8b/attachment.sig>
More information about the Skiboot
mailing list