From owner-freebsd-current@freebsd.org Tue Jul 3 23:02:01 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 993EA1031F5C for ; Tue, 3 Jul 2018 23:02:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5B975F6B for ; Tue, 3 Jul 2018 23:02:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 1BE1A10A87D; Tue, 3 Jul 2018 19:01:59 -0400 (EDT) Subject: Re: atomic changes break drm-next-kmod? To: Matthew Macy , Pete Wright References: <20180703170223.266dbf5b@thor.intern.walstatt.dynvpn.de> <845aca10-8c01-fa3b-087f-f957df4e7531@nomadlogic.org> <063ae5c3-0584-1284-dd9d-ab8b5790baf1@FreeBSD.org> <0bf8e57b-fdb4-4c1a-3d0d-a734f8187ca8@nomadlogic.org> Cc: FreeBSD Current , Niclas Zeising , "O. Hartmann" From: John Baldwin Message-ID: Date: Tue, 3 Jul 2018 16:01:59 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 03 Jul 2018 19:02:00 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2018 23:02:01 -0000 On 7/3/18 3:40 PM, Matthew Macy wrote: > This seems like a clang inline asm bug. Could you try building the port with a recent gcc against an unpatched HEAD? I've already committed the patch to HEAD, but using 'e' is from the GCC docs, not clang docs: https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html#Machine-Constraints The disassembly of one of the functions from the kmod using one of the affected atomic ops would show if it is working correctly (there should now be a mov with a 64-bit immediate into a register followed by the atomic op using a register operand). You could also try using just 'r' to always force the use of a register. It would be less optimal than "er" but should function correctly. > On Tue, Jul 3, 2018 at 15:38 Pete Wright > wrote: > > > > On 07/03/2018 15:29, John Baldwin wrote: > > That seems like kgdb is looking at the wrong CPU.  Can you use > > 'info threads' and look for threads not stopped in 'sched_switch' > > and get their backtraces?  You could also just do 'thread apply > > all bt' and put that file at a URL if that is easiest. > > > > > sure thing John - here's a gist of "thread apply all bt" > > https://gist.github.com/gem-pete/d8d7ab220dc8781f0827f965f09d43ed > > cheers! > -pete > > -- > Pete Wright > pete@nomadlogic.org > @nomadlogicLA > > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org " > -- John Baldwin