From patchwork Tue Aug 6 12:51:38 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: 817037 Delivered-To: patch@linaro.org Received: by 2002:adf:e00d:0:b0:367:895a:4699 with SMTP id s13csp1782706wrh; Tue, 6 Aug 2024 05:53:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWcPpv8yy0NI8On1ZYUggjQR2c8zkwKoxLdYEYQp2L5t4hNdvD8tPGqTxi1GGgJm9OCqamuxMh9mVA7yEQQoeAK X-Google-Smtp-Source: AGHT+IGk8MWqTBzAviHVzqCD7ZQcESEtzlPOqeGmf5+r1gh+GXnA7ExP1PMXXkh0QEW/zdS0asE8 X-Received: by 2002:a0d:e484:0:b0:648:baba:542f with SMTP id 00721157ae682-6895964bb05mr166816367b3.0.1722948816049; Tue, 06 Aug 2024 05:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722948816; cv=none; d=google.com; s=arc-20160816; b=qOqhZLckd1fAVjzixei3khbOMvp2U9oSUUOrkY1PO7XGlsnZx8iPi8PIFuIGgKuLFE WH10/aN70TO45ut30e3xtwUVcBvyI5oisktZCPWzf6n+54+oCKUQ3z1TM1WIB1GwWvKr 3AHqcVwC59bxn8CCJF9wMuwEdHO/1Q3CPMiEPB/m/Aiz5vrxs2YJM7xufKfB3DZ9lm2u ZECnbHRIicq66qBUh+9m31HZ8pfOzGcbWZq5Xsdfw4AhmuFamBNo6oa8Z8bhLTkTrcFi SgZCQ2J6JBfEVllyBB2UrIFepWug2qEpCwu0txyVrykQC948Al9hBih8VfvGK3wYAKA0 p3CA== 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=H8NieMjgzSjcem4/AV1PLU7Mhw3Kp6Q+yVzJJ4ns9BM=; fh=rxGWTSOrq9MmYE4+hMcV/u38d68oc92wX5eFok0A+84=; b=W3PLJNmGwvWJTwHFNV2Ioq8AzF30amUYjVItNGIWl99SICgmCNGstQfqzxEOTcmzyK 7Yja16J8KiUpPYCuuBFTFts4NT2V7FLvQGsVMlZTZJJusFT/FRm59MqE2Q9DRHM7G2X9 ha6ddg/BaxrAkTGyTq97S4m7T0h1OP0cQjF6z/Dhtf+uOcUdN8gZWatiS+sjD0iNpbwp g05lVX0PibA+kqYDP2MEmQI+O8ue4Cngrv8jOqAot7h8agK9Ztet9X6dPYJ/oxo9Jq+b So1byD8AMWEKON4iZPw/2aGkpkEjoXNQ0pPPw+n+iAPC7OurumknISef6gsjuhoCMTQr CG3A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vVMVw1PF; 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-4518a779addsi118870081cf.397.2024.08.06.05.53.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Aug 2024 05:53:36 -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=vVMVw1PF; 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 1sbJgr-0001o0-Gt; Tue, 06 Aug 2024 08:53:25 -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 1sbJgb-0000a2-4l for qemu-devel@nongnu.org; Tue, 06 Aug 2024 08:53:10 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbJgY-0008Tj-6E for qemu-devel@nongnu.org; Tue, 06 Aug 2024 08:53:08 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-52efa9500e0so769487e87.3 for ; Tue, 06 Aug 2024 05:53:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722948782; x=1723553582; 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=H8NieMjgzSjcem4/AV1PLU7Mhw3Kp6Q+yVzJJ4ns9BM=; b=vVMVw1PF5DwGxB5+jtlJXwZyyqYZ45qkqK5SEA3nmWLp8ggU/A07PTsiKQqzq1PVC8 mMbfpIUQU/7AQ1gBz4wD3jrGbNWdQkyLZq2Jm8V2kVwHco5QldxtWQnHfxvnIh7z/aCA yHq9l+hvnOHbl3zx0Y1UEQvo2ya0MwWSEXh3/4Ae7wKobf00opvOYVHj/HdF/uCUR8Ul f1E+jVFb5gD8a2sZBti80BRY7b1vsIIClFk5DDnVbsXxQooUut51s5NTjOJVAH02nCe4 U2Wdy95ib01MmIBvVZb0MvD28ZtahdX8+ysqqvDKdTUCQkYYwRIyoZ/8a9lP9WVi5QuM 9I1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722948782; x=1723553582; 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=H8NieMjgzSjcem4/AV1PLU7Mhw3Kp6Q+yVzJJ4ns9BM=; b=V3eKxIPdci2SmKO6ngCLRePBsPPh5vnpIqgh1iO4vPo54EwwOH9GHvrkkoIJi/xEY+ QJ2s+w8Z0haKB/0smKPSCWXOg13RoTTKPcZnVXIq0zohafJUbZkl1OjcectpTdGrb0ML kv9mF49HeKvyFioTOxlQgzhGBnsXJjGaZQqtJ1TYWM0X+hEEJ3kFGN6GwSYQjXk4x8ZP YYhlo5wqBmrhTZLua4CE0Q3lCJqa1tzknJHn1vyJmsuKen1JJk+Itb/wv40tPzKJFc+Y wAJfWaqIS77L6DVwq7oNgm/y7ouXAov55YeD1yM9chga9p4KCJNTAbB9jGMlZXDStwVS fY1w== X-Gm-Message-State: AOJu0YyuyB6/Hasz3CIt1Kby5paL0V/5EA8lG9Ux9A20suOBGSRkOhAB VkhAecFXT2FD7SgzTU8Tz+q3pBHgHBU8CsOXL5h/u5gajzy7ionSOg5tStSTNwuP8BnZrjtGb7O c X-Received: by 2002:a05:6512:3ca5:b0:52c:de3a:839f with SMTP id 2adb3069b0e04-530bb36f2afmr8602574e87.20.1722948782411; Tue, 06 Aug 2024 05:53:02 -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-a7dc9c61575sm546609166b.92.2024.08.06.05.53.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 06 Aug 2024 05:53:01 -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 10/28] hw/intc/loongson_ipi: Expose loongson_ipi_core_read/write helpers Date: Tue, 6 Aug 2024 14:51:38 +0200 Message-ID: <20240806125157.91185-11-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::133; envelope-from=philmd@linaro.org; helo=mail-lf1-x133.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: <20240805180622.21001-11-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;