[PATCH v4 2/5] arm64: ras: Add Device Tree frontend

Umang Chheda umang.chheda at oss.qualcomm.com
Mon Nov 30 04:29:40 PST 2026


Hello Rob,

On 11/19/2026 12:55 AM, Rob Herring wrote:
> 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 at 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).

Thanks for the review. The intent was to reuse the existing ACPI flow,
but I agree this is not the right DT approach.

I'll rework this to use normal DT device population and refactor the
common initialization logic so it can be shared between the ACPI and DT
paths.
 

> 
> Rob

Thanks,
Umang




More information about the linux-arm-kernel mailing list