Date: Mon, 23 Jul 2018 00:26:55 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Li-Wen Hsu <lwhsu@freebsd.org> Cc: current@freebsd.org, br@freebsd.org Subject: Re: FreeBSD-head-riscv64-build - Build #9623 (r336573) - Failure Message-ID: <20180722212655.GF65334@kib.kiev.ua> In-Reply-To: <20180722171601.GA25771@x1c.lwhsu.org> References: <941706773.1.1532139392496.JavaMail.jenkins@jenkins.ci.freebsd.org> <20180721231832.GC65334@kib.kiev.ua> <20180722010116.GA13419@freefall.freebsd.org> <20180722154505.GE65334@kib.kiev.ua> <20180722171601.GA25771@x1c.lwhsu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 22, 2018 at 06:16:02PM +0100, Li-Wen Hsu wrote: > On Sun, Jul 22, 2018 at 18:45:05 +0300, Konstantin Belousov wrote: > > On Sun, Jul 22, 2018 at 01:01:16AM +0000, Li-Wen Hsu wrote: > > > On Sun, Jul 22, 2018 at 02:18:32 +0300, Konstantin Belousov wrote: > > > > On Sat, Jul 21, 2018 at 02:16:17AM +0000, jenkins-admin@FreeBSD.org wrote: > > > > > --- lib/ofed/libmlx5__L --- > > > > > In file included from /workspace/src/contrib/ofed/libmlx5/mlx5.h:44:0, > > > > > from /workspace/src/contrib/ofed/libmlx5/buf.c:42: > > > > > /workspace/obj/workspace/src/riscv.riscv64/tmp/usr/include/infiniband/udma_barrier.h:108:2: error: #error No architecture specific memory barrier defines found! > > > > > #error No architecture specific memory barrier defines found! > > > > > ^~~~~ > > > > > > > > The patch below should be enough to fix the build, modulo the syntax > > > > errors which I cannot check. The reason is that it seems riscv is not > > > > cross-buildable from stable/11 host: > > > > --- includes_subdir_include/rpcsvc --- > > > > RPCGEN_CPP=cpp\ -target\ riscv64-unknown-freebsd12.0\ --sysroot=/usr/home/konstantinb/build/bsd/DEV/obj/usr/home/konstantinb/build/bsd/DEV/src/riscv.riscv64/tmp\ -B/usr/local rpcgen -C -h -DWANT_NFS3 /usr/home/konstantinb/build/bsd/DEV/src/include/rpcsvc/klm_prot.x -o klm_prot.h > > > > --- key_prot.h --- > > > > error: unknown target triple 'riscv64-unknown-freebsd12.0', please use -triple or -arch > > > > *** [key_prot.h] Error code 1 > > > > > > > > make[4]: stopped in /usr/home/konstantinb/build/bsd/DEV/src/include/rpcsvc > > > > > > > > So if somebody who care about riscv and can build the world could > > > > confirm the fix, I will commit it. > > > > > > > > diff --git a/contrib/ofed/include/udma_barrier.h b/contrib/ofed/include/udma_barrier.h > > > > index 71d264f8dce..6709d4433a7 100644 > > > > --- a/contrib/ofed/include/udma_barrier.h > > > > +++ b/contrib/ofed/include/udma_barrier.h > > > > @@ -104,6 +104,10 @@ > > > > #include <sys/types.h> > > > > #include <machine/atomic.h> > > > > #define udma_to_device_barrier() dmb() > > > > +#elif defined(__riscv__) > > > > +#include <sys/types.h> > > > > +#include <machine/atomic.h> > > > > +#define udma_to_device_barrier() fence() > > > > #else > > > > #error No architecture specific memory barrier defines found! > > > > #endif > > > > > > Thanks for looking into this. Attached patch is slightly modified. > > > RISC-V is using __riscv and there are few more atomic macros need to be > > > defined. > > Well, the arch(7) manpage documents __riscv__. Compilers typically > > provide both __XXX__ and __XXX, while FreeBSD traditionally uses > > the __XXX__ form. > > Please check r322168, __riscv__ is replaced by __riscv and > __riscv64 is replaced by (__riscv && __riscv_xlen == 64). Details are > in the commit message. > > Alghough I grep'd sys/ and there are some __riscv__ still existing: > > sys/vm/vm_unix.c:72:#if !defined(__aarch64__) && !defined(__riscv__) > sys/vm/vm_unix.c:81:#else /* defined(__aarch64__) || defined(__riscv__) */ > sys/vm/vm_unix.c:83:#endif /* defined(__aarch64__) || defined(__riscv__) */ > > I guess those also need changing, as well as arch(7) > > > > With that change, I think that your patch should go in regardless of > > the second issue below. > > Thanks, please commit or approve it. Why do you need an approval ? I already said that your patch looks fine.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180722212655.GF65334>