Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jul 2018 15:50:27 +0200
From:      Hans Petter Selasky <hps@selasky.org>
To:        Matt Macy <mmacy@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
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
Message-ID:  <646866ab-1fe1-1866-8777-c4ad852fef7d@selasky.org>
In-Reply-To: <201807021948.w62JmcV6019378@repo.freebsd.org>
References:  <201807021948.w62JmcV6019378@repo.freebsd.org>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?646866ab-1fe1-1866-8777-c4ad852fef7d>