From patchwork Wed Jul 17 21:46:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 813021 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp16952wro; Wed, 17 Jul 2024 14:50:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWttfIhB7J6eBD9NC5UwfT5x7emaN44v5IU1gzbtqxv/Mcgu1MJIj6QWsjTczACS4s7BQqqkWPnscglDtUgFgPA X-Google-Smtp-Source: AGHT+IGsjs7p7KtfmjICWTm51GWJ1xSrM991z4xXl5GOUXhb++Me7U969mYiHw/NBQWyT8Z8j0Q5 X-Received: by 2002:a05:6102:149d:b0:48f:ea84:4837 with SMTP id ada2fe7eead31-491598b5136mr4407299137.9.1721253000174; Wed, 17 Jul 2024 14:50:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721253000; cv=none; d=google.com; s=arc-20160816; b=UXQ4DjpTGn/5BOMFE5iVRUj1Aim38nErO8T4O+dzngP7ZIgkLv7nnlzGYBGMLjw+Xy F1V4BfS/27/TqScRouaCG8S8gxLtLEJyR71xCmQG8fWUnFYsvYTpQV7HmRW9svPAJORP 9ggw0UUagjOEE/wkR2hmuQOC3u7/UUNpb+w55OSn6Rc7lBCYsQbt7t1P6RV6GqQAPNS5 SyV1OODKvKxoMPpV30xzUoEEAm6TmkoApE3bBjHU+fU2RGDtpgiHPNLJNz4T72sAxuMd 6Z69TX23Yjwm3RT/tBHpXR4FqUN5ztxneA188PL1+1dZslrHDaqHePCsKHLQUXddUS3w POdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=9HOJ9dHSdrI02h20r8v9vJ4RkLFUfsaDgRPfqb5PG7w=; fh=7CZo9r9WU9KU00teYapfptgN1S3TE/Wbs8W77rrcURQ=; b=SD2lLURpbH/Qjwgs7uiZainJWZDVvnPDxba2eKVTuypuk0oQTubMq0RZcyuVTjEXbA yiuzjIOUdTxSDv1e86S7gHBF1WjQidLZHm8JdtexDGj3Bfr07WABX/xfzXlc2f21njp9 SImS1vZAwPm7SjAfGbA4TPmUU+A4D90y8VXaTxYPs6ZxjVRHoh/txwi2vSHa30DGimc1 0NTjPJGKiTrVsXfPepcKCgGw/z2h0VnIhVlMJ4tjXhTBDtrFCAbxfMcx5kVW74K2Xixi dfeoonvnSet4uL2SZN+i++OBePKXaEVzPIshqqJmUU0PAZNrafzjZ0DeND47Vxvr2Vyp VlKw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pAlSW3O0; 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 d75a77b69052e-44f5b82ca1csi111919341cf.690.2024.07.17.14.50.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jul 2024 14:50:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pAlSW3O0; 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 1sUCUn-00071B-OF; Wed, 17 Jul 2024 17:47:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUCUm-000701-2J for qemu-devel@nongnu.org; Wed, 17 Jul 2024 17:47:32 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUCUk-0001sM-BX for qemu-devel@nongnu.org; Wed, 17 Jul 2024 17:47:31 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-36844375001so113123f8f.0 for ; Wed, 17 Jul 2024 14:47:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721252848; x=1721857648; 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=9HOJ9dHSdrI02h20r8v9vJ4RkLFUfsaDgRPfqb5PG7w=; b=pAlSW3O0CmnArL+gH1RWSfJbEbenDhbOZ7iePiSddYTit2xEN+pM3sM/U84PWCkSO9 VKIXi5hz3qlRO1tiSdeHrH1y0h/aNAlOe/bfDyEA/ormpUDQd5iVhqFhQBPtQBvw3Aa8 g9E0lVO0F7/Xvd26cEj+f3rnARGS30ULAzAUfhRNY4lkLvztXfgz67XICEuxG2Yic+sy VdRZV9hekgch3eCd0Gu9g1oIU1muXPwfPtjGzfmm5B4GBJlPCTis/qVY9E/o/WPhKMZJ pUnVmIg9SKh+vIDsiBkCkEVN1XhuexxBKJbf8hOh1kr3KGkS+1cj4MAg5y6UCSJN8rxZ mYjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721252848; x=1721857648; 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=9HOJ9dHSdrI02h20r8v9vJ4RkLFUfsaDgRPfqb5PG7w=; b=am//z2zl3490uY21v88ZbLQ3ggOAvLf3stuxaOqnUiDwH0+Q++Sk1S/YOBPY587qQp 4nXa1mXt9aFcpAJxS0VBep6bSbz239nb3Y8pwbLoG88sCynobWAaKx6OI2AEgmYUFGAR v/jPm+6bTdFFLR94uEgEJSx/b8kuN5o00H/Fqm7xsduDVbJv4ADF2s0pCgmB1Dt1kvcW ryLBg6ds3dljgkgBFwzH94fnaN08IFu2umGxRlJv1nX0bg2BTLxIpGAU7AUE27lGn9H3 us4i86iWdYoG7+Db4UuMkdW2mD3bRbh1KZjVt/aJlrL2y8eKdipxpY/g0CxjZdFI5unU 4IDA== X-Forwarded-Encrypted: i=1; AJvYcCX1YfGAl8qm7y8I3BeknWJ1gFY+eQZiEapO+psy0dPXSrpQwhhdgtE76j58ZhGt4TT9MnfY3k+2+E6COLLMr036LLfTpDI= X-Gm-Message-State: AOJu0YwMbbV+j3sf2cUZQ1aQbBmKHOKEcledpMwhpEmMRiA+USpZ795F qrCak59Zd9bh/Z5ekmw217WftC11r42XU6t6mPpIQvQEDzzQpeOQObPy0xJPy7c= X-Received: by 2002:adf:fa8d:0:b0:367:8aa3:436f with SMTP id ffacd0b85a97d-3683167aedbmr1825102f8f.38.1721252846929; Wed, 17 Jul 2024 14:47:26 -0700 (PDT) Received: from localhost.localdomain ([176.187.208.21]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427c780c9d5sm10992955e9.38.2024.07.17.14.47.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Jul 2024 14:47:26 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Bibo Mao , Jiaxun Yang , qemu-devel@nongnu.org Cc: Xianglai Li , Paolo Bonzini , Huacai Chen , Xiaojuan Yang , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Song Gao Subject: [PATCH v3 02/17] hw/intc/loongson_ipi: Rename LoongsonIPI -> LoongsonIPIState Date: Wed, 17 Jul 2024 23:46:53 +0200 Message-ID: <20240717214708.78403-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240717214708.78403-1-philmd@linaro.org> References: <20240717214708.78403-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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 From: Bibo Mao We'll have to add LoongsonIPIClass in few commits, so rename LoongsonIPI as LoongsonIPIState for clarity. Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Signed-off-by: Philippe Mathieu-Daudé --- include/hw/intc/loongson_ipi.h | 6 +++--- hw/intc/loongson_ipi.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/hw/intc/loongson_ipi.h b/include/hw/intc/loongson_ipi.h index 3f795edbf3..efb772f384 100644 --- a/include/hw/intc/loongson_ipi.h +++ b/include/hw/intc/loongson_ipi.h @@ -31,10 +31,10 @@ #define IPI_MBX_NUM 4 #define TYPE_LOONGSON_IPI "loongson_ipi" -OBJECT_DECLARE_SIMPLE_TYPE(LoongsonIPI, LOONGSON_IPI) +OBJECT_DECLARE_SIMPLE_TYPE(LoongsonIPIState, LOONGSON_IPI) typedef struct IPICore { - LoongsonIPI *ipi; + LoongsonIPIState *ipi; MemoryRegion *ipi_mmio_mem; uint32_t status; uint32_t en; @@ -45,7 +45,7 @@ typedef struct IPICore { qemu_irq irq; } IPICore; -struct LoongsonIPI { +struct LoongsonIPIState { SysBusDevice parent_obj; MemoryRegion ipi_iocsr_mem; MemoryRegion ipi64_iocsr_mem; diff --git a/hw/intc/loongson_ipi.c b/hw/intc/loongson_ipi.c index e7979dbdd8..a34e7e634f 100644 --- a/hw/intc/loongson_ipi.c +++ b/hw/intc/loongson_ipi.c @@ -64,7 +64,7 @@ static MemTxResult loongson_ipi_iocsr_readl(void *opaque, hwaddr addr, uint64_t *data, unsigned size, MemTxAttrs attrs) { - LoongsonIPI *ipi = opaque; + LoongsonIPIState *ipi = opaque; IPICore *s; if (attrs.requester_id >= ipi->num_cpu) { @@ -160,7 +160,7 @@ static MemTxResult loongson_ipi_core_writel(void *opaque, hwaddr addr, MemTxAttrs attrs) { IPICore *s = opaque; - LoongsonIPI *ipi = s->ipi; + LoongsonIPIState *ipi = s->ipi; int index = 0; uint32_t cpuid; uint8_t vector; @@ -214,7 +214,7 @@ static MemTxResult loongson_ipi_iocsr_writel(void *opaque, hwaddr addr, uint64_t val, unsigned size, MemTxAttrs attrs) { - LoongsonIPI *ipi = opaque; + LoongsonIPIState *ipi = opaque; IPICore *s; if (attrs.requester_id >= ipi->num_cpu) { @@ -277,7 +277,7 @@ static const MemoryRegionOps loongson_ipi64_ops = { static void loongson_ipi_realize(DeviceState *dev, Error **errp) { - LoongsonIPI *s = LOONGSON_IPI(dev); + LoongsonIPIState *s = LOONGSON_IPI(dev); SysBusDevice *sbd = SYS_BUS_DEVICE(dev); int i; @@ -337,14 +337,14 @@ static const VMStateDescription vmstate_loongson_ipi = { .version_id = 2, .minimum_version_id = 2, .fields = (const VMStateField[]) { - VMSTATE_STRUCT_VARRAY_POINTER_UINT32(cpu, LoongsonIPI, num_cpu, + VMSTATE_STRUCT_VARRAY_POINTER_UINT32(cpu, LoongsonIPIState, num_cpu, vmstate_ipi_core, IPICore), VMSTATE_END_OF_LIST() } }; static Property ipi_properties[] = { - DEFINE_PROP_UINT32("num-cpu", LoongsonIPI, num_cpu, 1), + DEFINE_PROP_UINT32("num-cpu", LoongsonIPIState, num_cpu, 1), DEFINE_PROP_END_OF_LIST(), }; @@ -359,7 +359,7 @@ static void loongson_ipi_class_init(ObjectClass *klass, void *data) static void loongson_ipi_finalize(Object *obj) { - LoongsonIPI *s = LOONGSON_IPI(obj); + LoongsonIPIState *s = LOONGSON_IPI(obj); g_free(s->cpu); } @@ -367,7 +367,7 @@ static void loongson_ipi_finalize(Object *obj) static const TypeInfo loongson_ipi_info = { .name = TYPE_LOONGSON_IPI, .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(LoongsonIPI), + .instance_size = sizeof(LoongsonIPIState), .class_init = loongson_ipi_class_init, .instance_finalize = loongson_ipi_finalize, };