Re: [patch v11 10/12] platform/x86: mlx-platform: Extend register map configuration with IO access verification callbacks

From: Darren Hart
Date: Thu Jan 25 2018 - 17:16:12 EST


On Wed, Jan 24, 2018 at 08:34:56PM +0000, Vadim Pasternak wrote:
> Add definitions for hotplug device masks and events offsets.
>
> Extend register map configuration with the sets of writable, readable and
> volatile registers to allow verification prior to the access.
>
> Extend register map configuration with cache type field: use flat type.

This says "what" you're doing, but not why. The point of the change log is to
help the reviewer or some future debugger to understand not WHAT you did (we
have that in the code below) but WHY you did it - keeping in mind that we likely
haven't spent the time you have to understand what the right thing is to do
here, so share with us the result of your research.

"Extend register map configuration with cache type field: use flat type, in
order to XXXXXXXXXX".

Please keep in mind for future patches.

...

> +
> static int
> mlxplat_mlxcpld_reg_read(void *context, unsigned int reg, unsigned int *val)
> {
> @@ -317,6 +384,10 @@ static const struct regmap_config mlxplat_mlxcpld_regmap_config = {
> .reg_bits = 8,
> .val_bits = 8,
> .max_register = 255,
> + .cache_type = REGCACHE_FLAT,

--
Darren Hart
VMware Open Source Technology Center