287ca6da2e
23725-pci-add-device.patch 23762-iommu-fault-bm-off.patch 23763-pci-multi-seg-x2apic-vtd-no-crash.patch 23765-x86-irq-vector-leak.patch 23766-x86-msi-vf-bars.patch 23771-x86-ioapic-clear-pin.patch 23772-x86-trampoline.patch 23774-x86_64-EFI-EDD.patch 23776-x86-kexec-hpet-legacy-bcast-disable.patch 23781-pm-wide-ACPI-ids.patch 23782-x86-ioapic-clear-irr.patch 23783-ACPI-set-_PDC-bits.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=140
69 lines
1.9 KiB
Diff
69 lines
1.9 KiB
Diff
# HG changeset patch
|
|
# User Jan Beulich <jbeulich@novell.com>
|
|
# Date 1314004239 -3600
|
|
# Node ID 0849b0e59e2418e8215616df147f955b01b07577
|
|
# Parent 07f78b5bd03c02e32324eaa00487643d27b7ffa8
|
|
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@novell.com>
|
|
|
|
--- a/xen/arch/ia64/linux-xen/acpi.c
|
|
+++ b/xen/arch/ia64/linux-xen/acpi.c
|
|
@@ -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;
|
|
--- a/xen/arch/x86/acpi/cpu_idle.c
|
|
+++ b/xen/arch/x86/acpi/cpu_idle.c
|
|
@@ -871,11 +871,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;
|
|
@@ -952,7 +955,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);
|
|
--- a/xen/include/acpi/cpufreq/processor_perf.h
|
|
+++ b/xen/include/acpi/cpufreq/processor_perf.h
|
|
@@ -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);
|