From patchwork Wed Dec 18 13:42:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 851680 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp922232wrq; Wed, 18 Dec 2024 05:44:13 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWW9lOBHFHHCqNT/rFlml+vQiBG2Z+xl1DxR7AHPRiw2U4PAARcppgbSGgIm5hBrbeuBObR2A==@linaro.org X-Google-Smtp-Source: AGHT+IEp7zNGbZ/4ezGkUk1go4HKUVLIkKKKTJbBXcMLB0y7q6kLqvumCUI+l18EeGoopo0sXSj9 X-Received: by 2002:a05:620a:3192:b0:7b6:ea67:72d7 with SMTP id af79cd13be357-7b8595ae962mr1013014585a.1.1734529453377; Wed, 18 Dec 2024 05:44:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734529453; cv=none; d=google.com; s=arc-20240605; b=T4WrH5YS3RIxha/HoIUK5+IrCGN0dcAqL7kM94IUSToBX8d9VIVo4s+02q4DOGhyhA OTc6kW2huZy7LLMC+X0U8+iUvrKsvcasgGTLuylRgGxtnrVCInBVboPpXx1yYkQ3IECt oQRfjZ8/rGNM69lReLoMfEfIQ2gEYt6Dq2Iu+JKhq1CFNAwGfPcvzRh4NZ4+Isl+e2gp ol61p4wU5mOcCyvEd/s8Sn/tD++fPkP1BubFBt16lTZ8MbHh62R1l57YgTsdu64l/g4y RI6XAAwFA4wZvYr+ZX3sAEl8wQsLPYhhrXrPAhixNw6yHnzWnnBmXup6T9nTH9NaoW+c 43OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=i447dtSxlHmakblbDXagLB9a51ZdgcT0s439L6Wncxo=; fh=3mEp7FusppN5Drq2PN08R8D/9xXM9YdbtG5TkJxJBiE=; b=FUAneS2HosaQW1MPAhmtitCSha28/etxuuM1apbvMT9G0HDbXug1u398NFYAUwl1vP SEM9zjH/SyTgr4P1z/NfgnOxj6J4DLTj51dh7/eN3UPbOwJIme/W9vDB5JKEcy5uXmZ1 00I59ewXDMT6BdZODr3P0MgqHVLFAIvdPFLcnUstoNRgNaMGgRncW2E2b9YGzz7T6WPK O2UKNve0jPBMl/yNreUvU8NQQmYHhjzFkFxh0Pl+7ChQih6xDSSMO2rs6qltHge0jOon BOqSsXRBSh7ek/eWkRg1hv2md2XVQUZ1DDadqCQIkE3G8poKvg7R4n90eJ/zbyvoTgxC r+QQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GLpCgRqV; 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-7b7047c4962si1230710585a.106.2024.12.18.05.44.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Dec 2024 05:44:13 -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=GLpCgRqV; 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 1tNuLB-0002Hx-Hp; Wed, 18 Dec 2024 08:43:55 -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 1tNuKc-0001NA-IR for qemu-devel@nongnu.org; Wed, 18 Dec 2024 08:43:25 -0500 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNuKa-0005h2-VH for qemu-devel@nongnu.org; Wed, 18 Dec 2024 08:43:18 -0500 Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3eb8accbde3so381525b6e.0 for ; Wed, 18 Dec 2024 05:43:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734529396; x=1735134196; 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=i447dtSxlHmakblbDXagLB9a51ZdgcT0s439L6Wncxo=; b=GLpCgRqVWDlDgig33YG/KYOL4ZJsN71m6EJBiKcmf7yXpX6gfgMqLSZoxIli7Py+LH O/b1bv6BEXltJpjNaBbbnm5UOHcem+3rb9lAzZL8HJQOaaavRMT75P66vf9ndiKzljAY rPnjBWizeaRA+csnhFH9qk8hQdYZQWjRktU2ArKLHzZammFnlHVnmhxN9I26zUbLjqzq OlDHoF60FYAaKtyq4GnQZH3iWagstkE7YP5AxiMImuqMnE+T4LBwVBoauu6Y4GIUcDnX B87SUzwYcOeprVYFwWmPE1Zq8BQQ2X/LfUmk3WHxdR7JAkUOyzrDbYvGMOM6y8r4ydBI qbzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734529396; x=1735134196; 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=i447dtSxlHmakblbDXagLB9a51ZdgcT0s439L6Wncxo=; b=Kg+Jh9Pt63RouYQdMPUZ2uuWAAMhX29BgKwEzWHpMDVy3Jlxm7mFbhf2iFFY4+/VEW Tv5MyKVbQWxhDjyXSZrv2nBFseCJPRuxDLgOls2XTShKH7JEUicMyv30dltugaWixJwF 7A70h9HT7Al7lsu9+44gE1h/b5myAK3IpqItKlUCve9sCLOVtSRu8GmljJeWxL6OiLPt aXaRiRzdocD9iyon9Eskbzlq7tWD43REPXlndhI9Ua1MM5Ab6iceM3xIdnyTu19F1mX/ P+C4m2lWOFBBt/jnbjztE5M3+NtH1VRfbrr0BF9tV7R4qJWB51Nm6WZzhduDIr4+clGu UqhQ== X-Gm-Message-State: AOJu0YwffNccq1YhxQz/FyqIu7PU9gzrp3fqtYcuD4hBwnIN9BQjfDQK LcqBYmcPpG9Dlv0yPCd9KbJhUiuvfhg9ZB1eMWi5H8oXGIRazzuT5LlqQA5KevA92CqNjOJphs4 HvancH07M X-Gm-Gg: ASbGncsbm46dBrlCRJaQGmAptu6LFASo1LBh1rt3RVFlzbP2tFTFJNyiPOWxnw8dHDi lwKlvWM6gDjD/sd69FXBm6sw3GtFXZDOCr5G47wqN4v0JAs89mIgEa6ni8tJzKA0WS9HfEhSULe WLt80dsDcu8sAu8dXHMhJqMfEndid59GZPwx9VGByj3a1V0U4ONmSe9M/DkvK6YVQYfugOcHFra qkhaRji1i7s4HUo6V22ezEcHnYRvp8g66SPThiTGWmEMCSxP9BoIOdoz4Rhy/iJ X-Received: by 2002:a05:6808:3c4f:b0:3e7:bd4e:5b98 with SMTP id 5614622812f47-3ecccd8f720mr1552235b6e.0.1734529395814; Wed, 18 Dec 2024 05:43:15 -0800 (PST) Received: from stoup.. ([187.217.227.247]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3ebb478a502sm2870951b6e.9.2024.12.18.05.43.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2024 05:43:15 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com Subject: [PATCH v2 16/24] hw/arm/armsse: Use device_class_set_props_n Date: Wed, 18 Dec 2024 07:42:43 -0600 Message-ID: <20241218134251.4724-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241218134251.4724-1-richard.henderson@linaro.org> References: <20241218134251.4724-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::235; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x235.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;