len += snprintf(
buf + len, PAGE_SIZE - len,
"avg:%08lld min:%08lld max %08lld\n",
- phba->ktime_seg1_total /
- phba->ktime_data_samples,
+ div_u64(phba->ktime_seg1_total,
+ phba->ktime_data_samples),
phba->ktime_seg1_min,
phba->ktime_seg1_max);
len += snprintf(
len += snprintf(
buf + len, PAGE_SIZE - len,
"avg:%08lld min:%08lld max %08lld\n",
- phba->ktime_seg2_total /
- phba->ktime_data_samples,
+ div_u64(phba->ktime_seg2_total,
+ phba->ktime_data_samples),
phba->ktime_seg2_min,
phba->ktime_seg2_max);
len += snprintf(
len += snprintf(
buf + len, PAGE_SIZE - len,
"avg:%08lld min:%08lld max %08lld\n",
- phba->ktime_seg3_total /
- phba->ktime_data_samples,
+ div_u64(phba->ktime_seg3_total,
+ phba->ktime_data_samples),
phba->ktime_seg3_min,
phba->ktime_seg3_max);
len += snprintf(
len += snprintf(
buf + len, PAGE_SIZE - len,
"avg:%08lld min:%08lld max %08lld\n",
- phba->ktime_seg4_total /
- phba->ktime_data_samples,
+ div_u64(phba->ktime_seg4_total,
+ phba->ktime_data_samples),
phba->ktime_seg4_min,
phba->ktime_seg4_max);
len += snprintf(
buf + len, PAGE_SIZE - len,
"Total IO avg time: %08lld\n",
- ((phba->ktime_seg1_total +
+ div_u64(phba->ktime_seg1_total +
phba->ktime_seg2_total +
phba->ktime_seg3_total +
- phba->ktime_seg4_total) /
+ phba->ktime_seg4_total,
phba->ktime_data_samples));
return len;
}
"cmd pass to NVME Layer\n");
len += snprintf(buf + len, PAGE_SIZE-len,
"avg:%08lld min:%08lld max %08lld\n",
- phba->ktime_seg1_total /
- phba->ktime_data_samples,
+ div_u64(phba->ktime_seg1_total,
+ phba->ktime_data_samples),
phba->ktime_seg1_min,
phba->ktime_seg1_max);
len += snprintf(buf + len, PAGE_SIZE-len,
"-to- Driver rcv cmd OP (action)\n");
len += snprintf(buf + len, PAGE_SIZE-len,
"avg:%08lld min:%08lld max %08lld\n",
- phba->ktime_seg2_total /
- phba->ktime_data_samples,
+ div_u64(phba->ktime_seg2_total,
+ phba->ktime_data_samples),
phba->ktime_seg2_min,
phba->ktime_seg2_max);
len += snprintf(buf + len, PAGE_SIZE-len,
"Firmware WQ doorbell: cmd\n");
len += snprintf(buf + len, PAGE_SIZE-len,
"avg:%08lld min:%08lld max %08lld\n",
- phba->ktime_seg3_total /
- phba->ktime_data_samples,
+ div_u64(phba->ktime_seg3_total,
+ phba->ktime_data_samples),
phba->ktime_seg3_min,
phba->ktime_seg3_max);
len += snprintf(buf + len, PAGE_SIZE-len,
"-to- MSI-X ISR for cmd cmpl\n");
len += snprintf(buf + len, PAGE_SIZE-len,
"avg:%08lld min:%08lld max %08lld\n",
- phba->ktime_seg4_total /
- phba->ktime_data_samples,
+ div_u64(phba->ktime_seg4_total,
+ phba->ktime_data_samples),
phba->ktime_seg4_min,
phba->ktime_seg4_max);
len += snprintf(buf + len, PAGE_SIZE-len,
"-to- NVME layer passed cmd done\n");
len += snprintf(buf + len, PAGE_SIZE-len,
"avg:%08lld min:%08lld max %08lld\n",
- phba->ktime_seg5_total /
- phba->ktime_data_samples,
+ div_u64(phba->ktime_seg5_total,
+ phba->ktime_data_samples),
phba->ktime_seg5_min,
phba->ktime_seg5_max);
len += snprintf(buf + len, PAGE_SIZE-len,
"avg:%08lld min:%08lld "
"max %08lld\n",
- phba->ktime_seg10_total /
- phba->ktime_data_samples,
+ div_u64(phba->ktime_seg10_total,
+ phba->ktime_data_samples),
phba->ktime_seg10_min,
phba->ktime_seg10_max);
return len;
"-to- Driver rcv rsp status OP\n");
len += snprintf(buf + len, PAGE_SIZE-len,
"avg:%08lld min:%08lld max %08lld\n",
- phba->ktime_seg6_total /
- phba->ktime_status_samples,
+ div_u64(phba->ktime_seg6_total,
+ phba->ktime_status_samples),
phba->ktime_seg6_min,
phba->ktime_seg6_max);
len += snprintf(buf + len, PAGE_SIZE-len,
"-to- Firmware WQ doorbell: status\n");
len += snprintf(buf + len, PAGE_SIZE-len,
"avg:%08lld min:%08lld max %08lld\n",
- phba->ktime_seg7_total /
- phba->ktime_status_samples,
+ div_u64(phba->ktime_seg7_total,
+ phba->ktime_status_samples),
phba->ktime_seg7_min,
phba->ktime_seg7_max);
len += snprintf(buf + len, PAGE_SIZE-len,
" -to- MSI-X ISR for status cmpl\n");
len += snprintf(buf + len, PAGE_SIZE-len,
"avg:%08lld min:%08lld max %08lld\n",
- phba->ktime_seg8_total /
- phba->ktime_status_samples,
+ div_u64(phba->ktime_seg8_total,
+ phba->ktime_status_samples),
phba->ktime_seg8_min,
phba->ktime_seg8_max);
len += snprintf(buf + len, PAGE_SIZE-len,
"-to- NVME layer passed status done\n");
len += snprintf(buf + len, PAGE_SIZE-len,
"avg:%08lld min:%08lld max %08lld\n",
- phba->ktime_seg9_total /
- phba->ktime_status_samples,
+ div_u64(phba->ktime_seg9_total,
+ phba->ktime_status_samples),
phba->ktime_seg9_min,
phba->ktime_seg9_max);
len += snprintf(buf + len, PAGE_SIZE-len,
"cmd completed on wire\n");
len += snprintf(buf + len, PAGE_SIZE-len,
"avg:%08lld min:%08lld max %08lld\n",
- phba->ktime_seg10_total /
- phba->ktime_status_samples,
+ div_u64(phba->ktime_seg10_total,
+ phba->ktime_status_samples),
phba->ktime_seg10_min,
phba->ktime_seg10_max);
return len;