From nobody Wed Nov 27 04:57:18 2024 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=1700677970; cv=none; d=zohomail.com; s=zohoarc; b=IeJ820IdAodTP2kGVnCxW8CyuCQSO6SSBIR5faEt5St4CeUoBKFJYd+Lyr/3nldTWMycGvtxXvD7c97X4HnZWYOFeXUJ/vM2ccPPNIsJwM3tIhbNhplBbOxVOebjBY7/vLFppKkfOPkpX1w42hM2UctSlW3RSBFofegtGJm/gkY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700677970; 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=lSl3SvKqQCH/74SE8sqRcfeJMBZmOK/fR4uLmHCWg/A=; b=YphQfzPUQG/Ypg6v295zmHs07w8IcPb8UBcx+vps3Rg4w55VdB52jDZ/N5feA1Hy1zxVhzOUpLT+PPzNZufix94PZsbutWwbWRzt1Cqk2vc3ZdTK8P7EPUQbjKf/OM0vZvHor2tcU1efOS2gRQLav4KQaKXBVlbqXctaUyR+Qok= 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 1700677970449373.8671172268863; Wed, 22 Nov 2023 10:32:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5s0Q-0004BC-6N; Wed, 22 Nov 2023 13:31:22 -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 1r5s0I-00049z-2q for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:16 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5s03-0004Yc-Us for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:10 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4084b0223ccso281445e9.2 for ; Wed, 22 Nov 2023 10:30:57 -0800 (PST) Received: from m1x-phil.lan (pas38-h02-176-184-5-64.dsl.sta.abo.bbox.fr. [176.184.5.64]) by smtp.gmail.com with ESMTPSA id p21-20020a05600c431500b00403b63e87f2sm176451wme.32.2023.11.22.10.30.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Nov 2023 10:30:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700677856; x=1701282656; 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=lSl3SvKqQCH/74SE8sqRcfeJMBZmOK/fR4uLmHCWg/A=; b=RRYkkzKzayyDaoNmgqqeRCP0WOQDWX0EstnE52z/+iBWjuvEaiLu7T5XN039aJoCG1 Xykgg2a3mqKGRMK6ev3p5LwsSTMaVdv4wI736mR8xfAVeGehNvfe5FNCt0Nhncvx/U80 uQhmvEZljuGQvbtdu4surSHJfWgu/QXMH3BATjyP5dGLlC1umlBm7yRrpcV5Rqv9SoTc UVcuSH2Q1olvxWLoF3Dg3/xIiQ9E33Zz/HQ6s/v6aKtZ4KKqameV66a8sewYDikPj0AU DVo2FgoH82wRx+Ow3SIcgZ80gwX6n+35fTRrCpgRy7gFpZBD/00hLvLvjCU1UhvyX1rM yuJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700677856; x=1701282656; 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=lSl3SvKqQCH/74SE8sqRcfeJMBZmOK/fR4uLmHCWg/A=; b=tzG8KAeg50zG7SxiozfSgyFK8/tyjUPF+vssZSrjdLjs2rorPVRwqwoG5zGhALmz/S H+n0pFlMA8aJBowR4KSRnySAhXlhfXHfUcg9tM/sitW28DTux5A7AfClb4yUElEKdmnM e8uIcfF27pYtyW3C6MbrDpf++HTYD2lseWc4ZLgbdYfS4NEusrnfsNHne9V+f/+V8o3e O9dI4qYXjP2dKuZHA6cyiKHJ0bZWzd/Dkq9o5TsNwP6ZqXILZJLPVqpxU1UyCwTbuzvV HglMaarnhav6eH7syCHPutP+G4FNtKcbs9YfOTIdxAAluMydHGw53zibWVXWflOEXsMJ pO5Q== X-Gm-Message-State: AOJu0YyD7VoauUotqCKEmaH2LTOLxHRIG0E7zPdNKP1//lid2/eQWscP 9HUv7H0cwXBtfsEBFrkeWlRgbpN8ZDZY/9nvg0A= X-Google-Smtp-Source: AGHT+IG+lom2T2L1G6ppR4LSOkVj0+z1J919Ft7QO7x8s0p9VZICGrYQcWydldiJjYb9B55ciEXU+g== X-Received: by 2002:a05:600c:1991:b0:408:53ac:141f with SMTP id t17-20020a05600c199100b0040853ac141fmr2507005wmq.24.1700677856143; Wed, 22 Nov 2023 10:30:56 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Peter Maydell , Thomas Huth , Mark Cave-Ayland , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [RFC PATCH-for-9.0 01/11] qom: Introduce the TypeInfo::can_register() handler Date: Wed, 22 Nov 2023 19:30:37 +0100 Message-ID: <20231122183048.17150-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231122183048.17150-1-philmd@linaro.org> References: <20231122183048.17150-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::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1700677971747100002 Add a helper to decide at runtime whether a type can be registered to the QOM framework or not. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/qom/object.h | 4 ++++ qom/object.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/include/qom/object.h b/include/qom/object.h index afccd24ca7..0d42fe17de 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -372,6 +372,8 @@ struct Object * struct TypeInfo: * @name: The name of the type. * @parent: The name of the parent type. + * @can_register: This optional function is called before a type is regist= ered. + * If it exists and returns false, the type is not registered. * @instance_size: The size of the object (derivative of #Object). If * @instance_size is 0, then the size of the object will be the size of = the * parent object. @@ -414,6 +416,8 @@ struct TypeInfo const char *name; const char *parent; =20 + bool (*can_register)(void); + size_t instance_size; size_t instance_align; void (*instance_init)(Object *obj); diff --git a/qom/object.c b/qom/object.c index 95c0dc8285..f09b6b5a92 100644 --- a/qom/object.c +++ b/qom/object.c @@ -150,6 +150,9 @@ static TypeImpl *type_register_internal(const TypeInfo = *info) TypeImpl *type_register(const TypeInfo *info) { assert(info->parent); + if (info->can_register && !info->can_register()) { + return NULL; + } return type_register_internal(info); } =20 --=20 2.41.0 From nobody Wed Nov 27 04:57:18 2024 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=1700677983; cv=none; d=zohomail.com; s=zohoarc; b=RZk79YCzDS3ER0DCzb1F+tUdab45hXZHb/S0UTLKjWJrigR/l35RF/67xalzvOCxtSX0TN4xF3nkIzy6mR9o0JxdP3ssexOrxkBhsbFfaszr4FE4IJgC5uCSZ3UyaI0AMtUAcxNLFDTotu+4GYHQeIkI3I867MRgzHCbZ6u2MO8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700677983; 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=E7103XOFxT5bJSMqrbJRnaAZtCqt8Oh3G3I/DOAsQEM=; b=ONMaIXUHa/+IGljjI+JA6/IA8Kf7510QSA9L/KD6a0DAMusJXAlcEZn5ybgQlM8GD0fJ6A1ewuLEauAMAo72EQ9QRVKoP1RB0G/PU7YrE6DzRGUmIb4kBFC6l6QRS9AJ0BMsOSp2YJhYgcLDn1ZZ5J1A0evVxb3M68jNwmlOFJ4= 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 1700677983592553.0828178387225; Wed, 22 Nov 2023 10:33:03 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5s0Q-0004BM-6k; Wed, 22 Nov 2023 13:31:22 -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 1r5s0K-0004A3-1u for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:16 -0500 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5s09-0004Yz-Sw for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:14 -0500 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2c503da4fd6so996151fa.1 for ; Wed, 22 Nov 2023 10:31:03 -0800 (PST) Received: from m1x-phil.lan (pas38-h02-176-184-5-64.dsl.sta.abo.bbox.fr. [176.184.5.64]) by smtp.gmail.com with ESMTPSA id f3-20020a05600c43c300b003fc0505be19sm176312wmn.37.2023.11.22.10.31.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Nov 2023 10:31:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700677862; x=1701282662; 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=E7103XOFxT5bJSMqrbJRnaAZtCqt8Oh3G3I/DOAsQEM=; b=XudJ9G9i3I3FSZCHQA6DVEod88neTJm5dbjN+lB3MnansF4zmSW7DdweYcwUnYHypc CoOvqM4jd4EjaxKeFhhCW2GRHB2/aWQFTntHwKCEwKOPUOsnMVLoL134zJmjHsAq4oFL Dw1P3hTnZuqvUIabYn0Jhzwk6evKhY0l5hx5Oy2RLQoA/UczR9cqoUb3i3ksNrxJYHSY ZnBnwXQaTz3oRPSvccFbKDKuqjUe5yNAfTrxSAuV1b6RZvFwMjFXgn5vk9vAr+qFCFuc NwV4mnj/JZYYcwU7XUaKRxLqi/zxu3NnGO7RAIly0tWd1xabcfv7HjPMIQhsXWhnSNOZ VT7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700677862; x=1701282662; 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=E7103XOFxT5bJSMqrbJRnaAZtCqt8Oh3G3I/DOAsQEM=; b=Qvho+TOsW60c+ZNOyGp1O8bnO0xpBCc5n7ZtTPM7kWCBHxth+0pORJ2TEbgs+tk0RW DAfVfNDOzZrcyz35AjHibF+SkhxbOjuQnMtOGp39RjJLb0UcfcjktpGCZiven8KhKMzd yWVNw0wGzF5PPRZry8zqob5fEuNQwyqEGfO3s127qzI47H/czAiUE7bHrfGZPeXu49kI M6RptCdihz3QzxAJaMEcVYaP4jy4ButFOAWiTKsk0iR6j2TRLOdEHUNscY9A4i7q9TMv +NoG+VfiZy4AlGY72x7EXf4FmKvYgzXu+/Mr53SWAmVp9Vj9rt2Z6PMZEGBwIMTzcE5h /J4g== X-Gm-Message-State: AOJu0YzQ32cTLDoYFM2Pc/3bPXK2pOX7H1VYwP4ANGeGjQhoTAkWnYDp ZZsOuoSn5oJVddhBuYbgGIaMm3V7+zVBGUM3sJM= X-Google-Smtp-Source: AGHT+IHIV10IErfFC07Es1yMjpQsHxoU13Fz1+eiamPARf56zp7ZGthltp+wH8DZLOe8g00EO/RHvQ== X-Received: by 2002:a05:651c:21a:b0:2c8:7c22:97e2 with SMTP id y26-20020a05651c021a00b002c87c2297e2mr2064877ljn.45.1700677861838; Wed, 22 Nov 2023 10:31:01 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Peter Maydell , Thomas Huth , Mark Cave-Ayland , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [RFC PATCH-for-9.0 02/11] target/arm: Add target_aarch64_available() helper Date: Wed, 22 Nov 2023 19:30:38 +0100 Message-ID: <20231122183048.17150-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231122183048.17150-1-philmd@linaro.org> References: <20231122183048.17150-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::22e; envelope-from=philmd@linaro.org; helo=mail-lj1-x22e.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_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1700677985748100003 We want to build HW models once, but don't want to register types when all prerequisites are satisfied. Add the target_aarch64_available() to know at runtime whether TARGET_AARCH64 is built-in. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/cpu-qom.h | 2 ++ target/arm/cpu.c | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/target/arm/cpu-qom.h b/target/arm/cpu-qom.h index 02b914c876..bf6b3604ed 100644 --- a/target/arm/cpu-qom.h +++ b/target/arm/cpu-qom.h @@ -33,4 +33,6 @@ typedef struct AArch64CPUClass AArch64CPUClass; DECLARE_CLASS_CHECKERS(AArch64CPUClass, AARCH64_CPU, TYPE_AARCH64_CPU) =20 +bool target_aarch64_available(void); + #endif diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 25e9d2ae7b..1990c04089 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2548,3 +2548,12 @@ static void arm_cpu_register_types(void) } =20 type_init(arm_cpu_register_types) + +bool target_aarch64_available(void) +{ +#ifdef TARGET_AARCH64 + return true; +#else + return false; +#endif +} --=20 2.41.0 From nobody Wed Nov 27 04:57:18 2024 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=1700677972; cv=none; d=zohomail.com; s=zohoarc; b=EwYqEmBxJ/KWCj35DXNCJaU5uVe0Cb0vhOYJOOvfvNrz5GdJMw6s6p5kKinqIwyJ0lti9Rc+L5bbsmTW6yhschRDNwWOlK9TUYpZccXEMofZW2i+YjaEZ2/SxkFC5J9IKxUkPDNgaO/oit9lWwPOgDMxcDCOYYXtq9Mwlq0abGI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700677972; 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=aGx5XygnULFFxHYgrgUAbmNY2b76PBI4xDcz2zCtY2c=; b=fVTtlX6Lk+czLKo15I1GDtiwJ8NY6VOTEi27emkbEbOuoBkmpYsGCnb1v0Fdj52kTdCZQRRgdqLDp/GH5iE4yydu+PJxSc33y/cxsCZ1CAsgjKVnOsYQe8/gb3wPPNQNDG4CiN8n4eaR5SxYDH1/kLuIvBTFyIM2JMcqADUZOpQ= 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 1700677972934133.66093908931316; Wed, 22 Nov 2023 10:32:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5s0f-0004Ec-HB; Wed, 22 Nov 2023 13:31:37 -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 1r5s0S-0004Bv-GJ for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:31 -0500 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5s0D-0004ZV-U5 for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:21 -0500 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-507a98517f3so21182e87.0 for ; Wed, 22 Nov 2023 10:31:09 -0800 (PST) Received: from m1x-phil.lan (pas38-h02-176-184-5-64.dsl.sta.abo.bbox.fr. [176.184.5.64]) by smtp.gmail.com with ESMTPSA id dh10-20020a0560000a8a00b0032d8eecf901sm61377wrb.3.2023.11.22.10.31.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Nov 2023 10:31:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700677867; x=1701282667; 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=aGx5XygnULFFxHYgrgUAbmNY2b76PBI4xDcz2zCtY2c=; b=QyMYn8LcPHouMss7PKkuPerZ0IQ0UxBZKM79hwMoy+PJ1BwoOVgmu7Jl0KUoEmoU+X ekshtlgb5YaSaXBUvcndskveicFb6Rp3zs0P18UmPcF9opJ8rBLwdBrwYczFOQVWF5MQ vOqVZzExl+8L0azJSJY+xZVaxstV+2yD+YXcUcOp2X86Qfxo/E74w0/MGdTEAMguooWA N5UnPstwW/HAEp1OsEYhInRpyDM7mcfJeYpaTbcT9dWzFqnhjV6zj+bB1lb0E/IC9FyB rqDHDU9LtmgCn9ufCDOj7NhOL+E+15zZtFmJooigxCXp38HFzk4r4rWkp/rH9YbIiPW6 4gTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700677867; x=1701282667; 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=aGx5XygnULFFxHYgrgUAbmNY2b76PBI4xDcz2zCtY2c=; b=aWRxHLJWPRWvWPu91sGF/QYuqPzU6ihE90dj06HVSU/VEiKx6bYQD1kiOZJ4BcK6bh +c6yAX+EjnH/wJ19r9TtcazP7NioNi31/y43eu1/ODv3YjiXk+q1jDkFwYJtl7y7U2lf c1YSJuAJZwYJE5m9m7jlIiZzRI1ZYRWGrE6MwDXHFF6p6AqK3EK6qjtOw5omoujVCsFq +528aigHdS2kGZ9dkoL+2IxNfp6RKR6NneiVJWmbQsl1hW6q60d/l0fpCCJ4D1epGQQ1 0llZJKGK3tuFQyIz8HVhI1BOgwNa9xVUFrFeEvwxS55U7X+wLadQQyLvI9CnTzkATRgY K/sA== X-Gm-Message-State: AOJu0Yx1cZdlegpz8465KHE0gq6kE+sbhK4FjZJCfvp7WBrYjtCFgSwc 4esMAPy69TKB0+k9BLrtl1003KGP5jQ0T55h+qY= X-Google-Smtp-Source: AGHT+IGXiea0r3oI+ORFeqbb0Tw5S/xHce2rzUHHnseNrrpvUnoFaJ16nWaBmzGL7TIfeQ4Ggblq6g== X-Received: by 2002:ac2:4a84:0:b0:507:9a49:2d3d with SMTP id l4-20020ac24a84000000b005079a492d3dmr2124262lfp.31.1700677867269; Wed, 22 Nov 2023 10:31:07 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Peter Maydell , Thomas Huth , Mark Cave-Ayland , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH-for-9.0 03/11] target/arm: Declare ARM_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h' Date: Wed, 22 Nov 2023 19:30:39 +0100 Message-ID: <20231122183048.17150-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231122183048.17150-1-philmd@linaro.org> References: <20231122183048.17150-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::136; envelope-from=philmd@linaro.org; helo=mail-lf1-x136.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1700677973703100010 Missed in commit 2d56be5a29 ("target: Declare FOO_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h'"). See it for more details. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/cpu-qom.h | 3 +++ target/arm/cpu.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu-qom.h b/target/arm/cpu-qom.h index bf6b3604ed..be307037ff 100644 --- a/target/arm/cpu-qom.h +++ b/target/arm/cpu-qom.h @@ -33,6 +33,9 @@ typedef struct AArch64CPUClass AArch64CPUClass; DECLARE_CLASS_CHECKERS(AArch64CPUClass, AARCH64_CPU, TYPE_AARCH64_CPU) =20 +#define ARM_CPU_TYPE_SUFFIX "-" TYPE_ARM_CPU +#define ARM_CPU_TYPE_NAME(name) (name ARM_CPU_TYPE_SUFFIX) + bool target_aarch64_available(void); =20 #endif diff --git a/target/arm/cpu.h b/target/arm/cpu.h index a0282e0d28..d369275827 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -2834,8 +2834,6 @@ bool write_cpustate_to_list(ARMCPU *cpu, bool kvm_syn= c); #define ARM_CPUID_TI915T 0x54029152 #define ARM_CPUID_TI925T 0x54029252 =20 -#define ARM_CPU_TYPE_SUFFIX "-" TYPE_ARM_CPU -#define ARM_CPU_TYPE_NAME(name) (name ARM_CPU_TYPE_SUFFIX) #define CPU_RESOLVING_TYPE TYPE_ARM_CPU =20 #define TYPE_ARM_HOST_CPU "host-" TYPE_ARM_CPU --=20 2.41.0 From nobody Wed Nov 27 04:57:18 2024 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=1700677972; cv=none; d=zohomail.com; s=zohoarc; b=J1BV3MInTiKBWP5rIGMRa8MKm6n6DKWtzPvIfO6JDBOoBpA2AhssOCHOA5sm82oCcuo4kNSP+0R4m9jIJR4T6JR9hj8qjyRkHJY17SxUHFEq0XKtVXxGBw/eLx6MCvopx0mLTftxv/Os9V4u+bkOd1Cwaq0I3VBJ9s+OoCOj3pM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700677972; 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=iZrZRIxKP0fr1EzlYqN5VDWsI9Qt1x4ludh/rJlYbBI=; b=OEqhq1UNGA/FvG+Gc9JAqHBgSuJdfhmDUBLIBR9vUpm1sajKE7Gx/lxMV9/19Mw0mJJNa7XpU2qJQ5rgH8JtCl0/n9zQxc/rAJe+v6375N8EnK22canHUINa+P9TKs046HBRZ3jW0/xHACS4I8GdgcylposkcZ4U6CMr5FNpIgI= 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 1700677972899428.3665159605141; Wed, 22 Nov 2023 10:32:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5s0f-0004Ed-GL; Wed, 22 Nov 2023 13:31:37 -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 1r5s0N-0004BH-Ah for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:21 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5s0J-0004aB-1J for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:18 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3316bd84749so9070f8f.2 for ; Wed, 22 Nov 2023 10:31:13 -0800 (PST) Received: from m1x-phil.lan (pas38-h02-176-184-5-64.dsl.sta.abo.bbox.fr. [176.184.5.64]) by smtp.gmail.com with ESMTPSA id d11-20020adfa40b000000b003232380ffd7sm36991wra.102.2023.11.22.10.31.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Nov 2023 10:31:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700677872; x=1701282672; 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=iZrZRIxKP0fr1EzlYqN5VDWsI9Qt1x4ludh/rJlYbBI=; b=u7bcKp1l6iBeZ7fcRWf7yjRxw6pA0GNSsv0VuX/X0WtMzBbWWwzpdTI/L6BbbsYrdb EQE0GZUYnwQ17LE9RaP77MxkjgdKevzznbpWXNafASRBrQjqYM8rXyqvTBp0AG0EX6u7 xU1T9aOJuXns0ya8zPrYA0JN1+h9hQU/jKgw8VGuul78rZSTQECTN3zMtb5W8KQheCnM SMuLNfHF5b5+1+GvoF7z6JG6O7L3JXtOxkqR/gTkj7i81b1CE6LfPsfxjBjJE/fmxOq/ dQ1sfCtHhdooS+03vxqBwjuOM7oJtJH2mK6npBjwtfrFcXDdo8nq/6ykNvtZQoEBkgn4 Gv9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700677872; x=1701282672; 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=iZrZRIxKP0fr1EzlYqN5VDWsI9Qt1x4ludh/rJlYbBI=; b=mQl6OaphM99rKpvRSs+zcras+efqNkXI+CmNBf3nzmTig0kdRWibJNbLeeoBmoE4aj SIILLbHPJyc4PMmfDBj61HwsoH7eG0LEi49SRClKCBoLfNL4fnJr52F9dBNavncf8I/C ySWsydYz0wuScgHQKFPpdy5oKBl0pALjzCYVbH+ds8SwDEJucSf6F5p4j1v7Fv1iskkP vTUpPC1tpAej7fInJIBYZgNRvTnHU41O3OE0l7izhg1wCoenshGNZZYKdK7IlCoRAHAI QpK8Xp5Z6l3nGH0+ipQSFCF85MjTT7pWr+N7qsnN8Me3kv2rIudiqiLVmqEoxAw+J7ml VzNA== X-Gm-Message-State: AOJu0YztKDurohuQ3echTfQg0D2hLRX68X1BPwOVgjwuYwHOyoFOeHTW 0oyPBQ3nlOUOPdFaJpp07vagP7cA6YGKZHvvb1A= X-Google-Smtp-Source: AGHT+IFNiUEJEkxLFSoN2nQISIoUWkaNr4GSVPoaUIOGvxDTrhIxSw4N0ObW/C2qtmDB5en+mHW2tQ== X-Received: by 2002:a5d:6802:0:b0:332:d0f6:60fc with SMTP id w2-20020a5d6802000000b00332d0f660fcmr1992106wru.19.1700677872654; Wed, 22 Nov 2023 10:31:12 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Peter Maydell , Thomas Huth , Mark Cave-Ayland , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH-for-9.0 04/11] target/arm: Move ARM_CPU_IRQ/FIQ definitions to 'cpu-qom.h' Date: Wed, 22 Nov 2023 19:30:40 +0100 Message-ID: <20231122183048.17150-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231122183048.17150-1-philmd@linaro.org> References: <20231122183048.17150-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::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1700677973695100009 The ARM_CPU_IRQ/FIQ definitions are meant for the ARM CPU QOM model. Move them to "cpu-qom.h" so any QOM code can use them. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- Or do these definitions belong to cpu-defs.h? --- target/arm/cpu-qom.h | 6 ++++++ target/arm/cpu.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/arm/cpu-qom.h b/target/arm/cpu-qom.h index be307037ff..38030450f7 100644 --- a/target/arm/cpu-qom.h +++ b/target/arm/cpu-qom.h @@ -36,6 +36,12 @@ DECLARE_CLASS_CHECKERS(AArch64CPUClass, AARCH64_CPU, #define ARM_CPU_TYPE_SUFFIX "-" TYPE_ARM_CPU #define ARM_CPU_TYPE_NAME(name) (name ARM_CPU_TYPE_SUFFIX) =20 +/* Meanings of the ARMCPU object's four inbound GPIO lines */ +#define ARM_CPU_IRQ 0 +#define ARM_CPU_FIQ 1 +#define ARM_CPU_VIRQ 2 +#define ARM_CPU_VFIQ 3 + bool target_aarch64_available(void); =20 #endif diff --git a/target/arm/cpu.h b/target/arm/cpu.h index d369275827..124d829742 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -107,12 +107,6 @@ enum { #define offsetofhigh32(S, M) (offsetof(S, M) + sizeof(uint32_t)) #endif =20 -/* Meanings of the ARMCPU object's four inbound GPIO lines */ -#define ARM_CPU_IRQ 0 -#define ARM_CPU_FIQ 1 -#define ARM_CPU_VIRQ 2 -#define ARM_CPU_VFIQ 3 - /* ARM-specific extra insn start words: * 1: Conditional execution bits * 2: Partial exception syndrome for data aborts --=20 2.41.0 From nobody Wed Nov 27 04:57:18 2024 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=1700678006; cv=none; d=zohomail.com; s=zohoarc; b=c02OP/8+lcKvbssVf7rykyTOv8pkYxMR9s+GGTMFfyMdxKsn3EeDgBarpZazPgis9Np09Z63G7mqg182rwurfTxubGq9+orzIG087fCgug2B7Qv5+yr3++vTpn5o7LFxRykRdgxmcy679R77dtmoPUZfZDsaCFxbewoNRqdisv4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700678006; 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=emiroLvN4ZFzV0iGKy2RcqyAnliELrYGvZjH5AAzbJU=; b=cU67euAmDBB5dA2w5BkcrLulW6PbC9928nO0EjIOCY7m9eK6R+UOkQJvz6s44Oe28jbeFzkMFF56LP6wO/r+kKG2ZWqdBpKJ8xRZ67xVnahtr217LklyiHfudx5d79Opfb8wrvL5SdbyRSoYoCdYFXYcZME1TjR7EcCBcPU8pdM= 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 1700678005531199.06228543475004; Wed, 22 Nov 2023 10:33:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5s0o-0004Hh-2O; Wed, 22 Nov 2023 13:31:46 -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 1r5s0S-0004Bx-Ki for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:32 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5s0O-0004bE-LM for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:23 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-332d2b6a84cso22484f8f.0 for ; Wed, 22 Nov 2023 10:31:19 -0800 (PST) Received: from m1x-phil.lan (pas38-h02-176-184-5-64.dsl.sta.abo.bbox.fr. [176.184.5.64]) by smtp.gmail.com with ESMTPSA id t3-20020a5d6903000000b0032da49e18fasm66146wru.23.2023.11.22.10.31.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Nov 2023 10:31:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700677878; x=1701282678; 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=emiroLvN4ZFzV0iGKy2RcqyAnliELrYGvZjH5AAzbJU=; b=FVlhk34mZEB+d8qCug9cHm0r/g+slR0rjpcJfHCwmMbnRVv9PfwQcj25atXSH/k8FF BfJkJqpPfuGkyx6I1l0mzDI9lS/J5N/DjTegYz9W/3D7s2JbE8sHErliZs/QE/z6v4zM psZM1IwKbWXKK55xK0rPMSXW1a2yU0fvTtmJ+28vYwAwfa+o9kF4m6RYCmZVXI/sQywc XCJCjAW+i3EQZNePDfS5bLrW2DqlN/KVFpv+ZFarWshOa4tphjZop6KRJnpmU+mSbCmi JFv3j3kuCQUHiRD2kA9yMypZuPL8cj7IjuOLdUAvyScluvYBZOJi0BmnfwVxkAvrxNPf i7tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700677878; x=1701282678; 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=emiroLvN4ZFzV0iGKy2RcqyAnliELrYGvZjH5AAzbJU=; b=toagxF3J2pNB59O9XlpkOHuF8QvanPp0a21Zqp8qVDFyxOPdZOA6MiFJ5jWTLKLHLD AVyuNaRKP01BZfMpiKK8jkWARDvxQmusDeWv4+fyYjEJELiO3TFwf7C6RvqYFEBWBn1I gQuwXCoTSDd7VEUztV8vC/jfbYPOG5cikjPnXnnAj9zV8r6YHZIsN/GLyDDhcL5ExGr2 7yzHwEzjyId1NxP6oI/8RzqZ2SV/JL0vBewU/Rw6KDlpYEjMDq13eF/kFGIx01iNVJJa Og+4+Zua3ii4KSVihcIVcxbXJd3zZoutp9rt/q+MclwIDD9lwuojYHG+zfoPOOaTlodR cvVg== X-Gm-Message-State: AOJu0YzeGx9KiLR2DN6zVhiECs4vqCV6Fv4QGHMgLt7h9tgpAhuSRJRP sjKS+8hMczO5uV5K0IIi1EZUSP7nW2lOSuJDbt4= X-Google-Smtp-Source: AGHT+IFNMJbi2etXsf890GglUiuNpOGjNqWpIB4o2PtsfSGyJ5b4d+uqJysxjW5ginkWipADtZqyPw== X-Received: by 2002:adf:cc82:0:b0:331:6976:c8c7 with SMTP id p2-20020adfcc82000000b003316976c8c7mr2198011wrj.38.1700677877918; Wed, 22 Nov 2023 10:31:17 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Peter Maydell , Thomas Huth , Mark Cave-Ayland , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH-for-9.0 05/11] target/arm: Move GTIMER definitions to 'cpu-defs.h' Date: Wed, 22 Nov 2023 19:30:41 +0100 Message-ID: <20231122183048.17150-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231122183048.17150-1-philmd@linaro.org> References: <20231122183048.17150-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::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1700678007879100003 To allow GTIMER_* definitions to be used by non-ARM specific hardware models, move them to a new target agnostic "cpu-defs.h" header. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/cpu-defs.h | 19 +++++++++++++++++++ target/arm/cpu.h | 8 +------- hw/arm/bcm2836.c | 1 + 3 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 target/arm/cpu-defs.h diff --git a/target/arm/cpu-defs.h b/target/arm/cpu-defs.h new file mode 100644 index 0000000000..1ad76aff14 --- /dev/null +++ b/target/arm/cpu-defs.h @@ -0,0 +1,19 @@ +/* + * ARM "target agnostic" CPU definitions + * + * Copyright (c) 2003 Fabrice Bellard + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef ARM_CPU_DEFS_H +#define ARM_CPU_DEFS_H + +#define GTIMER_PHYS 0 +#define GTIMER_VIRT 1 +#define GTIMER_HYP 2 +#define GTIMER_SEC 3 +#define GTIMER_HYPVIRT 4 +#define NUM_GTIMERS 5 + +#endif diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 124d829742..8107e4d446 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -24,6 +24,7 @@ #include "qemu/cpu-float.h" #include "hw/registerfields.h" #include "cpu-qom.h" +#include "target/arm/cpu-defs.h" #include "exec/cpu-defs.h" #include "qapi/qapi-types-common.h" =20 @@ -154,13 +155,6 @@ typedef struct ARMGenericTimer { uint64_t ctl; /* Timer Control register */ } ARMGenericTimer; =20 -#define GTIMER_PHYS 0 -#define GTIMER_VIRT 1 -#define GTIMER_HYP 2 -#define GTIMER_SEC 3 -#define GTIMER_HYPVIRT 4 -#define NUM_GTIMERS 5 - #define VTCR_NSW (1u << 29) #define VTCR_NSA (1u << 30) #define VSTCR_SW VTCR_NSW diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 166dc896c0..6986b71cb4 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -15,6 +15,7 @@ #include "hw/arm/bcm2836.h" #include "hw/arm/raspi_platform.h" #include "hw/sysbus.h" +#include "target/arm/cpu-defs.h" =20 struct BCM283XClass { /*< private >*/ --=20 2.41.0 From nobody Wed Nov 27 04:57:18 2024 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=1700677979; cv=none; d=zohomail.com; s=zohoarc; b=iruSUVGczuZcY8V12heO1CGuhAk0ONGcPWhTblSvsFK9+gmms2kVx0j0LbiseROHA0/Ep3AJV8kiGBsKUoDs5gvYUlkDtEowAvRDbdD1FsyRvAddwvl+7LaDeYK8sipl7/hhFZF6Ho7x9OVyPWKRsnrT4pcU8dlUkSpollAEaV0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700677979; 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=wy7RMjyw0Q7UvKTe0+LJtz1uxwDhQNO7f4wPUgjAVa0=; b=BA313DQA5d8su/GUs2WtnVTx/4Pn5dfFZUAAkDckV2Nqv1Fs7sXxsjqJV1pojnsGfhtQlNZYTqE8mIHDi0ereaWX7WqmIYWm3oMdLbu6Q9AT7rZB166floRFg44u2YiKcKbizSWf1o317XEe7a5VdzGrJccuh3Qtj+rF9SfXxR8= 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 1700677978994240.56594955668106; Wed, 22 Nov 2023 10:32:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5s0i-0004G7-0o; Wed, 22 Nov 2023 13:31:40 -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 1r5s0X-0004CY-A4 for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:32 -0500 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5s0T-0004c5-Cq for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:27 -0500 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-50aabfa1b75so5530504e87.3 for ; Wed, 22 Nov 2023 10:31:25 -0800 (PST) Received: from m1x-phil.lan (pas38-h02-176-184-5-64.dsl.sta.abo.bbox.fr. [176.184.5.64]) by smtp.gmail.com with ESMTPSA id n17-20020a5d6b91000000b003140f47224csm67155wrx.15.2023.11.22.10.31.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Nov 2023 10:31:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700677883; x=1701282683; 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=wy7RMjyw0Q7UvKTe0+LJtz1uxwDhQNO7f4wPUgjAVa0=; b=X/N2pG9lvUgkzAyVafcIfDSH3kl94n168w6rSTYGGgxal59bvr3EFeOYHTPjjIikQl X8ClOBhFLsaSzayYkEyAitAbt8EVtaLnUHdHSDBlcOSjjW3OFsNdUnVKUenoo0fcqJie /pPOQAkRXkEKWPZjy8E7o0gJ5h0F24GltRWrMiAn1dwbzlhiBWXxIQMBwuNNbAFsI2ZJ ZLAp/bRd93QBOKPFZCa+U6P7sFoRq6VmIC0CZ5RULXUS0GrF+qx9O5y+VAZgBeHYsP3l 2kF408HSeoGrIRdn0X9nBsQ+49dzXO69KFSJBdXbob4d2TtqcvYUygBqRmcCc3UpEWAF thkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700677883; x=1701282683; 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=wy7RMjyw0Q7UvKTe0+LJtz1uxwDhQNO7f4wPUgjAVa0=; b=k8fQAw8dIDdUWsYtqmefhq8xekmW3TIoRIfkN5SAa6qhzoYgDuyoADwxds41B7nu2t gd9xiEmGPhuBGY78sRqXJHyBLsVWvGkeHbqwzj4rZmzccZn7deUwwE+3F/gqY56IQy/w FZfZhe3R6q6+TKaQjo+cPMC6TDlB4WbpyXsTzol8ovWoBnZG5wn4xjIuMGogiXkRousR L9OTnGZsfkLCkchPjSQgIZzIkC3ez9pCX4505qt4uQk7dY5Bkwpy20VpmuHu6ReTUYrs o6g87xMUTMWCUKub/z/rEh6hHKBsMdgcaznAmApObLY2H0olt/FMd6pxtQGrfKzi++s3 02Hw== X-Gm-Message-State: AOJu0YxXn3tIimw82hXXIt92UWxjCpcAbteCoahdbJTxpAlzh14KYP0b pWVstOl7JEaN64LxKzvLMnTFd+/TEBU0rqoCs9w= X-Google-Smtp-Source: AGHT+IEmMQjXUiyiLKGtUufCPQsRblLgydZGbL1JsNZSAIzcHo454I3CyBFJaRr1B79zPj8koxrWfA== X-Received: by 2002:a05:6512:158e:b0:507:a766:ad27 with SMTP id bp14-20020a056512158e00b00507a766ad27mr3346315lfb.16.1700677883188; Wed, 22 Nov 2023 10:31:23 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Peter Maydell , Thomas Huth , Mark Cave-Ayland , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH-for-9.0 06/11] hw/arm/bcm2836: Simplify use of 'reset-cbar' property Date: Wed, 22 Nov 2023 19:30:42 +0100 Message-ID: <20231122183048.17150-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231122183048.17150-1-philmd@linaro.org> References: <20231122183048.17150-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::12a; envelope-from=philmd@linaro.org; helo=mail-lf1-x12a.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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1700677979733100001 bcm2836_realize() is called by - bcm2836_class_init() which sets: bc->cpu_type =3D ARM_CPU_TYPE_NAME("cortex-a7") - bcm2837_class_init() which sets: bc->cpu_type =3D ARM_CPU_TYPE_NAME("cortex-a53") Both Cortex-A7 / A53 have the ARM_FEATURE_CBAR set. If it isn't, then this is a programming error: use &error_abort. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/arm/bcm2836.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 6986b71cb4..055c909e95 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -132,10 +132,8 @@ static void bcm2836_realize(DeviceState *dev, Error **= errp) s->cpu[n].core.mp_affinity =3D (bc->clusterid << 8) | n; =20 /* set periphbase/CBAR value for CPU-local registers */ - if (!object_property_set_int(OBJECT(&s->cpu[n].core), "reset-cbar", - bc->peri_base, errp)) { - return; - } + object_property_set_int(OBJECT(&s->cpu[n].core), "reset-cbar", + bc->peri_base, &error_abort); =20 /* start powered off if not enabled */ if (!object_property_set_bool(OBJECT(&s->cpu[n].core), --=20 2.41.0 From nobody Wed Nov 27 04:57:18 2024 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=1700677992; cv=none; d=zohomail.com; s=zohoarc; b=DbL+BfJsZNN5tB2fBsi++kLkJCBVZctyVffkK/gYYr7T+HVTc8rv1eOumFR/nJBgu9KroOhXLLGAa4lzPZ1A8z/GTSr0BURqI0MAPlyZH3ihStj2I9dNQoqABJ55Ew+T6CzUrxb8z0goa5AkoVO6pWQeMGqdVgrsRoSam9SkcmU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700677992; 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=Lb2/44LPlczFh1Mivxhuq3Cei7H/G9D4OqWoSqq23Aw=; b=RsnIs+BSA1Drkl6EHI4XQ/nOamR4KmnPxGV8n/OwnDqErVtGIKFr329Am0kxDcA6JLnyz8Wpb53h9x+bwVMEg7dl9mvQh8ikbkLD6UxVi+OaoNl+EnsmnRmmZ2Sq8EVTxVs0b0zsboU8rgvUA0y8NhaPzSiZRg5W7tPxmx0UBFw= 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 1700677992635552.1447911274031; Wed, 22 Nov 2023 10:33:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5s16-0004a5-LK; Wed, 22 Nov 2023 13:32:08 -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 1r5s0d-0004ET-Im for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:37 -0500 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5s0Z-0004dK-HJ for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:34 -0500 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2c876e44157so969971fa.2 for ; Wed, 22 Nov 2023 10:31:30 -0800 (PST) Received: from m1x-phil.lan (pas38-h02-176-184-5-64.dsl.sta.abo.bbox.fr. [176.184.5.64]) by smtp.gmail.com with ESMTPSA id q19-20020a05600c46d300b004064e3b94afsm280976wmo.4.2023.11.22.10.31.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Nov 2023 10:31:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700677888; x=1701282688; 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=Lb2/44LPlczFh1Mivxhuq3Cei7H/G9D4OqWoSqq23Aw=; b=Q5iEMtP4NRXbhRVM1KdnA3wZN2AjjeJRcNbBka2m5UHel/MGhXa1bun04xIPVCEE8+ 574UPft1pnmFMwVNKQYCBk19nw86XSKL+jpEpTYEKEpjFEGxs5ZCttKrlL476qabr5f3 cdIKVK2mq1EcIh+ocdCz07RSm6WbJQic/FMwQCd2nWfV7XznRWYdC7n8INzVwXCYTEer uclf2MO47MZ2JHb2o04nTo1lXXK9TLtd8O15nP2LSDgsyc22TbwD4nrhtVCzAjpIUudA bzGOXltFGgAbjp2jRa0vl+iCkwc4YEYMS/313RZu3ic3YH+qlyyvrPSkL1SHY0emz5qX hwMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700677888; x=1701282688; 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=Lb2/44LPlczFh1Mivxhuq3Cei7H/G9D4OqWoSqq23Aw=; b=hcaLiICwfOzfTWOJlZJKY0uIAW5xUaPfssTSo7u1el9I7rKPtE/Zcvh5E2g5wrVnhH j5RN0wwjGFAXTF+2+iqNY+BL/tEeJ1kzEXktWXjXqsHqfNMgkiqgZFh6OxeafPjZxSaL 1EmMUywQSQeHK8AbKH7I+x1TMcanS9Li4q+Tb8gxGMmVURbUdUIybX3Bkj5ZWnRRfrRi jSr98jVTHKe9fFAGBYjviPROJQqrfk+VDLuTjTKzorIJ86I/kCXgHO/yvsti7cT0GQhc 1u+QrTsmD3f4ifa+FpVKNhtqn36HGM7Sb31Z34gTpmpY5KIpuDXz0Y2DRn/xZemkY6dG OfXg== X-Gm-Message-State: AOJu0YzEOsGVROf6CK+/1D7l45ye5TUZKvtVC+zOWTH44Ip6u9GB5hew VB4DFloVeLP+tQSoM80GynsT4vNKgnOet7Dgr/M= X-Google-Smtp-Source: AGHT+IFkhrZIsbX/NLV5u7r2FhTAsRQgMEtXNWL5Z5QCEKRjxkWeiCkids1c2PJIQvSmJxDxRtKZcA== X-Received: by 2002:a2e:b914:0:b0:2c8:744e:dced with SMTP id b20-20020a2eb914000000b002c8744edcedmr2287579ljb.35.1700677888455; Wed, 22 Nov 2023 10:31:28 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Peter Maydell , Thomas Huth , Mark Cave-Ayland , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH-for-9.0 07/11] hw/arm/bcm2836: Simplify access to 'start-powered-off' property Date: Wed, 22 Nov 2023 19:30:43 +0100 Message-ID: <20231122183048.17150-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231122183048.17150-1-philmd@linaro.org> References: <20231122183048.17150-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::231; envelope-from=philmd@linaro.org; helo=mail-lj1-x231.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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1700677993786100001 All ARM CPUs have the 'start-powered-off' property since commit 5de164304a ("arm: Allow secondary KVM CPUs to be booted via PSCI"). Note: since commit c1b701587e ("target/arm: Move start-powered-off property to generic CPUState"), all CPUs for all targets have it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/arm/bcm2836.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 055c909e95..198f9b5730 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -136,12 +136,8 @@ static void bcm2836_realize(DeviceState *dev, Error **= errp) bc->peri_base, &error_abort); =20 /* start powered off if not enabled */ - if (!object_property_set_bool(OBJECT(&s->cpu[n].core), - "start-powered-off", - n >=3D s->enabled_cpus, - errp)) { - return; - } + object_property_set_bool(OBJECT(&s->cpu[n].core), "start-powered-o= ff", + n >=3D s->enabled_cpus, &error_abort); =20 if (!qdev_realize(DEVICE(&s->cpu[n].core), NULL, errp)) { return; --=20 2.41.0 From nobody Wed Nov 27 04:57:18 2024 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=1700677993; cv=none; d=zohomail.com; s=zohoarc; b=K6LaYvHuL/EczS3fE+aEL/WPHuPK4zaGQL4SbSkEK9MXxLy3BP8jjk59sZWcGznWTKFLjuJx3WhT/jfeE+uG2YW5p/UoLhD+VdxcLn9vVO+vokKD9kLu0UCtrLp25p35NVCz46ZkBIsh6uvirvBYLNHxbWHPNx9rJ7C9rTJWnsI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700677993; 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=auZXV6u0sdeAtdGoHPpNxl3A34os5kR+ZbHub0QBvt4=; b=Ecy2r1DoPoS4me1iSbnnp61kkScXHC72kdRFCxJHfwMB3D1z7apu6+ci0ke4WryonfELqsX4JAy1FzTuh3at+QzNbYcbgjmqriwbT5wPaJ94x7+wxrUbmBj1KeR69rvp7BOGkksJq3cuayuWnc95RfMNyVwu++136S7LStmKiK8= 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 1700677993401100.82289504921323; Wed, 22 Nov 2023 10:33:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5s1U-0004tG-AU; Wed, 22 Nov 2023 13:32:29 -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 1r5s0g-0004Fb-Ix for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:39 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5s0e-0004dv-In for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:38 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40a4848c6e1so321825e9.1 for ; Wed, 22 Nov 2023 10:31:34 -0800 (PST) Received: from m1x-phil.lan (pas38-h02-176-184-5-64.dsl.sta.abo.bbox.fr. [176.184.5.64]) by smtp.gmail.com with ESMTPSA id u14-20020a05600c138e00b004063ea92492sm187101wmf.22.2023.11.22.10.31.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Nov 2023 10:31:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700677893; x=1701282693; 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=auZXV6u0sdeAtdGoHPpNxl3A34os5kR+ZbHub0QBvt4=; b=PQQL0H6Rj0Loq3Q6FLGYVKxcQ6jr01fqCK7MSCFM9EZ3uRHoFPkOyfzxgqfI0vWMS8 4SjisWgAYjZjilYGAuFbBhC41De53GR5szhtBG0jPzJGBjkxVRv6TCHHLN5p2uEjYwi+ qCWXeUp6yHYeDMFvGZmTDUOtePoiGtu0rQHF0VMfdmZz652Q38tqGI5gOg02j0lEowOC IcUgQBFVwBZUmjkalAj8fM8glmQmDEE1/RQItSrrQZLoo7IjUY6qdTBwuZapQQGF/wEE 5bBscvVXvgCiyXYYMR5hB6/AvXGtUDF0Jl6Wdn3sf2nGxneUvodt4LDHO2QfVkgh01Hd S5mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700677893; x=1701282693; 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=auZXV6u0sdeAtdGoHPpNxl3A34os5kR+ZbHub0QBvt4=; b=SmR/5dQjSkAKsUDua/uvtP6MQlzSrz3GKapwg6DQQ+HOvdtmJiwAO5gI+quHfbdFhy xbUE9UYDOpz2Uw9ZO7ZuG3fS6Fqeahopg4hYCUvLkYaqWG0fPJkqg8WMR+GD9Ex3eKoV QdNP6vaviHkMk3UiV2IJ/9BGIdE+B02kmj2iyqM95JjLxgR5T4kuMjkER74qBh1Iw3fz RrJnwPwmb4ZnSZd5tVv7bVoG9eI60GbCE8khDo/1HNJsHhHzrfKWbIG2xpnzmOI/Uit1 0xVXqhJGAOivUvx8Subk31z7vP65O7GL0HQTSZV+FV8qOFMK65t3oCWDIBB91w58ho0I GMAg== X-Gm-Message-State: AOJu0YyaWzE+gx90IOGseL1/7alAn5tEhVnw7Tq31OBPH3MblZuOycGo uXI13fKxbdNv1zJqf3XyCOIMGYFSLS26HH/niN4= X-Google-Smtp-Source: AGHT+IGESb8wYuo18nw+OYgfuR8Z7d/jlZCt9RdbLsLVU/QAQzVuLyz/D2Glld5mzqjPtKZ2eSJoYA== X-Received: by 2002:a05:600c:3590:b0:405:1c14:9227 with SMTP id p16-20020a05600c359000b004051c149227mr2662206wmq.33.1700677893528; Wed, 22 Nov 2023 10:31:33 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Peter Maydell , Thomas Huth , Mark Cave-Ayland , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH-for-9.0 08/11] hw/arm/bcm2836: Use ARM_CPU 'mp-affinity' property Date: Wed, 22 Nov 2023 19:30:44 +0100 Message-ID: <20231122183048.17150-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231122183048.17150-1-philmd@linaro.org> References: <20231122183048.17150-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::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1700677995759100007 The 'mp-affinity' property is present since commit 15a21fe028 ("target-arm: Add mp-affinity property for ARM CPU class"). Use it and remove a /* TODO */ comment. Since all ARM CPUs have this property, use &error_abort, because this call can not fail. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/arm/bcm2836.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 198f9b5730..8031a74600 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -128,8 +128,8 @@ static void bcm2836_realize(DeviceState *dev, Error **e= rrp) qdev_get_gpio_in_named(DEVICE(&s->control), "gpu-fiq", 0)); =20 for (n =3D 0; n < BCM283X_NCPUS; n++) { - /* TODO: this should be converted to a property of ARM_CPU */ - s->cpu[n].core.mp_affinity =3D (bc->clusterid << 8) | n; + object_property_set_int(OBJECT(&s->cpu[n].core), "mp-affinity", + (bc->clusterid << 8) | n, &error_abort); =20 /* set periphbase/CBAR value for CPU-local registers */ object_property_set_int(OBJECT(&s->cpu[n].core), "reset-cbar", --=20 2.41.0 From nobody Wed Nov 27 04:57:18 2024 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=1700678012; cv=none; d=zohomail.com; s=zohoarc; b=YeY4INwoedsujoERJZ4aJsfHfroE3uz3Tl70LD0vTGjkklSj5XAhq2VZB/0RJraeLpxmTl02fM/yu905LOTr2Unmxa1JherUqOylofioU2YVb7E2DKJo8Y+Tiah9oX6+Yp64h+pztXlRuzK4QDF70lHcKqf3NaQ2/TxUgSJQuts= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700678012; 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=juSImIqOFX4cBg5Zc+Do2T+lJUxoOW0iOapk4mN+Z7o=; b=eh9Fq75F6k02hGN3Ftq3gQ8t6UgHliPgk86HV8am0Rq3nz1VlQ4sV8b9jR7vClXeENwSH5WPZGMGI+djnxw2EZS7PoULqXY6NFc5bRl3NUNlk5hRQUrEajph3nmdjJwzaArd6QAXuX6maRmtGNuR3FtZQ0WEiMzTXGWgdQ33Wl0= 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 1700678012808761.6398728926298; Wed, 22 Nov 2023 10:33:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5s15-0004WT-U2; Wed, 22 Nov 2023 13:32:04 -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 1r5s0m-0004Hc-Fw for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:45 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5s0i-0004es-Cy for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:43 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4084b0223ccso286335e9.2 for ; Wed, 22 Nov 2023 10:31:39 -0800 (PST) Received: from m1x-phil.lan (pas38-h02-176-184-5-64.dsl.sta.abo.bbox.fr. [176.184.5.64]) by smtp.gmail.com with ESMTPSA id b5-20020a05600c4e0500b003feae747ff2sm261799wmq.35.2023.11.22.10.31.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Nov 2023 10:31:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700677898; x=1701282698; 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=juSImIqOFX4cBg5Zc+Do2T+lJUxoOW0iOapk4mN+Z7o=; b=HYm4Qm6T8RPZspq0QC/9ILxuDUOlrpei8Dlmyju6RtFlBex4tXpdag8vXyGKMNihvu 4TX5YpXceDlDSOBQ4babeDEKGr1zLWzfSdi69Ggdsl1RPvr3+iCSqRjVY8Ignh06HqiC miI1k+K5QljjCGSBuPgtjKH+VMAAHNDD9F42wOcuUYpLC+fxlkgV+koQd8DcFhs5wVhx xSmlYR0UFnMrUu0OeT3J76LFareVEbZgPW1/UT23Tq4sxrsvVsp7xUwDGnNt2x8FuoPM uwkLFl54juhBvsILdYmr/BfKcODTPd4/zR+VdKgMpuCidhZwrLch/pClxACCBk5f/58O WLBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700677898; x=1701282698; 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=juSImIqOFX4cBg5Zc+Do2T+lJUxoOW0iOapk4mN+Z7o=; b=KLWw8n+tGDxXRn/u4M/NlFrE7qLCVTKhRpBiULkSwCmiEInDH287WE+KrTHcjkEeRA xXiO+vPwnlno8afTGF+Kab3Fk79ML7KhszDbwY2DprCuHQD+DZOJdqGtZ9tmHsDtBEeG DBmfFDD/s4I6wnBsJpgl4vpf915TL6aJk2tUR18ZCRQsJmOz7a0ewgpOuOXhRHc85UxT thUpfcvGGaXaAmGFbJ3iawObTRFd7Tojft9+JAD7dFf92LpNMr5vaIpKEZhZc9YbMb+9 g4lLylQAbbFVMLFym3JPWLu3ciFJx7L4IJfgIapSj4P51Jms2BfyX2mURIpQeKhVeQh3 mPcg== X-Gm-Message-State: AOJu0YyLpM8OpcN/JPLaLjfvnBri7QrukWK/F787fwejkblLsD+HavsS FO5agWG9tw8NC6J46PLj2FGVgK2bTLzbSz62C6s= X-Google-Smtp-Source: AGHT+IEDhZssPByOJSwxEJVD+BQeS0gJKpv55Tt6F3/9rP1iAZJ3KJSnJODJSNYMYHo+HTAjjtT9mw== X-Received: by 2002:a05:600c:4f01:b0:409:773:cf62 with SMTP id l1-20020a05600c4f0100b004090773cf62mr2223036wmq.39.1700677898695; Wed, 22 Nov 2023 10:31:38 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Peter Maydell , Thomas Huth , Mark Cave-Ayland , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [RFC PATCH-for-9.0 09/11] hw/arm/bcm2836: Allocate ARM CPU state with object_new() Date: Wed, 22 Nov 2023 19:30:45 +0100 Message-ID: <20231122183048.17150-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231122183048.17150-1-philmd@linaro.org> References: <20231122183048.17150-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::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1700678013866100003 The ARMCPU type is forward declared as a pointer to all hw/ files. Its declaration is restricted to target/arm/ files. By using a pointer in BCM283XState instead of embedding the whole CPU state, we don't need to include "cpu.h" which is target-specific. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/hw/arm/bcm2836.h | 4 ++-- hw/arm/bcm2836.c | 19 ++++++++++--------- hw/arm/raspi.c | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/include/hw/arm/bcm2836.h b/include/hw/arm/bcm2836.h index 6f90cabfa3..784bab0aad 100644 --- a/include/hw/arm/bcm2836.h +++ b/include/hw/arm/bcm2836.h @@ -14,7 +14,7 @@ =20 #include "hw/arm/bcm2835_peripherals.h" #include "hw/intc/bcm2836_control.h" -#include "target/arm/cpu.h" +#include "target/arm/cpu-qom.h" #include "qom/object.h" =20 #define TYPE_BCM283X "bcm283x" @@ -38,7 +38,7 @@ struct BCM283XState { uint32_t enabled_cpus; =20 struct { - ARMCPU core; + ARMCPU *core; } cpu[BCM283X_NCPUS]; BCM2836ControlState control; BCM2835PeripheralState peripherals; diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 8031a74600..4f5acee77e 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -39,8 +39,9 @@ static void bcm2836_init(Object *obj) int n; =20 for (n =3D 0; n < bc->core_count; n++) { - object_initialize_child(obj, "cpu[*]", &s->cpu[n].core, - bc->cpu_type); + s->cpu[n].core =3D ARM_CPU(object_new(bc->cpu_type)); + object_property_add_child(obj, "cpu[*]", OBJECT(s->cpu[n].core)); + qdev_realize_and_unref(DEVICE(s->cpu[n].core), NULL, &error_abort); } if (bc->core_count > 1) { qdev_property_add_static(DEVICE(obj), &bcm2836_enabled_cores_prope= rty); @@ -139,24 +140,24 @@ static void bcm2836_realize(DeviceState *dev, Error *= *errp) object_property_set_bool(OBJECT(&s->cpu[n].core), "start-powered-o= ff", n >=3D s->enabled_cpus, &error_abort); =20 - if (!qdev_realize(DEVICE(&s->cpu[n].core), NULL, errp)) { + if (!qdev_realize(DEVICE(s->cpu[n].core), NULL, errp)) { return; } =20 /* Connect irq/fiq outputs from the interrupt controller. */ qdev_connect_gpio_out_named(DEVICE(&s->control), "irq", n, - qdev_get_gpio_in(DEVICE(&s->cpu[n].core), ARM_CPU_IRQ)); + qdev_get_gpio_in(DEVICE(s->cpu[n].core), ARM_CPU_IRQ)); qdev_connect_gpio_out_named(DEVICE(&s->control), "fiq", n, - qdev_get_gpio_in(DEVICE(&s->cpu[n].core), ARM_CPU_FIQ)); + qdev_get_gpio_in(DEVICE(s->cpu[n].core), ARM_CPU_FIQ)); =20 /* Connect timers from the CPU to the interrupt controller */ - qdev_connect_gpio_out(DEVICE(&s->cpu[n].core), GTIMER_PHYS, + qdev_connect_gpio_out(DEVICE(s->cpu[n].core), GTIMER_PHYS, qdev_get_gpio_in_named(DEVICE(&s->control), "cntpnsirq", n= )); - qdev_connect_gpio_out(DEVICE(&s->cpu[n].core), GTIMER_VIRT, + qdev_connect_gpio_out(DEVICE(s->cpu[n].core), GTIMER_VIRT, qdev_get_gpio_in_named(DEVICE(&s->control), "cntvirq", n)); - qdev_connect_gpio_out(DEVICE(&s->cpu[n].core), GTIMER_HYP, + qdev_connect_gpio_out(DEVICE(s->cpu[n].core), GTIMER_HYP, qdev_get_gpio_in_named(DEVICE(&s->control), "cnthpirq", n)= ); - qdev_connect_gpio_out(DEVICE(&s->cpu[n].core), GTIMER_SEC, + qdev_connect_gpio_out(DEVICE(s->cpu[n].core), GTIMER_SEC, qdev_get_gpio_in_named(DEVICE(&s->control), "cntpsirq", n)= ); } } diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c index cc4c4ec9bf..01c391b90a 100644 --- a/hw/arm/raspi.c +++ b/hw/arm/raspi.c @@ -252,7 +252,7 @@ static void setup_boot(MachineState *machine, RaspiProc= essorId processor_id, s->binfo.firmware_loaded =3D true; } =20 - arm_load_kernel(&s->soc.cpu[0].core, machine, &s->binfo); + arm_load_kernel(s->soc.cpu[0].core, machine, &s->binfo); } =20 static void raspi_machine_init(MachineState *machine) --=20 2.41.0 From nobody Wed Nov 27 04:57:18 2024 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=1700677969; cv=none; d=zohomail.com; s=zohoarc; b=QbarBP4Y4kmVNoxsyaiYjgYKpbI93cxYbwmIKggyBaF8yYrWfDX50PGLTWIMBNoG1chqbiO+e0G6k2ATJy7BF3cHkEMgAjnsfepXb1IIJquELul3HDRNuvu+lMqS3b4cTgFp4PKOR/lqyNiHnPor2dM9SeHUkGSv8AtPko7ySJg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700677969; 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=Xw/8eweOyz7I3htVuJ6jfziPhJMt4cQLEajxgFqYUSs=; b=axFBT+U9SQzdyrW4bPp4iRItN6ZrzABuOTDbojyT2Jhi/ePpAbDNcjNSZw552fHC6qFIiR8KZuYbz+rbc4bbkEfpi7tYJpoy4qrd8IjAZlFYrZpnzxbU29JDAy7eRG8KVp+QVwULxQdc1V+VKcWA7CsJYwu2kMVCvEPFXYkbiOk= 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 1700677969975188.0216698074512; Wed, 22 Nov 2023 10:32:49 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5s1P-0004sa-N6; Wed, 22 Nov 2023 13:32:28 -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 1r5s0p-0004N7-3H for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:49 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5s0n-0004fP-Am for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:46 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4083dbc43cfso267065e9.3 for ; Wed, 22 Nov 2023 10:31:44 -0800 (PST) Received: from m1x-phil.lan (pas38-h02-176-184-5-64.dsl.sta.abo.bbox.fr. [176.184.5.64]) by smtp.gmail.com with ESMTPSA id hg15-20020a05600c538f00b0040849ce7116sm242754wmb.43.2023.11.22.10.31.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Nov 2023 10:31:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700677904; x=1701282704; 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=Xw/8eweOyz7I3htVuJ6jfziPhJMt4cQLEajxgFqYUSs=; b=BI5in9dwEOIqmmD9h+zoMmPY+YJWclo6Y2JXgn7PussaIZZ1kVgkCWB4xvVCP6K/AA izPWBzWO0OnySG1CQNaSQj+c+zCwQX1nSgfGSFg3naQvxcWOVG+rK8mhNOx/GMhdTtyI LQ4ziaU7BAr60sM1gs9zZHLOQbPj8awaxdDuMwaL9v9iW96AhEtzL+7FT8f5NgRWAbzI VW0pfRl8J8oVWrGej4MV7I5uWIMp35xb9zTIOg7gGPJ4iZzoDa5gpOJxXenwmheKGyJL n7Vy2XJIedTWSBzrw2YZJ7yCwT9180sCXdL8kDlgiHJ/5QmjIoLR29rp+h5sEUL9+CMg b0+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700677904; x=1701282704; 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=Xw/8eweOyz7I3htVuJ6jfziPhJMt4cQLEajxgFqYUSs=; b=Ac2QU5xo9f3EvPrAxyhxAu55j0LUldHCrmSOkEl6SUkia9CNSy6J8+IC9Xoso8jJlq 2+7ySNdBOj1Hk20my6kWqN9Mbht/TSm7pdn3c4/NUbBR0mllYSraMuhlIuHrBHj6nv85 BDwPLqle0zEky47FAUHoQ2uPStZVAFJc3g+juhsT5JugmSkggnstU7lyBVk3rvscBXIr AevP+ckQqBp+7FVcQTXLauI0CZ5+3iMQpfgYBK2NPvUFL7JSksSQsGU7GDoHiLOR1A1G vpcsWaJjEBw2bXrj4EpIJKnfN/CZc+9zvvcVMEEtaw22NI1vt8D85gIraFwlTpyOHXsR GHkA== X-Gm-Message-State: AOJu0Yze9PMZGW9+q+yCjLsvNsDemx7IZq73HNsqbR+3bhEr4y3izq1v SNF+RonhoXX4k8Cmo0F+56KRgencHZVxP0gasj4= X-Google-Smtp-Source: AGHT+IHEvpExXkkInrxw0CF5q6L6pfzIb5pjEjT/+Avi6nIuMN4o6urEqM0Ex8MQNVh19sVnhpRmvQ== X-Received: by 2002:a05:600c:35c6:b0:405:4002:825a with SMTP id r6-20020a05600c35c600b004054002825amr2690978wmq.13.1700677903888; Wed, 22 Nov 2023 10:31:43 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Peter Maydell , Thomas Huth , Mark Cave-Ayland , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [RFC PATCH-for-9.0 10/11] hw/arm/raspi: Build bcm2836.o and raspi.o objects once Date: Wed, 22 Nov 2023 19:30:46 +0100 Message-ID: <20231122183048.17150-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231122183048.17150-1-philmd@linaro.org> References: <20231122183048.17150-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::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1700677971725100001 Use the target_aarch64_available() method to restrict Aarch64 specific models. They will only be added at runtime if TARGET_AARCH64 is built in. The Raspberry Pi models can now be built once for all targets. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/arm/bcm2836.c | 5 +---- hw/arm/raspi.c | 6 ++---- hw/arm/meson.build | 6 ++++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 4f5acee77e..ecf434c8ce 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -194,7 +194,6 @@ static void bcm2836_class_init(ObjectClass *oc, void *d= ata) dc->realize =3D bcm2836_realize; }; =20 -#ifdef TARGET_AARCH64 static void bcm2837_class_init(ObjectClass *oc, void *data) { DeviceClass *dc =3D DEVICE_CLASS(oc); @@ -207,7 +206,6 @@ static void bcm2837_class_init(ObjectClass *oc, void *d= ata) bc->clusterid =3D 0x0; dc->realize =3D bcm2836_realize; }; -#endif =20 static const TypeInfo bcm283x_types[] =3D { { @@ -218,12 +216,11 @@ static const TypeInfo bcm283x_types[] =3D { .name =3D TYPE_BCM2836, .parent =3D TYPE_BCM283X, .class_init =3D bcm2836_class_init, -#ifdef TARGET_AARCH64 }, { .name =3D TYPE_BCM2837, .parent =3D TYPE_BCM283X, .class_init =3D bcm2837_class_init, -#endif + .can_register =3D target_aarch64_available, }, { .name =3D TYPE_BCM283X, .parent =3D TYPE_DEVICE, diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c index 01c391b90a..979937b9ac 100644 --- a/hw/arm/raspi.c +++ b/hw/arm/raspi.c @@ -349,7 +349,6 @@ static void raspi2b_machine_class_init(ObjectClass *oc,= void *data) raspi_machine_class_common_init(mc, rmc->board_rev); }; =20 -#ifdef TARGET_AARCH64 static void raspi3ap_machine_class_init(ObjectClass *oc, void *data) { MachineClass *mc =3D MACHINE_CLASS(oc); @@ -367,7 +366,6 @@ static void raspi3b_machine_class_init(ObjectClass *oc,= void *data) rmc->board_rev =3D 0xa02082; raspi_machine_class_common_init(mc, rmc->board_rev); }; -#endif /* TARGET_AARCH64 */ =20 static const TypeInfo raspi_machine_types[] =3D { { @@ -382,16 +380,16 @@ static const TypeInfo raspi_machine_types[] =3D { .name =3D MACHINE_TYPE_NAME("raspi2b"), .parent =3D TYPE_RASPI_MACHINE, .class_init =3D raspi2b_machine_class_init, -#ifdef TARGET_AARCH64 }, { .name =3D MACHINE_TYPE_NAME("raspi3ap"), .parent =3D TYPE_RASPI_MACHINE, .class_init =3D raspi3ap_machine_class_init, + .can_register =3D target_aarch64_available, }, { .name =3D MACHINE_TYPE_NAME("raspi3b"), .parent =3D TYPE_RASPI_MACHINE, .class_init =3D raspi3b_machine_class_init, -#endif + .can_register =3D target_aarch64_available, }, { .name =3D TYPE_RASPI_MACHINE, .parent =3D TYPE_MACHINE, diff --git a/hw/arm/meson.build b/hw/arm/meson.build index 68245d3ad1..15d60685d0 100644 --- a/hw/arm/meson.build +++ b/hw/arm/meson.build @@ -38,7 +38,6 @@ arm_ss.add(when: 'CONFIG_STRONGARM', if_true: files('stro= ngarm.c')) arm_ss.add(when: 'CONFIG_ALLWINNER_A10', if_true: files('allwinner-a10.c',= 'cubieboard.c')) arm_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-h3.c', '= orangepi.c')) arm_ss.add(when: 'CONFIG_ALLWINNER_R40', if_true: files('allwinner-r40.c',= 'bananapi_m2u.c')) -arm_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2836.c', 'raspi.c')) arm_ss.add(when: 'CONFIG_STM32F100_SOC', if_true: files('stm32f100_soc.c')) arm_ss.add(when: 'CONFIG_STM32F205_SOC', if_true: files('stm32f205_soc.c')) arm_ss.add(when: 'CONFIG_STM32F405_SOC', if_true: files('stm32f405_soc.c')) @@ -68,7 +67,10 @@ arm_ss.add(when: 'CONFIG_XEN', if_true: files('xen_arm.c= ')) =20 system_ss.add(when: 'CONFIG_ARM_SMMUV3', if_true: files('smmu-common.c')) system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4_boards.c')) -system_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_peripherals.c'= )) +system_ss.add(when: 'CONFIG_RASPI', if_true: files( + 'bcm2835_peripherals.c', + 'bcm2836.c', + 'raspi.c')) system_ss.add(when: 'CONFIG_TOSA', if_true: files('tosa.c')) =20 hw_arch +=3D {'arm': arm_ss} --=20 2.41.0 From nobody Wed Nov 27 04:57:18 2024 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=1700678033; cv=none; d=zohomail.com; s=zohoarc; b=V0JXWxMdyRtR4yWBljodR+QGqk/9tYYkk84z4SrpcEpw0kSdwqWvTKEMd14VBchAbRfBslxuktZmqDQuxDoa0TCG5FzE46bu7r9D59OlgXDUyOrP8BTV9F06o0oez9iJj1RK8RgC2t5IVG4HTE54K1XmvuPRaJPuX5BPyT2YvAU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700678033; 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=G9IPEOr0rBXMMdMMcbayFM6zic8FKV6LVlnxUz4MJGo=; b=JW83IospcZh70gfLg1pXGtHhT3zCRzYVhrKQnkQVBt2mefM/UH5L2Kz4uFQCcpWHPU45UtKZzBaccgv39j96QBEwl2MfqisPZVGP6i43/Z6eZl/Kl3rNvz3N7jJrYayK4MfeCb72zng/kL/joZzgb53TDUCY3tr7kZd62uHrsX4= 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 1700678033842733.8737764368702; Wed, 22 Nov 2023 10:33:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5s1e-0005JR-LA; Wed, 22 Nov 2023 13:32:38 -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 1r5s0u-0004RR-Sd for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:54 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5s0t-0004hS-3p for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:52 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-32dff08bbdbso7419f8f.2 for ; Wed, 22 Nov 2023 10:31:50 -0800 (PST) Received: from m1x-phil.lan (pas38-h02-176-184-5-64.dsl.sta.abo.bbox.fr. [176.184.5.64]) by smtp.gmail.com with ESMTPSA id d11-20020adfa40b000000b003232380ffd7sm38237wra.102.2023.11.22.10.31.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Nov 2023 10:31:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700677909; x=1701282709; 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=G9IPEOr0rBXMMdMMcbayFM6zic8FKV6LVlnxUz4MJGo=; b=CGUlveBtcf6sVTbFmIFKpNOwPRCdwQZZTtImAOLUjN+DmSgYiGK9xrcXqvj76DAo19 rssEi+4Vws9ooltW/C3MDJybOKHFI43eqaBP7v4M/FMBPWwAsiFHtzmPrJHx46ZsPnk4 PUzXgN5YA2Lfpk16t3/dzq3bukWP+YejbjKKnn/HBByhRyqYse96NnKiEL+BtE85/XcH WtFWQBK0gl2a9ctJv6BTTYqr/mUGkwSZQESq6bqakKDxXTVl6eIJzp11/YZVPr8fXj/x 4Rj9DYbds5+pkphSoKRZeS/xhGdtyoRlnsYoI99Z8wZaJHiOrymldIPD0LdVjXDP8tHK 6H9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700677909; x=1701282709; 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=G9IPEOr0rBXMMdMMcbayFM6zic8FKV6LVlnxUz4MJGo=; b=bHwYwc+T6TOTvlYqCYd4YrMvOemLnUAQhGn40nKV9VuexXccUi7uryvBztUAgdJ5Cv OJLQZYrmBfvOihCeHjOoX0MXHSTC3nPTrvb2gDya+JBuhyhXiNW4wE1lZpzGn6Zl3ff7 Pf1OK6fvpLpaLJ5RqnKSVylbcHo5F9v12gb+NkRdWErUrMDDhUvuL75ISZ8ZPyuGf4Rg V6dNcQC+uuipuUNQ+U/wsSbCgbrbdNxo+AXxbd5Wudu8fhXZvROewbnAuKny4gJ3Ht+G mIPVNBgKpiQ4yRDgGeB6Z1OmQM6VL2VBmlHxkvCTST+oJcjaMoZOffCILgNFB7+vZXxC al4w== X-Gm-Message-State: AOJu0YwCUVdQnxAlYQFi/uvsbDHfaq5X9NIz/CpfzFUg545HTZtIfV2n WiFOtRRhogeGi1GUrw8awK0+QPm4YffjzYbCJ20= X-Google-Smtp-Source: AGHT+IH5oUX5HGY8Tyq5COBq6B13fWkNiw9fUgbBMXCor3h0U1nUKnPUvYvsxmr+d4l3j0e+BaAyXw== X-Received: by 2002:a5d:6c6d:0:b0:332:ca1a:a824 with SMTP id r13-20020a5d6c6d000000b00332ca1aa824mr3142903wrz.11.1700677909262; Wed, 22 Nov 2023 10:31:49 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Peter Maydell , Thomas Huth , Mark Cave-Ayland , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [RFC PATCH-for-9.0 11/11] hw/intc/meson: Simplify how arm_gicv3_kvm.o objects are built Date: Wed, 22 Nov 2023 19:30:47 +0100 Message-ID: <20231122183048.17150-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231122183048.17150-1-philmd@linaro.org> References: <20231122183048.17150-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::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1700678035962100002 Use the target_aarch64_available() to build the ARM_GIC_KVM types regardless the ARM/AARCH64 targets are selected, but restrict its registration to TARGET_AARCH64 presence at runtime. This will help to have a single binary running both ARM/Aarch64. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/intc/arm_gicv3_its_kvm.c | 1 + hw/intc/arm_gicv3_kvm.c | 1 + hw/intc/meson.build | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c index f7df602cff..b3063c4cd7 100644 --- a/hw/intc/arm_gicv3_its_kvm.c +++ b/hw/intc/arm_gicv3_its_kvm.c @@ -261,6 +261,7 @@ static const TypeInfo kvm_arm_its_info =3D { .instance_size =3D sizeof(GICv3ITSState), .class_init =3D kvm_arm_its_class_init, .class_size =3D sizeof(KVMARMITSClass), + .can_register =3D target_aarch64_available, }; =20 static void kvm_arm_its_register_types(void) diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3_kvm.c index 77eb37e131..33321dee5d 100644 --- a/hw/intc/arm_gicv3_kvm.c +++ b/hw/intc/arm_gicv3_kvm.c @@ -909,6 +909,7 @@ static const TypeInfo kvm_arm_gicv3_info =3D { .instance_size =3D sizeof(GICv3State), .class_init =3D kvm_arm_gicv3_class_init, .class_size =3D sizeof(KVMARMGICv3Class), + .can_register =3D target_aarch64_available, }; =20 static void kvm_arm_gicv3_register_types(void) diff --git a/hw/intc/meson.build b/hw/intc/meson.build index ed355941d1..d45eb76f36 100644 --- a/hw/intc/meson.build +++ b/hw/intc/meson.build @@ -40,8 +40,10 @@ endif specific_ss.add(when: 'CONFIG_APIC', if_true: files('apic.c', 'apic_common= .c')) specific_ss.add(when: 'CONFIG_ARM_GIC', if_true: files('arm_gicv3_cpuif_co= mmon.c')) specific_ss.add(when: 'CONFIG_ARM_GICV3_TCG', if_true: files('arm_gicv3_cp= uif.c')) -specific_ss.add(when: 'CONFIG_ARM_GIC_KVM', if_true: files('arm_gic_kvm.c'= )) -specific_ss.add(when: ['CONFIG_ARM_GIC_KVM', 'TARGET_AARCH64'], if_true: f= iles('arm_gicv3_kvm.c', 'arm_gicv3_its_kvm.c')) +specific_ss.add(when: 'CONFIG_ARM_GIC_KVM', if_true: files( + 'arm_gic_kvm.c', + 'arm_gicv3_kvm.c', + 'arm_gicv3_its_kvm.c')) specific_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m_nvic.c')) specific_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_irqmp.c')) specific_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic.c')) --=20 2.41.0