From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3696423782; Thu, 30 Jul 2026 14:59:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785423581; cv=none; b=UnK/+ZURxalcBkCvXiVBJ0ZWGRR++wKQZeH5NwTrXHjE/eaFC3w2FwGIph33a0N/I3bxIQkMg2EYE1YccxusBkA3Cy2fZCdlK70nTHYOLUSw3jikERjGGsA252OM7wRBWyZgwgwe7zzXkgsShwCpgM5NKQYyyUfIC0NsLieHUnM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785423581; c=relaxed/simple; bh=D77ZiCAmV7Ks9Jhs7rTH0yRR7Zms8A0mrywO6wVbjqk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y/eEFrPO8ENQ/KEBsQ7zkwqecJVZszuATVSXRU/f7Nq1c6/I2sTQT0/EkCoSRiZWTveAsUFhIxwmbl9/Pv55cY9OOcXY417XGIzsaWQXNrZrcM7nb/VK39Q0DLuucEou6qOv1oE4fVJH3WfURkW99GwT/Thk2FJCaUkU1jXRBNM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MyySlMug; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="MyySlMug" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06E2F1F000E9; Thu, 30 Jul 2026 14:59:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1785423580; bh=Tuv6XrXsbwWlqwJXmBGjXomaOzPjLPc1WnOvex3SIzM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=MyySlMug2AvJVQTu0WshSqPggRxOcvsMbZSBro/7RO621nrG4cmwywlfiDKuqBF6H 0dXqArWdcQx6xeILFi+5Qc9+0GmSMTJDehfpdPYehTpnZyMBsuS19VNLtNfN9fVFD3 GkjQ9xrM7hEDZq1C/kuYoHlxZ5jiI/51j5ahKq6M= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Pushpendra Singh , Sudeep Holla , Sasha Levin Subject: [PATCH 6.18 094/675] firmware: arm_scmi: Rate-limit queue-full warnings in IRQ context Date: Thu, 30 Jul 2026 16:07:04 +0200 Message-ID: <20260730141447.127153126@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260730141445.110192266@linuxfoundation.org> References: <20260730141445.110192266@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Pushpendra Singh [ Upstream commit a4447c0693830d5ecadd6e755cb7fdc55d86aacc ] The scmi_notify() function is called from interrupt context to queue received notification events onto a per-protocol kfifo. When the kfifo is full, it logs a warning via dev_warn() for every dropped event. Under conditions where the platform sends a burst of SCMI notifications faster than the deferred worker can drain the queue, this results in a flood of dev_warn() calls from IRQ context. Each call acquires the console lock and may execute blocking console writes, causing the CPU to be held in interrupt context for an extended period and leading to observable system stalls. Fix this by switching to dev_warn_ratelimited() to limit the frequency of log messages when the notification queue is full. This reduces console overhead in interrupt context and prevents CPU stalls caused by excessive logging, while still preserving diagnostic visibility. Fixes: bd31b249692e ("firmware: arm_scmi: Add notification dispatch and delivery") Signed-off-by: Pushpendra Singh Link: https://patch.msgid.link/20260708072339.3021140-1-pushpendra.singh@oss.qualcomm.com Signed-off-by: Sudeep Holla Signed-off-by: Sasha Levin --- drivers/firmware/arm_scmi/notify.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/firmware/arm_scmi/notify.c b/drivers/firmware/arm_scmi/notify.c index 2047edbdc5f6b1..9bf7f43ab868c8 100644 --- a/drivers/firmware/arm_scmi/notify.c +++ b/drivers/firmware/arm_scmi/notify.c @@ -600,9 +600,9 @@ int scmi_notify(const struct scmi_handle *handle, u8 proto_id, u8 evt_id, return -EINVAL; } if (kfifo_avail(&r_evt->proto->equeue.kfifo) < sizeof(eh) + len) { - dev_warn(handle->dev, - "queue full, dropping proto_id:%d evt_id:%d ts:%lld\n", - proto_id, evt_id, ktime_to_ns(ts)); + dev_warn_ratelimited(handle->dev, + "queue full, dropping proto_id:%d evt_id:%d ts:%lld\n", + proto_id, evt_id, ktime_to_ns(ts)); return -ENOMEM; } -- 2.53.0