From nobody Fri Jul 8 17:50:00 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 530DD12AFA47; Fri, 8 Jul 2022 17:50:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lfgls084pz48MD; Fri, 8 Jul 2022 17:50:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657302601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wOthmx9AVt4I87PmlOtjDfNExd2Rvm+akGonvUTxa+o=; b=nLzumZBlbNp8kxf/UAHEjN5px5F04NL/Ml7TEn84ihaD4mVgzi6AULUjXgcIKm6vM0h17+ /QvVJzP5/3TRNANdEM7icxihj21q9i+A3iUoHlSzpFbI8lSlfa85J4FnJqO7mSq7DuASXN t1Tm6TjNbCVJV8BNbgOWyE8YIdUMxDsxuRRBljKYHnvM9XeSJT82+a5jcdQ9FxM0gEWsEO ds8Us8oskAPFZJ/Us2NhJ5DxEXlFLB/jndSj2dUJhKA5BBrFSwWpM7AZqEF34ErO79NLsh AkiM0Zag9unlWYdMXFM2eDGJDej9aGjNZOW4L5gS7Lcd8P3ga9XYuejTspwZ4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Lfglr6MKbzG0H; Fri, 8 Jul 2022 17:50:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 268Ho0wt065293; Fri, 8 Jul 2022 17:50:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 268Ho0fG065279; Fri, 8 Jul 2022 17:50:00 GMT (envelope-from git) Date: Fri, 8 Jul 2022 17:50:00 GMT Message-Id: <202207081750.268Ho0fG065279@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 0e5ac0ad0384 - main - stand: Use a for loop for all the common ZSTD files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e5ac0ad03845dee6a6b21adfaf508b6ad10c625 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657302601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wOthmx9AVt4I87PmlOtjDfNExd2Rvm+akGonvUTxa+o=; b=kHaweRIleHQy8OR45Lvdd8TkoeDWK9au6cMIUO5EAdufodorrEJQWfC6gtBfiFh7eMxFIU IDN5qU3Hrp/+E3d0A1gX/6oNhZkSh+UmkgLgDhkK+HTi/1IFmp+WlHOa+sB02rDb2IZwIJ gX+pvDnLH39vFvZfMI3eMyxxTDqcQpOpLQwpWgEZ6Wq/MF1ziobZwJh2vbZX1J4WKd1ubC AwiHn5A8R8X/6pKFAxBBejUeWDVPKd0j82yJbGkU0wpmd3R6eSfoSENvKsHd5mchEnJTOH eKvrbu25E6Ix0/ww/dXFGT6Mgw3LwCSTmwFRtkuv09e+Eybv/3FkpI4fvCWqeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657302601; a=rsa-sha256; cv=none; b=yK7xQjVyGc3Pha6dnHS066iSAKQydLRaIZDkgNVN559m2R4spyIpF4E4T+hzlLru0cAeJ8 OAknGVBw2PM/eeWLuj6F25IfqlAuzJVdGEXSIWZpyUpz5N6IeDDp9bFIz2WaEXBDw7mCIi TV+W8hzpX6lAaTKwGANirKrQdHXQaFwwpfiwXn6NeAuBnaEQnmLB1uUF/zJFeVt1qYfqit tAGNyILtRcsaIhKbwsrg4s0mzV0u19a/4uJMhtNwIje2lA8sr2FOc2bzETJgTPb5ZZRJIY X2XSC3jBE/lc9OazrfuPiw54qhCCHzuRO6QeFvCr5gO1akz3ez2SXxzJx62Evw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0e5ac0ad03845dee6a6b21adfaf508b6ad10c625 commit 0e5ac0ad03845dee6a6b21adfaf508b6ad10c625 Author: Warner Losh AuthorDate: 2022-07-08 15:13:50 +0000 Commit: Warner Losh CommitDate: 2022-07-08 17:47:36 +0000 stand: Use a for loop for all the common ZSTD files Also add comments about why we're not using the BMI instructions when vailable. Sponsored by: Netflix --- stand/libsa/zfs/Makefile.inc | 53 ++++++++------------------------------------ 1 file changed, 9 insertions(+), 44 deletions(-) diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.inc index ff8dfea195b5..841b1b5c327c 100644 --- a/stand/libsa/zfs/Makefile.inc +++ b/stand/libsa/zfs/Makefile.inc @@ -40,50 +40,15 @@ CFLAGS_EARLY.zstd_shim.c+= ${ZFS_EARLY} CFLAGS.nvlist.c+= -I${ZFSOSINC}/spl CFLAGS.zfs.c+= -I${ZFSOSINC}/spl \ -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4 -CFLAGS.entropy_common.c= -U__BMI__ -CFLAGS.entropy_common.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.error_private.c= -U__BMI__ -CFLAGS.error_private.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.fse_compress.c= -U__BMI__ -CFLAGS.fse_compress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.fse_decompress.c= -U__BMI__ -CFLAGS.fse_decompress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.hist.c= -U__BMI__ -CFLAGS.hist.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.huf_compress.c= -U__BMI__ -CFLAGS.huf_compress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.huf_decompress.c= -U__BMI__ -CFLAGS.huf_decompress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.pool.c= -U__BMI__ -CFLAGS.pool.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.xxhash.c= -U__BMI__ -CFLAGS.xxhash.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.zstd_common.c= -U__BMI__ -CFLAGS.zstd_common.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.zstd_compress.c= -U__BMI__ -CFLAGS.zstd_compress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.zstd_compress_literals.c= -U__BMI__ -CFLAGS.zstd_compress_literals.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.zstd_compress_sequences.c= -U__BMI__ -CFLAGS.zstd_compress_sequences.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.zstd_compress_superblock.c= -U__BMI__ -CFLAGS.zstd_compress_superblock.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.zstd_double_fast.c= -U__BMI__ -CFLAGS.zstd_double_fast.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.zstd_fast.c= -U__BMI__ -CFLAGS.zstd_fast.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.zstd_lazy.c= -U__BMI__ -CFLAGS.zstd_lazy.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.zstd_ldm.c= -U__BMI__ -CFLAGS.zstd_ldm.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.zstd_opt.c= -U__BMI__ -CFLAGS.zstd_opt.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.zstd_ddict.c= -U__BMI__ -CFLAGS.zstd_ddict.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.zstd_decompress.c= -U__BMI__ -CFLAGS.zstd_decompress.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} -CFLAGS.zstd_decompress_block.c= -U__BMI__ -CFLAGS.zstd_decompress_block.c+= ${NO_WBITWISE_INSTEAD_OF_LOGICAL} + +# +# ZSTD coding style has some issues, so suppress clang's warnings. Also, zstd's +# use of BMI instrucitons is broken in this environment, so avoid them. +# +.for i in ${ZSTD_SRC} +CFLAGS.$i+= -U__BMI__ ${NO_WBITWISE_INSTEAD_OF_LOGICAL} +.endfor + CFLAGS.zstd_shim.c+= -DIN_BASE -DIN_LIBSA -I${OZFS}/include # Do not unroll skein loops, reduce code size