aboutsummaryrefslogtreecommitdiff
path: root/drivers/base/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/cpu.c')
-rw-r--r--drivers/base/cpu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 5bb0298fbcc..9a5578efbc9 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -267,6 +267,13 @@ static const struct attribute_group *cpu_root_attr_groups[] = {
NULL,
};
+bool cpu_is_hotpluggable(unsigned cpu)
+{
+ struct device *dev = get_cpu_device(cpu);
+ return dev && container_of(dev, struct cpu, dev)->hotpluggable;
+}
+EXPORT_SYMBOL_GPL(cpu_is_hotpluggable);
+
int __init cpu_dev_init(void)
{
int err;