From owner-svn-src-head@freebsd.org Thu Jul 5 13:50:50 2018 Return-Path: Delivered-To: svn-src-head@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 10AC1102B4DA; Thu, 5 Jul 2018 13:50:50 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2D6A7D817; Thu, 5 Jul 2018 13:50:49 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 9F571260247; Thu, 5 Jul 2018 15:50:46 +0200 (CEST) Subject: Re: svn commit: r335873 - in head: . sys/amd64/amd64 sys/amd64/include sys/conf sys/i386/i386 sys/i386/include sys/sys sys/vm To: Matt Macy , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807021948.w62JmcV6019378@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <646866ab-1fe1-1866-8777-c4ad852fef7d@selasky.org> Date: Thu, 5 Jul 2018 15:50:27 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <201807021948.w62JmcV6019378@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2018 13:50:50 -0000 On 07/02/18 21:48, Matt Macy wrote: > Author: mmacy > Date: Mon Jul 2 19:48:38 2018 > New Revision: 335873 > URL:https://svnweb.freebsd.org/changeset/base/335873 > > Log: > inline atomics and allow tied modules to inline locks > > - inline atomics in modules on i386 and amd64 (they were always > inline on other arches) > - allow modules to opt in to inlining locks by specifying > MODULE_TIED=1 in the makefile > > Reviewed by: kib > Sponsored by: Limelight Networks > Differential Revision:https://reviews.freebsd.org/D16079 Hi, This change breaks all atomic usage in drm-next-kmod even after r335913. The problem is simply that SMP is not defined at all for KLD's so all non-kernel atomic usage is with MPLOCKED empty! /* * For userland, always use lock prefixes so that the binaries will run * on both SMP and !SMP systems. */ #if defined(SMP) || !defined(_KERNEL) #define MPLOCKED "lock ; " #else #define MPLOCKED #endif Should the check above be: #if defined(SMP) || !defined(_KERNEL) || defined(KLD_MODULE) --HPS