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 6EE9E434404; Thu, 30 Jul 2026 15:59:15 +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=1785427157; cv=none; b=Kp9sha6Ckw319WtnbzcZ0R1WSs08nLjREt8XaWS4Lv/IfKoc2qXObhQt+rAEenhqhySqrNNcQr1WpBqBJ4hPdoYnWM4XekZNGiUq9yXt1B7/5CMtusNj4YmmX/THioTkLFIofpwH5IAGo0rNVnyeIVrf04W++8k4nd3wc0h7LJ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785427157; c=relaxed/simple; bh=3aa5USkVnVz1FDnAU6hAaW6GoKIZiIpV7YzsWJ7vF1A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m20a1sKzy9sVDCgBU+lwaPv/2wO9FyyZayV1M0irdfcA1tR8bW8O/Nu20E3q0inLzBtPhy6Gf62oEg9nrrYkJVZFhZoXjPFBymT7rv5uHBuvNwHRZN/sxxOxp1gfSmt3c2ajv2j0acve1V2TedlsYTeqvL+zOo3dZ/st4ojuMIQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nTJe9kzH; 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="nTJe9kzH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4DC81F000E9; Thu, 30 Jul 2026 15:59:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1785427155; bh=H0FvUdj6RNWSvtOgF5b0Uo/O8u/xA+HheQ81/nsjz84=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=nTJe9kzHYu2DUfff5IKo/OCnUMcz/CfcQODe6gMdN46AKBzGv5N1nFmECUXGYZDfd X+XMYJSaB0K5DisBUgMTfZ1lb9I7fjGRMYhkOWSFC7TbzQVKCMz0IflWKX95OMxhny Aysn0PpBjJbIY6aUMh9gRthcJHp+Y+sq0FG57v0U= 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.6 070/484] firmware: arm_scmi: Rate-limit queue-full warnings in IRQ context Date: Thu, 30 Jul 2026 16:09:27 +0200 Message-ID: <20260730141424.956252611@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260730141423.392222816@linuxfoundation.org> References: <20260730141423.392222816@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.6-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 4782b115e6ec51..1bc715fe3968c3 100644 --- a/drivers/firmware/arm_scmi/notify.c +++ b/drivers/firmware/arm_scmi/notify.c @@ -595,9 +595,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