From patchwork Tue Apr 2 14:24:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 785127 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp4962949wrt; Tue, 2 Apr 2024 07:26:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXTBqk4ZDh4nzC+vS/NV3axGidfzFAWqW1G89aChZ2uzo2C/lMrTJky/EZaqs/UZ19dfFkhshbWTjDMVQiH/sms X-Google-Smtp-Source: AGHT+IEf3hfxLl3mFLC4bGbDxp/lsMYJk1Ssh4O09SEfZBEAyuTKYlCu6d0nnUF1Uo/cB99VcpbI X-Received: by 2002:a05:6871:5b28:b0:21e:b50c:3e8e with SMTP id op40-20020a0568715b2800b0021eb50c3e8emr13565473oac.56.1712068003175; Tue, 02 Apr 2024 07:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712068003; cv=none; d=google.com; s=arc-20160816; b=fpKTrzJ7pyH7LR2ne63vOB6UIRf5dnHXufuKCnUJw2bfiNXFuizcvUqPZ+Lyc1oFtl gXnjg1rmBBgIQ5UDlxrkEXfnN+baWcf7fOyIXDtdAg4SDB3IH3KgbApJ6/3ZnxWFbxLD rcbvETEMXCH5LMVUEWWuIslz79GFFbqCALyW7HGdRrZwxuwZ16gnigzbwW/tg8tLkXm7 coZTm+3SuELgp+23goTfahe0fe3dwsIkjUs79q2P14y0DaN6b+hNdT9ou5vFtdCCx+0Y hRs0eniG7hdveevtVsIe1h4x5NloSFhSc5ol+Q8AUtP4xbzAO+YBVj8LjDEkPumtGOrU jJYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uQbqgStHmRhecsY4PYqLfYr9cNfbGSMKT9lGuv09ipA=; fh=OTMIH+oX447cVt9jKa/ovFtkpGUzXCdBQIjG8sgzvdY=; b=XLeUQ7HkXnF/9onPac0tAyBlgi4dOMJXk8U2uGnBHRHKqySG1Y9QHg/Zgr14oxVIvf OjQ3sNIt01UWASgYk6psx2YbsUxi8nNAcB45NyOf2Yq4v2BRfZHXafP5kQj4aeQtlS/e iDeKSE4PpwP1NnsvEM+JCKQ3zJKWrpcTejodnZ0uUNT2X5pl7OZ/LxxBVYgrQA1kwr9P MyLK9RH1RbYeUHC6loDFkWVG2Lg7OeIY4O/Rc4dfy8Uhpx2K3/IjRVuxYh3AmKtRkQmf 65spIqJ8GjWOoZziIjCej+42G33ISIkjZc4FPFTkv4OGl1DQokxePWI7DMgLDv6qYS1u EFIQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PneklPK3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n5-20020ac85a05000000b00430b7f82191si12218215qta.444.2024.04.02.07.26.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Apr 2024 07:26:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PneklPK3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrf4h-0000zZ-ID; Tue, 02 Apr 2024 10:25:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rrf4b-0000uI-FT for qemu-devel@nongnu.org; Tue, 02 Apr 2024 10:25:13 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rrf4Z-0007yu-8h for qemu-devel@nongnu.org; Tue, 02 Apr 2024 10:25:13 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-34379b447c3so187668f8f.0 for ; Tue, 02 Apr 2024 07:25:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712067909; x=1712672709; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uQbqgStHmRhecsY4PYqLfYr9cNfbGSMKT9lGuv09ipA=; b=PneklPK3VWzq7Rpn5MJMwrcOmZ+1kZlnIIZfc+UQ6NsFTudEX/wZu+9IcIIeFsc4Ef oRer9N1Y2vi2RSUgioIWehUSUb4Hg276okTDBY8R25IhjroBe2gx2rdl9ps5ea5oahdN iovT3uf6a18kuyIieZKCzeHwnW7dBNMns2VWDPOUt27srLXMgkH6UABqxVENPh3k3K8p D+BM8KEuLSFNaBpclbzdqvoIDyzXPde86eZjyiJhQ48a1aBaVW0j8DJ9HZzOG3ZqE4e8 3eS0eJpKGLK94BVWnYnU9m1XEA7Xzpno6r7WrK4WbzeocHAmtUiWelYzuItG1FpUwDVt eBRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712067909; x=1712672709; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uQbqgStHmRhecsY4PYqLfYr9cNfbGSMKT9lGuv09ipA=; b=isorFe72NsLftnwgEIWa43tLub1oNBiK0n6GzLe0cNU8SQoCwResqgUOZTFqfWdPnp pF/YIAKmfypRUB+y3VxbnoV5u9JbYSCtJu/ID8C6RVm0eNUyDkzstaR7AWE188PaVVP3 jueltugWrTsBmaLAGa3lD45YFXyND5Jtgijqimm1E3kmaJb5WAViSml2WRm05ew8M7Bo BVBB9gaj0bTq3AsYw7VxY6kgy1kCTO5zdG3TCBWmAi0vTCN7QNCjWELXX50yGkj/YHcd L8ve735RNRDE0yg5m36ghXqQjIvD9GibniPaptsEDJ+4x19UCXo7UPM4jhwWJuiU9mZf EAxw== X-Gm-Message-State: AOJu0Yx8H8JU5fMGAHnUcUb53leDfULdENRETB0fj4fmX6eqk0L3imMm +xokawmwx/piUBRgUMVEf6Uw7jW9KDdYP95T7MYIljSI2Gl7+Hj9u2MN2gjywi09yif6YgfIcxu XhwE= X-Received: by 2002:a5d:56cb:0:b0:343:8022:dd08 with SMTP id m11-20020a5d56cb000000b003438022dd08mr327218wrw.0.1712067908944; Tue, 02 Apr 2024 07:25:08 -0700 (PDT) Received: from m1x-phil.lan ([176.187.202.91]) by smtp.gmail.com with ESMTPSA id bx26-20020a5d5b1a000000b0034356c434d0sm2796273wrb.117.2024.04.02.07.25.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 02 Apr 2024 07:25:08 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Eric Auger , Peter Maydell Subject: [PULL 05/15] hw/arm/smmu: Avoid using inlined functions with external linkage again Date: Tue, 2 Apr 2024 16:24:20 +0200 Message-ID: <20240402142431.70700-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240402142431.70700-1-philmd@linaro.org> References: <20240402142431.70700-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Similarly to commit 9de9fa5cf2 ("hw/arm/smmu-common: Avoid using inlined functions with external linkage"): None of our code base require / use inlined functions with external linkage. Some places use internal inlining in the hot path. These two functions are certainly not in any hot path and don't justify any inlining, so these are likely oversights rather than intentional. Fix: C compiler for the host machine: clang (clang 15.0.0 "Apple clang version 15.0.0 (clang-1500.3.9.4)") ... hw/arm/smmu-common.c:203:43: error: static function 'smmu_hash_remove_by_vmid' is used in an inline function with external linkage [-Werror,-Wstatic-in-inline] g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_vmid, &vmid); ^ include/hw/arm/smmu-common.h:197:1: note: use 'static' to give inline function 'smmu_iotlb_inv_vmid' internal linkage void smmu_iotlb_inv_vmid(SMMUState *s, uint16_t vmid); ^ static hw/arm/smmu-common.c:139:17: note: 'smmu_hash_remove_by_vmid' declared here static gboolean smmu_hash_remove_by_vmid(gpointer key, gpointer value, ^ Fixes: ccc3ee3871 ("hw/arm/smmuv3: Add CMDs related to stage-2") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Eric Auger Message-Id: <20240313184954.42513-2-philmd@linaro.org> --- hw/arm/smmu-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c index 4caedb4998..c4b540656c 100644 --- a/hw/arm/smmu-common.c +++ b/hw/arm/smmu-common.c @@ -197,7 +197,7 @@ void smmu_iotlb_inv_asid(SMMUState *s, uint16_t asid) g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_asid, &asid); } -inline void smmu_iotlb_inv_vmid(SMMUState *s, uint16_t vmid) +void smmu_iotlb_inv_vmid(SMMUState *s, uint16_t vmid) { trace_smmu_iotlb_inv_vmid(vmid); g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_vmid, &vmid);