Fix the acpi idle support on i386 which was broken by r312910.
The ifdefs were '#if !defined(__i386__) || !defined(PC98)' previously, so cpu_idle_acpi was enabled both i386 and amd64 except PC98. I was obfuscated by '#if !defined(__i386__)' condition. Submitted by: bde Reported by: bde
This commit is contained in:
parent
15b2cdedca
commit
645b154260
@ -451,9 +451,7 @@ struct {
|
|||||||
{ cpu_idle_spin, "spin" },
|
{ cpu_idle_spin, "spin" },
|
||||||
{ cpu_idle_mwait, "mwait" },
|
{ cpu_idle_mwait, "mwait" },
|
||||||
{ cpu_idle_hlt, "hlt" },
|
{ cpu_idle_hlt, "hlt" },
|
||||||
#if !defined(__i386__)
|
|
||||||
{ cpu_idle_acpi, "acpi" },
|
{ cpu_idle_acpi, "acpi" },
|
||||||
#endif
|
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -470,11 +468,9 @@ idle_sysctl_available(SYSCTL_HANDLER_ARGS)
|
|||||||
if (strstr(idle_tbl[i].id_name, "mwait") &&
|
if (strstr(idle_tbl[i].id_name, "mwait") &&
|
||||||
(cpu_feature2 & CPUID2_MON) == 0)
|
(cpu_feature2 & CPUID2_MON) == 0)
|
||||||
continue;
|
continue;
|
||||||
#if !defined(__i386__)
|
|
||||||
if (strcmp(idle_tbl[i].id_name, "acpi") == 0 &&
|
if (strcmp(idle_tbl[i].id_name, "acpi") == 0 &&
|
||||||
cpu_idle_hook == NULL)
|
cpu_idle_hook == NULL)
|
||||||
continue;
|
continue;
|
||||||
#endif
|
|
||||||
p += sprintf(p, "%s%s", p != avail ? ", " : "",
|
p += sprintf(p, "%s%s", p != avail ? ", " : "",
|
||||||
idle_tbl[i].id_name);
|
idle_tbl[i].id_name);
|
||||||
}
|
}
|
||||||
@ -509,11 +505,9 @@ idle_sysctl(SYSCTL_HANDLER_ARGS)
|
|||||||
if (strstr(idle_tbl[i].id_name, "mwait") &&
|
if (strstr(idle_tbl[i].id_name, "mwait") &&
|
||||||
(cpu_feature2 & CPUID2_MON) == 0)
|
(cpu_feature2 & CPUID2_MON) == 0)
|
||||||
continue;
|
continue;
|
||||||
#if !defined(__i386__)
|
|
||||||
if (strcmp(idle_tbl[i].id_name, "acpi") == 0 &&
|
if (strcmp(idle_tbl[i].id_name, "acpi") == 0 &&
|
||||||
cpu_idle_hook == NULL)
|
cpu_idle_hook == NULL)
|
||||||
continue;
|
continue;
|
||||||
#endif
|
|
||||||
if (strcmp(idle_tbl[i].id_name, buf))
|
if (strcmp(idle_tbl[i].id_name, buf))
|
||||||
continue;
|
continue;
|
||||||
cpu_idle_fn = idle_tbl[i].id_fn;
|
cpu_idle_fn = idle_tbl[i].id_fn;
|
||||||
|
Loading…
Reference in New Issue
Block a user