From patchwork Mon Aug 5 18:06:17 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: 816749 Delivered-To: patch@linaro.org Received: by 2002:adf:e00d:0:b0:367:895a:4699 with SMTP id s13csp1469987wrh; Mon, 5 Aug 2024 11:08:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVQU9Bbg8qwcrOE2/a1V5M+Qq/aa/PLreijh0pfHrrGaa8c1R444K83ZE3MI0AZ7xaOaGQJFLbsySi3WyjmtIw3 X-Google-Smtp-Source: AGHT+IGjjqWTH7O7vjrlEcgYOwvOTb9WdgzYY41pnae1AXYzxTETJeiBCyD7UMzHHuDURuQV4dMf X-Received: by 2002:a05:622a:341:b0:441:3bf6:d5cb with SMTP id d75a77b69052e-451892766ecmr150450811cf.6.1722881306410; Mon, 05 Aug 2024 11:08:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722881306; cv=none; d=google.com; s=arc-20160816; b=oK7lqIB3qfZVxRkG48F2qxfSuD06QGCm4Qv+Jd7opEutq5JG1+C7iyiRYGW+OV7K+B YYFd/i4z2AVNZhRp5h0QwYaMogMRFq/t5xpnnD2pIdT6308y2Oe8TR2EiRxG68Lf7p8n xZAxZbkQaP4001uBk+RulTly0roeb7hfAihSPWbHJ6i2q8Mr37U418I2bGe784ROoorq vy7ZdIGkuy8qr3qgHKLUHmII+pHfzsuxbbQlYEoyb4r+y5sKq5fXMxYXJO6q9Hq/4VXV /eC3MurX3gYjCgngpY7eqZ56GCRcvPr82Zjt0sQs3rM9hNzKFDh4kbrS323o6la0Skxv xThA== 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=gYMjdBet7Yoml5axNQCgjfc0S4lBa+FajRuNH3b5IpI=; fh=9FIv2ryHyUdV0M0E/xImFOb7ha8RVmpB9WW8IcVSbKs=; b=tADCfyT6idC2lwV3h0uJHJp7ZoQE/F8ypOGUyLp/7ZuPOYCi+lkJ+CCofAlR/UsAs5 k3RHOcnoE/qFkX2zzFocGdCc8BaRu67lygPYlAv6htUR2O4gFcXoJQGBgfA5sLAVmpeF Wwd8/XTJZW464SRyF5+BOctoSWadG0oRk38b0QlojDC3lMXP2jF+0nKXQbs70r8f7UjQ ZM34ldY2ZSjma2urCRSx/A5ERXOnGBweEOSRYaY6xXnNchxYxF45eYLdH2YLes6ff3tG nv+/Dh0gO3AVtfFNIHt6w/OKDX1LlF8GGI4P38Qx3fQGv9DZqIVLi0YR1xEpaQc9O8SM dZzQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KQDvBtnP; 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-4518a762708si94765521cf.375.2024.08.05.11.08.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Aug 2024 11:08:26 -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=KQDvBtnP; 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 1sb27L-0001JA-7a; Mon, 05 Aug 2024 14:07:35 -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 1sb27K-0001F9-2A for qemu-devel@nongnu.org; Mon, 05 Aug 2024 14:07:34 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sb27H-0006QZ-W4 for qemu-devel@nongnu.org; Mon, 05 Aug 2024 14:07:33 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-428085a3ad1so75676485e9.1 for ; Mon, 05 Aug 2024 11:07:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722881250; x=1723486050; 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=gYMjdBet7Yoml5axNQCgjfc0S4lBa+FajRuNH3b5IpI=; b=KQDvBtnPnZRFgE+feZpLHPBY17UPbzeabHuyKljZYfldxYWZByuJdWUa3Kwtk9pwZz to4aizFDZXbY0As6K1vM9w7larkYHHJEZeR2hwRfCMTNdtNDmBSzSYWvVkgNxpt39r6J N5w1fu/WRj4fXqcZPrySXGWaa+BHsT+0c+dHvxSWFKSxc9MyunvHKhYGdEBzovYWaQK7 Y+HCHLbxp7AKukSNvBLCY4ImxtiZjQ+22DH+NBuzoPKdHCb24RpiTD8pO2J/tvAxLOVM Zs9tuFv3bSiFBGc3vuOR+XrZRvLRM/5cHCtuw+FkigglY13zCJr21WqvMvL/O7cyvayB UvlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722881250; x=1723486050; 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=gYMjdBet7Yoml5axNQCgjfc0S4lBa+FajRuNH3b5IpI=; b=TdMCC08MAErMBIS5Ie4MNMYZIaWom1hRdc75PltNTzPYK25pPVLV5+Jcu0Thqvc+nu ZDKGdY09G78WOyEoVizmVravxtOyenh0RKqb/l40kXV/KJX9O6DWFTYQV9Khte2aiTEc R3H5DwvAjBS5Z4LDprWeEpyOeg4Der7T1T3otEV94he0Iduuh0NU1JgsNeCiG13tTkSH z8V9MU7TwXgQw8r/mHBDH+BiJ0Vg0/JB+w/Z2+BCWfRfv9GqFiuzlIQDHoAi5myOcjjL OGFCrp/ElXZ/An4QiBJ8yWJjvSw4FrqZtlV8RVqHzGZfKm/ZIGwJQDGEQMEW3fdB7a3E QjyA== X-Gm-Message-State: AOJu0YyeT1ceQPaWVQCnKpM/cCVrlx6JCQ6qOb9eR7sTkiFCMkdWj3Ti eCkAajqpgzU0vyJpm8x8faZhiaTzDax972zp+LBhRO6kBs6LMJykBfZpkNCDiDwfbDXFYkCN+2V O X-Received: by 2002:a05:600c:5393:b0:428:1090:cfd4 with SMTP id 5b1f17b1804b1-428e6b83437mr81893475e9.33.1722881249959; Mon, 05 Aug 2024 11:07:29 -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 5b1f17b1804b1-4282bb64b84sm208585055e9.32.2024.08.05.11.07.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 05 Aug 2024 11:07:29 -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 10/15] hw/intc/loongson_ipi: Expose loongson_ipi_core_read/write helpers Date: Mon, 5 Aug 2024 20:06:17 +0200 Message-ID: <20240805180622.21001-11-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::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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 order to access loongson_ipi_core_read/write helpers from loongson_ipi_common.c in the next commit, make their prototype declaration public. 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-14-philmd@linaro.org> --- include/hw/intc/loongson_ipi_common.h | 6 ++++++ hw/intc/loongson_ipi.c | 10 ++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/hw/intc/loongson_ipi_common.h b/include/hw/intc/loongson_ipi_common.h index 8997676f0d..65f8ef7957 100644 --- a/include/hw/intc/loongson_ipi_common.h +++ b/include/hw/intc/loongson_ipi_common.h @@ -10,6 +10,7 @@ #include "qom/object.h" #include "hw/sysbus.h" +#include "exec/memattrs.h" #define IPI_MBX_NUM 4 @@ -44,6 +45,11 @@ struct LoongsonIPICommonClass { CPUState *(*cpu_by_arch_id)(int64_t id); }; +MemTxResult loongson_ipi_core_readl(void *opaque, hwaddr addr, uint64_t *data, + unsigned size, MemTxAttrs attrs); +MemTxResult loongson_ipi_core_writel(void *opaque, hwaddr addr, uint64_t val, + unsigned size, MemTxAttrs attrs); + /* Mainy used by iocsr read and write */ #define SMP_IPI_MAILBOX 0x1000ULL diff --git a/hw/intc/loongson_ipi.c b/hw/intc/loongson_ipi.c index 4a8e743528..c13cb5a1d2 100644 --- a/hw/intc/loongson_ipi.c +++ b/hw/intc/loongson_ipi.c @@ -24,9 +24,8 @@ #endif #include "trace.h" -static MemTxResult loongson_ipi_core_readl(void *opaque, hwaddr addr, - uint64_t *data, - unsigned size, MemTxAttrs attrs) +MemTxResult loongson_ipi_core_readl(void *opaque, hwaddr addr, uint64_t *data, + unsigned size, MemTxAttrs attrs) { IPICore *s = opaque; uint64_t ret = 0; @@ -165,9 +164,8 @@ static MemTxResult any_send(LoongsonIPICommonState *ipi, return send_ipi_data(ipi, cs, val, addr, attrs); } -static MemTxResult loongson_ipi_core_writel(void *opaque, hwaddr addr, - uint64_t val, unsigned size, - MemTxAttrs attrs) +MemTxResult loongson_ipi_core_writel(void *opaque, hwaddr addr, uint64_t val, + unsigned size, MemTxAttrs attrs) { IPICore *s = opaque; LoongsonIPICommonState *ipi = s->ipi;