> 
> However, it is still much more clear and credible to users by exposing the 
> data
> directly from ACPI table.
> 

Except ARM64 iort, numa_node is actually also applicable to x86 and other 
architectures through general
acpi_create_platform_device() API:

drivers/acpi/scan.c:
static void acpi_default_enumeration(struct acpi_device *device)
{
        ...
        if (!device->flags.enumeration_by_parent) {
                acpi_create_platform_device(device, NULL);
                acpi_device_set_enumerated(device);
        }
}

struct platform_device *acpi_create_platform_device(struct acpi_device *adev,
                                        struct property_entry *properties)
{
        ...

        pdev = platform_device_register_full(&pdevinfo);
        if (IS_ERR(pdev))
                dev_err(&adev->dev, "platform device creation failed: %ld\n",
                        PTR_ERR(pdev));
        else {
                set_dev_node(&pdev->dev, acpi_get_node(adev->handle));
                dev_dbg(&adev->dev, "created platform device %s\n",
                        dev_name(&pdev->dev));
        }

        ...

        return pdev;
}

> >
> > Thanks,
> > John

Thanks
Barry


Reply via email to