Fix SMP save/restore for 1 vcpu by adding suspend/resume functions for SMP.

We have to free_irq the irq vectors for the SMP ipi vectors.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
cl349@firebug.cl.cam.ac.uk committed 2005-08-02 19:08:28 +00:00
1 parent fd3721aea3
commit ba5fb52dda
2 files changed
+34 -1

No files matched your search

@@ -1529,7 +1529,7 @@ void __init smp_cpus_done(unsigned int max_cpus)
extern irqreturn_t smp_reschedule_interrupt(int, void *, struct pt_regs *);
extern irqreturn_t smp_call_function_interrupt(int, void *, struct pt_regs *);
void __init smp_intr_init(void)
void smp_intr_init(void)
{
int cpu = smp_processor_id();
@@ -1546,3 +1546,24 @@ void __init smp_intr_init(void)
smp_call_function_interrupt,
SA_INTERRUPT, callfunc_name[cpu], NULL));
}
static void smp_intr_exit(void)
{
int cpu = smp_processor_id();
free_irq(per_cpu(resched_irq, cpu), NULL);
unbind_ipi_from_irq(RESCHEDULE_VECTOR);
free_irq(per_cpu(callfunc_irq, cpu), NULL);
unbind_ipi_from_irq(CALL_FUNCTION_VECTOR);
}
void smp_suspend(void)
{
smp_intr_exit();
}
void smp_resume(void)
{
smp_intr_init();
}
@@ -91,6 +91,10 @@ static void __do_suspend(void)
#define gnttab_resume() do{}while(0)
#endif
#ifdef CONFIG_SMP
extern void smp_suspend(void);
extern void smp_resume(void);
#endif
extern void time_suspend(void);
extern void time_resume(void);
extern unsigned long max_pfn;
@@ -115,6 +119,10 @@ static void __do_suspend(void)
time_suspend();
#ifdef CONFIG_SMP
smp_suspend();
#endif
xenbus_suspend();
ctrl_if_suspend();
@@ -158,6 +166,10 @@ static void __do_suspend(void)
xenbus_resume();
#ifdef CONFIG_SMP
smp_resume();
#endif
time_resume();
blkdev_resume();
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.