Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252771
b: refs/heads/master
c: 534bc4e
h: refs/heads/master
i:
  252769: 251f09c
  252767: f0a1106
v: v3
  • Loading branch information
Zhang Rui authored and Len Brown committed May 29, 2011
1 parent 076ff91 commit 8be824e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 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: 932df7414336a00f45e5aec62724cf736b0bcfd4
refs/heads/master: 534bc4e3d27096e2f3fc00c14a20efd597837a4f
8 changes: 8 additions & 0 deletions trunk/drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,14 @@ static struct dmi_system_id __initdata ec_dmi_table[] = {
ec_flag_msi, "MSI hardware", {
DMI_MATCH(DMI_CHASSIS_VENDOR, "MICRO-STAR")}, NULL},
{
ec_flag_msi, "Quanta hardware", {
DMI_MATCH(DMI_SYS_VENDOR, "Quanta"),
DMI_MATCH(DMI_PRODUCT_NAME, "TW8/SW8/DW8"),}, NULL},
{
ec_flag_msi, "Quanta hardware", {
DMI_MATCH(DMI_SYS_VENDOR, "Quanta"),
DMI_MATCH(DMI_PRODUCT_NAME, "TW9/SW9"),}, NULL},
{
ec_validate_ecdt, "ASUS hardware", {
DMI_MATCH(DMI_BIOS_VENDOR, "ASUS") }, NULL},
{},
Expand Down
12 changes: 3 additions & 9 deletions trunk/drivers/acpi/processor_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ static struct dmi_system_id __initdata processor_idle_dmi_table[] = {
{},
};

#ifdef CONFIG_SMP
static int map_lapic_id(struct acpi_subtable_header *entry,
u32 acpi_id, int *apic_id)
{
Expand Down Expand Up @@ -164,9 +165,7 @@ static int map_mat_entry(acpi_handle handle, int type, u32 acpi_id)

int acpi_get_cpuid(acpi_handle handle, int type, u32 acpi_id)
{
#ifdef CONFIG_SMP
int i;
#endif
int apic_id = -1;

apic_id = map_mat_entry(handle, type, acpi_id);
Expand All @@ -175,19 +174,14 @@ int acpi_get_cpuid(acpi_handle handle, int type, u32 acpi_id)
if (apic_id == -1)
return apic_id;

#ifdef CONFIG_SMP
for_each_possible_cpu(i) {
if (cpu_physical_id(i) == apic_id)
return i;
}
#else
/* In UP kernel, only processor 0 is valid */
if (apic_id == 0)
return apic_id;
#endif
return -1;
}
EXPORT_SYMBOL_GPL(acpi_get_cpuid);
#endif

static bool __init processor_physically_present(acpi_handle handle)
{
Expand Down Expand Up @@ -223,7 +217,7 @@ static bool __init processor_physically_present(acpi_handle handle)
type = (acpi_type == ACPI_TYPE_DEVICE) ? 1 : 0;
cpuid = acpi_get_cpuid(handle, type, acpi_id);

if (cpuid == -1)
if ((cpuid == -1) && (num_possible_cpus() > 1))
return false;

return true;
Expand Down
7 changes: 7 additions & 0 deletions trunk/include/acpi/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,14 @@ static inline int acpi_processor_get_bios_limit(int cpu, unsigned int *limit)

/* in processor_core.c */
void acpi_processor_set_pdc(acpi_handle handle);
#ifdef CONFIG_SMP
int acpi_get_cpuid(acpi_handle, int type, u32 acpi_id);
#else
static inline int acpi_get_cpuid(acpi_handle handle, int type, u32 acpi_id)
{
return -1;
}
#endif

/* in processor_throttling.c */
int acpi_processor_tstate_has_changed(struct acpi_processor *pr);
Expand Down

0 comments on commit 8be824e

Please sign in to comment.