xen/24123-x86-cpuidle-quiesce.patch
Charles Arnold ac6e56e6d7 - Upstream patches from Jan
23900-xzalloc.patch
  24144-cpufreq-turbo-crash.patch
  24148-shadow-pgt-dying-op-performance.patch
  24155-x86-ioapic-EOI-after-migration.patch
  24156-x86-ioapic-shared-vectors.patch
  24157-x86-xstate-init.patch
  24168-x86-vioapic-clear-remote_irr.patch

- submit fixes for bnc#649209 and bnc#711892
  xl-create-pv-with-qcow2-img.patch
  update suspend_evtchn_lock.patch
 

- Update trace.c, merge patches from upstream
  23050-xentrace_dynamic_tracebuffer_allocation.patch
  23091-xentrace_fix_t_info_pages_calculation..patch
  23092-xentrace_print_calculated_numbers_in_calculate_tbuf_size.patch
  23093-xentrace_remove_gdprintk_usage_since_they_are_not_in_guest_context.patch
  23094-xentrace_update_comments.patch
  23095-xentrace_use_consistent_printk_prefix.patch
  23128-xentrace_correct_formula_to_calculate_t_info_pages.patch
  23129-xentrace_remove_unneeded_debug_printk.patch
  23173-xentrace_Move_register_cpu_notifier_call_into_boot-time_init..patch
  23239-xentrace_correct_overflow_check_for_number_of_per-cpu_trace_pages.patch
  23308-xentrace_Move_the_global_variable_t_info_first_offset_into_calculate_tbuf_size.patch
  23309-xentrace_Mark_data_size___read_mostly_because_its_only_written_once.patch
  23310-xentrace_Remove_unneeded_cast_when_assigning_pointer_value_to_dst.patch
  23404-xentrace_reduce_trace_buffer_size_to_something_mfn_offset_can_reach.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=160
2011-11-28 19:34:40 +00:00

65 lines
2.4 KiB
Diff

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1321017916 -3600
# Node ID 8b08b2166aa82e7df0b1fa620ed57078810f8c12
# Parent 4699decb8424a00447c466205be3cb4d0fb95a76
x86: quiesce cpuidle code
So far these messages got pointlessly (as the code in other places
assumes symmetric configuration) emitted once per CPU. Hide the debug
one behind opt_cpu_info, and issue the info one just once (if the code
gets adjusted to support assymtric configurations, this would need to
be revisited, but ideally without producing per-CPU messages again).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -659,6 +659,8 @@ static int acpi_processor_ffh_cstate_pro
unsigned int edx_part;
unsigned int cstate_type; /* C-state type and not ACPI C-state type */
unsigned int num_cstate_subtype;
+ int ret = 0;
+ static unsigned long printed;
if ( c->cpuid_level < CPUID_MWAIT_LEAF )
{
@@ -667,8 +669,9 @@ static int acpi_processor_ffh_cstate_pro
}
cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx);
- printk(XENLOG_DEBUG "cpuid.MWAIT[.eax=%x, .ebx=%x, .ecx=%x, .edx=%x]\n",
- eax, ebx, ecx, edx);
+ if ( opt_cpu_info )
+ printk(XENLOG_DEBUG "cpuid.MWAIT[eax=%x ebx=%x ecx=%x edx=%x]\n",
+ eax, ebx, ecx, edx);
/* Check whether this particular cx_type (in CST) is supported or not */
cstate_type = (cx->reg.address >> MWAIT_SUBSTATE_SIZE) + 1;
@@ -676,15 +679,16 @@ static int acpi_processor_ffh_cstate_pro
num_cstate_subtype = edx_part & MWAIT_SUBSTATE_MASK;
if ( num_cstate_subtype < (cx->reg.address & MWAIT_SUBSTATE_MASK) )
- return -EFAULT;
-
+ ret = -ERANGE;
/* mwait ecx extensions INTERRUPT_BREAK should be supported for C2/C3 */
- if ( !(ecx & CPUID5_ECX_EXTENSIONS_SUPPORTED) ||
- !(ecx & CPUID5_ECX_INTERRUPT_BREAK) )
- return -EFAULT;
-
- printk(XENLOG_INFO "Monitor-Mwait will be used to enter C-%d state\n", cx->type);
- return 0;
+ else if ( !(ecx & CPUID5_ECX_EXTENSIONS_SUPPORTED) ||
+ !(ecx & CPUID5_ECX_INTERRUPT_BREAK) )
+ ret = -ENODEV;
+ else if ( opt_cpu_info || cx->type >= BITS_PER_LONG ||
+ !test_and_set_bit(cx->type, &printed) )
+ printk(XENLOG_INFO "Monitor-Mwait will be used to enter C%d state\n",
+ cx->type);
+ return ret;
}
/*