Message ID | 20250403235821.9909-23-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:6dae:0:b0:38f:210b:807b with SMTP id u14csp3530721wrs; Thu, 3 Apr 2025 17:01:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUlP/9+Q8LM5oX7KepYft6Qb8QGuS42zd9KYDR/dxqft7jWHvzxm92fSUa55SeGAj18ifmacA==@linaro.org X-Google-Smtp-Source: AGHT+IEmrruC8bk7fjsQ/bvmy3w82b21a+NGbzRYdEPp6xAUnqwmUavhd+ta2N+HqRWtQFq2LM45 X-Received: by 2002:ac8:1201:0:b0:477:88c8:9907 with SMTP id d75a77b69052e-47924a404f3mr18462931cf.2.1743724900840; Thu, 03 Apr 2025 17:01:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1743724900; cv=none; d=google.com; s=arc-20240605; b=eHv9B0+4UU/OJVVgvowOyjCHNs7r5v0z8AIukueaOe5W6uFITJE3qrKsF+EJ8vJBwj vSnDga7yLeHDVPtGJyA4iQnJL1DW5UhSdv0ZLDUjlyKSjMwbYr+aplPHDTiJ+baYIqB/ Y2tMuLURPxWMVF1JEiDlCZ6MS25itJ3QjP0Y9n8LSxtM5XBfxg6iY0nHUKFUJJLxJeYl WMwPJFdbkCFH4gWwm7wJTM9lh6kKqKow/zMmVVHISfpk29KoDmDKbcww8uiOzMSIdYUS 3fn7V9dvshIAulDzMPBF7USi6oIsAimBH2PUzXmNz3atH7TgZnDdWBlY+yohlOMSzAF7 K43w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=TP105EOAJeVHdN1BZY7s+jUHXieu6gJKrsZ9gC9TZqY=; fh=cGDjR9+NH75RtMqDHQPhCvgcQemKyI3acX9LAGXbf+c=; b=hAN6rNsakKFKuUzh+bZt4yHpQryOLDz1qCveY6rsIumORkRrYNNMqMnsFYlYO4tVqO x5UsCNfL7ioCz29s2x2dHrTl2vGhSnbYB3b1JpVlBo8IkkMYDB85vQP8Kp5wKiN4V9Wo 2saqXfAfguCkglrfibH1WPugOeUa/4ML7VRBAf+r5XrEm1UNb9T+7WZD4VT3/EteCssk QmjVLZ5AXteN7lqnv9CcO2cnn6Cn07nqHnJvyY/LqGlDzjLSWAXm+NpO3vM6RFD4W0xq imbtL7ELRpaQtHFCiWWiso4quzhm4M6SLlNzIm45+to7dBWy6o1Ue2ELXopQXLQvHbTj pN3w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Xe/iBpF7"; 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; dara=neutral header.i=@linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4791b198d88si20918071cf.384.2025.04.03.17.01.40 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Apr 2025 17:01:40 -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="Xe/iBpF7"; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1u0UUh-0005n9-GJ; Thu, 03 Apr 2025 20:01:11 -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 <philmd@linaro.org>) id 1u0UUO-0005Hf-VZ for qemu-devel@nongnu.org; Thu, 03 Apr 2025 20:00:55 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1u0UUN-00033L-5o for qemu-devel@nongnu.org; Thu, 03 Apr 2025 20:00:52 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-43cf628cb14so18154475e9.1 for <qemu-devel@nongnu.org>; Thu, 03 Apr 2025 17:00:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1743724849; x=1744329649; 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=TP105EOAJeVHdN1BZY7s+jUHXieu6gJKrsZ9gC9TZqY=; b=Xe/iBpF7Jji64IrtJEhEpXiNTAj3VnbLJvXYFh3hhRwbF6odbzlOOV/18b8tPzJz0T tnTFqnZq8K9zMbbTNpSN+utPigB6dqC2HRQalS9fIRvN1P41wYOPy0vxdqMTlKDuR4Us WKv0pZ93A3scedeZMDYqUIViHSyXXKtBJBrEs6RbE7SCiMVSmseDQipaqinIeL/tH0Lj 3gUjwksKULcbDHLqd6CKqE2yTXFz+/gtYOpO/zHvu4k/mBW0x2EULkYWxgC+2De4KTbs MOdp4CFnxCuWy78xCoiY5kpWD2P4UdgJqacYg819Hd6WD00d1q8xYRQfZGpKCPSqShLr rwOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743724849; x=1744329649; 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=TP105EOAJeVHdN1BZY7s+jUHXieu6gJKrsZ9gC9TZqY=; b=fru/VDpFBc5g4pQbjYiNmYqt2IvcxQc/l+v6xRxbdfbX1RSmifQ5Wvp6CevwPELNJc obvK7hz/T34xyCyA9WOdxZKpoykUk00RmJtsK+PuqtwZC4yyuWcfALkJ3WXS2HChmfrP yUhZvCb/pq6+fFjABv25B8lNip+8Y/yu0VSeJX/LT6Xx7+VDNTzBCbTr1ozqdRumxihq CezyEfuSBH/IWqW19v20q9T2lB1BCwGlBIt8EUrYdKa/16stB7QRre5mMvY1XlE8v1Ke 2j3S1VauHQ1Gf3x0zbrQTqBOIsoqQMyuzem2cN2nQ2uxK7TxSuNGxU8Ax4mXVdhpXB70 NW4A== X-Gm-Message-State: AOJu0Yw9lisl9swMMvFaAu1RMkmiA7BGGfjWW3Dfg1rnK72iiZR1GuKK +dA2ELz94sCgJe3QyFKKcJ/FQIJCQiDaM2errHZXIHQO23q9xdiFY7cM/bLfil6NSRvmjyoQw/P f X-Gm-Gg: ASbGnctz5ObIZBZeCkWjUS2dxpqWuGMwIuWzRRn2jsVPQ4GcDzQ6sw9ajvX/EUw3uqP Krx6zvEO7/JvqWflTogrQJQ/jg3VuN3HDNuX2Lm4NvuDFDw/RJ6FUab8qDvRoTYJzgzli85QH3b yLgjFS4HyWwSg9kiW8VaUqjRCIkEgrFC/lJc9+7qlEUGvpTmrWBkW/L99RlVfJQz2gw0sIpgg8z rATaebpnMqvg16ReYKsSqdMFD/5JxwpDyDBeni/byTJX0B/EW0OHmUpsW5mNYY6zdiG/PUcs4RN pe2kFC90FZhvXSzCG24iM7Eh6mkrwVsWjKfnfkhAgzuWMxxlWueA22NUIXX2wZRl1ibA/nxlp+M kSeZY1q73at6Yx/UxBts= X-Received: by 2002:a05:6000:4027:b0:39c:140c:308 with SMTP id ffacd0b85a97d-39c2e5f50b6mr4084817f8f.3.1743724849120; Thu, 03 Apr 2025 17:00:49 -0700 (PDT) Received: from localhost.localdomain (184.170.88.92.rev.sfr.net. [92.88.170.184]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ec3428298sm31329365e9.8.2025.04.03.17.00.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 03 Apr 2025 17:00:47 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org>, Richard Henderson <richard.henderson@linaro.org>, Markus Armbruster <armbru@redhat.com> Subject: [RFC PATCH-for-10.1 22/39] target/arm: Add arm_cpu_has_feature() helper Date: Fri, 4 Apr 2025 01:58:04 +0200 Message-ID: <20250403235821.9909-23-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250403235821.9909-1-philmd@linaro.org> References: <20250403235821.9909-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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=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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
single-binary: Make hw/arm/ common
|
expand
|
diff --git a/target/arm/cpu_has_feature.h b/target/arm/cpu_has_feature.h index 2adfccd9208..352f9d75bed 100644 --- a/target/arm/cpu_has_feature.h +++ b/target/arm/cpu_has_feature.h @@ -62,4 +62,6 @@ typedef enum arm_features { ARM_FEATURE_BACKCOMPAT_CNTFRQ, /* 62.5MHz timer default */ } ArmCpuFeature; +bool arm_cpu_has_feature(ARMCPU *cpu, ArmCpuFeature feature); + #endif diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 6f62745d7f6..66a58916fcc 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -55,6 +55,13 @@ #include "target/arm/gtimer.h" #include "target/arm/multiprocessing.h" +bool arm_cpu_has_feature(ARMCPU *cpu, ArmCpuFeature feature) +{ + CPUARMState *env = &cpu->env; + + return arm_feature(env, feature); +} + static void arm_cpu_set_pc(CPUState *cs, vaddr value) { ARMCPU *cpu = ARM_CPU(cs);