From patchwork Thu Jul 18 08:38:24 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: 813141 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp188855wro; Thu, 18 Jul 2024 01:40:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWJsr7DfiQRghx8y2DOdemU5CN+aWVkHx2qHhVl4GmeuYLdU+pB3JuDXhMWiQtXnRHRpwyqjIjYfnLKvIn9WG1f X-Google-Smtp-Source: AGHT+IH9iOTiJzEKtxUv4f9O2IwttTpt2rbjXcetNr5XPBn+gVkiaNUV8CIseEB34UMc+dWA/j3r X-Received: by 2002:a05:620a:3951:b0:79c:fbf:6381 with SMTP id af79cd13be357-7a193990ab2mr10415785a.70.1721292052455; Thu, 18 Jul 2024 01:40:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721292052; cv=none; d=google.com; s=arc-20160816; b=NQkbcZQSyRzBJzKE4trOti3+L3u72BXGEzhBu02gWVt7c0VXIrZhMVmup+raPmYlTt rbL3VOnnKV37eNRS9f2Q3wxdzhF8YGhsJxbZugQvep8PRzz7N6jZYZMzlVgVPu7Otcxm sf2E7XyVK1E/0+K79s6nZ4IZ1P2sfGui2Z44T3tXGhydYb5SBYmJ0jfpkpHqyImL+ZHT UHlsBGShbJogxg7OhRegkEwdF2MkyZ1a79Kn2hD1R2/MNQMEmGe28GAgOIZgGj0/1m1S nE8yXdr0lyPcw21kV+GsE6GEYkECe7ll0RzAMbGwyu6vebaVmGoGq7yuRjB2uNHSxZ7k 4xDw== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=NZhVPPESYyOA2ZSzQn5rT4TavGDsoy7sQe+a6ueTJ9I=; fh=NLZWUfvz+g+MnoIWE6nGov3chqHrPo6wetxAC/CDqtI=; b=POjFgnYP3rf/lHBlQeLuQ4B1gLv8IrWoflm1bSQMI29/rgbg6Qg8B6yYFc5z/Y2sB8 PIsJ6QtFvkGUFEd3iIi8fiPXX+M+t8kXdz9RJPbEIP9G7Zvb70T0Ro6219ULTo5ewfm7 2D1lyPxKulL4BTIEdKYXfYjjypp3/Aol49h4P4j2k9Lg4YYZk7Ep4bTEj4FrJRDURaQb j2oNj0yTy8pVbuciL0rC3qCIXB0UTdWZXoDGbp9CCQXt7jL7fURmXcBVof2Lyo+iPxWh JRYHk/gPU+fmwtBkZ/XQifxV8ch1SkDOjDvu5/bCgYtPGMfnO8YLNGsRutGU6SKY5ZTY OkjQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bKw3Vvn9; 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-7a19398d9c8si7996185a.417.2024.07.18.01.40.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 01:40:52 -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=bKw3Vvn9; 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 1sUMf8-0000xE-Ae; Thu, 18 Jul 2024 04:38:54 -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 1sUMf5-0000nr-V2 for qemu-devel@nongnu.org; Thu, 18 Jul 2024 04:38:52 -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 1sUMf4-0004fo-4x for qemu-devel@nongnu.org; Thu, 18 Jul 2024 04:38:51 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-52ea2ce7abaso113950e87.0 for ; Thu, 18 Jul 2024 01:38:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721291927; x=1721896727; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=NZhVPPESYyOA2ZSzQn5rT4TavGDsoy7sQe+a6ueTJ9I=; b=bKw3Vvn9ClqdxpNMMHtLC3wmceKLswlluVxeaEMrn2a0/OpjlZOumKT0SN5tDYWbd7 lzw3YnYBZvYQHZIahWb/vlbu0NGXEws+qmq0HDVzILZseiz29MRZlC+qHB4L1ZcBeJdu 4S4EzfuaiUvKBVpSioFsBZDbP4fXhGk8Qo6UjFOBe+vTUFcvbUC5TBpL96Y74jjOzKgD Whe+Emc48JLeC/lsAcIe2NjIVE5aIMhIQnGRPPpLAiWlfVSIPelzO8XeiEsWqgFKINYG 6xNeLO0Ji/AGXvhj7VtWBnuucEHQqkPYec4SV/UAH4Sa90oownROg9F5F73xj0WTuZFI Zs+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721291927; x=1721896727; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NZhVPPESYyOA2ZSzQn5rT4TavGDsoy7sQe+a6ueTJ9I=; b=twSP2mcewqEMZqoHuo1ZlQVIW1WXpQOzJTc3RRLVqFFchdvAFKQ2aurZgGZ7SgJkBB ltly58RoU93QDIHuidMT0urEsJMWZi5JrWv4T9Z0q3RigtFNRDbQds1pzzcEdI56F0Tx igBZ2Bw3lhTVGjXqQShCsKZCGB2JGnZW9Gevm2D0ZsH13PXLekcOiyaV90zYJYMbB3vv 1oYkBkN1TKeeUGDLzna16a5bY8Q4gsVyu+v7GqDftxUbilt0tkp4qB+H+JBgbwyo3xsE PS9HcUoYp/6KrwZOQJmsi97qlO4QqTpI1VuUCHWr1kfaZI6CFxmChgO0Gj+21EPQigM2 Inzw== X-Gm-Message-State: AOJu0YzK0OXRVV1Pn+Tc82u6ADYEa+1UrZGjVjf0/NDfgXwszteuIqJI +zxQMQTCDDEPKGNQ33Sh1BAvtZ3ov9zxxev10EqZ6xjWyj9GpscsYQQGdGJ539APY3bqPTVDcN7 KscY= X-Received: by 2002:a05:6512:3b92:b0:52e:7f09:aaae with SMTP id 2adb3069b0e04-52ee53c50e8mr3728974e87.27.1721291927422; Thu, 18 Jul 2024 01:38:47 -0700 (PDT) Received: from localhost.localdomain ([176.187.208.21]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427d2b136absm1440335e9.2.2024.07.18.01.38.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 18 Jul 2024 01:38:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Bibo Mao , Jiaxun Yang Cc: Song Gao , Xianglai Li , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Xiaojuan Yang , Paolo Bonzini Subject: [PATCH v4 00/18] Reconstruct loongson ipi driver Date: Thu, 18 Jul 2024 10:38:24 +0200 Message-ID: <20240718083842.81199-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 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 Since v3: - Use DEFINE_TYPES() macro (unreviewed patch #1) - Update MAINTAINERS - Added Bibo's tags Song, since Bibo reviewed/tested, if you provide your Acked-by I can queue that to my next hw-misc PR (pending Jiaxun testing). Thanks, Phil. Bibo Mao (16): hw/intc/loongson_ipi: Access memory in little endian hw/intc/loongson_ipi: Rename LoongsonIPI -> LoongsonIPIState hw/intc/loongson_ipi: Extract loongson_ipi_common_finalize() hw/intc/loongson_ipi: Extract loongson_ipi_common_realize() hw/intc/loongson_ipi: Add TYPE_LOONGSON_IPI_COMMON stub hw/intc/loongson_ipi: Move common definitions to loongson_ipi_common.h hw/intc/loongson_ipi: Move IPICore::mmio_mem to LoongsonIPIState hw/intc/loongson_ipi: Move IPICore structure to loongson_ipi_common.h hw/intc/loongson_ipi: Pass LoongsonIPICommonState to send_ipi_data() hw/intc/loongson_ipi: Add LoongsonIPICommonClass::get_iocsr_as handler hw/intc/loongson_ipi: Add LoongsonIPICommonClass::cpu_by_arch_id handler hw/intc/loongson_ipi: Expose loongson_ipi_core_read/write helpers hw/intc/loongson_ipi: Move common code to loongson_ipi_common.c hw/intc/loongarch_ipi: Add loongarch IPI support hw/loongarch/virt: Replace loongson IPI with loongarch IPI hw/intc/loongson_ipi: Restrict to MIPS Philippe Mathieu-Daudé (2): hw/intc/loongson_ipi: Declare QOM types using DEFINE_TYPES() macro hw/intc/loongson_ipi: Remove unused headers MAINTAINERS | 6 +- include/hw/intc/loongarch_ipi.h | 25 ++ include/hw/intc/loongson_ipi.h | 50 +--- include/hw/intc/loongson_ipi_common.h | 72 ++++++ include/hw/loongarch/virt.h | 1 - hw/intc/loongarch_ipi.c | 68 +++++ hw/intc/loongson_ipi.c | 355 +++----------------------- hw/intc/loongson_ipi_common.c | 344 +++++++++++++++++++++++++ hw/loongarch/virt.c | 4 +- hw/intc/Kconfig | 8 + hw/intc/meson.build | 2 + hw/loongarch/Kconfig | 2 +- 12 files changed, 568 insertions(+), 369 deletions(-) create mode 100644 include/hw/intc/loongarch_ipi.h create mode 100644 include/hw/intc/loongson_ipi_common.h create mode 100644 hw/intc/loongarch_ipi.c create mode 100644 hw/intc/loongson_ipi_common.c Acked-by: Song Gao