From: Rob Herring <robh@kernel.org>
To: Umang Chheda <umang.chheda@oss.qualcomm.com>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Ruidong Tian <tianruidong@linux.alibaba.com>,
Tony Luck <tony.luck@intel.com>, Borislav Petkov <bp@alien8.de>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Abel Vesa <abelvesa@kernel.org>,
Richard Cochran <richardcochran@gmail.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Robin Murphy <robin.murphy@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
James Morse <james.morse@arm.com>,
Sudeep Holla <sudeep.holla@kernel.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org,
Avaneesh Dwivedi <avaneesh.dwivedi@oss.qualcomm.com>
Subject: Re: [PATCH v4 2/5] arm64: ras: Add Device Tree frontend
Date: Wed, 18 Nov 2026 13:25:43 -0600 [thread overview]
Message-ID: <20261118192543.GA261024-robh@kernel.org> (raw)
In-Reply-To: <20261118-aest-devicetree-support-v4-2-936587251e8f@oss.qualcomm.com>
On Wed, Nov 18, 2026 at 12:48:21AM +0530, Umang Chheda wrote:
> Add a Device Tree frontend for the ARM64 RAS driver, allowing it
> to be used on platforms without ACPI firmware.
>
> The error sources defined in DT are registered as arm64_ras platform
> devices at boot. The frontend produces the same software fwnode properties
> as the ACPI path, so the core driver probes DT and ACPI nodes identically
> without any firmware-specific knowledge.
>
> Signed-off-by: Umang Chheda <umang.chheda@oss.qualcomm.com>
[...]
> + ret = platform_device_add(pdev);
> + if (ret)
> + goto err_put;
> +
> + pr_debug("registered RAS node %pOF as arm64_ras.%d\n", np, pdev->id);
> + return 0;
> +
> +err_put:
> + platform_device_put(pdev);
> + return ret;
> +}
> +
> +static int __init ras_of_init(void)
> +{
> + const struct of_device_id *match;
> + struct device_node *np;
> + int index = 0, ret;
> +
> + if (!acpi_disabled)
> + return 0;
> +
> + for_each_matching_node_and_match(np, ras_of_match, &match) {
> + u8 node_type = *(const unsigned long *)match->data;
> +
> + ret = ras_of_init_one_node(np, node_type, index++);
Why are you rolling your own platform device creation? The DT
infrastructure will create devices for you. And likely you are getting 2
devices for every node because you are not setting flags on the nodes to
prevent that. But setting the flag is not the right thing. Moving all
this code to driver probe is the right thing. That probably means some
refactoring have a common probe function that the DT and ACPI probe
functions can call (assuming there can't just be one common probe).
Rob
next prev parent reply other threads:[~2026-11-18 19:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 19:18 [PATCH v4 0/5] arm: ras: Add DT frontend support for ARM RAS Umang Chheda
2026-11-17 19:18 ` [PATCH v4 1/5] dt-bindings: arm: ras: Introduce ARM RAS error sources Umang Chheda
2026-11-17 19:18 ` [PATCH v4 2/5] arm64: ras: Add Device Tree frontend Umang Chheda
2026-11-18 19:25 ` Rob Herring [this message]
2026-11-17 19:18 ` [PATCH v4 3/5] arm64: dts: qcom: monaco: add RAS error source nodes Umang Chheda
2026-11-17 19:18 ` [PATCH v4 4/5] arm64: dts: qcom: lemans: " Umang Chheda
2026-11-17 19:18 ` [PATCH v4 5/5] arm64: dts: qcom: shikra: " Umang Chheda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261118192543.GA261024-robh@kernel.org \
--to=robh@kernel.org \
--cc=abelvesa@kernel.org \
--cc=andersson@kernel.org \
--cc=avaneesh.dwivedi@oss.qualcomm.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=james.morse@arm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=richardcochran@gmail.com \
--cc=robin.murphy@arm.com \
--cc=sudeep.holla@kernel.org \
--cc=tianruidong@linux.alibaba.com \
--cc=tony.luck@intel.com \
--cc=umang.chheda@oss.qualcomm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®