From patchwork Wed Jul 17 21:46:51 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: 813007 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp16313wro; Wed, 17 Jul 2024 14:47:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWCLjtodsuXXYwp29SNoHFGtERp5j/1itnzTr+D7ElnDkGHSSnn2Oxp4WujHpvdrLMoiu6khXWFU91u4ksV4Hwy X-Google-Smtp-Source: AGHT+IFH3SE38KM+Cw7Qgv/mO+CEHZTSIXbTp3HVUJku6hK4HmZ9Wa8PnVGPMS35XBx3Rv0VeXct X-Received: by 2002:a37:e111:0:b0:797:84f9:cb38 with SMTP id af79cd13be357-7a18da6a006mr176211585a.11.1721252864865; Wed, 17 Jul 2024 14:47:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721252864; cv=none; d=google.com; s=arc-20160816; b=yItE3nJa8MUG89DFbdfCM2Qa8uYtsEvrsYzXir1qRHfxXSUHh7+VUfdQ3e4VUpBQYg ivOYs0OdAfG6rqZ6utqcq9px9kdXsel8cYO58iYykgrPV3TZVS7OedFNEYFzrAqjtqJJ NTYamIUmU0cVuUaO5Urj0WG+ZMNXuva9jowaBM/2LQx68VftRTw0U4lrm8fIwXQLOM8x DeSvCBIudwMh1FWlJGaIG/4mEo2nYG9abxlBEPgAjXJVKLN/ebYN52h1je72I/7iSslD Ivcj9oM2ldTIlqclyV97XzcjRtGjhE75ii77EaF8eAog4rslebvFsCwcAAUB/WdN465g 0uGw== 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=+f/KVJUEDho/j4I/Tg6zeoQ3B9CtIz8Yu6yDHAPIQgo=; fh=22BXgYj7s1E7dHNYAQe1VEC9HP+BgPxhM5rRp+ywoT8=; b=bDKrZoZRQZwXjhG2mBtbfnlinAZJK+dMIXSr0/Bx6prDO2nAnO5l1hwxwC7hhTce8x 354yavW0+LV7CO7h+bHGvWvTdis5H6rHI4odsmzcmmYaUBfc4niWXWu5aLHpxfkzpjww Tt6hDOEuNEtRnIZYX5mmZ6e/9/GXOz6gumPUK0MtHH0jHFX4yNb80Q4a62K1NKt/PQ8s rs3wCtJCpvVIFt+OSx/I0pZHSYPJQOknbzT8be02ESrVBv4pVpG78a/HoOvzLYn9Ootf 7y8Doa246VJ9iyFXL084uMcX5IbbVXFtf9S3vdiUOK68UHy9lWmzoxpQ5EVEQ7FOfp8i IW9Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XmkpUwLi; 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-7a160c918acsi1061234385a.775.2024.07.17.14.47.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jul 2024 14:47:44 -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=XmkpUwLi; 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 1sUCUZ-0006pA-Fw; Wed, 17 Jul 2024 17:47:19 -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 1sUCUX-0006of-Rw for qemu-devel@nongnu.org; Wed, 17 Jul 2024 17:47:17 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUCUV-0001rP-R1 for qemu-devel@nongnu.org; Wed, 17 Jul 2024 17:47:17 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4279c10a40eso947915e9.3 for ; Wed, 17 Jul 2024 14:47:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721252834; x=1721857634; 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=+f/KVJUEDho/j4I/Tg6zeoQ3B9CtIz8Yu6yDHAPIQgo=; b=XmkpUwLiYx804ma73DIRqesiS1cxwXZZOz5bh/p2V2/Hky8XMN6ge7jKWW5YFMegWr jzZBckQrN+wzPGaPR9mDngMy1GCh/f42GIKkYbvVdregOm2jApD8AElRj2J3gL5bpl9u JFB/07/6B/pwdpRlmq9S3ixNKY3PRbCfe1kUPLDiGMPfDEaurB5d3+2YJyxf/fUU6XM/ rnKEkqoBA8gAbOSIaEc1rBNnXDBoEBP7RZ39lRddFgUse+MaIkWV20lX9NDIyBJxGubr CCp08x+tdIAlu+3u+MDgiIlm0x115oRm9lLw1kgNoFQn22xbNLAw0WgSnWs+SwhT6tv1 kITg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721252834; x=1721857634; 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=+f/KVJUEDho/j4I/Tg6zeoQ3B9CtIz8Yu6yDHAPIQgo=; b=qPucgzTFXXS+SEBRchpfv08KInV0xu5BA8K1smxFUqYHysnOAKBIPHwhjG18chxr6e kRaUObt0JrtgyTWbcBst4NPGZYEM4q/4P4vEDeDbgd5VOeEi+doHp13M/r+dPaMEqAQN 3QYjTiHNjlD/+y5z0OSsgIDA8PpmB0OkJT5N9TbnWDlsZBWsp87XVcxkgY8Iq6SzAyVT NulsVajM06Ya9dDwAU7kLKpFYB7MEneV0uzIbthcJYyRfDOJmH/bKFFnBC2OJpswtPF7 elAspW8v1x0LllitbiZ1S+Lms85+U+P1GUDKYr2TI4+6Y1d2KNnTIrODIk7l948NDxEZ y0pA== X-Forwarded-Encrypted: i=1; AJvYcCW+8ntB+OmeWyAN7Uo7CtejDGDPGytbNfLYYc+GDxg9aSAegECbvIICTwb12Enm70ChN8L/IstL8lsrTBdeqr8DSayi1HE= X-Gm-Message-State: AOJu0YzMFXcn7LhgumRLjAMzL5Ct7cnPAOKYOVOBRufZI1ZzIGSMPr5P OJQ78j61Dpqye3f7k1LbGkRRQo0LQzPb2ApzDTdBYnwZm3EqdOQoHH4BuSpASEo= X-Received: by 2002:a05:600c:1d18:b0:426:62c5:4741 with SMTP id 5b1f17b1804b1-427c2c99bfbmr21268055e9.2.1721252833429; Wed, 17 Jul 2024 14:47:13 -0700 (PDT) Received: from localhost.localdomain ([176.187.208.21]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427c77e52c7sm11591905e9.24.2024.07.17.14.47.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Jul 2024 14:47:13 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Bibo Mao , Jiaxun Yang , qemu-devel@nongnu.org Cc: Xianglai Li , Paolo Bonzini , Huacai Chen , Xiaojuan Yang , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Song Gao Subject: [PATCH v3 00/17] Reconstruct loongson ipi driver Date: Wed, 17 Jul 2024 23:46:51 +0200 Message-ID: <20240717214708.78403-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::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 Hi, this is a respin of Bibo v2 [*] splitting the patches in atomic/trivial changes as I was taking notes reviewing it. I suppose I shoudn't have done that way and asked Bibo to do it, but I felt responsible for merging Jiaxun series and soft freeze is urging. Patch descriptions are expected to be self-explicit. I'm getting sick so I'll defer to Bibo & Jiaxun to follow up. I only build-tested so far, not run any guest code... Regards, Phil. [*] https://lore.kernel.org/qemu-devel/20240704033802.3838618-1-maobibo@loongson.cn/ 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é (1): hw/intc/loongson_ipi: Remove unused headers 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 | 71 ++++++ hw/intc/loongson_ipi.c | 338 ++----------------------- hw/intc/loongson_ipi_common.c | 347 ++++++++++++++++++++++++++ hw/loongarch/virt.c | 4 +- hw/intc/Kconfig | 8 + hw/intc/meson.build | 2 + hw/loongarch/Kconfig | 2 +- 11 files changed, 563 insertions(+), 357 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