summaryrefslogtreecommitdiffstats
path: root/include/linux/acpi.h
diff options
context:
space:
mode:
authorHanjun Guo2015-05-13 10:19:30 +0200
committerRafael J. Wysocki2015-05-13 23:28:16 +0200
commitddcc18f5bdd1aafd457032ec693fd9d0af764d61 (patch)
tree0fc442b95f716e618e8b49c30b72babade41a1ed /include/linux/acpi.h
parentACPI / processor: return specific error instead of -1 (diff)
downloadkernel-qcow2-linux-ddcc18f5bdd1aafd457032ec693fd9d0af764d61.tar.gz
kernel-qcow2-linux-ddcc18f5bdd1aafd457032ec693fd9d0af764d61.tar.xz
kernel-qcow2-linux-ddcc18f5bdd1aafd457032ec693fd9d0af764d61.zip
ACPI / processor: Introduce invalid_phys_cpuid()
Introduce invalid_phys_cpuid() to identify cpu with invalid physical ID, then used it as replacement of the direct comparisons with PHYS_CPUID_INVALID. Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r--include/linux/acpi.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 913b49f9a6e6..90e4ed1eb191 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -163,6 +163,11 @@ static inline bool invalid_logical_cpuid(u32 cpuid)
return (int)cpuid < 0;
}
+static inline bool invalid_phys_cpuid(phys_cpuid_t phys_id)
+{
+ return phys_id == PHYS_CPUID_INVALID;
+}
+
#ifdef CONFIG_ACPI_HOTPLUG_CPU
/* Arch dependent functions for cpu hotplug support */
int acpi_map_cpu(acpi_handle handle, phys_cpuid_t physid, int *pcpu);