Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mei: me: move trace into firmware status read

Move register trace near it actual read in the firmware status callback
and make it adhere to the actual read type.

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Link: https://patch.msgid.link/20260201094358.1440593-4-alexander.usyskin@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Alexander Usyskin and committed by
Greg Kroah-Hartman
bf025a84 f3d0423d

+12 -12
+2 -1
drivers/misc/mei/gsc-me.c
··· 23 23 24 24 #define MEI_GSC_RPM_TIMEOUT 500 25 25 26 - static int mei_gsc_read_hfs(const struct mei_device *dev, int where, u32 *val) 26 + static int mei_gsc_read_hfs(const struct mei_device *dev, int where, const char *name, u32 *val) 27 27 { 28 28 struct mei_me_hw *hw = to_me_hw(dev); 29 29 30 30 *val = ioread32(hw->mem_addr + where + 0xC00); 31 + trace_mei_reg_read(&dev->dev, name, where, *val); 31 32 32 33 return 0; 33 34 }
+3 -8
drivers/misc/mei/hw-me.c
··· 215 215 216 216 fw_status->count = fw_src->count; 217 217 for (i = 0; i < fw_src->count && i < MEI_FW_STATUS_MAX; i++) { 218 - ret = hw->read_fws(dev, fw_src->status[i], 218 + ret = hw->read_fws(dev, fw_src->status[i], "PCI_CFG_HFS_X", 219 219 &fw_status->status[i]); 220 - trace_mei_pci_cfg_read(&dev->dev, "PCI_CFG_HFS_X", 221 - fw_src->status[i], 222 - fw_status->status[i]); 223 220 if (ret) 224 221 return ret; 225 222 } ··· 247 250 hw->hbuf_depth = (hcsr & H_CBD) >> 24; 248 251 249 252 reg = 0; 250 - hw->read_fws(dev, PCI_CFG_HFS_1, &reg); 251 - trace_mei_pci_cfg_read(&dev->dev, "PCI_CFG_HFS_1", PCI_CFG_HFS_1, reg); 253 + hw->read_fws(dev, PCI_CFG_HFS_1, "PCI_CFG_HFS_1", &reg); 252 254 hw->d0i3_supported = 253 255 ((reg & PCI_CFG_HFS_1_D0I3_MSK) == PCI_CFG_HFS_1_D0I3_MSK); 254 256 ··· 442 446 if (!kind_is_gsc(dev) && !kind_is_gscfi(dev)) 443 447 return; 444 448 445 - hw->read_fws(dev, PCI_CFG_HFS_5, &fwsts5); 446 - trace_mei_pci_cfg_read(&dev->dev, "PCI_CFG_HFS_5", PCI_CFG_HFS_5, fwsts5); 449 + hw->read_fws(dev, PCI_CFG_HFS_5, "PCI_CFG_HFS_5", &fwsts5); 447 450 448 451 if ((fwsts5 & GSC_CFG_HFS_5_BOOT_TYPE_MSK) == GSC_CFG_HFS_5_BOOT_TYPE_PXP) { 449 452 if (dev->gsc_reset_to_pxp == MEI_DEV_RESET_TO_PXP_DEFAULT)
+1 -1
drivers/misc/mei/hw-me.h
··· 56 56 enum mei_pg_state pg_state; 57 57 bool d0i3_supported; 58 58 u8 hbuf_depth; 59 - int (*read_fws)(const struct mei_device *dev, int where, u32 *val); 59 + int (*read_fws)(const struct mei_device *dev, int where, const char *name, u32 *val); 60 60 /* polling */ 61 61 struct task_struct *polling_thread; 62 62 wait_queue_head_t wait_active;
+6 -2
drivers/misc/mei/pci-me.c
··· 23 23 #include "client.h" 24 24 #include "hw-me-regs.h" 25 25 #include "hw-me.h" 26 + #include "mei-trace.h" 26 27 27 28 /* mei_pci_tbl - PCI Device ID Table */ 28 29 static const struct pci_device_id mei_me_pci_tbl[] = { ··· 146 145 static inline void mei_me_unset_pm_domain(struct mei_device *dev) {} 147 146 #endif /* CONFIG_PM */ 148 147 149 - static int mei_me_read_fws(const struct mei_device *dev, int where, u32 *val) 148 + static int mei_me_read_fws(const struct mei_device *dev, int where, const char *name, u32 *val) 150 149 { 151 150 struct pci_dev *pdev = to_pci_dev(dev->parent); 151 + int ret; 152 152 153 - return pci_read_config_dword(pdev, where, val); 153 + ret = pci_read_config_dword(pdev, where, val); 154 + trace_mei_pci_cfg_read(&dev->dev, name, where, *val); 155 + return ret; 154 156 } 155 157 156 158 /**