From patchwork Tue Aug 6 12:51:32 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: 817052 Delivered-To: patch@linaro.org Received: by 2002:adf:e00d:0:b0:367:895a:4699 with SMTP id s13csp1785598wrh; Tue, 6 Aug 2024 06:01:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVvefPWu+v4cQVASa37/pw7vtlLHQsNxqEy5WyMcAk88Gz9iGRAWcKZ4N1Yi7njD57QRY+MkpDhn1NUfvLdFUTA X-Google-Smtp-Source: AGHT+IFsSCmu+9nynDm84IcOpZUMMSNd0w3NBzDi1tA8tF3AuI8zWj/vAprjKitW1sFCRWhKEJgS X-Received: by 2002:a05:6214:5b11:b0:6b5:a8b9:e8ab with SMTP id 6a1803df08f44-6bb984b3040mr166303046d6.49.1722949271361; Tue, 06 Aug 2024 06:01:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722949271; cv=none; d=google.com; s=arc-20160816; b=ynYW41PaS0Iozflxa02w1QNWG8pPGXMSPOJ1Vn0ShvIlpKQBM7cI0gpZtuCNUMHrLs vf6riXGOawcWiIYv+mY8B5GldvrRcBFtrXzo6/JfP1qlw/O56nKgDZY4NK7rMOepAmbq Eou26Cw2iPrJUP5/76SGq9wJlJmC7jivQ8OdQdWOyfOiohuhEubJNOla8T+kQ1aRhdX5 Q76zNaRK32vsILhFKvDMNlBCbKt1qQqGyBtcfnJTzWpjbocnZ8nTLqRBwvhhbViezlEj 3r2WOVYL1nIHO6WuCbGwUFA5wZO+wI3VEjXJc71ZLINdfhuQADbDc2QHnFWUf0lfBX00 PnrQ== 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=O8RRMhLXR56plds6R4QKKiZtLeNwl7BDBlyuBOky7w8=; fh=rxGWTSOrq9MmYE4+hMcV/u38d68oc92wX5eFok0A+84=; b=qu7ye7iSnYwy8WkretAHW6hpfMcjk7waC6WTTF1vEwm8i8bOwzkIIX2/eUqXUDmwEA WowqaYgce0PTknWp7sV3t59UZ9Dki/ZWu3PqTgdG+/z3mD0lxM7sCr71aL3F6clq+0Fd KlLs1QyO7/mh/D0SMchWr7gvr7KdVXoIPXY9m9DzVczJMvdRdnO+gmIK60u50WSU19il 1rKOrr0mzZ10Pw+CDmaUCaD4Pz63oAmYroish9BPClqGCUPu5sVLy/lYT2/lhS2cicFq YFFmIZyPwWSXAKv1SAnNUxmxULX5nmE8g3Cd2VmdRmDIDh2ko+Trd5db4KJaTtfOW2PE mT2A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yv3uU6tC; 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 6a1803df08f44-6bb9c86fd8esi118490436d6.369.2024.08.06.06.01.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Aug 2024 06:01:11 -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=Yv3uU6tC; 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 1sbJfx-0005lj-Ig; Tue, 06 Aug 2024 08:52:29 -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 1sbJfv-0005lF-Qg for qemu-devel@nongnu.org; Tue, 06 Aug 2024 08:52:27 -0400 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 1sbJfu-0008OD-1W for qemu-devel@nongnu.org; Tue, 06 Aug 2024 08:52:27 -0400 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-530ae4ef29dso1150916e87.3 for ; Tue, 06 Aug 2024 05:52:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722948744; x=1723553544; 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=O8RRMhLXR56plds6R4QKKiZtLeNwl7BDBlyuBOky7w8=; b=Yv3uU6tCf1T937m2RMfOuKTL/ax8ZZfX65jDM+IyWeCw13xe2f3Jj6cknPx5RY4FNl i6u5Nm0GDG7nCzwhTeX5WLZkaYhCo4Bri7bz8XIXQlm+zmzuq89eXg8/jjRjzKlRLC4u /MA+iG7GmpwYJN3cgGFZ96cOUIqHF0RDAwqa4l5G10FEcPsEQgEfKhXwui/ssJS3+EFK 3i3+3aTi8geIzdnDMHsKCMWCHWtytafy/x4jI2wbArFpatAPdW+p/x86Ch2QG9hSEPiX 0YOa/0XO1jPfjR1RWV9+7VxjxreXjkZp0w4aVyK/7j4tzyS6Apz2VTuoO+HEARRu3dXO vTMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722948744; x=1723553544; 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=O8RRMhLXR56plds6R4QKKiZtLeNwl7BDBlyuBOky7w8=; b=qgWcg9o9IFvGDzooreP2VYkYC4bVUTvKlvaqFuogrDO/j4N3PtFlace3FuEme2Dkwd TG9yRlYptVk4nFgMB4Hdh7YqgBX182D2sb4jPP4vZzu6eFbcKs/urTYlDcN0UZNdRpEU 20fFWpOQJb9WVtYVUFdo06ceGygs2o3T694nyVNuF1pW7naYXnqNL4A6pLZI5Zq0nkLF 5hRP5pdJmLB6VOUbZe2VXpw108/xsQjlTYUdYyMXXGFX1DOoASgiIojddJeVzxMVAq0s 1I6iBn7uqnGH7olr+UcJsIbdhkuuqH2xvXiNNtSN03Jgt2N7tU9FhiPtRvKbEMMTYtXv yXyg== X-Gm-Message-State: AOJu0YzaTxCYalhMEeF5YzjBo/S256jzjrUFsByjZp1j6nGvpxLg1sPQ WnHr9nJuJeBJQcICK3UG4zXaPMnvbfoWmRpasSY/COGO2y8Fkp6DQXpfTeaUr0vTksF4zB7pXHm + X-Received: by 2002:a05:6512:3b89:b0:52c:cd77:fe03 with SMTP id 2adb3069b0e04-530bb380dabmr12456478e87.14.1722948743824; Tue, 06 Aug 2024 05:52:23 -0700 (PDT) Received: from m1x-phil.lan (cor91-h02-176-184-30-206.dsl.sta.abo.bbox.fr. [176.184.30.206]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7dc9e8383dsm551798066b.173.2024.08.06.05.52.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 06 Aug 2024 05:52:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Bibo Mao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Song Gao , Richard Henderson , Jiaxun Yang Subject: [PULL 04/28] hw/intc/loongson_ipi: Move common definitions to loongson_ipi_common.h Date: Tue, 6 Aug 2024 14:51:32 +0200 Message-ID: <20240806125157.91185-5-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240806125157.91185-1-philmd@linaro.org> References: <20240806125157.91185-1-philmd@linaro.org> MIME-Version: 1.0 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 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 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 Acked-by: Song Gao Reviewed-by: Richard Henderson Reviewed-by: Jiaxun Yang Tested-by: Jiaxun Yang Message-Id: <20240805180622.21001-5-philmd@linaro.org> --- include/hw/intc/loongson_ipi.h | 18 ------------------ include/hw/intc/loongson_ipi_common.h | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/include/hw/intc/loongson_ipi.h b/include/hw/intc/loongson_ipi.h index 9c9030761e..70e00dc1a7 100644 --- a/include/hw/intc/loongson_ipi.h +++ b/include/hw/intc/loongson_ipi.h @@ -12,24 +12,6 @@ #include "hw/intc/loongson_ipi_common.h" #include "hw/sysbus.h" -/* Mainy used by iocsr read and write */ -#define SMP_IPI_MAILBOX 0x1000ULL -#define CORE_STATUS_OFF 0x0 -#define CORE_EN_OFF 0x4 -#define CORE_SET_OFF 0x8 -#define CORE_CLEAR_OFF 0xc -#define CORE_BUF_20 0x20 -#define CORE_BUF_28 0x28 -#define CORE_BUF_30 0x30 -#define CORE_BUF_38 0x38 -#define IOCSR_IPI_SEND 0x40 -#define IOCSR_MAIL_SEND 0x48 -#define IOCSR_ANY_SEND 0x158 - -#define MAIL_SEND_ADDR (SMP_IPI_MAILBOX + IOCSR_MAIL_SEND) -#define MAIL_SEND_OFFSET 0 -#define ANY_SEND_OFFSET (IOCSR_ANY_SEND - IOCSR_MAIL_SEND) - #define IPI_MBX_NUM 4 #define TYPE_LOONGSON_IPI "loongson_ipi" diff --git a/include/hw/intc/loongson_ipi_common.h b/include/hw/intc/loongson_ipi_common.h index 70ac69d0ba..b43b77bda6 100644 --- a/include/hw/intc/loongson_ipi_common.h +++ b/include/hw/intc/loongson_ipi_common.h @@ -23,4 +23,23 @@ struct LoongsonIPICommonClass { SysBusDeviceClass parent_class; }; +/* Mainy used by iocsr read and write */ +#define SMP_IPI_MAILBOX 0x1000ULL + +#define CORE_STATUS_OFF 0x0 +#define CORE_EN_OFF 0x4 +#define CORE_SET_OFF 0x8 +#define CORE_CLEAR_OFF 0xc +#define CORE_BUF_20 0x20 +#define CORE_BUF_28 0x28 +#define CORE_BUF_30 0x30 +#define CORE_BUF_38 0x38 +#define IOCSR_IPI_SEND 0x40 +#define IOCSR_MAIL_SEND 0x48 +#define IOCSR_ANY_SEND 0x158 + +#define MAIL_SEND_ADDR (SMP_IPI_MAILBOX + IOCSR_MAIL_SEND) +#define MAIL_SEND_OFFSET 0 +#define ANY_SEND_OFFSET (IOCSR_ANY_SEND - IOCSR_MAIL_SEND) + #endif