[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <B926444035E5E2439431908E3842AFD2552B4F@DGGEMI525-MBS.china.huawei.com>
Date: Fri, 3 Jul 2020 05:19:54 +0000
From: "Song Bao Hua (Barry Song)" <song.bao.hua@...ilicon.com>
To: John Garry <john.garry@...wei.com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"rafael@...nel.org" <rafael@...nel.org>
CC: Robin Murphy <robin.murphy@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Zengtao (B)" <prime.zeng@...ilicon.com>,
Linuxarm <linuxarm@...wei.com>
Subject: RE: [PATCH v3] driver core: platform: expose numa_node to users in
sysfs
>
> 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
Powered by blists - more mailing lists