From patchwork Mon Aug 5 18:06:11 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: 816742 Delivered-To: patch@linaro.org Received: by 2002:adf:e00d:0:b0:367:895a:4699 with SMTP id s13csp1469789wrh; Mon, 5 Aug 2024 11:08:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXM1l2s7oL0iohq21KgyFh2TT2Wf1FtEHIydPBK04EJ16lPOFTQxIz1D45pZgPP6BqwAkKykxkGN2idrWrAYd6/ X-Google-Smtp-Source: AGHT+IHmzCBy9b3zr6wtUoNfIUbd58Sv9Hjp3HUfqvu8Svzis0hOooU0TOGhyf3i7SnVZlt5Y5tK X-Received: by 2002:a05:620a:4143:b0:79f:b72:fb30 with SMTP id af79cd13be357-7a34efc81ebmr1296818185a.59.1722881280588; Mon, 05 Aug 2024 11:08:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722881280; cv=none; d=google.com; s=arc-20160816; b=kcGFxgd71r2jRVQ65A22DaVR6KCz2d8b58tMkGDWM+YpL1fnD4sAOYcSic/bJOFeNz H67FXO6uxUbzn0beDNi4IMzlITTIq+XlB4VfGtizPGkpGdnMrPIIviPzqTrR8rmgASgh 28JPT93oGIGXtAUxIed7cIkVWjxRkyk5aIYXzXmwuDOM6yMohWomzBLcoyhXAFcvzDA5 wWftFme8yiEWBkxpOf64U9NBl0GCsB54XUfDDDExgYGv1MdPVOF9xVusj3/XLSiUKVQY 8wPj2nJsxUSx5UnB57dKbeFoH46tgG/r0LeSuXA+kS9Abe6AFiMH/wU/eejX5QD6W9nA PbFg== 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=tcvWw4VD2EULzwQDC9M8lg6CF9IpMcNlyvAmzky8oRU=; fh=9FIv2ryHyUdV0M0E/xImFOb7ha8RVmpB9WW8IcVSbKs=; b=rv2m1t8fp/yM8OoETVfV0VzFtAdDVV3TldGZx1SmD77zdS0RxCZxls5hTsbM0fapXO nJE8la93V2JQd0CzqU1aIkxNLShBotalggggjqfMrGEMC9uusg1zbwkCTyqCUdZBw2w8 3yYkftjD3tlUPoxMiZZgwnZ5aQ/G0xDDCp8S3H+XH4F1x5s7Re6yv41rvcskzzUFg0n/ FEvxpN+rnh5DucQglQ+Df8off2rh09etxVw9+eUGoCnaGHyUZesZfW0A8UPOU4R8CaND xN8Id5pbv1HYhyXFIxuyzmXa81rw3+g98dU69DKqWoqQm6J6PjlIcZ2gazD8a9cD1lnc tefQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mJwGhNpA; 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-7a34f775b39si1057708885a.479.2024.08.05.11.08.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Aug 2024 11:08: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=mJwGhNpA; 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 1sb26i-0006CN-Sp; Mon, 05 Aug 2024 14:06:56 -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 1sb26h-00065v-8M for qemu-devel@nongnu.org; Mon, 05 Aug 2024 14:06:55 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sb26f-0006OU-IX for qemu-devel@nongnu.org; Mon, 05 Aug 2024 14:06:54 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-36ba3b06186so3035450f8f.2 for ; Mon, 05 Aug 2024 11:06:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722881211; x=1723486011; 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=tcvWw4VD2EULzwQDC9M8lg6CF9IpMcNlyvAmzky8oRU=; b=mJwGhNpA2l5O3pbypFBkVsHPFaVWSMJCviMT7EU2bHEViyP5pOb2BM4Cj7k1aGxCX4 VN13tJ+SdtQfOqZe/M27bYt5G3WJc6XNJSXYzZM+dKJBZe3kLKvP8j8zR4trUA6uCj6z UwYVXop1myjGk0RxFmASWUiBfIgegfNXOgGIO46A6ygpWvbnZD+IL3drDm5ls0ki8PNL OAtI8AK4AVlz0mtGXJT4hXUQcxTazHlnDRfNhn0n9zN/f0/JX3H21Ba/ihDweLgatuGn VfOIfGI4tWkCnzu/9DJ/BplR+KjCLozvHokKoL8oJ7II7/ZAany7NlmAmRwpGHnJF9Id mPCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722881211; x=1723486011; 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=tcvWw4VD2EULzwQDC9M8lg6CF9IpMcNlyvAmzky8oRU=; b=Loh73YOQsvRiryM96b4Rp1E4NIwbJbuIGF7rlaPL2ABbOEJyRgacCjPCTy2O83TKfV 0NC/aYHufb2daDfSEX8ZXqSRqVdpoOwQ2PCuO8STKmiSIBB56GkpKjc4sMqxSqWhvzow QmBLeDACRXtwtoUMA2Ah4TI83Xius+8/CYNRhVQoIPEG3rdDEnS3vkBB5unCDIfBOUlw Vao7cK89v/Gu44fPRyiD4XUsUmUIkHGIsnCudtp8rC2b8CRVMx5++nqIG2vCuo2m0Z/d qHpEpByPxAHRkk2MAFDp08nb3uzqoqa1crk4Pt0NthdhN1mbkDv7k7UANspZbTnmZm+j wVyw== X-Gm-Message-State: AOJu0YwMB0O1R01k9K0c+8fxWXrPKDfM6g4DWC8GfQL3nOjJ5DuEbOd9 bKsnrIcsK5Q1ne8pocEq1TjLgtInO9bXiY5XW79OdRQ/wVWeQfaVyMrlCahXU1m0eS24k5QbD/x r X-Received: by 2002:a5d:4f11:0:b0:368:12ef:92d0 with SMTP id ffacd0b85a97d-36bbc1d2d8emr8952432f8f.51.1722881211600; Mon, 05 Aug 2024 11:06:51 -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 ffacd0b85a97d-36bbd0597a7sm10684615f8f.75.2024.08.05.11.06.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 05 Aug 2024 11:06:51 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Bibo Mao Cc: Song Gao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Jiaxun Yang Subject: [PATCH-for-9.1 v6 04/15] hw/intc/loongson_ipi: Move common definitions to loongson_ipi_common.h Date: Mon, 5 Aug 2024 20:06:11 +0200 Message-ID: <20240805180622.21001-5-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805180622.21001-1-philmd@linaro.org> References: <20240805180622.21001-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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: <20240718133312.10324-8-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