From patchwork Thu Jul 18 08:38:28 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: 813134 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp188438wro; Thu, 18 Jul 2024 01:39:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVkxcqEpsbHdOeJBhTUidefj2Ybes7vG129wqEusY/pRF1cuHCSMo6OPoOiIuXjse56G8Svg/1HGsPNTgCXHxLz X-Google-Smtp-Source: AGHT+IFtykdmuIOBxepyzVbAQXH3eGIAxcKwmsad7Xmq7CMqmiKyfNCSbJl47A5GAvSkNZAypQxz X-Received: by 2002:a05:620a:2901:b0:79f:178f:99e6 with SMTP id af79cd13be357-7a19398d82amr10425585a.64.1721291980250; Thu, 18 Jul 2024 01:39:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721291980; cv=none; d=google.com; s=arc-20160816; b=ZytFibC2NRmo4tAk7sUOE1x1bH5Eu3r1Zg8Sm/xhVajb6iA0NKqBmVCK3yqJRLUsCL 4NYaEYVGBRJ92lbqG9hf6xNq1Z01GAY+Jx4sJ4I475bOmG1/fChIqNzS+Jn3Vv0b5U6n Mw4jUdgriE44To1LKSj3l/HNRTw6rvvYBUjXs0GIDN7cphGXNjpcooJPCUWPKQ2OR6zs mjxKTRxL4lSnT7ODYAXuath7c3FhXxJgEmwT9tr+kEPsQl6eRvuI3OjzqQMltSOIAEgF R+lbMM7dgan5A5lmCFXbvBbNUanWZ1OnlVs9LaHQcN/6fYiZVsTRi10hV87n5Cca7O5k kS1g== 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=gM364jAAbzhkuB964x9fsLUOlXwiGfCqOc37mduCfFY=; fh=NLZWUfvz+g+MnoIWE6nGov3chqHrPo6wetxAC/CDqtI=; b=ju2ZabWRx5QpcCkeU53zHLI0XCO9OTs1FI73BriF6ZZ5cuEJUQCnD4pG98HvbE4Rt6 YsHf5RvPLdgwbtF1UK3rRyaw6BLhbyi9mYx4Kjl1F0uPXY63Y9ylqM4WA/+TyMQ/DdJ4 Ot4cFL4wQfdbIbFSp/3bb4uK3QKX9MKEizMiQLXWcVDPtSFmNhx5RXqTRjbvHLBJL444 JdLpdW4oqcTd3Vn/6S6XMe04OmGrE/1t6EGHqDdb2KGRijyFCrs+SyL+gUmv0T1Ykzzq 7xPzgJX2P4ztBiHFw+5XE3S6UVBTWzM3kCX41zMFmRBvVCcHsmpwNzRd0zGZM0fb0mqY 9y1g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wEJ+ZlOa; 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-44f96abdfe3si767501cf.672.2024.07.18.01.39.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 01:39:40 -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=wEJ+ZlOa; 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 1sUMfb-0002yt-Qt; Thu, 18 Jul 2024 04:39:23 -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 1sUMfZ-0002ka-CZ for qemu-devel@nongnu.org; Thu, 18 Jul 2024 04:39:21 -0400 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUMfX-0004jC-Kr for qemu-devel@nongnu.org; Thu, 18 Jul 2024 04:39:21 -0400 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2ebe40673d8so7404411fa.3 for ; Thu, 18 Jul 2024 01:39:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721291957; x=1721896757; 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=gM364jAAbzhkuB964x9fsLUOlXwiGfCqOc37mduCfFY=; b=wEJ+ZlOawTQdG621TE20G3yBS6QhIr7u0gmNHUF2BgFb2/aPLAyOFqz83eogaENO3O fvzyBHymVyCVz5G/E+Xy24XjI4/q/cG2CE0j6bha57fRd4qEn2Pa39oro6CEaanYchXU f2fmXluRFiOdqEqzF4FkYGQM87fxXff3gYx5TBZB2L0rCNp2+UP3l8qH9Gqs+r9ap42m wm5RLNxBlWTH9r6Rh/1JVWmjKySM6UbuKqaNBItz1kpbK8oeMWxOciTaDsf/OpFLmU8A V7ma2CUAPoQMMMNrgiJkVp5L/8dGicxQpS5U2kGykkbXkZnIyNSPTyag1gAxOpHO+L0i GYtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721291957; x=1721896757; 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=gM364jAAbzhkuB964x9fsLUOlXwiGfCqOc37mduCfFY=; b=NdEAUHV40lYNZnEMQMLjicrHicX+zsGjRWf34LhcAxba8w54XkG3x3LDHTYnJu8iAb O9Haj2V+reX3Y1peV5Z6elYhcEt4TVipNk0snjTfQnqPzXQ4m8Lb8j0Nt69bCF6PY63Y W8osPHgF8TVM5hItsDSYI+Pwcbo+gA+QVh8mxzxJ07KK16CnLf1UcT9S4fr2U5ElYuct JkrNE5wTAUDpSOO/BRz/W8kZ1VzGzITFswB72S8/2P01LlVT0A6Te7FiEG7OXnjKvLXQ YYSn1WCn5PqZZaUgvYL2SrP0sZjCXNRUBhayI0KSDfNBGLr/zPfKCtNcAen61FgcUCzL Xt5Q== X-Gm-Message-State: AOJu0YzXpG/9z33meuoSrcJScaZMKS2EXNZo18cdHtyhpOnkhgD2rA+R MBP8DdZe7RyW8gJuozEafPxW4TcSOCtCIJMPfnjkmPQbvTlex0xUm+PMCv6uP2vsWmc2Or1CpKr iZWs= X-Received: by 2002:a2e:6e09:0:b0:2ee:7b7d:66ee with SMTP id 38308e7fff4ca-2ef05d43d93mr11606211fa.41.1721291956778; Thu, 18 Jul 2024 01:39:16 -0700 (PDT) Received: from localhost.localdomain ([176.187.208.21]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3684e96033dsm1145887f8f.23.2024.07.18.01.39.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 18 Jul 2024 01:39:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Bibo Mao , Jiaxun Yang Cc: Song Gao , Xianglai Li , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Xiaojuan Yang , Paolo Bonzini Subject: [PATCH v4 04/18] hw/intc/loongson_ipi: Extract loongson_ipi_common_finalize() Date: Thu, 18 Jul 2024 10:38:28 +0200 Message-ID: <20240718083842.81199-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240718083842.81199-1-philmd@linaro.org> References: <20240718083842.81199-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::232; envelope-from=philmd@linaro.org; helo=mail-lj1-x232.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 In preparation to extract common IPI code in few commits, extract loongson_ipi_common_finalize(). Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Co-Developed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bibo Mao Tested-by: Bibo Mao Reviewed-by: Richard Henderson --- hw/intc/loongson_ipi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/intc/loongson_ipi.c b/hw/intc/loongson_ipi.c index d870af39c1..960d1e604f 100644 --- a/hw/intc/loongson_ipi.c +++ b/hw/intc/loongson_ipi.c @@ -357,13 +357,18 @@ static void loongson_ipi_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_loongson_ipi; } -static void loongson_ipi_finalize(Object *obj) +static void loongson_ipi_common_finalize(Object *obj) { LoongsonIPIState *s = LOONGSON_IPI(obj); g_free(s->cpu); } +static void loongson_ipi_finalize(Object *obj) +{ + loongson_ipi_common_finalize(obj); +} + static const TypeInfo loongson_ipi_types[] = { { .name = TYPE_LOONGSON_IPI,