scsi: ufs: core: Drop last_intr_status/ts stats

In order to prepare introduction of a threaded interrupt handler, drop
last_intr_status & last_intr_ts drop the ufs_stats struct, and the
associated debug code.

Suggested-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250407-topic-ufs-use-threaded-irq-v3-1-08bee980f71e@linaro.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Neil Armstrong 2025-04-07 12:17:03 +02:00 committed by Martin K. Petersen
parent 0af2f6be1b
commit 56f4beffc9
2 changed files with 3 additions and 13 deletions

View File

@ -643,9 +643,6 @@ static void ufshcd_print_host_state(struct ufs_hba *hba)
"last_hibern8_exit_tstamp at %lld us, hibern8_exit_cnt=%d\n", "last_hibern8_exit_tstamp at %lld us, hibern8_exit_cnt=%d\n",
div_u64(hba->ufs_stats.last_hibern8_exit_tstamp, 1000), div_u64(hba->ufs_stats.last_hibern8_exit_tstamp, 1000),
hba->ufs_stats.hibern8_exit_cnt); hba->ufs_stats.hibern8_exit_cnt);
dev_err(hba->dev, "last intr at %lld us, last intr status=0x%x\n",
div_u64(hba->ufs_stats.last_intr_ts, 1000),
hba->ufs_stats.last_intr_status);
dev_err(hba->dev, "error handling flags=0x%x, req. abort count=%d\n", dev_err(hba->dev, "error handling flags=0x%x, req. abort count=%d\n",
hba->eh_flags, hba->req_abort_count); hba->eh_flags, hba->req_abort_count);
dev_err(hba->dev, "hba->ufs_version=0x%x, Host capabilities=0x%x, caps=0x%x\n", dev_err(hba->dev, "hba->ufs_version=0x%x, Host capabilities=0x%x, caps=0x%x\n",
@ -6984,14 +6981,12 @@ static irqreturn_t ufshcd_sl_intr(struct ufs_hba *hba, u32 intr_status)
*/ */
static irqreturn_t ufshcd_intr(int irq, void *__hba) static irqreturn_t ufshcd_intr(int irq, void *__hba)
{ {
u32 intr_status, enabled_intr_status = 0; u32 last_intr_status, intr_status, enabled_intr_status = 0;
irqreturn_t retval = IRQ_NONE; irqreturn_t retval = IRQ_NONE;
struct ufs_hba *hba = __hba; struct ufs_hba *hba = __hba;
int retries = hba->nutrs; int retries = hba->nutrs;
intr_status = ufshcd_readl(hba, REG_INTERRUPT_STATUS); last_intr_status = intr_status = ufshcd_readl(hba, REG_INTERRUPT_STATUS);
hba->ufs_stats.last_intr_status = intr_status;
hba->ufs_stats.last_intr_ts = local_clock();
/* /*
* There could be max of hba->nutrs reqs in flight and in worst case * There could be max of hba->nutrs reqs in flight and in worst case
@ -7015,7 +7010,7 @@ static irqreturn_t ufshcd_intr(int irq, void *__hba)
dev_err(hba->dev, "%s: Unhandled interrupt 0x%08x (0x%08x, 0x%08x)\n", dev_err(hba->dev, "%s: Unhandled interrupt 0x%08x (0x%08x, 0x%08x)\n",
__func__, __func__,
intr_status, intr_status,
hba->ufs_stats.last_intr_status, last_intr_status,
enabled_intr_status); enabled_intr_status);
ufshcd_dump_regs(hba, 0, UFSHCI_REG_SPACE_SIZE, "host_regs: "); ufshcd_dump_regs(hba, 0, UFSHCI_REG_SPACE_SIZE, "host_regs: ");
} }

View File

@ -501,8 +501,6 @@ struct ufs_event_hist {
/** /**
* struct ufs_stats - keeps usage/err statistics * struct ufs_stats - keeps usage/err statistics
* @last_intr_status: record the last interrupt status.
* @last_intr_ts: record the last interrupt timestamp.
* @hibern8_exit_cnt: Counter to keep track of number of exits, * @hibern8_exit_cnt: Counter to keep track of number of exits,
* reset this after link-startup. * reset this after link-startup.
* @last_hibern8_exit_tstamp: Set time after the hibern8 exit. * @last_hibern8_exit_tstamp: Set time after the hibern8 exit.
@ -510,9 +508,6 @@ struct ufs_event_hist {
* @event: array with event history. * @event: array with event history.
*/ */
struct ufs_stats { struct ufs_stats {
u32 last_intr_status;
u64 last_intr_ts;
u32 hibern8_exit_cnt; u32 hibern8_exit_cnt;
u64 last_hibern8_exit_tstamp; u64 last_hibern8_exit_tstamp;
struct ufs_event_hist event[UFS_EVT_CNT]; struct ufs_event_hist event[UFS_EVT_CNT];