From 4b5a45fc1ac12e034d5ae6cfaab62a596e724098 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 28 Oct 2008 10:39:11 +0000 Subject: [PATCH] dom0: Fix for throttling while pr->id == -1 Signed-off-by: Wei Gang --- drivers/acpi/processor_core.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 3997f185..2680e022 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -513,8 +513,17 @@ static int acpi_processor_get_info(struct acpi_processor *pr) #if defined(CONFIG_CPU_FREQ) || defined(CONFIG_PROCESSOR_EXTERNAL_CONTROL) acpi_processor_ppc_has_changed(pr); #endif - acpi_processor_get_throttling_info(pr); - acpi_processor_get_limit_info(pr); + + /* + * pr->id may equal to -1 while processor_cntl_external enabled. + * throttle and thermal module don't support this case. + * Tx only works when dom0 vcpu == pcpu num by far, as we give + * control to dom0. + */ + if (pr->id != -1) { + acpi_processor_get_throttling_info(pr); + acpi_processor_get_limit_info(pr); + } return 0; } -- 2.39.5