summaryrefslogtreecommitdiff
path: root/include/linux/acpi.h
diff options
context:
space:
mode:
authorHanjun Guo <hanjun.guo@linaro.org>2015-05-13 11:19:30 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-05-14 00:28:16 +0300
commitddcc18f5bdd1aafd457032ec693fd9d0af764d61 (patch)
tree0fc442b95f716e618e8b49c30b72babade41a1ed /include/linux/acpi.h
parentd3da7cb9d243c484fcb05e6c16f55090fba99702 (diff)
downloadlinux-ddcc18f5bdd1aafd457032ec693fd9d0af764d61.tar.xz
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);