From nobody Sun Jun 23 23:24:42 2024 X-Original-To: dev-commits-src-main@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 4W6nHb12bzz5PDCF; Sun, 23 Jun 2024 23:24:43 +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 4W6nHb0TFGz4hSX; Sun, 23 Jun 2024 23:24:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719185083; 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=pnMc1up+8Be5xBgZewyCmQjp4ZnNXzZpSG5OEr8ZQHU=; b=NOjirMJB9ZBU/4xVJMegWAwdbulbWCWLyLz7wTbA30GyW7pop3A9sn8ULsHYOMrNyLvb49 8w7eVQt1342YqhfTMMCw2IMceU/fEcqygb9ciru7LzfQTlVz3O7rKVo+UDHUPhgcCyxDoN 3mis6giJGAVNtHTJo0Qth12yRzhh85SpCPWTww2i4yxt2dM0VdAU784pTUnFj35xbehmgd O8X20Y7XfYHMM35lbCbuPaG+zwD8Akv1zWfx+iaGXC7UBuh4HNm09FqXX7KVOmQ8ban3NB aJ0e1qneK2y6NEn2oLgvWGZXWlW+8lo+qCnoqpjB+e4h1ymwExOOYa59lUKc6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719185083; a=rsa-sha256; cv=none; b=IqP909L5F6dSc/U3E69Ud8TXdH7A0E8BEdQKBqTAtN//2gm/Eub2NlDA31Dm2CvkRKulj5 ZvJWMCxzpmD7VTsHeqYxCfpYI9rBNY93N6rsklptQ+ZZjUwYEh0V0qqD0dFz7ZsGMwlZ2N 7dr5CpCYHVzJ8i0rAlF0oFRbl2S0DtGsY430E3nt1zICT1IAuiakglqhVcNvlofcXkC5mf 2h7Jhq/wE0+AdRZD3MkqKG0ng0tDYZMkNvYWWAQyEjG/vADJ4oljdqJbfsCgojJt1Cr5dn KI25+38tk4sJkx2ABgjBhALuBZ0jZlE/YFTz+gyZdYZHV0fjui9DeNCDOp2MAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719185083; 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=pnMc1up+8Be5xBgZewyCmQjp4ZnNXzZpSG5OEr8ZQHU=; b=sum5BY05uUTGEwdv/321PXpvnyF82XXs5c/r7QzSGA3r7TQb3FBSJIdsDLb4155gw7z5tg 44BtZDki+QTpp+JFjtOBMsG1Hb1zGZCVCeoUzgysSiEThBbXbuqAGU7iTrSN3/B62HN9tT FxwTiKfM7UZnaLovIEejFWx92+zKHS3msvAroY+R1B98P0khpywv5z1YuEBRv/Ze6girCY EBQ1mSJpj9zYpzUiXPNY6fTxxXVLmN5XNXQvzg1UfSdox6haCeWsg5JF802sr2RaAtHe9n vEfodcv5W7Zg9Kf80c1XM630ho1HLtNFV7nqQYf2fkm/NLcTvvcfkSLNGqbixQ== 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 4W6nHb04yPzvJ2; Sun, 23 Jun 2024 23:24:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45NNOgcP032757; Sun, 23 Jun 2024 23:24:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45NNOg4f032754; Sun, 23 Jun 2024 23:24:42 GMT (envelope-from git) Date: Sun, 23 Jun 2024 23:24:42 GMT Message-Id: <202406232324.45NNOg4f032754@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 6095f4b04cf9 - main - amd64 kernel __storeload_barrier: quiet gcc -Warray-bounds List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6095f4b04cf9714a3b66fc5906fcfc5ec2a8ddd6 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=6095f4b04cf9714a3b66fc5906fcfc5ec2a8ddd6 commit 6095f4b04cf9714a3b66fc5906fcfc5ec2a8ddd6 Author: Ryan Libby AuthorDate: 2024-06-23 23:23:14 +0000 Commit: Ryan Libby CommitDate: 2024-06-23 23:23:14 +0000 amd64 kernel __storeload_barrier: quiet gcc -Warray-bounds Use a constant input operand instead of an output operand to tell the compiler about OFFSETOF_MONITORBUF. If we tell it we are writing to *(u_int *)OFFSETOF_MONITORBUF, it rightly complains, but we aren't. The memory clobber already covers the necessary semantics for the compiler. Reviewed by: kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45694 --- sys/amd64/include/atomic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/include/atomic.h b/sys/amd64/include/atomic.h index facf6da844d3..75a88e03290e 100644 --- a/sys/amd64/include/atomic.h +++ b/sys/amd64/include/atomic.h @@ -295,8 +295,8 @@ static __inline void __storeload_barrier(void) { #if defined(_KERNEL) - __asm __volatile("lock; addl $0,%%gs:%0" - : "+m" (*(u_int *)OFFSETOF_MONITORBUF) : : "memory", "cc"); + __asm __volatile("lock; addl $0,%%gs:%c0" + : : "i" (OFFSETOF_MONITORBUF) : "memory", "cc"); #else /* !_KERNEL */ __asm __volatile("lock; addl $0,-8(%%rsp)" : : : "memory", "cc"); #endif /* _KERNEL*/