aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2008-04-30 07:38:37 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-04-30 07:38:44 -0400
commit1e489518da2a49604df2c3281034097274324be9 (patch)
treef0a6e5b9a19d2d3f8aef4ba1ad3a762e01d4e67a /drivers/s390/char
parent0b18d318b80a7f350648ca8f7cc00a2f688104cb (diff)
[S390] Automatically detect added cpus.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char')
-rw-r--r--drivers/s390/char/sclp_config.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/s390/char/sclp_config.c b/drivers/s390/char/sclp_config.c
index b8f35bc52b7b..9e784d5f7f57 100644
--- a/drivers/s390/char/sclp_config.c
+++ b/drivers/s390/char/sclp_config.c
@@ -10,6 +10,7 @@
10#include <linux/cpu.h> 10#include <linux/cpu.h>
11#include <linux/sysdev.h> 11#include <linux/sysdev.h>
12#include <linux/workqueue.h> 12#include <linux/workqueue.h>
13#include <asm/smp.h>
13#include "sclp.h" 14#include "sclp.h"
14 15
15#define TAG "sclp_config: " 16#define TAG "sclp_config: "
@@ -19,9 +20,11 @@ struct conf_mgm_data {
19 u8 ev_qualifier; 20 u8 ev_qualifier;
20} __attribute__((packed)); 21} __attribute__((packed));
21 22
23#define EV_QUAL_CPU_CHANGE 1
22#define EV_QUAL_CAP_CHANGE 3 24#define EV_QUAL_CAP_CHANGE 3
23 25
24static struct work_struct sclp_cpu_capability_work; 26static struct work_struct sclp_cpu_capability_work;
27static struct work_struct sclp_cpu_change_work;
25 28
26static void sclp_cpu_capability_notify(struct work_struct *work) 29static void sclp_cpu_capability_notify(struct work_struct *work)
27{ 30{
@@ -37,13 +40,24 @@ static void sclp_cpu_capability_notify(struct work_struct *work)
37 put_online_cpus(); 40 put_online_cpus();
38} 41}
39 42
43static void sclp_cpu_change_notify(struct work_struct *work)
44{
45 smp_rescan_cpus();
46}
47
40static void sclp_conf_receiver_fn(struct evbuf_header *evbuf) 48static void sclp_conf_receiver_fn(struct evbuf_header *evbuf)
41{ 49{
42 struct conf_mgm_data *cdata; 50 struct conf_mgm_data *cdata;
43 51
44 cdata = (struct conf_mgm_data *)(evbuf + 1); 52 cdata = (struct conf_mgm_data *)(evbuf + 1);
45 if (cdata->ev_qualifier == EV_QUAL_CAP_CHANGE) 53 switch (cdata->ev_qualifier) {
54 case EV_QUAL_CPU_CHANGE:
55 schedule_work(&sclp_cpu_change_work);
56 break;
57 case EV_QUAL_CAP_CHANGE:
46 schedule_work(&sclp_cpu_capability_work); 58 schedule_work(&sclp_cpu_capability_work);
59 break;
60 }
47} 61}
48 62
49static struct sclp_register sclp_conf_register = 63static struct sclp_register sclp_conf_register =
@@ -57,6 +71,7 @@ static int __init sclp_conf_init(void)
57 int rc; 71 int rc;
58 72
59 INIT_WORK(&sclp_cpu_capability_work, sclp_cpu_capability_notify); 73 INIT_WORK(&sclp_cpu_capability_work, sclp_cpu_capability_notify);
74 INIT_WORK(&sclp_cpu_change_work, sclp_cpu_change_notify);
60 75
61 rc = sclp_register(&sclp_conf_register); 76 rc = sclp_register(&sclp_conf_register);
62 if (rc) { 77 if (rc) {