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 EE3753EF641; Tue, 17 Mar 2026 16:56:33 +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=1773766594; cv=none; b=SNlNkc2a1uV8Qy/5exYB5TmEvqOoT/9YY+Qf9Wstb3A4GGe+8tlWX4perUbuAwyS0L0DV4hYpiic1wrJi0ZJVhFclZluFrk5XqNQCr3d5nVTLIb/esTHdARQiNsbR7MsSIwXR7M+rqzDZ/x5guzH9zUK4+RbR21KQt8hyyTmbqM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773766594; c=relaxed/simple; bh=ZiQjgCEUUgYKGi5Yz9ViD441fTEouee7qiL3izrPbng=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=msvaDl7qv5HF1tlxTRSaP8pZxwA4jGFYddhtSO6Ki6GeelxljQHbE2bn8G/+yIzzrAWc7QL2mwmIFtBVBj5F33divz36ffmTFeHXrx3/iMrIj2Sef3ODyqAuOFLCyLeX1Qo6IQFE4jCObhlwdC9OC2//3uDcrQxDbUFhT5pUrRM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ylqi3LA/; 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="Ylqi3LA/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5DE4BC4CEF7; Tue, 17 Mar 2026 16:56:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773766593; bh=ZiQjgCEUUgYKGi5Yz9ViD441fTEouee7qiL3izrPbng=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ylqi3LA/fRh4Jx2RntRoj3PG6cegxaFAOxa3ehBNllQPC+cQO+398Nx+ffg2tPWx6 Tvxo/UTHomJ9ZlUKMsOAGqLFYWExJSsSWy9Gge60lAr3STiSXeUtpK/ifK+ZU+Vvc7 HT25LMwrCU40EMkPWrgWkycMWQkplN/iyX/uZvKI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Ma=C3=ADra=20Canal?= , Florian Fainelli , Stefan Wahren , Ulf Hansson Subject: [PATCH 6.19 280/378] pmdomain: bcm: bcm2835-power: Fix broken reset status read Date: Tue, 17 Mar 2026 17:33:57 +0100 Message-ID: <20260317163017.306434608@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260317163006.959177102@linuxfoundation.org> References: <20260317163006.959177102@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.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Maíra Canal commit 550bae2c0931dbb664a61b08c21cf156f0a5362a upstream. bcm2835_reset_status() has a misplaced parenthesis on every PM_READ() call. Since PM_READ(reg) expands to readl(power->base + (reg)), the expression: PM_READ(PM_GRAFX & PM_V3DRSTN) computes the bitwise AND of the register offset PM_GRAFX with the bitmask PM_V3DRSTN before using the result as a register offset, reading from the wrong MMIO address instead of the intended PM_GRAFX register. The same issue affects the PM_IMAGE cases. Fix by moving the closing parenthesis so PM_READ() receives only the register offset, and the bitmask is applied to the value returned by the read. Fixes: 670c672608a1 ("soc: bcm: bcm2835-pm: Add support for power domains under a new binding.") Signed-off-by: Maíra Canal Reviewed-by: Florian Fainelli Reviewed-by: Stefan Wahren Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/pmdomain/bcm/bcm2835-power.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/pmdomain/bcm/bcm2835-power.c +++ b/drivers/pmdomain/bcm/bcm2835-power.c @@ -580,11 +580,11 @@ static int bcm2835_reset_status(struct r switch (id) { case BCM2835_RESET_V3D: - return !PM_READ(PM_GRAFX & PM_V3DRSTN); + return !(PM_READ(PM_GRAFX) & PM_V3DRSTN); case BCM2835_RESET_H264: - return !PM_READ(PM_IMAGE & PM_H264RSTN); + return !(PM_READ(PM_IMAGE) & PM_H264RSTN); case BCM2835_RESET_ISP: - return !PM_READ(PM_IMAGE & PM_ISPRSTN); + return !(PM_READ(PM_IMAGE) & PM_ISPRSTN); default: return -EINVAL; }