/linux/drivers/fsi/ |
H A D | fsi-occ.c | 16 #include <linux/fsi-occ.h> 42 struct occ { struct 58 #define to_occ(x) container_of((x), struct occ, mdev) argument 69 struct occ *occ; member 84 struct occ *occ = to_occ(mdev); in occ_open() local 95 client->occ = occ; in occ_open() 98 get_device(occ->dev); in occ_open() 160 * Copy the user command (assume user data follows the occ command in occ_write() 180 rc = fsi_occ_submit(client->occ->dev, cmd, data_length + 6, cmd, in occ_write() 202 put_device(client->occ->dev); in occ_release() [all …]
|
H A D | Kconfig | 88 tristate "OCC SBEFIFO client device driver" 91 This option enables an SBEFIFO based On-Chip Controller (OCC) device 92 driver. The OCC is a device embedded on a POWER processor that collects 93 and aggregates sensor data from the processor and system. The OCC can
|
/linux/drivers/hwmon/occ/ |
H A D | sysfs.c | 14 /* OCC status register */ 17 /* OCC extended status register */ 31 struct occ *occ = dev_get_drvdata(dev); in occ_active_store() local 37 rc = occ_active(occ, active); in occ_active_store() 49 struct occ *occ = dev_get_drvdata(dev); in occ_sysfs_show() local 53 if (occ->active) { in occ_sysfs_show() 54 rc = occ_update_response(occ); in occ_sysfs_show() 58 header = (struct occ_poll_response_header *)occ->resp.data; in occ_sysfs_show() 119 struct occ *occ = dev_get_drvdata(dev); in occ_error_show() local 121 occ_update_response(occ); in occ_error_show() [all …]
|
H A D | common.c | 21 #define OCC_ERROR_COUNT_THRESHOLD 2 /* required by OCC spec */ 32 /* OCC sensor type and version definitions */ 133 static int occ_poll(struct occ *occ) in occ_poll() argument 144 cmd[4] = occ->poll_cmd_data; /* data */ in occ_poll() 149 rc = occ->send_cmd(occ, cmd, sizeof(cmd), &occ->resp, sizeof(occ->resp)); in occ_poll() 151 occ->last_error = rc; in occ_poll() 152 if (occ->error_count++ > OCC_ERROR_COUNT_THRESHOLD) in occ_poll() 153 occ->error = rc; in occ_poll() 159 occ->error_count = 0; in occ_poll() 160 occ->last_error = 0; in occ_poll() [all …]
|
H A D | p9_sbe.c | 7 #include <linux/fsi-occ.h> 21 struct occ occ; member 30 #define to_p9_sbe_occ(x) container_of((x), struct p9_sbe_occ, occ) 37 struct occ *occ = dev_get_drvdata(kobj_to_dev(kobj)); in ffdc_read() local 38 struct p9_sbe_occ *ctx = to_p9_sbe_occ(occ); in ffdc_read() 83 static int p9_sbe_occ_send_cmd(struct occ *occ, u8 *cmd, size_t len, in p9_sbe_occ_send_cmd() argument 87 struct p9_sbe_occ *ctx = to_p9_sbe_occ(occ); in p9_sbe_occ_send_cmd() 96 sysfs_notify(&occ->bus_dev->kobj, NULL, in p9_sbe_occ_send_cmd() 137 struct occ *occ; in p9_sbe_occ_probe() local 146 occ = &ctx->occ; in p9_sbe_occ_probe() [all …]
|
H A D | common.h | 16 * Same response format for all OCC versions. 71 * OCC only provides one sensor data block of each type, but any number of 91 struct occ { struct 98 u8 poll_cmd_data; /* to perform OCC poll command */ 99 int (*send_cmd)(struct occ *occ, u8 *cmd, size_t len, void *resp, argument 103 struct mutex lock; /* lock OCC access */ 114 unsigned long last_safe; /* time OCC entered "safe" state */ 128 int occ_active(struct occ *occ, bool active); argument 129 int occ_setup(struct occ *occ); 130 int occ_setup_sysfs(struct occ *occ); [all …]
|
H A D | p8_i2c.c | 6 #include <linux/fsi-occ.h> 18 /* OCB (on-chip control bridge - interface to OCC) registers */ 23 /* OCC SRAM address space */ 30 struct occ occ; member 34 #define to_p8_i2c_occ(x) container_of((x), struct p8_i2c_occ, occ) 51 /* data from OCC is big-endian */ in p8_i2c_occ_getscom() 114 static int p8_i2c_occ_send_cmd(struct occ *occ, u8 *cmd, size_t len, in p8_i2c_occ_send_cmd() argument 122 struct p8_i2c_occ *ctx = to_p8_i2c_occ(occ); in p8_i2c_occ_send_cmd() 138 /* trigger OCC attention */ in p8_i2c_occ_send_cmd() 154 /* wait for OCC */ in p8_i2c_occ_send_cmd() [all …]
|
H A D | Kconfig | 7 tristate "POWER8 OCC through I2C" 12 On-Chip Controller (OCC) on a POWER8 processor. However, this driver 14 the P8, not the POWER processor itself. Communications with the OCC are 18 called occ-p8-hwmon. 21 tristate "POWER9 OCC through SBE" 26 On-Chip Controller (OCC) on a POWER9 processor. However, this driver 28 the P9, not the POWER processor itself. Communications with the OCC are 32 called occ-p9-hwmon.
|
H A D | Makefile | 2 occ-hwmon-common-objs := common.o sysfs.o 3 occ-p8-hwmon-objs := p8_i2c.o 4 occ-p9-hwmon-objs := p9_sbe.o 6 obj-$(CONFIG_SENSORS_OCC) += occ-hwmon-common.o 7 obj-$(CONFIG_SENSORS_OCC_P8_I2C) += occ-p8-hwmon.o 8 obj-$(CONFIG_SENSORS_OCC_P9_SBE) += occ-p9-hwmon.o
|
/linux/Documentation/hwmon/ |
H A D | occ.rst | 1 Kernel driver occ-hwmon 14 This driver supports hardware monitoring for the On-Chip Controller (OCC) 15 embedded on POWER processors. The OCC is a device that collects and aggregates 16 sensor data from the processor and the system. The OCC can provide the raw 20 manually if an "ibm,p8-occ-hwmon" compatible device is found under the 23 The P9 version of this driver is a client driver of the FSI-based OCC driver. 24 It will be probed automatically by the FSI-based OCC driver. 32 The OCC sensor ID is an integer that represents the unique identifier of the 33 sensor with respect to the OCC. For example, a temperature sensor for the third 37 Some entries are only present with certain OCC sensor versions or only on [all …]
|
H A D | ibmpowernv.rst | 45 each OCC. Using this attribute each OCC can be asked to 58 each OCC. Using this attribute each OCC can be asked to 69 each OCC. Using this attribute each OCC can be asked to 80 each OCC. Using this attribute each OCC can be asked to
|
/linux/tools/testing/selftests/drivers/net/mlxsw/ |
H A D | tc_police_occ.sh | 68 local occ=$(tc_police_occ_get) 73 (( occ + 1 == $(tc_police_occ_get) )) 74 check_err $? "Got occupancy $(tc_police_occ_get), expected $((occ + 1))" 77 (( occ == $(tc_police_occ_get) )) 78 check_err $? "Got occupancy $(tc_police_occ_get), expected $occ" 87 (( occ + 1 == $(tc_police_occ_get) )) 88 check_err $? "Got occupancy $(tc_police_occ_get), expected $((occ + 1))" 91 (( occ + 1 == $(tc_police_occ_get) )) 92 check_err $? "Got occupancy $(tc_police_occ_get), expected $((occ + 1))" 95 (( occ == $(tc_police_occ_get) )) [all …]
|
H A D | port_range_occ.sh | 69 local occ=$(port_range_occ_get) 76 (( occ + 2 == $(port_range_occ_get) )) 77 check_err $? "Got occupancy $(port_range_occ_get), expected $((occ + 2))" 88 (( occ + 2 == $(port_range_occ_get) )) 89 check_err $? "Got occupancy $(port_range_occ_get), expected $((occ + 2))" 94 (( occ + 2 == $(port_range_occ_get) )) 95 check_err $? "Got occupancy $(port_range_occ_get), expected $((occ + 2))" 98 (( occ == $(port_range_occ_get) )) 99 check_err $? "Got occupancy $(port_range_occ_get), expected $occ"
|
H A D | port_scale.sh | 56 occ=$(devlink -j resource show $DEVLINK_DEV \ 57 | jq '.[][][] | select(.name=="physical_ports") |.["occ"]') 59 [[ $occ -eq $max_ports ]] 60 check_err_fail $should_fail $? "Attempt to create $max_ports ports (actual result $occ)"
|
H A D | rif_mac_profile_scale.sh | 42 occ=$(devlink -j resource show $DEVLINK_DEV \ 43 | jq '.[][][] | select(.name=="rif_mac_profiles") |.["occ"]') 45 [[ $occ -eq $count ]] 46 check_err_fail $should_fail $? "Attempt to use $count profiles (actual result $occ)"
|
/linux/Documentation/devicetree/bindings/fsi/ |
H A D | ibm,p9-occ.yaml | 4 $id: http://devicetree.org/schemas/fsi/ibm,p9-occ.yaml# 7 title: IBM FSI-attached On-Chip Controller (OCC) 13 The POWER processor On-Chip Controller (OCC) helps manage power and 20 - ibm,p9-occ 21 - ibm,p10-occ 25 $ref: /schemas/hwmon/ibm,occ-hwmon.yaml 34 occ { 35 compatible = "ibm,p9-occ"; 38 compatible = "ibm,p9-occ-hwmon";
|
H A D | ibm,p9-sbefifo.yaml | 27 occ: 29 $ref: ibm,p9-occ.yaml# 43 occ { 44 compatible = "ibm,p9-occ";
|
/linux/Documentation/devicetree/bindings/hwmon/ |
H A D | ibm,occ-hwmon.yaml | 4 $id: http://devicetree.org/schemas/hwmon/ibm,occ-hwmon.yaml# 7 title: IBM On-Chip Controller (OCC) accessed from a service processor 13 The POWER processor On-Chip Controller (OCC) helps manage power and 15 controller can query the OCC for it's power and thermal data to report 21 - ibm,p9-occ-hwmon 22 - ibm,p10-occ-hwmon 25 description: This property describes whether or not the OCC should 37 compatible = "ibm,p10-occ-hwmon";
|
/linux/drivers/soc/ti/ |
H A D | k3-ringacc.c | 33 * @occ: Ring Occupancy Register 42 u32 occ; member 124 * @occ: Occupancy 131 u32 occ; member 242 return readl(&ring->rt->occ) & K3_RINGACC_RT_OCC_MASK; in k3_ringacc_ring_read_occ() 249 val = readl(&ring->rt->occ); in k3_ringacc_ring_update_occ() 251 ring->state.occ = val & K3_RINGACC_RT_OCC_MASK; in k3_ringacc_ring_update_occ() 322 dev_dbg(dev, "dump occ%08x\n", readl(&ring->rt->occ)); in k3_ringacc_ring_dump() 509 void k3_ringacc_ring_reset_dma(struct k3_ring *ring, u32 occ) in k3_ringacc_ring_reset_dma() argument 517 if (!occ) in k3_ringacc_ring_reset_dma() [all …]
|
/linux/arch/arm/boot/dts/aspeed/ |
H A D | aspeed-bmc-opp-vesnin.dts | 166 occ-hwmon@50 { 167 compatible = "ibm,p8-occ-hwmon"; 175 occ-hwmon@51 { 176 compatible = "ibm,p8-occ-hwmon"; 193 occ-hwmon@56 { 194 compatible = "ibm,p8-occ-hwmon"; 210 occ-hwmon@57 { 211 compatible = "ibm,p8-occ-hwmon";
|
H A D | ibm-power9-dual.dtsi | 89 fsi_occ0: occ@1 { 90 compatible = "ibm,p9-occ"; 190 fsi_occ1: occ@2 { 191 compatible = "ibm,p9-occ"; 206 /* Legacy OCC numbering (to get rid of when userspace is fixed) */
|
/linux/arch/mips/boot/dts/mobileye/ |
H A D | eyeq5-clocks.dtsi | 17 occ_cpu: occ-cpu { 80 occ_isram: occ-isram { 94 occ_dbu: occ-dbu { 109 occ_vdi: occ-vdi { 123 occ_can_ser: occ-can-ser { 145 occ_periph: occ-periph { 220 occ_mjpeg_core: occ-mjpeg-core { 252 occ_pci_sys: occ-pci-sys {
|
/linux/drivers/net/netdevsim/ |
H A D | fib.c | 124 u64 occ; member 1116 u64 occ = 0; in nsim_nexthop_create() local 1131 occ = 1; in nsim_nexthop_create() 1135 occ += info->nh_grp->nh_entries[i].weight; in nsim_nexthop_create() 1138 occ = info->nh_res_table->num_nh_buckets; in nsim_nexthop_create() 1147 nexthop->occ = occ; in nsim_nexthop_create() 1156 static int nsim_nexthop_account(struct nsim_fib_data *data, u64 occ, in nsim_nexthop_account() argument 1162 for (i = 0; i < occ; i++) in nsim_nexthop_account() 1170 if (WARN_ON(occ > atomic64_read(&data->nexthops.num))) in nsim_nexthop_account() 1172 atomic64_sub(occ, &data->nexthops.num); in nsim_nexthop_account() [all …]
|
/linux/tools/testing/selftests/drivers/net/netdevsim/ |
H A D | psample.sh | 127 grep -q -e "out-tc-occ " $CAPTURE_FILE 128 check_err $? "Sampled packets not reported with out-tc-occ when should" 133 grep -q -e "out-tc-occ " $CAPTURE_FILE 134 check_fail $? "Sampled packets reported with out-tc-occ when should not"
|
/linux/drivers/net/ethernet/mellanox/mlxsw/ |
H A D | spectrum1_kvdl.c | 282 u64 occ = 0; in mlxsw_sp1_kvdl_part_occ() local 289 occ += info->alloc_size; in mlxsw_sp1_kvdl_part_occ() 290 return occ; in mlxsw_sp1_kvdl_part_occ() 296 u64 occ = 0; in mlxsw_sp1_kvdl_occ_get() local 300 occ += mlxsw_sp1_kvdl_part_occ(kvdl->parts[i]); in mlxsw_sp1_kvdl_occ_get() 302 return occ; in mlxsw_sp1_kvdl_occ_get()
|