Skip to contentSkip to conversation

sparc32: SMP IPI patches

PATCH In review Daniel Hellstrom 2 participants 3 messages May 2, 2011 – May 19, 2011

lore
Share & tools
lore
#0 lore raw

v2 cover sparc32: SMP IPI patches

Hello Dave,

I have made a new set of IPI patches, this time it includes patches for all SPARC32 architectures. It looks to me as if sun4d does not have a pending soft-IRQ register, so I handle it as a normal hard IRQ.

I'm not sure if I should add a STBAR/memory barrier or a spinlock to the sun4d implementation of smp4d_ipi_{single,mask_one,resched}. I'm a bit worried that the memory write happens after the IPI is generated to the other CPUs. Also, I'm not sure that IRQ14 is the best choice for IPI, the best is probably of put it on a separate IRQ but I don't know if there are free IRQs.

I hope that someone could try SMP on sun4m and sun4d with these patches.

Thanks,
Daniel

---

 arch/sparc/Kconfig                  |    3 +-
 arch/sparc/include/asm/cpudata_32.h |    5 ++
 arch/sparc/include/asm/leon.h       |    4 +-
 arch/sparc/include/asm/smp_32.h     |   22 +++----
 arch/sparc/kernel/entry.S           |   45 +++++++++++++-
 arch/sparc/kernel/irq.h             |    6 ++
 arch/sparc/kernel/irq_32.c          |   10 +++
 arch/sparc/kernel/leon_smp.c        |  109 
++++++++++++++++++++++++++++++++++-
 arch/sparc/kernel/smp_32.c          |   52 +++++++++++++++--
 arch/sparc/kernel/sun4d_irq.c       |    9 +++
 arch/sparc/kernel/sun4d_smp.c       |   79 +++++++++++++++++++++++++
 arch/sparc/kernel/sun4m_smp.c       |   29 +++++++++
 12 files changed, 345 insertions(+), 28 deletions(-)
#1 lore raw

From: Daniel Hellstrom <[email protected]>
Date: Mon, 02 May 2011 12:07:49 +0200

Quoted 11 lines

I have made a new set of IPI patches, this time it includes patches for all SPARC32 architectures. It looks to me as if sun4d does not have a pending soft-IRQ register, so I handle it as a normal hard IRQ.

I'm not sure if I should add a STBAR/memory barrier or a spinlock to the sun4d implementation of smp4d_ipi_{single,mask_one,resched}. I'm a bit worried that the memory write happens after the IPI is generated to the other CPUs. Also, I'm not sure that IRQ14 is the best choice for IPI, the best is probably of put it on a separate IRQ but I don't know if there are free IRQs.

Quoted 2 lines

I hope that someone could try SMP on sun4m and sun4d with these patches.

I'm not going to hold these patches back, if we find bugs that need to be fixed on sun4m/sun4d then we will simply fix them.

Thanks for fixing a problem we've had for such a long time.

#2 lore raw
In reply to Daniel Hellstrom
Quoted 21 lines · David Miller

From: Daniel Hellstrom <[email protected]>
Date: Mon, 02 May 2011 12:07:49 +0200

Quoted 11 lines

I have made a new set of IPI patches, this time it includes patches for all SPARC32 architectures. It looks to me as if sun4d does not have a pending soft-IRQ register, so I handle it as a normal hard IRQ.

I'm not sure if I should add a STBAR/memory barrier or a spinlock to the sun4d implementation of smp4d_ipi_{single,mask_one,resched}. I'm a bit worried that the memory write happens after the IPI is generated to the other CPUs. Also, I'm not sure that IRQ14 is the best choice for IPI, the best is probably of put it on a separate IRQ but I don't know if there are free IRQs.

Quoted 4 lines

I hope that someone could try SMP on sun4m and sun4d with these patches.

Quoted 6 lines

I'm not going to hold these patches back, if we find bugs that need to be fixed on sun4m/sun4d then we will simply fix them.

Thanks for fixing a problem we've had for such a long time.

Thanks for applying these pathes. From now on LEON SMP users can run vanilla kernels.

Daniel