From patchwork Wed Apr 2 22:23:32 2025 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: 877748 Delivered-To: patch@linaro.org Received: by 2002:a5d:6dae:0:b0:38f:210b:807b with SMTP id u14csp2986167wrs; Wed, 2 Apr 2025 15:25:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVPG8PjpNSsstnierviG3f1JGyBGGlB1xZ7a6uryLU3jSYzwmoqBDIXXlGWrDglLh2f1jxYnw==@linaro.org X-Google-Smtp-Source: AGHT+IHC27cbabdZcUx3gtVL0HkHsHA4C8iTkvSabyWicSgxIMU1AAmH2yBfsKwiPpdMXRMu+8fo X-Received: by 2002:a05:600c:510d:b0:43c:fee3:2bce with SMTP id 5b1f17b1804b1-43e258cc945mr141142575e9.26.1743632756281; Wed, 02 Apr 2025 15:25:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1743632756; cv=none; d=google.com; s=arc-20240605; b=XUGY+XrxmY5QiMbBklcqkfq5PjeT0Z1EOeLcRbhdKWR47fA0jXOH7NQPXWf4GvCMNE nH6qRk69UG6J+DpZr1cWpZEbVjxLGyYFf0iwGfAKnuXbzLSk3pXNUWnIgA8FMGmoFVrP d2p46G7c9dU3H1wI+r+rQuvz6vPyKXx4LmDreilanJLm2viu/5ECPAMpwJjSzcGniMGD VgbwGCoZVyNTvRtFlIOKoe4crKtuLeaKpS5PzEPdNtu6CXpiEZNlP6Rlwu7aR/wURL7n /3Q9u781LSNCz0+EI9F46DO9CxoWKEV1S8IUNNXLd7JXkzhk2gYFDGYaO9I8n09ulGrS 33wA== 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=jF70aNm+iGgL2ioq9Xiaj6FEbb6pAabZS82CmNkwLqw=; fh=ILu9n9UJYyGKJ+F9rVBU1LrxK5aJ3ihMVgUEh7OR7WA=; b=VRUxvpNlOWVeB1THjm93xExt/xckgH9BU0STMwfFPy0XW55Q9zjbeHz7Jjp5CUJJP9 LNWhMiRLqK3IKotAJ0hYRAeocVbpyA+K/e4iiJleicJSKWMBlgk4MswrLWZNxJEdG4uu fp913EwxgxQyeqpeqh+sDCZpA98q8tpW0Tevx2n4yiyVGijRzDcWAnEt08tUHeY+M2b9 /xeN0ksVZYJeJaZLx6I2Tk1PvRfFZ7zdTrbNGy19IZYwk3QrgQxv7vr9odViAmWt7TJ4 CRyev8b/WsAlsDcFTXIvWfbFYDyggNV+e28RfTG48sSTUlk3rb4/4W7qkiD4eUiE4BLr VlKQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NTBPdEmh; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 5b1f17b1804b1-43ec39b0ac7si51105e9.188.2025.04.02.15.25.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Apr 2025 15:25:56 -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=NTBPdEmh; 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 ) id 1u06WT-0005is-Bj; Wed, 02 Apr 2025 18:25:25 -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 1u06Vh-0004qf-NM for qemu-devel@nongnu.org; Wed, 02 Apr 2025 18:24:41 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u06Vf-0002Yp-8D for qemu-devel@nongnu.org; Wed, 02 Apr 2025 18:24:37 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-43948021a45so2145565e9.1 for ; Wed, 02 Apr 2025 15:24:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1743632673; x=1744237473; 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=jF70aNm+iGgL2ioq9Xiaj6FEbb6pAabZS82CmNkwLqw=; b=NTBPdEmhWAFZDYelVwktQM4gu5tCJmN0Xc+3d8luoe191qeOPcReHtl3TD2f1KV9cn EpdiPzLSVzpd9ut00FjpDuO7VLdE/h5syp6oCnX/aYYw8Q74YQj83PzwlMJFvbrMP6YJ fpDW/5fZeB60yNwFIG+Ush3vn3dadUySNFQejyYhyi1il/hU4WzPDwZiVpeG79QGuZi+ 75a2yv/eCqRbG9FqHbbzwIpyl81wP5kdOw91THt9JLc8luw70o/ecD9z0mTKluZ+AjvB KNQmxysL1kVTZ67iyAqy/EvTfuSv9ckfb9uwA1s5BtWw3MVFBEBxEIzjQxm1CLRdfLXA r4Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743632673; x=1744237473; 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=jF70aNm+iGgL2ioq9Xiaj6FEbb6pAabZS82CmNkwLqw=; b=eN0herz7bSJTHVEKIFUWm+zpYfjahBqy66GUyvBCsNJDdP+e5uynyr6TF0PPbakufO nBvlmDORL+hdqswFiDP7A62V7jDwwfNLL1CX/dwxsJkMREUyrUbSPmJkB0IY0MQm0Scv tnOjaqbHXOWTpf/6AzSqvuFmFCRT/YGYPUgDgSMkiQWG+5dz6nNZRz87tShoUQjMtxBd hXxiMCnNkPfsgCYdLU/RFtelZMg0QnOsDW29TpxNx5Hea7jd/b9qOMBimriY08yWaI80 H2weV2jZY2UQY5N+rUpDZEHViFhq4FbHAmMHk8yd1EQ/4JUxEtoQ/RGd5FxdXh2At+HZ ivmQ== X-Gm-Message-State: AOJu0YyKQcK1Rbdk++IXA1ACl2yK3UlJGyRlcnjHRfV/xY6o7eMqD+jw 3AY95a5MgrX/GoGRtkqJJ4Ox+beIahy1LAityf70LcrK7uH1Pza5DOSZjXXSY7hw1cIEPxlX3Fp 9 X-Gm-Gg: ASbGncsDSP44yoysyKS12eyokZIrr8+TJad4sCzPH2l6xCnabMyolQ9sy8xjUn12Evg u7qjlcGm/TZScNA2z6iuYeaNafNqf8JfC62D4s1uW5SdhfV2oyOMnZMujH8Luire0A48N1tKTwD DEKeZGayNFhL1AejlIb1rZYQbUKJ2s76GdcSm5kd++2kazCqTonb3zQ0MHrveFB/PopycDdcJ2h CpF8Wshow1A+J6nCh4og+pmtnfVeHL75k5lRgO2xxgaUu/eCUapciVT1juRrRwNwyUsnzqdIfj8 n3RJyHLFwjXcZk1tPks7/PFP3BBnlFoB9aSvG3UgAbuW4A4YMvwMaC7BscHQ3JkOBV5J7XjuML+ YWV9d9/xIV2YN6eziY6c= X-Received: by 2002:a05:600c:34d0:b0:43c:fcb1:528a with SMTP id 5b1f17b1804b1-43db61d8dcbmr162934155e9.6.1743632672939; Wed, 02 Apr 2025 15:24:32 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c30226f1fsm40966f8f.95.2025.04.02.15.24.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 02 Apr 2025 15:24:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Pierrick Bouvier , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH-for-10.1 12/13] hw/arm/realview: Replace arm_feature() -> arm_cpu_has_feature() Date: Thu, 3 Apr 2025 00:23:32 +0200 Message-ID: <20250402222334.66511-13-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250402222334.66511-1-philmd@linaro.org> References: <20250402222334.66511-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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: 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 By using arm_cpu_has_feature() instead of arm_feature() we don't need to include "cpu.h" anymore. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/realview.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/arm/realview.c b/hw/arm/realview.c index f81d084eb80..48cfe05add0 100644 --- a/hw/arm/realview.c +++ b/hw/arm/realview.c @@ -9,7 +9,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "cpu.h" #include "hw/sysbus.h" #include "hw/arm/boot.h" #include "hw/arm/primecell.h" @@ -31,6 +30,7 @@ #include "hw/sd/sd.h" #include "audio/audio.h" #include "target/arm/cpu-qom.h" +#include "target/arm/cpu_has_feature.h" #define SMP_BOOT_ADDR 0xe0000000 #define SMP_BOOTREG_ADDR 0x10000030 @@ -77,7 +77,6 @@ static void realview_init(MachineState *machine, enum realview_board_type board_type) { ARMCPU *cpu = NULL; - CPUARMState *env; MemoryRegion *sysmem = get_system_memory(); MemoryRegion *ram_lo; MemoryRegion *ram_hi = g_new(MemoryRegion, 1); @@ -138,16 +137,15 @@ static void realview_init(MachineState *machine, cpu_irq[n] = qdev_get_gpio_in(DEVICE(cpuobj), ARM_CPU_IRQ); } cpu = ARM_CPU(first_cpu); - env = &cpu->env; - if (arm_feature(env, ARM_FEATURE_V7)) { + if (arm_cpu_has_feature(cpu, ARM_FEATURE_V7)) { if (is_mpcore) { proc_id = 0x0c000000; } else { proc_id = 0x0e000000; } - } else if (arm_feature(env, ARM_FEATURE_V6K)) { + } else if (arm_cpu_has_feature(cpu, ARM_FEATURE_V6K)) { proc_id = 0x06000000; - } else if (arm_feature(env, ARM_FEATURE_V6)) { + } else if (arm_cpu_has_feature(cpu, ARM_FEATURE_V6)) { proc_id = 0x04000000; } else { proc_id = 0x02000000;