arm SMP fix
Olivier Houchard
cognet at ci0.org
Fri Nov 22 16:56:29 UTC 2013
On Fri, Nov 22, 2013 at 11:21:40AM +0400, Ruslan Bukin wrote:
> On Fri, Nov 22, 2013 at 12:04:57AM +0000, Olivier Houchard wrote:
> > Hi all,
> >
> > Attached is the first draft to a patch that fixes SMP for me, it seems to
> > work fine on my Pandaboard.
> > The problem is, as it is currently implemented, curthread is basically
> > defined as get_pcpu()->pc_curthread. If we get interrupted between the moment
> > we got the struct pcpu, and the moment we derefence it to get the curthread
> > pointer, and migrated to another core, we would get the wrong curthread, and
> > that's not good.
> > The proposed fix does the following :
> > - use the register we used to use for pcpu for curthread
> > - get the pcpu address by reading the cpu id from the CPUID register, and
> > just use it as an index for the __pcpu array.
> >
> > It breaks the KBI, which is unfortunate, but I think it is no big deal for
> > arm right now.
> >
> > Any review, comment, and testing, even on UP boards, would be very welcome.
> >
> > Regards,
> >
> > Olivier
>
> what type of media for root you used?
>
> just a quick test on exynos5250
>
> one time I booted OK with patch and SMP enabled,
> two other attempts got panics
> (probably during usb ethernet load)
>
> http://pastebin.com/H129SMKX
> http://pastebin.com/szkBjaT5
>
Hi,
I'm netbooting using the Pandaboard usb ethernet adapter too.
As you're not alone in reporting that my patch doesn't work, I guess I can't
just pretend it's your fault :)
Are you getting the same thing without the patch ?
Regards,
Olivier
More information about the freebsd-arm
mailing list