From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796219373; b=G3o5iT5cwiq6HuIlM/B7xqB8rzyQRJkNUwZjWQ+z+rN3KEHEC0DUCjrs+OBGld3ZDb8W 2dHuHkMAjIsWjojPw9Lj3EDseMM1mZmKccI02lfXUHIie52SueeYjapspoNIcHmkCY6bY rPxmBBbE05PH3DrM7VChvBT7LLQWCopInte1aDnF3u1poQffMFXNB+SXTMmjGxanHJ2U+ 98sS1I+itfyAdqs5WLaC/B3JvXtU0KZWVJvNng28IUKK0h0KmFKfxxzwN2zaZJ9IIxZc7 q/WRA+ICvWcXfpt1we/6fAPJ/QWmqDv8CrHs2QK+ap3rT0cAobWQgRdbDGsRPLKXXjQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796219373; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=CPBKM+y8waEPG/ysKrWy9N3BSv0L4wbGmJjkDNcG2X8=; b=5Ymkw95TBCwYOrcMc0NMAUUR2GJOVRWy2e3gQomRgQraa2P9TD9wVdPilSF3pk9nreuV kqtDkGWQyOpW/XttXBFuPLEy7ZJrHa3LM+lxguZIcNh0s1ZCA2nCRf3KK7GJkI3W2R1pH ghapxCLD/8ABsKimKXYN/BBvordhUxc77iBGehuPrFNg5yW+oe7O6mI9adeiDcOY0NNfH eBz6D8ge3RG4i8PItigFNf0dbeLJ0/Mi1NHgUVHw3M126HmX+lfP07+oH16wNcNQf5+k2 RhEkH98If81bOxvKAgvoDTAWhT8Cr1GDY2RfeIK67YabWOFI386W/B98xsO9j10kcxw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="aR/LfZoH"; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD16F606A6B2; Wed, 2 Dec 2026 13:49:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=aR/LfZoH Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796219373; b=Zs5wmZn/1kD0s0COdugxPMlozIro2ZKx0m3+uY9goFBHrJLo1txv9/w7eDUYf467oSmM 8GHh1hf24wVJ9ziWYFGUOgCNmmXDIVDy0TovPKzwMiHJXKBIoZKNMclPdvuCRGH5ntSPN ASaFy2RRiRr76suioqG3qPlA0LRW+wgbtOzK/N3ZzFvdgqHT8BApnFJnhGlh26O3IeUAP 3DlvuXQRF5OgDAv8KxY1Nso7w9WoGeEDmM+6vMm9MVABEW4RmRh2z/JHT0hwJ832TOaeY zfdHIu92Mmz2IZzmqNZJHxXsralJQQBNhTmvvXEO6NY8VCClZa1cgt49wwKWrEZNtOg== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796219373; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=CPBKM+y8waEPG/ysKrWy9N3BSv0L4wbGmJjkDNcG2X8=; b=RmCCIglwltQUmmHBfdhmMOECfpUfweqmwAYTnaDMVYYApRLsPRnUDeJM8oYBdSnOXZy4 /yHmHj1APSYk8mzxufLM8RQz+aRsLUBxW1NttQN8kJXmtWzlPUBnldBkc8LLKuKAe2/lW WQpKHw9sxD2CE3/Oiu01SIaLkyyjYRAn4sw8mL4PBZIDtiuoTMyi/hr6Bl0vVtYJaIwjD VkaGCVvzeDqOLnxAYtR4zPOodBce/gwVfG7fl+fADHlGB3DndhwCK/Lg/dXbqDl3VE0l+ C6qGv71F/BiHAxLZP1zA2SB6++9mr6hykv01qPzXBl5XjdM8vSA7RPQAXxdRs3J/dww== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 3C3BE1F00931; Wed, 2 Dec 2026 13:49:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796219373; bh=CPBKM+y8waEPG/ysKrWy9N3BSv0L4wbGmJjkDNcG2X8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=aR/LfZoH8wH3gO7yLTpbWegYgidNgpf5DkEakYWDAZXFyNWw/Uubuqh8b/O5EyN7K cPYhF+Kftb82BKUTPtRxWXjhr1+YGAhczcWCRIhXqZm9oIVxP1MIqGsNY5fRAEnWXN zXMGMSxB2SEo9k4D+tehDG3UUZktzom1zbpjQht77kMhLTqDlZxuFfFNwTrCSApxa/ jCx6bvhSrIkLknOTjIgyksh4H6DkiwwrY2apB3Q+l761osp3MDLHRndsoSeQ0EGBQQ bAcu03wCIx8MJlHZmPfuPjr8PPy7yD2jTAWzcCiV0aUfJtK/m6pzDaVIbEtlHb+Ezp cE7UN772BwyAA== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 8C63F4F42B; Wed, 2 Dec 2026 13:49:20 +0000 (UTC) From: Alexandre Rapaille via B4 Relay Date: Wed, 02 Dec 2026 14:49:20 +0100 Subject: [PATCH 1/2] remoteproc: qcom_wcnss: Request the MX and PX regulators on pronto-v1/v2 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261202-pronto-v1-send-v1-1-dff86afc652f@atlr-engineering.com> References: <20261202-pronto-v1-send-v1-0-dff86afc652f@atlr-engineering.com> In-Reply-To: <20261202-pronto-v1-send-v1-0-dff86afc652f@atlr-engineering.com> To: Bjorn Andersson , Mathieu Poirier , Val Packett , Konrad Dybcio , Konrad Dybcio , Abel Vesa , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Luca Weiss Cc: linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Luca Weiss , Alexandre Rapaille , stable@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796219360; l=1885; i=arapaille@atlr-engineering.com; s=20261118; h=from:subject:message-id; bh=JZUgUXDk2q6T622Sb37/pn06F1p6yEh0AR6wOod6Cjk=; b=Zl/DSc0UNyaHpzZlzfnRspQeb7PR+T6ElZU5DBsRhRTpD/H5VnL1+/25CRDugcdCKjOnMsUhk pfIJtkvabAxBmeOe64KacOdfD2wZoGFzYyB3tl3XWPoQBN1K5PsIa4k X-Developer-Key: i=arapaille@atlr-engineering.com; a=ed25519; pk=xskH/sIiNU/aZCeGeBB1TK/AuiG3MXlX0m2wMlbMl08= X-Endpoint-Received: by B4 Relay for arapaille@atlr-engineering.com/20261118 with auth_id=1560 X-Original-From: Alexandre Rapaille Reply-To: arapaille@atlr-engineering.com Content-Transfer-Encoding: 7bit From: Alexandre Rapaille The pronto-v3 check added by commit 3dbc90b9c22e ("remoteproc: qcom_wcnss: Fix handling the lack of PD regulators in v3") compares the number of power domain names with num_vregs, which counts only the non-PD regulators. On pronto-v1/v2 that is 2 >= 1, so the PD regulators are skipped there too: the driver requests only the first entry, "vddcx" (a dummy when CX is a power domain), and never votes VDD_MX or VDD_PX. Only skip when the vregs list has no PD regulators. Reverting that commit would bring back the pronto-v3 out-of-bounds read it fixed. Fixes: 3dbc90b9c22e ("remoteproc: qcom_wcnss: Fix handling the lack of PD regulators in v3") Cc: stable@vger.kernel.org Signed-off-by: Alexandre Rapaille --- drivers/remoteproc/qcom_wcnss.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index 02f38fe29f20..e73c4ed0b513 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -445,19 +445,15 @@ static int wcnss_init_regulators(struct qcom_wcnss *wcnss, { const struct wcnss_vreg_info *info = data->vregs; struct regulator_bulk_data *bulk; - size_t i, possible_pds = 0, num_vregs = data->num_vregs; + size_t i, num_vregs = data->num_vregs; int ret; - for (i = 0; i < WCNSS_MAX_PDS; i++) - if (data->pd_names[i]) - possible_pds++; - /* * If attaching the power domains suceeded we can skip requesting * the regulators for the power domains. For old device trees we need to * reserve extra space to manage them through the regulator interface. */ - if (possible_pds >= num_vregs) { + if (!data->num_pd_vregs) { /* Do nothing if vregs do not include PD regulators (pronto-v3) */ } else if (wcnss->num_pds) { info += wcnss->num_pds; -- 2.43.0