From nobody Sun Apr 12 07:20:24 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1771005128; cv=none; d=zohomail.com; s=zohoarc; b=OkReq8V4wvYTUBdfLdylTQ1jBHmz65mYB05B1aEwiel9EK2m6M9ABx1UeC0Ezay89WEzXE7NFEBYVgVmVa9dkUp0/xIhoojHlk/b6ySj4lLd6ZqPYZgqEHQ1wjF7ep+Y0jbtfIsrbWnkMdCH6ZvR2K1zKnLDNSRrQYAmleSHqEI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1771005128; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=LdOrr20jFZY51Y7mXxgCHJFVkE0DMi0TRk23lW75Jg8=; b=RZA752ka6jYCkVacYxHMtONvZHAGG7p1yWM36e6nnoMBXFWwEjH6R3zbHml/c5sbbiHgqEjWTlfTY/AYLyrw+0nNMvUlcvQeA05B/1gPrWbp6XeqcuXcU6OYkbQi+8wpz7KyCi75eigKjo4nbxuSeiobZTRoDaPCHa8w5tMj7xc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1771005128761606.5433837147314; Fri, 13 Feb 2026 09:52:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vqxJX-0006Ja-4d; Fri, 13 Feb 2026 12:50:47 -0500 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 1vqxJV-0006J5-Gi for qemu-devel@nongnu.org; Fri, 13 Feb 2026 12:50:45 -0500 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vqxJU-000690-18 for qemu-devel@nongnu.org; Fri, 13 Feb 2026 12:50:45 -0500 Received: by mail-wm1-x342.google.com with SMTP id 5b1f17b1804b1-4833115090dso10777565e9.3 for ; Fri, 13 Feb 2026 09:50:43 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4834d7e50casm265949645e9.8.2026.02.13.09.50.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Feb 2026 09:50:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1771005042; x=1771609842; 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=LdOrr20jFZY51Y7mXxgCHJFVkE0DMi0TRk23lW75Jg8=; b=zYe+1vTQPARf8iijdgsQbrDrC7VoNz6IXFyqN+041N4qTzP6+UEVKgEHCoy13aV7g4 RXO6pcrYZKdZilBQ056M4nxpU49NLiAnjaHiu4gLxnfpC0gEHtI6gsHfzGcaEWhBPNuA rMp4OiAQ1UdgSr5F6U1cI12gk1DVyj78onZ325j9fn1/PTQc12aY6P3rFW9d1JnmN1Em N/qYvQsMX6m10k82INhhh2Zdwy4j8YxPC43UmbqNyDnUez5bG+EMfO3qq98DyKSrgKoS VWXsqkoVL5IK5KckUpt8jvX9wkcpw/ZdRupy9YsdXB8scAGFiRaYnuJbjLLG29gttnIA DQSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771005042; x=1771609842; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=LdOrr20jFZY51Y7mXxgCHJFVkE0DMi0TRk23lW75Jg8=; b=K/uX6czHr+rUEyJWQD2np1B16323Gr0rd8Acgw1AA2rpTT97kMEskJBqsskLErU0On XK+fRvdpWHQ4r+NdlxbvRvAuuoal2WnXtyQhcy1BSoqhYiLeXGUrbDUYTe/KQPoST7lP O/OZl/cCDtC+3jS+HHXheEIn9AVr9uRlqxsR+ODkhvwuPplnnuROfo64HCHl8NYXsCGu /MsxtSsjHhYoF2kKC5CuYiAoT/9DLVSaWS/Cs11GpjYtYCGZ26BCAZi3IT9ZpwWDxFup 45a/qV85eWtAspMXlqxek4BWsC+m7gcokVJem66FBdqYeEoQu2HESOIv+NsTYPjKECBL n3mA== X-Gm-Message-State: AOJu0Yz7RYCeVupgSBG9M7xRka8/u34rWtv5XSOHR9vAAtK0ZAbFHsH8 GaBtqQ/TtRY1yrgNGDIlS7n4vf/X8QySDlVNJmWkRTKnd1B9xp4NzQt86lZ/KSsmFdgnih/gn/B 2Ye/GdMjJEg== X-Gm-Gg: AZuq6aJDGE1Y6T5d7uNL4+Gdr4sFM3udYEecUIcDoqFAWzyu+MGRWKrzZXq18w/iHD2 zKdcAW8lLIK/iKzWZL8gJpxbxNNHKgnb3//EqYKdEnDFIGgQw+3ppA/cO/HJhdzq/O4zs+flGWc OnNuTk9ajdd5eIWJJr+9siRWzBib3VpQJ52SbiEygFzXYZJKBwV/R97BfHf4wVuph0KuU8knRPW 7EOF8OmhUmDM4OBX466F0vBxn/L2hciTSA5Pky8JOUEdeL3na03dve2NYUovUiNHTdxqIR4plG4 FiFO0Q0zJm3iugv0FhMQCNxySDge454kPDvJ1FgXjsgfyy1fRHzi+vpAM0779cc/ZYuyTPb7fxt LTzuiHjs22mwXr1H4HVpWmSEN0b8GQxjTQ3OYNqqEAcA58EdjXIshSrBAejGZ5RiD5W9vxojvIh OA8jRtSiTOQXHP7VFe0O159R4vFyesCs5gWSFTH6WnwN6qsdVYWPa5jWVF62S4/GODR9B+B+bTE SLAiMsX8vQ= X-Received: by 2002:a05:600c:8714:b0:483:709e:f227 with SMTP id 5b1f17b1804b1-48373a749a3mr49827495e9.31.1771005041999; Fri, 13 Feb 2026 09:50:41 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Markus Armbruster , qemu-s390x@nongnu.org, Pierrick Bouvier , Fam Zheng , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v4 1/5] qemu: Document qemu_arch_available() method Date: Fri, 13 Feb 2026 18:50:28 +0100 Message-ID: <20260213175032.32121-2-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260213175032.32121-1-philmd@linaro.org> References: <20260213175032.32121-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=philmd@linaro.org; helo=mail-wm1-x342.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1771005130174158500 qemu_arch_available() is used to check if a broadly available feature should be exposed to a particular set of target architectures. Since its argument is a mask of bits, rename it as @arch_bitmask. We have less than 32 target architectures so far, so restrict it to the uint32_t type. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- include/system/arch_init.h | 8 +++++++- system/arch_init.c | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/system/arch_init.h b/include/system/arch_init.h index f2f909d5406..92d50ba8d63 100644 --- a/include/system/arch_init.h +++ b/include/system/arch_init.h @@ -25,6 +25,12 @@ enum { QEMU_ARCH_LOONGARCH =3D (1 << 23), }; =20 -bool qemu_arch_available(unsigned qemu_arch_mask); +/** + * qemu_arch_available: + * @arch_bitmask: bitmask of QEMU_ARCH_* constants + * + * Return whether the current target architecture is contained in @arch_bi= tmask + */ +bool qemu_arch_available(uint32_t arch_bitmask); =20 #endif diff --git a/system/arch_init.c b/system/arch_init.c index e85736884c9..d7ec6e69c79 100644 --- a/system/arch_init.c +++ b/system/arch_init.c @@ -24,7 +24,7 @@ #include "qemu/osdep.h" #include "system/arch_init.h" =20 -bool qemu_arch_available(unsigned qemu_arch_mask) +bool qemu_arch_available(uint32_t arch_bitmask); { - return qemu_arch_mask & QEMU_ARCH; + return arch_bitmask & QEMU_ARCH; } --=20 2.52.0