Date: Mon, 26 Nov 2018 12:19:51 -0800 From: John Baldwin <jhb@FreeBSD.org> To: Mateusz Guzik <mjguzik@gmail.com>, Warner Losh <imp@bsdimp.com> Cc: Konstantin Belousov <kostikbel@gmail.com>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r340676 - in head/sys: kern sys Message-ID: <8cae923a-2b14-c16b-23e7-e6eb7e9a8c3a@FreeBSD.org> In-Reply-To: <CAGudoHFL-B6e5oufAKMY=_gvgto1o07DPHxfv3rZGnaiEwB9yg@mail.gmail.com> References: <201811201458.wAKEwftP033152@repo.freebsd.org> <20181120150756.GD2378@kib.kiev.ua> <CAGudoHG-8VpSpTMX=ZL4LhSsfUe9fEkjr_-KE83K1NQGsskihw@mail.gmail.com> <CANCZdfrDyj1qjkp1XGjYP_bCHJfmcdbHxUQ%2BncNE=quQfOabUw@mail.gmail.com> <CAGudoHFL-B6e5oufAKMY=_gvgto1o07DPHxfv3rZGnaiEwB9yg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/22/18 9:28 AM, Mateusz Guzik wrote: > diff --git a/sys/sys/systm.h b/sys/sys/systm.h > index a1b98c5660c..fab94ee7979 100644 > --- a/sys/sys/systm.h > +++ b/sys/sys/systm.h > @@ -523,7 +523,11 @@ int alloc_unr_specific(struct unrhdr *uh, u_int item); > int alloc_unrl(struct unrhdr *uh); > void free_unr(struct unrhdr *uh, u_int item); > > -#if defined(__mips__) || defined(__powerpc__) > +#if defined(mips) && !defined(__mips_n64) && !defined(__mips_n32) > +#define UNR64_LOCKED > +#endif This would perhaps be shorter as: #if defined(__mips__) && defined(__mips_o32) > + > +#if defined(__powerpc__) && !defined(__powerpc64__) > #define UNR64_LOCKED > #endif It's not clear to me why this isn't just conditional on LP64 though. If 32-bit riscv existed in FreeBSD it would also not have this. If we really care that much about i386 and 32-bit arm you could write it as: #if !(defined(__LP64__) || defined(__i386__) || defined(__arm__)) (I'm not sure we care that much though and think we could just use __LP64__ alone and call it a day.) -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8cae923a-2b14-c16b-23e7-e6eb7e9a8c3a>