diff mbox

[v3,1/5] ACPI / processor : add support for ACPI0010 processor container

Message ID 1449065446-26115-2-git-send-email-sudeep.holla@arm.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Sudeep Holla Dec. 2, 2015, 2:10 p.m. UTC
ACPI 6.0 adds support for optional processor container device which may
contain child objects that are either processor devices or other processor
containers. This allows representing hierarchical processor topologies.

It is declared using the _HID of ACPI0010. It is an abstract container
used to represent CPU topology and should not be used to hotplug
purposes.

This patch enables the support for these ACPI processor containers and
ensures the generic container/module devices are not created for them.

Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/acpi/acpi_processor.c | 17 +++++++++++++++++
 include/acpi/processor.h      |  1 +
 2 files changed, 18 insertions(+)

Comments

Rafael J. Wysocki Feb. 16, 2016, 8:10 p.m. UTC | #1
On Wednesday, December 02, 2015 02:10:42 PM Sudeep Holla wrote:
> ACPI 6.0 adds support for optional processor container device which may
> contain child objects that are either processor devices or other processor
> containers. This allows representing hierarchical processor topologies.
> 
> It is declared using the _HID of ACPI0010. It is an abstract container
> used to represent CPU topology and should not be used to hotplug
> purposes.
> 
> This patch enables the support for these ACPI processor containers and
> ensures the generic container/module devices are not created for them.

I wouldn't say that it "enables the support".  What it actually does is
to prevent platform devices from being created for processor container
objects.

I can apply it right away with this changelog modification, though.

Thanks,
Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sudeep Holla Feb. 17, 2016, 11:54 a.m. UTC | #2
On 16/02/16 20:10, Rafael J. Wysocki wrote:
> On Wednesday, December 02, 2015 02:10:42 PM Sudeep Holla wrote:
>> ACPI 6.0 adds support for optional processor container device which may
>> contain child objects that are either processor devices or other processor
>> containers. This allows representing hierarchical processor topologies.
>>
>> It is declared using the _HID of ACPI0010. It is an abstract container
>> used to represent CPU topology and should not be used to hotplug
>> purposes.
>>
>> This patch enables the support for these ACPI processor containers and
>> ensures the generic container/module devices are not created for them.
>
> I wouldn't say that it "enables the support".  What it actually does is
> to prevent platform devices from being created for processor container
> objects.
>
> I can apply it right away with this changelog modification, though.
>

Ah my mistake, didn't change the log message from first version.
Will post the patch with update log, you can change it further if required.
diff mbox

Patch

diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c
index 6979186dbd4b..b5e54f2da53d 100644
--- a/drivers/acpi/acpi_processor.c
+++ b/drivers/acpi/acpi_processor.c
@@ -514,7 +514,24 @@  static struct acpi_scan_handler processor_handler = {
 	},
 };
 
+static int acpi_processor_container_attach(struct acpi_device *dev,
+					   const struct acpi_device_id *id)
+{
+	return 1;
+}
+
+static const struct acpi_device_id processor_container_ids[] = {
+	{ ACPI_PROCESSOR_CONTAINER_HID, },
+	{ }
+};
+
+static struct acpi_scan_handler processor_container_handler = {
+	.ids = processor_container_ids,
+	.attach = acpi_processor_container_attach,
+};
+
 void __init acpi_processor_init(void)
 {
 	acpi_scan_add_handler_with_hotplug(&processor_handler, "processor");
+	acpi_scan_add_handler(&processor_container_handler);
 }
diff --git a/include/acpi/processor.h b/include/acpi/processor.h
index 07fb100bcc68..54d7860cac11 100644
--- a/include/acpi/processor.h
+++ b/include/acpi/processor.h
@@ -9,6 +9,7 @@ 
 #define ACPI_PROCESSOR_CLASS		"processor"
 #define ACPI_PROCESSOR_DEVICE_NAME	"Processor"
 #define ACPI_PROCESSOR_DEVICE_HID	"ACPI0007"
+#define ACPI_PROCESSOR_CONTAINER_HID	"ACPI0010"
 
 #define ACPI_PROCESSOR_BUSY_METRIC	10