[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-4.1-testing] pm: don't truncate processors' ACPI IDs to 8 bits
# HG changeset patch # User Jan Beulich <jbeulich@xxxxxxxxxx> # Date 1341825744 -3600 # Node ID 9fe2a77b740d3d591e994d687bac31484506920b # Parent b394b1f87ebcdc88aa0478a93870862bb50df040 pm: don't truncate processors' ACPI IDs to 8 bits This is just another adjustment to allow systems with very many CPUs (or unusual ACPI IDs) to be properly power-managed. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> xen-unstable changeset: 23781:0849b0e59e24 xen-unstable date: Mon Aug 22 10:10:39 2011 +0100 --- diff -r b394b1f87ebc -r 9fe2a77b740d xen/arch/ia64/linux-xen/acpi.c --- a/xen/arch/ia64/linux-xen/acpi.c Mon Jul 09 10:21:42 2012 +0100 +++ b/xen/arch/ia64/linux-xen/acpi.c Mon Jul 09 10:22:24 2012 +0100 @@ -223,11 +223,14 @@ static u16 ia64_acpiid_to_sapicid[ MAX_L {[0 ... MAX_LOCAL_SAPIC - 1] = 0xffff }; /* acpi id to cpu id */ -int get_cpu_id(u8 acpi_id) +int get_cpu_id(u32 acpi_id) { int i; u16 apic_id; + if ( acpi_id >= MAX_LOCAL_SAPIC ) + return -EINVAL; + apic_id = ia64_acpiid_to_sapicid[acpi_id]; if ( apic_id == 0xffff ) return -EINVAL; diff -r b394b1f87ebc -r 9fe2a77b740d xen/arch/x86/acpi/cpu_idle.c --- a/xen/arch/x86/acpi/cpu_idle.c Mon Jul 09 10:21:42 2012 +0100 +++ b/xen/arch/x86/acpi/cpu_idle.c Mon Jul 09 10:22:24 2012 +0100 @@ -902,11 +902,14 @@ static void set_cx( acpi_power->safe_state = cx; } -int get_cpu_id(u8 acpi_id) +int get_cpu_id(u32 acpi_id) { int i; u32 apic_id; + if ( acpi_id >= MAX_MADT_ENTRIES ) + return -1; + apic_id = x86_acpiid_to_apicid[acpi_id]; if ( apic_id == BAD_APICID ) return -1; @@ -983,7 +986,7 @@ long set_cx_pminfo(uint32_t cpu, struct print_cx_pminfo(cpu, power); /* map from acpi_id to cpu_id */ - cpu_id = get_cpu_id((u8)cpu); + cpu_id = get_cpu_id(cpu); if ( cpu_id == -1 ) { printk(XENLOG_ERR "no cpu_id for acpi_id %d\n", cpu); diff -r b394b1f87ebc -r 9fe2a77b740d xen/include/acpi/cpufreq/processor_perf.h --- a/xen/include/acpi/cpufreq/processor_perf.h Mon Jul 09 10:21:42 2012 +0100 +++ b/xen/include/acpi/cpufreq/processor_perf.h Mon Jul 09 10:22:24 2012 +0100 @@ -6,7 +6,7 @@ #define XEN_PX_INIT 0x80000000 -int get_cpu_id(u8); +int get_cpu_id(u32); int powernow_cpufreq_init(void); unsigned int powernow_register_driver(void); unsigned int get_measured_perf(unsigned int cpu, unsigned int flag); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |