From patchwork Mon Aug 5 18:06:20 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: 816744 Delivered-To: patch@linaro.org Received: by 2002:adf:e00d:0:b0:367:895a:4699 with SMTP id s13csp1469923wrh; Mon, 5 Aug 2024 11:08:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWqOMLaO6PCVNFrQqIOf8vIV/1Oo+4MDS4DwAGBmRbVNQwjWyySQyLhKs3hSp+ysio7FsrOx6z+3ZMT57xL+y6p X-Google-Smtp-Source: AGHT+IEB31HXo26aQIWSXcrgZOTRIUfcjpjybhbCOIRZbFG3Ikc51LDc/BHieiw3eA/GRF9GkUKP X-Received: by 2002:ac8:5787:0:b0:447:f6c7:65ee with SMTP id d75a77b69052e-451845379dfmr245250131cf.10.1722881298663; Mon, 05 Aug 2024 11:08:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722881298; cv=none; d=google.com; s=arc-20160816; b=eZfARLqkBRUKJo2/bzah6Y16r9w/9GGUWYJHnZ4JvhPfiGBsg64pAWlQ9iLJwVu49U aECgNNoxEXsh1s0jxRb3ycSrd3IBliKIi8PRZFJnc2sMIKeIsBN7dSRs45GWybyLmRfd lZ0MrTaBYBsgIJJfbXFHC8c6OKKYaY1+bdVNp5FdFtj0+r3IviD0ATYkiBsqZFUY963p SkAr1pK4t78xbQQ5XVpO1/dyDRMQt8gHb/RqbJ2sg6NZy+KHhu4RVdBmEHoWCGOBEkbU cKKx93dGv8AZ4Wj7wXbLDvf8Ck+d5SVhUZ/qoA2/26AIoNr6L9kDTx6hf1szhcShTHRt 4EqQ== 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=T9ejfrRNicFtIaOENDLOGRJ84CHVlCyZuuz175O5yxE=; fh=9FIv2ryHyUdV0M0E/xImFOb7ha8RVmpB9WW8IcVSbKs=; b=uu3q5A4HCfAUrXEV7+bZ9FlfPuPrmHHv4RlS4/QYlnAGvR6JsPrDiQfmpEF7JKXswJ Zwhk7tuDJuzrP+CnNLeWZak7nwK4SYXU48N6VvTmn6//u8d9fx+rgyHXG1wGMwgld8PA RcGtnD/L+XUVqYs064wbXrLeEzNAeWAdGU3LAwnfXXTNGxCXjoG273MwXYuuL5DcFtbB pnX6CaQ83TVvJGQ8ouBrRApuS0awKIWdc6MmXQrWwbg7S1ZmlBfbEwxl3FN55UuDs+Wl C2C2fghcuqVvn8usJ1lhnlWu555lwzqczvRJ8JXmMM42DUzhfQf6+YNk7IyurUx0plfG +kjg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FOOgRTiq; 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-4518a7631f3si110513021cf.257.2024.08.05.11.08.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Aug 2024 11:08:18 -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=FOOgRTiq; 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 1sb27e-0003GQ-3B; Mon, 05 Aug 2024 14:07: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 1sb27c-00037r-OT for qemu-devel@nongnu.org; Mon, 05 Aug 2024 14:07:52 -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 1sb27a-0006Sp-TH for qemu-devel@nongnu.org; Mon, 05 Aug 2024 14:07:52 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4280bbdad3dso73350655e9.0 for ; Mon, 05 Aug 2024 11:07:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722881269; x=1723486069; 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=T9ejfrRNicFtIaOENDLOGRJ84CHVlCyZuuz175O5yxE=; b=FOOgRTiqtxXRGpRrNyYDJR3bj/Jeq3V3VAbZL/wfWdmpilIz3k2IDHfsgTjyttCzvg ltSLXNZEjn2rlUYRG4Xrg79HjeDEjKnIZ/c10aJ5SwGFiBQ8WSadjiXyG2kZYukSxFig SBNgjbzJoClXQ5O+OaJdhX8sCRP5YO2LW/u85u5/eEzToOGQll4Yj1s/2WqQVTXSAvve TIdCR0Kfak5pa1kEkLVUitrYOhRh+2blRj2dn3/ZLizxvXrq+d9ql08gDy+hZLQ8TiUY 4b6Zoi/EdILsmWv+UFx6FwcdQCCUu+2hv9sfZrYlLBL/vfg87deWKW5RyV0JDHp3N9rX gPTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722881269; x=1723486069; 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=T9ejfrRNicFtIaOENDLOGRJ84CHVlCyZuuz175O5yxE=; b=rSl7Ok9cVSStM3iahOUgHPEi63frtXLZt11gYFWZ5mJ+5CIKWTcwFAIwnkrFnNluCb Wg5Hp4QOAUV5C2xYwUp64yjrYI6mkTJzB56O7igoLKDVqj7n05DMXIPE3yLepGkcNEZi KE7/bO83lrW4SNECC4M1dPPGxjJ6IY4wz7JIKASA5uCAvOYuanEFygn6/zH8tSU1NxOu 5eivMQ4mF+WonrXKhARRmSOoHrB5LXyEdwOZi44WaiR9vfVgYMUX0Hw/v0RBEEFzJHi5 51bZa900wIGiRoQOmsJAyPD9dnsaUZwT3wsa7PjcxkQ4qUqaxQr+4ZPttK7mWVBMxh89 2xOA== X-Gm-Message-State: AOJu0YyaeuJt/kObqbNa2V/yspjNYRgj1obPqeGsjtEgG5AG6yd3Yt8T LjvJzRWBaJoYR+yq0A5R/8qEf+fZW96hXPtl0qrcU9WD4xrn+WzjC8nYtReVS09tsrfptUv0rpY q X-Received: by 2002:a05:600c:3544:b0:421:7aa1:435 with SMTP id 5b1f17b1804b1-428e6b81cbamr73972275e9.25.1722881268980; Mon, 05 Aug 2024 11:07:48 -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-4282bb63f16sm208353415e9.33.2024.08.05.11.07.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 05 Aug 2024 11:07:48 -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 13/15] hw/loongarch/virt: Replace Loongson IPI with LoongArch IPI Date: Mon, 5 Aug 2024 20:06:20 +0200 Message-ID: <20240805180622.21001-14-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 Loongarch IPI inherits from class LoongsonIPICommonClass, and it only contains Loongarch 3A5000 virt machine specific interfaces, rather than mix different machine implementations together. Signed-off-by: Bibo Mao [PMD: Rebased] 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-17-philmd@linaro.org> --- include/hw/loongarch/virt.h | 1 - hw/loongarch/virt.c | 4 ++-- hw/loongarch/Kconfig | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/hw/loongarch/virt.h b/include/hw/loongarch/virt.h index 603c1cebdb..c373e48f27 100644 --- a/include/hw/loongarch/virt.h +++ b/include/hw/loongarch/virt.h @@ -11,7 +11,6 @@ #include "target/loongarch/cpu.h" #include "hw/boards.h" #include "qemu/queue.h" -#include "hw/intc/loongson_ipi.h" #include "hw/block/flash.h" #include "hw/loongarch/boot.h" diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index e592b1b6b7..29040422aa 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -23,7 +23,7 @@ #include "net/net.h" #include "hw/loader.h" #include "elf.h" -#include "hw/intc/loongson_ipi.h" +#include "hw/intc/loongarch_ipi.h" #include "hw/intc/loongarch_extioi.h" #include "hw/intc/loongarch_pch_pic.h" #include "hw/intc/loongarch_pch_msi.h" @@ -788,7 +788,7 @@ static void virt_irq_init(LoongArchVirtMachineState *lvms) */ /* Create IPI device */ - ipi = qdev_new(TYPE_LOONGSON_IPI); + ipi = qdev_new(TYPE_LOONGARCH_IPI); qdev_prop_set_uint32(ipi, "num-cpu", ms->smp.cpus); sysbus_realize_and_unref(SYS_BUS_DEVICE(ipi), &error_fatal); diff --git a/hw/loongarch/Kconfig b/hw/loongarch/Kconfig index 89be737726..0de713a439 100644 --- a/hw/loongarch/Kconfig +++ b/hw/loongarch/Kconfig @@ -12,7 +12,7 @@ config LOONGARCH_VIRT select SERIAL select VIRTIO_PCI select PLATFORM_BUS - select LOONGSON_IPI + select LOONGARCH_IPI select LOONGARCH_PCH_PIC select LOONGARCH_PCH_MSI select LOONGARCH_EXTIOI