From patchwork Wed Mar 13 18:49:51 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: 780043 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ed0:b0:33e:7753:30bd with SMTP id ea16csp74727wrb; Wed, 13 Mar 2024 11:51:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU/aLk5vIDnR6M3gYZxw8p/hVLjLzRA1ZGYFBfVnbgZ833TC7YWVljgCQMMArIHCO1YPkxeBnNxWJY08WdSsidN X-Google-Smtp-Source: AGHT+IE+Yg2cmiOx7Qbxk1eEYB0N2CKt5tQECPSNhHsSLQzdJ6Cl3mlng4BfFkBNvgxS0ZzYiIrt X-Received: by 2002:a05:622a:648:b0:42f:515c:3155 with SMTP id a8-20020a05622a064800b0042f515c3155mr7548267qtb.61.1710355897250; Wed, 13 Mar 2024 11:51:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710355897; cv=none; d=google.com; s=arc-20160816; b=DMQqIU2cJgOKBHHIsetzYpgezCHl/XVOCk751XvzC884EPiHXEq8NSBLwSj2tnKrh3 Ttuc7AcuSJNIzQzeBChJ1aVjOIMRel3+nUr0J/+ZyU+PjGr38ziLaZi/3H4APYN7CDrn Klcx+KVc3mUKfg3pxNCCGZTzEUCt+eiFp9HIul1+kp3OdaJExeR5ginEI7UmYgoN73yk pUjugz2VINKbKV7nzEWZOam0kMkmfsJZmRw9jgwgxPWmMZTSinTs4UnKcpeh/70dS3V4 wLBJHeNdkxbTI1TDe4nxl9rd+EUEI4WT20hQVu0exI+BU9Ax2RA5Z8hBCfJfNS6HoD3z 7e8A== 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=cA2TT9vWbQLNZEplCJtFv+ktuA7SvmljLFLbMp9Tj4w=; fh=aGZTIr0kq9izro58BcTksSEiZzOqKaj7frLxg/3wpBI=; b=Rlzp36n9VFHe56n/wjFetgAdx0ZT9Ts1wAF0Nuh3fgUyk4zEKtP/NdtM7zqKvX7jrO Qvbp6x6nBUl32NyTWTev1vCUxLNdMd/MB9Xmmhf9UCDWJ81ZSlVvYxaO2vLyHLGOMKql BazcHG9nq9bg1htnbBhWQuK6S0BUxLqfpZb0GLnQ2smGhMMOaEDnblyEUFLKa5gm0cDc uWH6I2NIehsZmI2YC5gxJ3gwzq5/3qvcl0YWQt1HTN454uXT5iQ3DwlfbnTf9HEa16Ki 8890GWIniVjDiDyfPkXCyY+Jc/AF6hffLK66mLrQvRNQzh5Uv0PrdA72aNnCck5799pQ LR+w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D9XA2JeY; 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 e15-20020a05622a110f00b0042f5146dce5si5340762qty.49.2024.03.13.11.51.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Mar 2024 11:51:37 -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=D9XA2JeY; 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 1rkTgL-0001aR-JU; Wed, 13 Mar 2024 14:50:30 -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 1rkTgB-0001ZQ-0a for qemu-devel@nongnu.org; Wed, 13 Mar 2024 14:50:19 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rkTg5-00048E-W3 for qemu-devel@nongnu.org; Wed, 13 Mar 2024 14:50:15 -0400 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-5131316693cso261196e87.0 for ; Wed, 13 Mar 2024 11:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710355812; x=1710960612; 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=cA2TT9vWbQLNZEplCJtFv+ktuA7SvmljLFLbMp9Tj4w=; b=D9XA2JeYuliooNtIgl5agwclxJ73pP6GWAj7N62L51Y83gjC+XJuMl9aaTG/zH9dpA 2mJqkh+EybJEjtF3/ZGYuOs75lSjMDuRMZAUqnKnd4+BvtkstOOm/fUQP5X6C4BEfylc 6iSFn1fmTayyFiiP3GEluxtxSkssp1W70gV9Fijvqdu++3BxTKTJ77giMSJrFwmBHwf+ fIQomMs+kifyc4hyRVBGCM++NtSL9D2wt+nsCkQds2/nttIuRPfIdUoObD1vJPdqvkOo KYF4JdcBhohz0Yx/ZszIqOnJ3PbtMfjBPlr2fpa0YrE1YBpa0+mDz2wnB1AMkxYKi9zq 2L2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710355812; x=1710960612; 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=cA2TT9vWbQLNZEplCJtFv+ktuA7SvmljLFLbMp9Tj4w=; b=uebUbYQuIfi1nIhxu3LzF23Gi5ubL1hTs5Hk0DgjAhGXOGECIeyjP5fGGejSu9rzfu FKxcFCuM+/lPmRFwQPD8EYkJxBQeHJOJBxf/Pd61Plc1qam0U+F6uMalCPsQ1z79ZyBz S5/LSuJoU8TDyp2fT653dUxILLQ2cP8aA8FjJsZgwspZUQ++N6cmJZmO8Dh/pxD0zgv6 Qs5EI7yiSCCA24NH7qZx9kMBV3IONx3PkvRM8twbXdPtGEmckNIojJbSA9rTnG4avHr3 4RatvkqDLbC4RdwhWRJKssrJyE9vwtp+jlxZKo2Mp318LTrfLKC4c5m/MpmrVYE58P51 M6Pg== X-Gm-Message-State: AOJu0YzpP7CN4CZfayh8iDUsoaOysPE3NV2k79e8bqVfeWibVOQDLtv6 2uBEp9PJ44BEXMKF5XGbMNIdKzDuWwAs83Pjf2ov/q00WJNktbYZDaV/BCbxKJQAQlQ6qIyiu25 r X-Received: by 2002:a05:6512:3b12:b0:513:2329:4308 with SMTP id f18-20020a0565123b1200b0051323294308mr6796012lfv.14.1710355811959; Wed, 13 Mar 2024 11:50:11 -0700 (PDT) Received: from m1x-phil.lan ([176.176.182.179]) by smtp.gmail.com with ESMTPSA id l19-20020a05600c4f1300b004130378fb77sm3129692wmq.6.2024.03.13.11.50.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 13 Mar 2024 11:50:11 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Laurent Vivier , John Snow , Alexander Graf , Eric Auger , qemu-block@nongnu.org, Thomas Huth , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P=2E_?= =?utf-8?q?Berrang=C3=A9?= , =?utf-8?q?Marc-Andr=C3=A9_?= =?utf-8?q?Lureau?= , Cameron Esfahani , Roman Bolshakov , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH-for-9.0 1/4] hw/arm/smmu: Avoid using inlined functions with external linkage again Date: Wed, 13 Mar 2024 19:49:51 +0100 Message-ID: <20240313184954.42513-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240313184954.42513-1-philmd@linaro.org> References: <20240313184954.42513-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=philmd@linaro.org; helo=mail-lf1-x12c.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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 --- 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);