From patchwork Thu Jul 18 13:32:59 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: 813203 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp296721wro; Thu, 18 Jul 2024 06:35:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX2YfGfBBGhtZsyYuyzZJ26TA/nya19mFWIiixkg3i+T+n29+4dXkxHcGU4iegUfe6hXTnPd1bl3P/PXAy4zd/L X-Google-Smtp-Source: AGHT+IGYXQMnCkV83mQY478/JzLIyF7sORSQqIpewFwl/1ZQEb2cdjQZNSXtMpIJ7R8sLAFdkE8z X-Received: by 2002:a05:620a:4246:b0:7a1:456b:fd59 with SMTP id af79cd13be357-7a187419cffmr544516385a.6.1721309701302; Thu, 18 Jul 2024 06:35:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721309701; cv=none; d=google.com; s=arc-20160816; b=DSOG5QHcfU+uBuBgS0QgzkMz9+93k8ER59uBg4RQ8uTm+GFdo5JQ48k/kR59Cf3iBC N8ZpGGRXo4mPzeiEo2pY/Lrdjq84a4MuCmrJy3l3dXTd+MXsPO4IpWCGmvwAZgXVjyBR 0vmynv+SFCy5wypuyGwR/uTdSxEz+3r3Mm+1oevFseGls6v08wyGn0ak1GOq6G5eSlJb 1dyP7yaxTP94pkzJgPQAcVi1ObRxV0LVW4mIAB8Uk3teThbMHNzLfjBENuaTK2pbIFi5 CsSIKImbz/xescKS6ev3e9ahJOQWLpGbmMh/EqXXKGoh8guiz+eqZxl+P11vKwul/ae4 TAnA== 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=HLONTvRjf34a+Vyw93TpcK5Od4YkptKH5NfsXVNFERI=; fh=yAsKE6TiSoiw3fbZCUfqzMsS5eWPN8kryrNccMNgpJQ=; b=DAh6cAUHwo3n7vNTUdfvc+zfoCnBIzKDL1oMHupHCn8SyWxfToy0ed+JF4R9+0Vwpi ZORdQsMJnDV4qB+mBY1j9vX2UylqmyKKuoo5giU/Mgrq2NDB4lx+05JaRw6O4uFilmFq TFSQxLFP35MMAaDDEPajRiy9YtayiWhuThD+7GiVkY2JLqRBmLRHdsoZt2MAt8Qpafit VWdgUGe3jnRS52UpaCJUGzeiTMjZidvked8rYGrTgxaDwPHAMWr7C6c2+7fHu/yN85RQ YbK275BRvjFMp5eCEBRlTLcDT74abdSwkf8IL/vV+qd4OC1fHH2XOTj+17GTNnQhU75v 8n5A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="BMAQOIB/"; 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-7a1939911aesi57938185a.470.2024.07.18.06.35.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 06:35:01 -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="BMAQOIB/"; 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 1sURGi-0005cv-Kn; Thu, 18 Jul 2024 09:34:00 -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 1sURGh-0005W4-1B for qemu-devel@nongnu.org; Thu, 18 Jul 2024 09:33:59 -0400 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sURGe-0008Sv-Tw for qemu-devel@nongnu.org; Thu, 18 Jul 2024 09:33:58 -0400 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2eecb63de15so10877271fa.0 for ; Thu, 18 Jul 2024 06:33:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721309635; x=1721914435; 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=HLONTvRjf34a+Vyw93TpcK5Od4YkptKH5NfsXVNFERI=; b=BMAQOIB/VbuWg0ktnT/anuPnQzGMz125WTUGSX0dtFrXd7uTWEtzG8QJhqgTcCR774 OoS5kBwFbdoW4/Plf4EJU6kyJRtGi0/E/BsmAZ68N+DaYHMAs9WBDINBlKnSkSSqwqq4 K/Fz1Um/lzWk/VY1quB6jAHgUuKLypSigNxfAzbyi/gFVdSoNYb0iycxWS+1FKU5rNgm /Y7cQeRBqM9oH292dnbYSTsqRdVTzxYr68hBb7FO2t4y97UJYFGpcymvhYtTacqtT6QK h7F/yw9SQbmn8/QXiOn4sA6PFK4pYzAJhNcpxk9jGWcgGCO1rL7PqJ16Y5dB87dYTBHI mRZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721309635; x=1721914435; 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=HLONTvRjf34a+Vyw93TpcK5Od4YkptKH5NfsXVNFERI=; b=Z4I3DACPXlUmObVm8crGTQqOI52Bs32L8HnWTveQlGq9gFEpWSBQSu+r2kCCA14XUf DKdEukit/fUPwafjgNC1/XoJbeSrA99Y7gtsfrfKXW/PPYMCpx9uX04MEbOSkTVCmxrs 82Fhp0rtLOAld1pHBvS8yE5EMT5qCQDffz4BuSTz1MH/0McsbgdyMxFOVMzW1c2rII0O YEQMZ4oa9hmLs2qYTMWGizY1nPREqU6eR0GY49q0jNzOkCE0xKl7Du6FQRHA+IifaY/k E2QaKJ2lkpme5yZtiDu0pFjeyiiwPKF+NuyWE4enpLtcPWNvfBVdI49Fox81t/Lu7LbV kUOA== X-Forwarded-Encrypted: i=1; AJvYcCXW1Yze52EmHnCtImoEO5LVmD5xBzx7OuK0i7iNeP/7hgRw85ESpww5B+pY+tM02qrBO3caNIvkKy+2e4PjkYr893kl9mM= X-Gm-Message-State: AOJu0YxKUINHD70HNq8MMGlq8mRLmaL1D2B97ngll3HhU7QABSuzShG4 SVmmGDTO1VUMGonnTa4QpGzWNhnGeRADphN263br08mw/0Wfu57lXMtGPNmjIAQ= X-Received: by 2002:a2e:90d5:0:b0:2ec:1cf1:b74c with SMTP id 38308e7fff4ca-2ef05d32f7bmr16817141fa.32.1721309635203; Thu, 18 Jul 2024 06:33:55 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.113]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3680daccacdsm14337586f8f.62.2024.07.18.06.33.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 18 Jul 2024 06:33:54 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Bibo Mao , qemu-devel@nongnu.org, Jiaxun Yang Cc: Song Gao , Paolo Bonzini , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Xiaojuan Yang , Xianglai Li Subject: [PATCH v5 07/19] hw/intc/loongson_ipi: Move common definitions to loongson_ipi_common.h Date: Thu, 18 Jul 2024 15:32:59 +0200 Message-ID: <20240718133312.10324-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240718133312.10324-1-philmd@linaro.org> References: <20240718133312.10324-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22b; envelope-from=philmd@linaro.org; helo=mail-lj1-x22b.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 --- 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 82cb64ca40..d53bd5dcfe 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