|
@@ -53,6 +53,8 @@ static unsigned long *acpi_ids_done;
|
|
static unsigned long *acpi_id_present;
|
|
static unsigned long *acpi_id_present;
|
|
/* And if there is an _CST definition (or a PBLK) for the ACPI IDs */
|
|
/* And if there is an _CST definition (or a PBLK) for the ACPI IDs */
|
|
static unsigned long *acpi_id_cst_present;
|
|
static unsigned long *acpi_id_cst_present;
|
|
|
|
+/* Which ACPI P-State dependencies for a enumerated processor */
|
|
|
|
+static struct acpi_psd_package *acpi_psd;
|
|
|
|
|
|
static int push_cxx_to_hypervisor(struct acpi_processor *_pr)
|
|
static int push_cxx_to_hypervisor(struct acpi_processor *_pr)
|
|
{
|
|
{
|
|
@@ -372,6 +374,13 @@ read_acpi_id(acpi_handle handle, u32 lvl, void *context, void **rv)
|
|
|
|
|
|
pr_debug("ACPI CPU%u w/ PBLK:0x%lx\n", acpi_id, (unsigned long)pblk);
|
|
pr_debug("ACPI CPU%u w/ PBLK:0x%lx\n", acpi_id, (unsigned long)pblk);
|
|
|
|
|
|
|
|
+ /* It has P-state dependencies */
|
|
|
|
+ if (!acpi_processor_get_psd(handle, &acpi_psd[acpi_id])) {
|
|
|
|
+ pr_debug("ACPI CPU%u w/ PST:coord_type = %llu domain = %llu\n",
|
|
|
|
+ acpi_id, acpi_psd[acpi_id].coord_type,
|
|
|
|
+ acpi_psd[acpi_id].domain);
|
|
|
|
+ }
|
|
|
|
+
|
|
status = acpi_evaluate_object(handle, "_CST", NULL, &buffer);
|
|
status = acpi_evaluate_object(handle, "_CST", NULL, &buffer);
|
|
if (ACPI_FAILURE(status)) {
|
|
if (ACPI_FAILURE(status)) {
|
|
if (!pblk)
|
|
if (!pblk)
|
|
@@ -405,6 +414,14 @@ static int check_acpi_ids(struct acpi_processor *pr_backup)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ acpi_psd = kcalloc(nr_acpi_bits, sizeof(struct acpi_psd_package),
|
|
|
|
+ GFP_KERNEL);
|
|
|
|
+ if (!acpi_psd) {
|
|
|
|
+ kfree(acpi_id_present);
|
|
|
|
+ kfree(acpi_id_cst_present);
|
|
|
|
+ return -ENOMEM;
|
|
|
|
+ }
|
|
|
|
+
|
|
acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT,
|
|
acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT,
|
|
ACPI_UINT32_MAX,
|
|
ACPI_UINT32_MAX,
|
|
read_acpi_id, NULL, NULL, NULL);
|
|
read_acpi_id, NULL, NULL, NULL);
|
|
@@ -417,6 +434,12 @@ upload:
|
|
pr_backup->acpi_id = i;
|
|
pr_backup->acpi_id = i;
|
|
/* Mask out C-states if there are no _CST or PBLK */
|
|
/* Mask out C-states if there are no _CST or PBLK */
|
|
pr_backup->flags.power = test_bit(i, acpi_id_cst_present);
|
|
pr_backup->flags.power = test_bit(i, acpi_id_cst_present);
|
|
|
|
+ /* num_entries is non-zero if we evaluated _PSD */
|
|
|
|
+ if (acpi_psd[i].num_entries) {
|
|
|
|
+ memcpy(&pr_backup->performance->domain_info,
|
|
|
|
+ &acpi_psd[i],
|
|
|
|
+ sizeof(struct acpi_psd_package));
|
|
|
|
+ }
|
|
(void)upload_pm_data(pr_backup);
|
|
(void)upload_pm_data(pr_backup);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -566,6 +589,7 @@ static void __exit xen_acpi_processor_exit(void)
|
|
kfree(acpi_ids_done);
|
|
kfree(acpi_ids_done);
|
|
kfree(acpi_id_present);
|
|
kfree(acpi_id_present);
|
|
kfree(acpi_id_cst_present);
|
|
kfree(acpi_id_cst_present);
|
|
|
|
+ kfree(acpi_psd);
|
|
for_each_possible_cpu(i)
|
|
for_each_possible_cpu(i)
|
|
acpi_processor_unregister_performance(i);
|
|
acpi_processor_unregister_performance(i);
|
|
|
|
|