Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204696
b: refs/heads/master
c: 66953eb
h: refs/heads/master
v: v3
  • Loading branch information
Matthew McClintock authored and Benjamin Herrenschmidt committed Jul 9, 2010
1 parent 72d96d3 commit bf46f8f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d10ac3734d07bee675384d22d06883b3c57b1524
refs/heads/master: 66953ebef60ffe94650a735b445f1495d989c523
18 changes: 18 additions & 0 deletions trunk/arch/powerpc/sysdev/mpic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1636,6 +1636,24 @@ void __devinit smp_mpic_setup_cpu(int cpu)
{
mpic_setup_this_cpu();
}

void mpic_reset_core(int cpu)
{
struct mpic *mpic = mpic_primary;
u32 pir;
int cpuid = get_hard_smp_processor_id(cpu);

/* Set target bit for core reset */
pir = mpic_read(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT));
pir |= (1 << cpuid);
mpic_write(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT), pir);
mpic_read(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT));

/* Restore target bit after reset complete */
pir &= ~(1 << cpuid);
mpic_write(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT), pir);
mpic_read(mpic->gregs, MPIC_INFO(GREG_PROCESSOR_INIT));
}
#endif /* CONFIG_SMP */

#ifdef CONFIG_PM
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/sysdev/mpic.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ static inline int mpic_pasemi_msi_init(struct mpic *mpic)
extern int mpic_set_irq_type(unsigned int virq, unsigned int flow_type);
extern void mpic_set_vector(unsigned int virq, unsigned int vector);
extern int mpic_set_affinity(unsigned int irq, const struct cpumask *cpumask);
extern void mpic_reset_core(int cpu);

#endif /* _POWERPC_SYSDEV_MPIC_H */

0 comments on commit bf46f8f

Please sign in to comment.