From nobody Tue Feb 10 01:30:51 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B2BF42405E1; Thu, 16 Oct 2025 19:08:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760641736; cv=none; b=GooTDw60VNuUU4zFBxITkLRaEZDPAXyyxnNL/b7Azs6jqdcd5qg0h7h09/N+pFdHDPsw5JmheQ5JOpewYVu2igLXdMLuD+9Jm4Tl1wa/g3kN0EiH3p3OR0Sjxt7aBluS7vvKA6MMYkq6oksXhVILjnq6gYFVzd8qbD0W6rBVH9o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760641736; c=relaxed/simple; bh=PpaQ7BCEXv9Ro94oij7wAw/f4BpfXUSkCtsNnzFifvM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=t62w4zpOvB0V+ae5NEw+Yqv9olnUj0SR1154Uy22GKPdXmfGKY9cO/3fXrCDggfSHxED/yc1I0Q9Ex/NDcFen70ZrOx51uC9cUfuuwKp1WDvhZcrtgK1uam7JkOmKh4dlpr4MDd4SluVfq6VPocQap1LjMHFBU50wVMRQXyBuj4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2BD4426BA; Thu, 16 Oct 2025 12:08:46 -0700 (PDT) Received: from e133711.arm.com (e133711.arm.com [10.1.196.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BEAC03F66E; Thu, 16 Oct 2025 12:08:52 -0700 (PDT) From: Sudeep Holla Date: Thu, 16 Oct 2025 20:08:17 +0100 Subject: [PATCH 3/6] mailbox: pcc: Set txdone_irq/txdone_poll based on PCCT flags Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251016-pcc_mb_updates-v1-3-0fba69616f69@arm.com> References: <20251016-pcc_mb_updates-v1-0-0fba69616f69@arm.com> In-Reply-To: <20251016-pcc_mb_updates-v1-0-0fba69616f69@arm.com> To: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sudeep Holla , Adam Young , Robbie King , Huisong Li , Jassi Brar , Cristian Marussi X-Mailer: b4 0.14.3 The PCC controller currently enables txdone via IRQ if the PCCT exposes platform capability to generate command completion interrupt, but it leaves txdone_poll unchanged. Make the behaviour explicit: - If ACPI_PCCT_DOORBELL is present, use txdone_irq and disable polling. - Otherwise, disable txdone_irq and fall back to txdone_poll. Configure the PCC mailbox to use interrupt-based completion for PCC types that signal completion via IRQ using TXDONE_BY_IRQ, and fall back to polling for others using TXDONE_BY_POLL. This ensures the PCC driver uses the appropriate completion mechanism according to the PCCT table definition and makes the completion mode unambiguous avoiding mixed signalling when the platform lacks a doorbell flag set. Signed-off-by: Sudeep Holla Acked-by: lihuisong@huawei.com Tested-by: Adam Young --- drivers/mailbox/pcc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c index 2b690c268cf0..327e022973db 100644 --- a/drivers/mailbox/pcc.c +++ b/drivers/mailbox/pcc.c @@ -791,8 +791,13 @@ static int pcc_mbox_probe(struct platform_device *pdev) (unsigned long) pcct_tbl + sizeof(struct acpi_table_pcct)); =20 acpi_pcct_tbl =3D (struct acpi_table_pcct *) pcct_tbl; - if (acpi_pcct_tbl->flags & ACPI_PCCT_DOORBELL) + if (acpi_pcct_tbl->flags & ACPI_PCCT_DOORBELL) { pcc_mbox_ctrl->txdone_irq =3D true; + pcc_mbox_ctrl->txdone_poll =3D false; + } else { + pcc_mbox_ctrl->txdone_irq =3D false; + pcc_mbox_ctrl->txdone_poll =3D true; + } =20 for (i =3D 0; i < count; i++) { struct pcc_chan_info *pchan =3D chan_info + i; --=20 2.34.1