From patchwork Wed Jul 17 21:47:06 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: 813019 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp16911wro; Wed, 17 Jul 2024 14:49:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCViOJAgM1LUGUVskNpqDlbmQP1+o08NeaAnOa0Y8OOrzeDgODrdPq8gfMYCtqjetydzTb13rqB9l++EhO9RBK1V X-Google-Smtp-Source: AGHT+IEuGkb/MBm5u2wSgpzBIHgH4sJoILLMto7Gjls78NX7cCEEDcuWs0I7TntB9mQzWMik1uri X-Received: by 2002:a05:620a:40c5:b0:79d:59bb:639f with SMTP id af79cd13be357-7a1875162abmr343700585a.65.1721252991518; Wed, 17 Jul 2024 14:49:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721252991; cv=none; d=google.com; s=arc-20160816; b=BvhcUk9Hghl0sSgbZOtCE+VSDQIXYute7Ow3xX4oWxg8n2VP0wgbVxRuJSaZI6+XHJ LwAbk9OOM+Iugr5+rp1XwjG00X8DW1k1fDGXFYw6KEL/av2Z9FTwAWAYdoIpJnxLz21d senA0DvCHRd56+CLNA304HMmlIf6G4TAlVh5yOUT+0aSLvGplMGbw1PMSEpeNv9CSbo4 QgXE3XdR5I8V7h6jhIQFo1XbKrLgVHVwhfvJF++UBxA26P1Z6o3l/y2IcnJiIKovrG84 LFa+eXqYcoZUwUFBGQr2HLx9J/wdFDT61pyZV23cPHl2wdJddjpcZ4buLbcITPC7823o KVFg== 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=Kegsiamyyo4kuzUkiCo64gpe7mAsvqKWMspUikrykEI=; fh=DmXcsNxfOAfvKcZinyFNmCm2T6aEjWY4vQy0hAxcy8E=; b=F65mjr2zGqHNNUw6ZCDRD+rpEOlyeDfJhAiaF0Wtt9alv8gb/8P1Udsm2d1L8cnEQ4 TrqYdhdlU/hspDqBDCaDD9f8z0oDIuUPyuo1AplIt6rKR4Zd1M9koun3n4IUPjA/2W07 k8Krn7J8LP1Hbx/CQgAgfdgfagFFhFQDtdGcSTZaQk/SmHSSEGp7RIuGhB41kx5P1DT2 6bk0GcoEnfKEekJgL8ErTBxWx956wW1G8zmvjrJHDj+X2FQaPszlOKxYtMkJR6pslVMp eQuerYx91gvJjNbYpDptEnx1a4flpLHuB8Wt2bjpjvz/NcObff9k6id7YAoTMu4AYTC8 zO7w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gk4yao0d; 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-7a160c4a094si1066997585a.265.2024.07.17.14.49.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jul 2024 14:49:51 -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=gk4yao0d; 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 1sUCWJ-0006Vg-1e; Wed, 17 Jul 2024 17:49:07 -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 1sUCWH-0006Kr-9W for qemu-devel@nongnu.org; Wed, 17 Jul 2024 17:49:05 -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 1sUCWF-0002Qy-Lq for qemu-devel@nongnu.org; Wed, 17 Jul 2024 17:49:05 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4266b1f1b21so1052915e9.1 for ; Wed, 17 Jul 2024 14:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721252942; x=1721857742; 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=Kegsiamyyo4kuzUkiCo64gpe7mAsvqKWMspUikrykEI=; b=gk4yao0dVSYyiNOY1yEzLfUF20PWplsbId29iHAPjprsh4dLZjzt1M2CUbxOfliIhd /A5+DoAh9OVdftOMd11DOrOWPpiG1aqjy8yDk4kFlRPeWUIXtXVMU6+dgTdzn6Az0Qk5 /PanrMFpd+OP/23eE++aj4Wh4uk9zOpUo5FmAin9xG8bTZKGb9wYHc+CnxK4QAq/PukR udszVmjZhYvJClBMiZ3dV9YBglsf3BGGjq+9yNIcV8zvGv2xLkvYa+3TI0KVQSRZvEoK MXz03o+rIqQtBp1wnha7wJKc0FRLzkJCo4UL/4MFJyxWDbiUBvpwHoBO2g6qB6GmT2wF OhWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721252942; x=1721857742; 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=Kegsiamyyo4kuzUkiCo64gpe7mAsvqKWMspUikrykEI=; b=N3aZwfcWnfDlJdym1AhkBvOqkjvlD94lQ2UBUTjz3INKfhN59V90CLKu5VCeXFHm54 tj42xFNYARfyhrHA05GU7qgAfRi26I8lqWhyoGWR2IBAIfXfKwo8JUMBhjG/vSit+pLD 34skNCYcISmrXBfFJZwFcmv33Hlqnne7XcXh89jJHpNpWF+0oP4kOo9Tj34k7ZuednXO rudhMx3rf1Lyk5UVL5X5A8SUvPS9EPY6u3oIo51VUMlnLchwSJ8UFZyyvtl5y0SFmL8X jvEECNq6ICscCvvQB8jfusOuNv7Ib9DjRjyj97tt9wKl2dvGtGIyQVeeSWs6bCOdIuml TuQg== X-Forwarded-Encrypted: i=1; AJvYcCUqnQFlWEKUrD8VMVAfMefB/4iI3ERs+AYpGLc2KBjko+8mfteKAT9YgjOVdfPcD/PHumqP0ULkaGil14NdQe2L1Y+D3ig= X-Gm-Message-State: AOJu0YyTd184rid7Fxc2zL9BwS+ctUIRREV/J2zc1t92ey9+kZFolKHk ahpYYc0KCG0+i/0qlUS6cS1/ScolHN9SsrNq/VvNalJseKRHnpea2lq38P9HAPU= X-Received: by 2002:a05:600c:a44:b0:426:5e0b:5823 with SMTP id 5b1f17b1804b1-427c2d33196mr21227425e9.34.1721252942408; Wed, 17 Jul 2024 14:49:02 -0700 (PDT) Received: from localhost.localdomain ([176.187.208.21]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427c77a56f3sm11697835e9.11.2024.07.17.14.49.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Jul 2024 14:49:02 -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 15/17] hw/loongarch/virt: Replace loongson IPI with loongarch IPI Date: Wed, 17 Jul 2024 23:47:06 +0200 Message-ID: <20240717214708.78403-16-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240717214708.78403-1-philmd@linaro.org> References: <20240717214708.78403-1-philmd@linaro.org> 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 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] Signed-off-by: Philippe Mathieu-Daudé --- 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 8fdfacf268..91216418c8 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