diff options
Diffstat (limited to 'arch/powerpc/sysdev/mpic.c')
-rw-r--r-- | arch/powerpc/sysdev/mpic.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 20b73c025a45..7c1342618a30 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -1636,6 +1636,24 @@ void __devinit smp_mpic_setup_cpu(int cpu) | |||
1636 | { | 1636 | { |
1637 | mpic_setup_this_cpu(); | 1637 | mpic_setup_this_cpu(); |
1638 | } | 1638 | } |
1639 | |||
1640 | void mpic_reset_core(int cpu) | ||
1641 | { | ||
1642 | struct mpic *mpic = mpic_primary; | ||
1643 | u32 pir; | ||
1644 | int cpuid = get_hard_smp_processor_id(cpu); | ||
1645 | |||
1646 | /* Set target bit for core reset */ | ||
1647 | pir = mpic_read(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT)); | ||
1648 | pir |= (1 << cpuid); | ||
1649 | mpic_write(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT), pir); | ||
1650 | mpic_read(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT)); | ||
1651 | |||
1652 | /* Restore target bit after reset complete */ | ||
1653 | pir &= ~(1 << cpuid); | ||
1654 | mpic_write(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT), pir); | ||
1655 | mpic_read(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT)); | ||
1656 | } | ||
1639 | #endif /* CONFIG_SMP */ | 1657 | #endif /* CONFIG_SMP */ |
1640 | 1658 | ||
1641 | #ifdef CONFIG_PM | 1659 | #ifdef CONFIG_PM |