Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Nov 2013 11:21:40 +0400
From:      Ruslan Bukin <br@bsdpad.com>
To:        Olivier Houchard <cognet@FreeBSD.ORG>
Cc:        arm@freebsd.org
Subject:   Re: arm SMP fix
Message-ID:  <20131122072140.GA709@mail.bsdpad.com>
In-Reply-To: <20131122000457.GA44039@freebsd.org>
References:  <20131122000457.GA44039@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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

-Ruslan




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131122072140.GA709>