From patchwork Mon Dec 16 03:51:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 851217 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:2c4:b0:385:e875:8a9e with SMTP id o4csp2657631wry; Sun, 15 Dec 2024 19:54:04 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW3MzJ3rFcDocmdrWhRrYrVtCZE3OxzHfMm7cCjNvqWwflTUQRKSo4RuAqZ1z5YT5FNbM7GWQ==@linaro.org X-Google-Smtp-Source: AGHT+IEPI8dWirDIk6sepojC7uf4LNKiRt5ye/A9Dlx7hE8ZsmhbeMMkO4OUYS/g1GHIB/tPbkc9 X-Received: by 2002:a05:620a:4009:b0:7b6:eab3:cdd2 with SMTP id af79cd13be357-7b6fbf4434amr1886166285a.56.1734321244205; Sun, 15 Dec 2024 19:54:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734321244; cv=none; d=google.com; s=arc-20240605; b=FpBn/xXJQ7jygN4BonICaiD0TO7HrYR/Tt5J4Zqcxfll4ktKpQWrQqyPiq5RZOu2mB KRsBCvtB4CP2ZAb0GRF2zmtXupwEWjj74Mcv3qiPQ+hu/pxJSDLT+UHfo0GVE4GcGRDv KweDS29g62e9cjUcLo5wEQOxkgydns9feUFJdPYWktYitkHNnfc+yoOBdhchWQXokAnu 9TWagrg9arlm9fFsCnYd+BEBilclLfKFkaiUznU2yqgQc6NeJJk/pNuzsdwldY1ejd30 P5ML2ZToyWkdF6l5tK9nNf0Pkg6PeW5hk3lxSKl5DC3Cf6ptLhlMpjTYi/W9eI8S0EkE 4i2g== 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:to:from :dkim-signature; bh=i447dtSxlHmakblbDXagLB9a51ZdgcT0s439L6Wncxo=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=NPKQKVUCAEQA1RyWNs1dt/fICFf0mbhEiVYaDs7lV8h5E/Oc+w45+Qd6jKpmS3CKKP muQ0K8gxqzTZfoXm7MLKDJTvZRyEuQWyNXuEu4zA5b2Q/3wymyCQXG3Y2itfkZvXhPs1 JlVtTg5CJUABToZ4HFfx/AiGEHBKgb5WARUPldYMlrxgqPp/tlMzPsTVJ5zhPY4WTvGf UVL7bXxgpU2pk4D8z1md7jd91yfYRGpp1zrECCeCSNHy3icWYILdpfYe5ukIll+y4Y45 L6Hfp9/R+6d+U4b1xtBDmGBNLwG830S7tphRThUnUJtOBxBIYusazZXHh5rbMUhQgvZA 1egg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RXJDlEin; 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 af79cd13be357-7b7048f24fdsi591118685a.622.2024.12.15.19.54.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 15 Dec 2024 19:54:04 -0800 (PST) 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=RXJDlEin; 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 1tN295-0007MZ-MN; Sun, 15 Dec 2024 22:51:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tN293-0007Lc-Hu for qemu-devel@nongnu.org; Sun, 15 Dec 2024 22:51:45 -0500 Received: from mail-oo1-xc34.google.com ([2607:f8b0:4864:20::c34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tN291-00060i-QV for qemu-devel@nongnu.org; Sun, 15 Dec 2024 22:51:45 -0500 Received: by mail-oo1-xc34.google.com with SMTP id 006d021491bc7-5f2dee7d218so1601261eaf.2 for ; Sun, 15 Dec 2024 19:51:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734321103; x=1734925903; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=i447dtSxlHmakblbDXagLB9a51ZdgcT0s439L6Wncxo=; b=RXJDlEinePf/KsJBsKlFJcR6VvQe5w3oP2SBlSD7hQCLLzjPR+oU31Jfv7bzpl0/IT CGujFVwlMod4dbfttGp593Tlhh+PiYgM9TPYAZQ5JRnSrPmT/D+q8YP63d7NrfAO7LbE jRCtTMx7/ZjE4oTQzr1s0Xq5pEcop2+Pa1Co9grkNThrjd19Z4jKv7H1Q+GD03Dz2bvE E9J/fNmZMrYy4SDM/jj+IemTBdR1lPVFHtHmY3Y9qVdTaDy935CjgE8EDsxxpvbeku+S QrcCssnLKfi36S7/NMQtsun+VHyAEJXLuweFsbwSwX8tUXezFtCVme/0tK5voCE3LydE Thjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734321103; x=1734925903; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i447dtSxlHmakblbDXagLB9a51ZdgcT0s439L6Wncxo=; b=kKT6BL2ING2kwFoSp7JarfO8jIjIvUfaXn2Xs5qrguZHdBYSzL7gBpRsYz/VyBGmOt KqMtaSP0DeqKWAD8xyfSJP3HyxcDONkAiAa2muqHXzyimtI9FyCtkdmXXfAduBss3oim xL6xAAuI9ZE1eyQuA4OJm49bSrF+y1j8yK8PacXAwyGFVDq03GsA6bJJyzXnMiGX07L3 pRFBxYM5v2TBI+yIMygFnjpsG+aPZzGOjR4f0D2RwjW2HxHN5Gj/V6BiRVZfAM32LyzK dB8GvtCR+kGqwqxB2sbMi3iXP4X/iNIaUGufl58of+wp7gDZJXnMw/ENa4tjm8/VV/M7 NSkA== X-Gm-Message-State: AOJu0YzXZvTnayqsu+DquSHkgoJwY36djnSBMDrT99+EDmQOWAvxcyJ3 /632htyTwKlxWhcwOm1igAR+hPvM59Ug6h6WWXihyuutmqftAmnAqXlHYEhZ4NfrzQGqAmp5a9g PRRcA6CdY X-Gm-Gg: ASbGncuT8rKyvl6KfPrldGLsYfw1/44KV4BfoAFAfM5YAS3mJ4EgZdrgKnJpeVUiKpi WmWmzbwUcsz5OQhV5pxDo8FCvlza3xfNNdrTS4KFIz3zI7b0fi20G/DVoIr7GzoZxp6ZjUMr12v v72sMSSg9zyMfueQd60pshqMiMIhyaNfPjo0QKcbfYHirri/K13kh4wMuOmLE3WY6wwcivfqey1 R+9nMNeOgMalsZk3krUqyap5i2BtEsdBj/zIcnUuokEKbOFj+KlwAkzuiWtZMCtrc9h+RibDULj YXZWpkhxKoeIVpRC8jE6oIIZ3a3aNF66IbUA1E2XYRM= X-Received: by 2002:a05:6870:b07:b0:29e:37bb:c0e0 with SMTP id 586e51a60fabf-2a3ac6b9185mr5902576fac.23.1734321102636; Sun, 15 Dec 2024 19:51:42 -0800 (PST) Received: from localhost.localdomain (fixed-187-189-51-143.totalplay.net. [187.189.51.143]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5f33a93a6d1sm1287493eaf.33.2024.12.15.19.51.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Dec 2024 19:51:42 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 16/24] hw/arm/armsse: Use device_class_set_props_n Date: Sun, 15 Dec 2024 21:51:01 -0600 Message-ID: <20241216035109.3486070-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241216035109.3486070-1-richard.henderson@linaro.org> References: <20241216035109.3486070-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::c34; envelope-from=richard.henderson@linaro.org; helo=mail-oo1-xc34.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 We must remove DEFINE_PROP_END_OF_LIST so the count is correct. Signed-off-by: Richard Henderson --- hw/arm/armsse.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c index 1cd6b4a4b2..ffd732f806 100644 --- a/hw/arm/armsse.c +++ b/hw/arm/armsse.c @@ -72,6 +72,7 @@ struct ARMSSEInfo { bool has_cpu_pwrctrl; bool has_sse_counter; bool has_tcms; + uint8_t props_count; const Property *props; const ARMSSEDeviceInfo *devinfo; const bool *irq_is_common; @@ -87,7 +88,6 @@ static const Property iotkit_properties[] = { DEFINE_PROP_BOOL("CPU0_DSP", ARMSSE, cpu_dsp[0], true), DEFINE_PROP_UINT32("CPU0_MPU_NS", ARMSSE, cpu_mpu_ns[0], 8), DEFINE_PROP_UINT32("CPU0_MPU_S", ARMSSE, cpu_mpu_s[0], 8), - DEFINE_PROP_END_OF_LIST() }; static const Property sse200_properties[] = { @@ -104,7 +104,6 @@ static const Property sse200_properties[] = { DEFINE_PROP_UINT32("CPU0_MPU_S", ARMSSE, cpu_mpu_s[0], 8), DEFINE_PROP_UINT32("CPU1_MPU_NS", ARMSSE, cpu_mpu_ns[1], 8), DEFINE_PROP_UINT32("CPU1_MPU_S", ARMSSE, cpu_mpu_s[1], 8), - DEFINE_PROP_END_OF_LIST() }; static const Property sse300_properties[] = { @@ -117,7 +116,6 @@ static const Property sse300_properties[] = { DEFINE_PROP_BOOL("CPU0_DSP", ARMSSE, cpu_dsp[0], true), DEFINE_PROP_UINT32("CPU0_MPU_NS", ARMSSE, cpu_mpu_ns[0], 8), DEFINE_PROP_UINT32("CPU0_MPU_S", ARMSSE, cpu_mpu_s[0], 8), - DEFINE_PROP_END_OF_LIST() }; static const ARMSSEDeviceInfo iotkit_devices[] = { @@ -528,6 +526,7 @@ static const ARMSSEInfo armsse_variants[] = { .has_sse_counter = false, .has_tcms = false, .props = iotkit_properties, + .props_count = ARRAY_SIZE(iotkit_properties), .devinfo = iotkit_devices, .irq_is_common = sse200_irq_is_common, }, @@ -549,6 +548,7 @@ static const ARMSSEInfo armsse_variants[] = { .has_sse_counter = false, .has_tcms = false, .props = sse200_properties, + .props_count = ARRAY_SIZE(sse200_properties), .devinfo = sse200_devices, .irq_is_common = sse200_irq_is_common, }, @@ -570,6 +570,7 @@ static const ARMSSEInfo armsse_variants[] = { .has_sse_counter = true, .has_tcms = true, .props = sse300_properties, + .props_count = ARRAY_SIZE(sse300_properties), .devinfo = sse300_devices, .irq_is_common = sse300_irq_is_common, }, @@ -1699,7 +1700,7 @@ static void armsse_class_init(ObjectClass *klass, void *data) dc->realize = armsse_realize; dc->vmsd = &armsse_vmstate; - device_class_set_props(dc, info->props); + device_class_set_props_n(dc, info->props, info->props_count); device_class_set_legacy_reset(dc, armsse_reset); iic->check = armsse_idau_check; asc->info = info;