"Aneesh Kumar K.V" <[email protected]> writes:

> Vaibhav Jain <[email protected]> writes:
>
>> Add necessary scaffolding in libndctl for dimms that support papr_scm
>> specification[1]. Since there can be platforms that support
>> Open-Firmware[2] but not the papr_scm specification, hence the changes
>> proposed first add support for probing if the dimm bus supports
>> Open-Firmware. This is done via querying for sysfs attribute 'of_node'
>> in dimm device sysfs directory. If available newly introduced member
>> 'struct ndctl_bus.has_of_node' is set. During the probe of the dimm
>> and execution of add_dimm(), the newly introduced add_of_pmem_dimm()
>> is called if dimm bus reports supports Open-Firmware.
>>
>> Function add_of_pmem_dimm() queries the 'compatible' device tree
>> attribute and based on its value assign NVDIMM_FAMILY_PAPR_SCM to the
>> dimm command family. In future, based on the contents of 'compatible'
>> attribute more of_pmem dimm families can be queried.
>>
>> We also add support for parsing the dimm flags for
>> NVDIMM_FAMILY_PAPR_SCM supporting nvdimms as described at [3]. A newly
>> introduced function parse_papr_scm_flags() reads the contents of this
>> flag file and sets appropriate flag bits in 'struct
>> ndctl_dimm.flags'.
>
> The mixing of of_pmem and papr_scm is confuring here considering we have
> two different driver in the kernel. If both can be handled by the same
> code them possibly function that indicate both? ie, replace
> add_of_pmem_dimm() with something more generic?
Currently this function handles only papr compliant memory hence will
rename the function to add_papr_pmem_dimm() as discussed offline.

>
>>
>> Also we advertise support for monitor mode by allocating a file
>> descriptor to the dimm 'flags' file and assigning it to 'struct
>> ndctl_dimm.health_event_fd'.
>>
>> The dimm-ops implementation for NVDIMM_FAMILY_PAPR_SCM is
>> available in global variable 'papr_scm_dimm_ops' which points to
>> skeleton implementation in newly introduced file 'lib/papr_scm.c'.
>>
>
>
> -aneesh
> _______________________________________________
> Linux-nvdimm mailing list -- [email protected]
> To unsubscribe send an email to [email protected]

~ Vaibhav
_______________________________________________
Linux-nvdimm mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to