From 62e164e0e57e929349f32a3829dc504874908abe Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 3 Dec 2011 13:06:50 -0800 Subject: [PATCH] --- yaml --- r: 277247 b: refs/heads/master c: 2987557f52b97f679f0c324d8f51b8d66e1f2084 h: refs/heads/master i: 277245: b3ceead21a7a8a8c1f23a10ca1664252a7be9dc1 277243: 7c68da54672bc2d4ad670387874d3e004acac7ba 277239: fb91583c2582aa606dbd8f628d76c9196225cae8 277231: 1adc768ad0061d351bc24461fcb71aa98728bd8d 277215: b0bb2065ffb81f6cf4bb3b059bb2538531404111 277183: dba16112217a1d993e6443a0e67304527cfaa311 277119: bc54933de289c686489ec0bac27e2ad7bf5303a6 276991: afef2004d5595a144f687679a0dc8dab9a915ec2 v: v3 --- [refs] | 2 +- trunk/drivers/base/cpu.c | 7 +++++++ trunk/include/linux/cpu.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 7a37649f4e5a..50039fe25950 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2d1dc9a600edf33321bcdc1c808b7957d8a3f3e1 +refs/heads/master: 2987557f52b97f679f0c324d8f51b8d66e1f2084 diff --git a/trunk/drivers/base/cpu.c b/trunk/drivers/base/cpu.c index 251acea3d359..3991502b21e5 100644 --- a/trunk/drivers/base/cpu.c +++ b/trunk/drivers/base/cpu.c @@ -247,6 +247,13 @@ struct sys_device *get_cpu_sysdev(unsigned cpu) } EXPORT_SYMBOL_GPL(get_cpu_sysdev); +bool cpu_is_hotpluggable(unsigned cpu) +{ + struct sys_device *dev = get_cpu_sysdev(cpu); + return dev && container_of(dev, struct cpu, sysdev)->hotpluggable; +} +EXPORT_SYMBOL_GPL(cpu_is_hotpluggable); + int __init cpu_dev_init(void) { int err; diff --git a/trunk/include/linux/cpu.h b/trunk/include/linux/cpu.h index 6cb60fd2ea84..305c263021e7 100644 --- a/trunk/include/linux/cpu.h +++ b/trunk/include/linux/cpu.h @@ -27,6 +27,7 @@ struct cpu { extern int register_cpu(struct cpu *cpu, int num); extern struct sys_device *get_cpu_sysdev(unsigned cpu); +extern bool cpu_is_hotpluggable(unsigned cpu); extern int cpu_add_sysdev_attr(struct sysdev_attribute *attr); extern void cpu_remove_sysdev_attr(struct sysdev_attribute *attr);