From owner-freebsd-arm@FreeBSD.ORG Fri Nov 22 11:32:27 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBE63BD for ; Fri, 22 Nov 2013 11:32:27 +0000 (UTC) Received: from mail-ie0-x246.google.com (mail-ie0-x246.google.com [IPv6:2607:f8b0:4001:c03::246]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 769422CA5 for ; Fri, 22 Nov 2013 11:32:27 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id tp5so3467971ieb.9 for ; Fri, 22 Nov 2013 03:32:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:message-id:date:subject:from:to:content-type; bh=+lf4wG9IPr/0mjyij5dGuta8GArf6qYsb2Bdfy+YGEc=; b=rGeg6CquUR0RWu0/2vUWp4MmjpvBZFviyl0y+ZZiRhBeBPRVOLMolJqnJP/VFUH80e FE1yS1upk6UOO3W9EITHoiJ2IWGPc1gB3+ol8H4oHAXWcjqjSLNgvh986uA0eNU2GPhF fZ9zUjmxyIabeLDAzgcPgL8Zi8Gfm47itTnSdFXjQepmwYb4YXY+ovejirJw3KLGZdB0 uY35FZfr2cjSiVJbQFhdwTl3MFx5FAAifxjQAsFuxSfX2UHk8RJMJCJp1CuD4kdr81UC wXoBzfabpTn7lvIqUdZWCgqx3ZgKZ0y1GnXQd4NcL1XJ+9Yf+5l2C5HZAPSS3ZlUcsft PmqQ== MIME-Version: 1.0 X-Received: by 10.182.118.194 with SMTP id ko2mr3987602obb.32.1385119946383; Fri, 22 Nov 2013 03:32:26 -0800 (PST) Message-ID: <089e0118378460293b04ebc25e3c@google.com> Date: Fri, 22 Nov 2013 11:32:26 +0000 Subject: www.freebsd.org From: Ciara Millar To: freebsd-arm@freebsd.org Content-Type: text/plain; charset=windows-1252; format=flowed; delsp=yes Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.16 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Nov 2013 11:32:27 -0000 PGRpdiBkaXI9Imx0ciI+PHNwYW4gIA0Kc3R5bGU9ImZvbnQtZmFtaWx5OmFyaWFsLHNhbnMtc2Vy aWY7Zm9udC1zaXplOjEzcHgiPkhpLDwvc3Bhbj48YnIgIA0Kc3R5bGU9ImZvbnQtZmFtaWx5OmFy aWFsLHNhbnMtc2VyaWY7Zm9udC1zaXplOjEzcHgiPjxkaXYgIA0KY2xhc3M9ImdtYWlsX3F1b3Rl IiAgDQpzdHlsZT0iZm9udC1mYW1pbHk6YXJpYWwsc2Fucy1zZXJpZjtmb250LXNpemU6MTNweCI+ PGRpdiB0ZXh0PSIjMDAwMDAwIiAgDQpiZ2NvbG9yPSIjRkZGRkZGIj4NCjxkaXY+PHA+SSBjYW1l IGFjcm9zcyB5b3VyIHdlYnNpdGUgYW5kIHdhbnRlZCB0byBzZW5kIHlvdSBhIHF1aWNrIG5vdGUu ICANCldpdGggYSBmZXcgc2ltcGxlIGNoYW5nZXMgdG8gbWFrZSB5b3VyIHNpdGUgbW9yZSBTRU8t ZnJpZW5kbHkgSZJtIHN1cmUgeW91ICANCmNhbiBjb252ZXJ0IG1vcmUgdmlzaXRvcnMgaW50byBs ZWFkcyBhbmQgZ2V0IGl0IHBsYWNlZCBoaWdoZXIgaW4gdGhlICANCm9yZ2FuaWMgc2VhcmNoIHJl c3VsdHMsIGZvciBrZXl3b3JkcyB0aGF0IG1hdHRlciB0byB5b3UgdGhlIG1vc3QuPC9wPg0KPC9k aX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-arm@FreeBSD.ORG Fri Nov 22 16:56:29 2013 Return-Path: Delivered-To: arm@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7426042F for ; Fri, 22 Nov 2013 16:56:29 +0000 (UTC) Received: from kanar.ci0.org (kanar.ci0.org [88.191.150.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D8FA620A6 for ; Fri, 22 Nov 2013 16:56:25 +0000 (UTC) Received: from kanar.ci0.org (pluxor@localhost [127.0.0.1]) by kanar.ci0.org (8.14.5/8.14.5) with ESMTP id rAMGhx0c015521; Fri, 22 Nov 2013 17:43:59 +0100 (CET) (envelope-from cognet@ci0.org) Received: (from doginou@localhost) by kanar.ci0.org (8.14.5/8.14.5/Submit) id rAMGhwp5015520; Fri, 22 Nov 2013 17:43:58 +0100 (CET) (envelope-from cognet@ci0.org) X-Authentication-Warning: kanar.ci0.org: doginou set sender to cognet@ci0.org using -f Date: Fri, 22 Nov 2013 17:43:58 +0100 From: Olivier Houchard To: Ruslan Bukin Subject: Re: arm SMP fix Message-ID: <20131122164358.GA15486@ci0.org> References: <20131122000457.GA44039@freebsd.org> <20131122072140.GA709@mail.bsdpad.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131122072140.GA709@mail.bsdpad.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: arm@FreeBSD.ORG X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Nov 2013 16:56:29 -0000 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