From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1510F3AEF4F; Mon, 23 Mar 2026 14:03:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774274621; cv=none; b=YYMUqwq+yAZMLPZ2GOZflFl4Wo5FiWcxwVakGQb7E/lKoYIM03via2o8pLNGwxLnwJWGUTJmoas0DHb6Cdi7rSBS+VUBCaxeXng2nJ1G/Wnuc3Ziyoa6fVkP/7pwnKvZFsZToXJTx1XWwpcQXl6a1jOmndP5nchQUkaEZA1zUkc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774274621; c=relaxed/simple; bh=NPrebAKSaCg4Wx8lb0ycgGYSeophYgkC8KoO7Nvin+g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ddv8TsEjaNdLgzQ2euRoGiQCGBvafpQEqxS4lAm5tRG0rO7/gR2VaQ4Rzcqz036xqbFS3xfSK++XQoBCcMJBTZnYZU2dUXw/kBWjz7YTf8UyBj3/Zt5fne0/wF8OTQlxzvS11j+PnUlgqP9H+PzbLwKMHAlvnIRVuBp4Cw8rKb0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=k/ZsEQHg; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="k/ZsEQHg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C00AC2BC9E; Mon, 23 Mar 2026 14:03:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774274621; bh=NPrebAKSaCg4Wx8lb0ycgGYSeophYgkC8KoO7Nvin+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k/ZsEQHgtRvElXHb4bqqPxBvrxGHRw8W3ICoB4rEfGdY8QIpipYpzgTCy5i1FGbSK uD039OfL0Ccq60sD0yG6rYNUPhDttfVSRJjMiEq5xBc+LlN/1eyly5AgQ9JvykAwp5 Sagp6WIOvNLGF2bp3NE/lNq6DzHoOCdswzfOP85U= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Ma=C3=ADra=20Canal?= , Stefan Wahren , Ulf Hansson Subject: [PATCH 6.18 055/212] pmdomain: bcm: bcm2835-power: Increase ASB control timeout Date: Mon, 23 Mar 2026 14:44:36 +0100 Message-ID: <20260323134505.507398024@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323134503.770111826@linuxfoundation.org> References: <20260323134503.770111826@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Maíra Canal commit b826d2c0b0ecb844c84431ba6b502e744f5d919a upstream. The bcm2835_asb_control() function uses a tight polling loop to wait for the ASB bridge to acknowledge a request. During intensive workloads, this handshake intermittently fails for V3D's master ASB on BCM2711, resulting in "Failed to disable ASB master for v3d" errors during runtime PM suspend. As a consequence, the failed power-off leaves V3D in a broken state, leading to bus faults or system hangs on later accesses. As the timeout is insufficient in some scenarios, increase the polling timeout from 1us to 5us, which is still negligible in the context of a power domain transition. Also, replace the open-coded ktime_get_ns()/ cpu_relax() polling loop with readl_poll_timeout_atomic(). Cc: stable@vger.kernel.org Fixes: 670c672608a1 ("soc: bcm: bcm2835-pm: Add support for power domains under a new binding.") Signed-off-by: Maíra Canal Reviewed-by: Stefan Wahren Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/pmdomain/bcm/bcm2835-power.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) --- a/drivers/pmdomain/bcm/bcm2835-power.c +++ b/drivers/pmdomain/bcm/bcm2835-power.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -152,7 +153,6 @@ struct bcm2835_power { static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable) { void __iomem *base = power->asb; - u64 start; u32 val; switch (reg) { @@ -165,8 +165,6 @@ static int bcm2835_asb_control(struct bc break; } - start = ktime_get_ns(); - /* Enable the module's async AXI bridges. */ if (enable) { val = readl(base + reg) & ~ASB_REQ_STOP; @@ -175,11 +173,9 @@ static int bcm2835_asb_control(struct bc } writel(PM_PASSWORD | val, base + reg); - while (!!(readl(base + reg) & ASB_ACK) == enable) { - cpu_relax(); - if (ktime_get_ns() - start >= 1000) - return -ETIMEDOUT; - } + if (readl_poll_timeout_atomic(base + reg, val, + !!(val & ASB_ACK) != enable, 0, 5)) + return -ETIMEDOUT; return 0; }