From owner-dev-commits-src-all@freebsd.org Sun Jan 10 21:41:41 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5BCF14DAD63; Sun, 10 Jan 2021 21:41:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDVfD71jLz3lN6; Sun, 10 Jan 2021 21:41:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 10ALfXOs060850 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 10 Jan 2021 23:41:37 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 10ALfXOs060850 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 10ALfXUB060849; Sun, 10 Jan 2021 23:41:33 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 10 Jan 2021 23:41:33 +0200 From: Konstantin Belousov To: Jessica Clarke Cc: Mitchell Horne , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: facdd1cd2045 - main - cgem: add 64-bit support Message-ID: References: <202101102053.10AKrGqv070360@gitrepo.freebsd.org> <51C7F0DA-0EA2-45EF-A817-53984205C648@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51C7F0DA-0EA2-45EF-A817-53984205C648@freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4DDVfD71jLz3lN6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2021 21:41:41 -0000 On Sun, Jan 10, 2021 at 09:33:16PM +0000, Jessica Clarke wrote: > On 10 Jan 2021, at 21:31, Konstantin Belousov wrote: > > On Sun, Jan 10, 2021 at 09:17:48PM +0000, Jessica Clarke wrote: > >> On 10 Jan 2021, at 20:53, Mitchell Horne wrote: > >>> diff --git a/sys/dev/cadence/if_cgem.c b/sys/dev/cadence/if_cgem.c > >>> index 3c5277452469..77337e977dcc 100644 > >>> --- a/sys/dev/cadence/if_cgem.c > >>> +++ b/sys/dev/cadence/if_cgem.c > >>> @@ -77,6 +77,14 @@ __FBSDID("$FreeBSD$"); > >>> #include > >>> #include > >>> > >>> +#ifdef EXT_RESOURCES > >>> +#include > >>> +#endif > >>> + > >>> +#if INTPTR_MAX == INT64_MAX > >>> +#define CGEM64 > >>> +#endif > >> > >> This isn't going to work with CHERI. Perhaps a BUS_SPACE_MAXADDR check, > >> or SIZE_MAX? The former is probably preferable for PAE systems. > > > > Wouldn't it be spelled as __LP64__ ? > > It shouldn't be, because the P stands for pointer(s), which we make > 128-bit, though in practice for compatibility we have a hack to define > it anyway (but the compiler *won't*, it's in bsd.cpu.mk or similar). > Only the integer addresses are 128-bit. I have no idea about CHERI, I mean how this statement should be handled for FreeBSD.