diff options
Diffstat (limited to 'arch/sparc64/kernel/ds.c')
-rw-r--r-- | arch/sparc64/kernel/ds.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/arch/sparc64/kernel/ds.c b/arch/sparc64/kernel/ds.c index b6331718ee0c..1c587107cef0 100644 --- a/arch/sparc64/kernel/ds.c +++ b/arch/sparc64/kernel/ds.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/power.h> | 20 | #include <asm/power.h> |
21 | #include <asm/mdesc.h> | 21 | #include <asm/mdesc.h> |
22 | #include <asm/head.h> | 22 | #include <asm/head.h> |
23 | #include <asm/irq.h> | ||
23 | 24 | ||
24 | #define DRV_MODULE_NAME "ds" | 25 | #define DRV_MODULE_NAME "ds" |
25 | #define PFX DRV_MODULE_NAME ": " | 26 | #define PFX DRV_MODULE_NAME ": " |
@@ -559,6 +560,9 @@ static int dr_cpu_configure(struct ds_cap_state *cp, u64 req_num, | |||
559 | 560 | ||
560 | kfree(resp); | 561 | kfree(resp); |
561 | 562 | ||
563 | /* Redistribute IRQs, taking into account the new cpus. */ | ||
564 | fixup_irqs(); | ||
565 | |||
562 | return 0; | 566 | return 0; |
563 | } | 567 | } |
564 | 568 | ||
@@ -566,7 +570,8 @@ static int dr_cpu_unconfigure(struct ds_cap_state *cp, u64 req_num, | |||
566 | cpumask_t *mask) | 570 | cpumask_t *mask) |
567 | { | 571 | { |
568 | struct ds_data *resp; | 572 | struct ds_data *resp; |
569 | int resp_len, ncpus; | 573 | int resp_len, ncpus, cpu; |
574 | unsigned long flags; | ||
570 | 575 | ||
571 | ncpus = cpus_weight(*mask); | 576 | ncpus = cpus_weight(*mask); |
572 | resp_len = dr_cpu_size_response(ncpus); | 577 | resp_len = dr_cpu_size_response(ncpus); |
@@ -578,9 +583,25 @@ static int dr_cpu_unconfigure(struct ds_cap_state *cp, u64 req_num, | |||
578 | resp_len, ncpus, mask, | 583 | resp_len, ncpus, mask, |
579 | DR_CPU_STAT_UNCONFIGURED); | 584 | DR_CPU_STAT_UNCONFIGURED); |
580 | 585 | ||
586 | for_each_cpu_mask(cpu, *mask) { | ||
587 | int err; | ||
588 | |||
589 | printk(KERN_INFO PFX "CPU[%d]: Shutting down cpu %d...\n", | ||
590 | smp_processor_id(), cpu); | ||
591 | err = cpu_down(cpu); | ||
592 | if (err) | ||
593 | dr_cpu_mark(resp, cpu, ncpus, | ||
594 | DR_CPU_RES_FAILURE, | ||
595 | DR_CPU_STAT_CONFIGURED); | ||
596 | } | ||
597 | |||
598 | spin_lock_irqsave(&ds_lock, flags); | ||
599 | ds_send(ds_info->lp, resp, resp_len); | ||
600 | spin_unlock_irqrestore(&ds_lock, flags); | ||
601 | |||
581 | kfree(resp); | 602 | kfree(resp); |
582 | 603 | ||
583 | return -EOPNOTSUPP; | 604 | return 0; |
584 | } | 605 | } |
585 | 606 | ||
586 | static void process_dr_cpu_list(struct ds_cap_state *cp) | 607 | static void process_dr_cpu_list(struct ds_cap_state *cp) |