Enabling p9 OCC hwmon

Joel Stanley joel at jms.id.au
Mon Jun 5 23:11:48 AEST 2017


On Mon, Jun 5, 2017 at 5:46 PM, Joel Stanley <joel at jms.id.au> wrote:
> Hi Eddie,
>
> As of 763d6007e084f480b7129f35560c30ce30938509 the kernel tree has all
> of the drivers that have been posted to the list staged, as far as I
> could tell.
>
> I was attempting to enable the OCC hwmon driver, but it is behind a
> config symbol that does not exist:
>
> $ git grep CONFIG_SENSORS_OCC_P9_SBE
> drivers/hwmon/occ/Makefile:ifeq ($(CONFIG_SENSORS_OCC_P9_SBE), y)
>
> Can you work out what has happened here?

I made a patch that fixes the issue for now:

 http://patchwork.ozlabs.org/patch/771128/

This my not be the fix you want once you've integrated the p8 version.
Do you plan on posting the p8 OCC patches?

In addition, we need to fix these sparse warnings:

$ make C=2  drivers/hwmon/occ/
  CHECK   drivers/hwmon/occ/p9.c
  CHECK   drivers/hwmon/occ/p9_sbe.c
  CHECK   drivers/hwmon/occ/common.c
drivers/hwmon/occ/p9.c:99:23: warning: cast to restricted __be16
drivers/hwmon/occ/p9.c:96:23: warning: cast to restricted __be32
drivers/hwmon/occ/p9.c:63:23: warning: cast to restricted __be32
drivers/hwmon/occ/p9.c:181:23: warning: cast to restricted __be16
drivers/hwmon/occ/p9.c:178:23: warning: cast to restricted __be16
drivers/hwmon/occ/p9.c:175:23: warning: cast to restricted __be16
drivers/hwmon/occ/p9.c:172:23: warning: cast to restricted __be16
drivers/hwmon/occ/p9.c:169:23: warning: cast to restricted __be16
drivers/hwmon/occ/p9.c:166:23: warning: cast to restricted __be16
drivers/hwmon/occ/p9.c:140:23: warning: cast to restricted __be16
drivers/hwmon/occ/p9.c:137:23: warning: cast to restricted __be64
drivers/hwmon/occ/p9.c:134:23: warning: cast to restricted __be32
drivers/hwmon/occ/p9.c:125:23: warning: cast to restricted __be32
drivers/hwmon/occ/p9.c:210:5: warning: symbol
'p9_occ_setup_sensor_attrs' was not declared. Should it be static?
drivers/hwmon/occ/common.c:77:24: warning: incorrect type in
assignment (different base types)
drivers/hwmon/occ/common.c:77:24:    expected unsigned short
[unsigned] [usertype] user_power_cap
drivers/hwmon/occ/common.c:77:24:    got restricted __be16 [usertype] <noident>

Cheers,

Joel


More information about the openbmc mailing list