Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286497
b: refs/heads/master
c: d640113
h: refs/heads/master
i:
  286495: 0ee7a02
v: v3
  • Loading branch information
Lin Ming authored and Len Brown committed Jan 17, 2012
1 parent 327fc1e commit 7f724e2
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c2a9f06a9cd7194f884cdc88144866235dec07d
refs/heads/master: d640113fe80e45ebd4a5b420b220d3f6bf37f682
5 changes: 0 additions & 5 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1035,11 +1035,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
By default, super page will be supported if Intel IOMMU
has the capability. With this option, super page will
not be supported.

intel_idle.max_cstate= [KNL,HW,ACPI,X86]
0 disables intel_idle and fall back on acpi_idle.
1 to 6 specify maximum depth of C-state.

intremap= [X86-64, Intel-IOMMU]
on enable Interrupt Remapping (default)
off disable Interrupt Remapping
Expand Down
26 changes: 24 additions & 2 deletions trunk/drivers/acpi/processor_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,30 @@ int acpi_get_cpuid(acpi_handle handle, int type, u32 acpi_id)
apic_id = map_mat_entry(handle, type, acpi_id);
if (apic_id == -1)
apic_id = map_madt_entry(type, acpi_id);
if (apic_id == -1)
return apic_id;
if (apic_id == -1) {
/*
* On UP processor, there is no _MAT or MADT table.
* So above apic_id is always set to -1.
*
* BIOS may define multiple CPU handles even for UP processor.
* For example,
*
* Scope (_PR)
* {
* Processor (CPU0, 0x00, 0x00000410, 0x06) {}
* Processor (CPU1, 0x01, 0x00000410, 0x06) {}
* Processor (CPU2, 0x02, 0x00000410, 0x06) {}
* Processor (CPU3, 0x03, 0x00000410, 0x06) {}
* }
*
* Ignores apic_id and always return 0 for CPU0's handle.
* Return -1 for other CPU's handle.
*/
if (acpi_id == 0)
return acpi_id;
else
return apic_id;
}

#ifdef CONFIG_SMP
for_each_possible_cpu(i) {
Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/idle/intel_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static struct cpuidle_state atom_cstates[MWAIT_MAX_NUM_CSTATES] = {
.enter = &intel_idle },
};

static long get_driver_data(int cstate)
static int get_driver_data(int cstate)
{
int driver_data;
switch (cstate) {
Expand Down Expand Up @@ -232,7 +232,6 @@ static long get_driver_data(int cstate)
* @drv: cpuidle driver
* @index: index of cpuidle state
*
* Must be called under local_irq_disable().
*/
static int intel_idle(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index)
Expand All @@ -248,6 +247,8 @@ static int intel_idle(struct cpuidle_device *dev,

cstate = (((eax) >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK) + 1;

local_irq_disable();

/*
* leave_mm() to avoid costly and often unnecessary wakeups
* for flushing the user TLB's associated with the active mm.
Expand Down Expand Up @@ -347,8 +348,7 @@ static int intel_idle_probe(void)
cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &mwait_substates);

if (!(ecx & CPUID5_ECX_EXTENSIONS_SUPPORTED) ||
!(ecx & CPUID5_ECX_INTERRUPT_BREAK) ||
!mwait_substates)
!(ecx & CPUID5_ECX_INTERRUPT_BREAK))
return -ENODEV;

pr_debug(PREFIX "MWAIT substates: 0x%x\n", mwait_substates);
Expand Down Expand Up @@ -394,7 +394,7 @@ static int intel_idle_probe(void)
if (boot_cpu_has(X86_FEATURE_ARAT)) /* Always Reliable APIC Timer */
lapic_timer_reliable_states = LAPIC_TIMER_ALWAYS_RELIABLE;
else {
on_each_cpu(__setup_broadcast_timer, (void *)true, 1);
smp_call_function(__setup_broadcast_timer, (void *)true, 1);
register_cpu_notifier(&setup_broadcast_notifier);
}

Expand Down Expand Up @@ -471,7 +471,7 @@ static int intel_idle_cpuidle_driver_init(void)
}

if (auto_demotion_disable_flags)
on_each_cpu(auto_demotion_disable, NULL, 1);
smp_call_function(auto_demotion_disable, NULL, 1);

return 0;
}
Expand Down Expand Up @@ -568,7 +568,7 @@ static void __exit intel_idle_exit(void)
cpuidle_unregister_driver(&intel_idle_driver);

if (lapic_timer_reliable_states != LAPIC_TIMER_ALWAYS_RELIABLE) {
on_each_cpu(__setup_broadcast_timer, (void *)false, 1);
smp_call_function(__setup_broadcast_timer, (void *)false, 1);
unregister_cpu_notifier(&setup_broadcast_notifier);
}

Expand Down

0 comments on commit 7f724e2

Please sign in to comment.