From patchwork Thu Jul 18 13:33:08 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: 813211 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp297249wro; Thu, 18 Jul 2024 06:36:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWMtSMUmIaSrld0BfpFQDb6ZHo/peWqHGr1KkdU19ge5wCiRC4MMKQjbh8WDUbREU9+pqDx0m9UpdSNk8W6pPFp X-Google-Smtp-Source: AGHT+IGH1FBIeQmYMOPVxPulJiAiFcHfKShlokmt6+bKtnxgOvVMoOTCHUJoAOYCa5utt1NgsS8d X-Received: by 2002:a05:620a:448f:b0:79f:1776:356b with SMTP id af79cd13be357-7a1938c3c5dmr114736085a.8.1721309772290; Thu, 18 Jul 2024 06:36:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721309772; cv=none; d=google.com; s=arc-20160816; b=hQxsoxNMQzcKRP8N2ZVOM/pV4p1qS/gEYvhktbUEyLD2OiiQtE7ACEoN4cT4A1GLPY VAM1cinDrx7RGqIwSpsj/4BMQsd6B+Ss5Y6RlzzcRLJYb+21H90aB9wkYm0/FtpOZDjd /RuGmJnhRPXhBMejUfCWfiAm4Y8EtQ5SEp1UcpgRffhjSbkiHW3hRBS/6DjSHY9JQxYf aE9qC65ysMHRrWEuff2dmiiL9tOm1XIWelQygI2pp0x71RTsgKaxSJC0HLSWsOnkcvi4 p9VxtdQxe+1OSQgA8W2P1WQOzKNAyZf1x+k4saSZ1dgL+CmlGfrYqSLd2+6f7K+MTDo+ qVwg== 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=T0uj0dnWiKopOMNbBacKJZ22z85m6+wChhbexgzZrEw=; fh=fee94b8L2Y6y9fHQ+G64znsfipcPlIvJ+IF+kDx+MPU=; b=TrcUU+2/K/uxi9kyiweTFUkc4iYZ8mYDBvp2N51mfWTp8ugMljASC5tEiu0KhytRuR zTuBNR5w/tyWOOR04aaqmKrJ3/OXGTKwH/9R93qziXi75lVnANLBX9q3ZihwXc1QKSRQ AoDiGQQ9NlmFfArvNBupLK/UsCjudoueutshY4X8knVAF0iD9QyX2L0BtdOS8f8B7l+6 zmfo8EnUXQxs++kRticwRN5KF+3dmkmPxFcRy8Tl6NbOhfchsQC4hEBUv0utdBCAUtRZ 7Yy9FsuRTdIDJoqvOeorwVZhEBR64xHka+3CVE4lYy+Nl57onQoGde8OJtzHuAp+zMyC II8A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h8sMqOdz; 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-7a1939024a3si57920985a.196.2024.07.18.06.36.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 06:36:12 -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=h8sMqOdz; 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 1sURHb-0003W7-HD; Thu, 18 Jul 2024 09:34:55 -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 1sURHX-0002zj-8U for qemu-devel@nongnu.org; Thu, 18 Jul 2024 09:34:51 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sURHV-00007p-JV for qemu-devel@nongnu.org; Thu, 18 Jul 2024 09:34:50 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4266dc7591fso3024105e9.0 for ; Thu, 18 Jul 2024 06:34:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721309688; x=1721914488; 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=T0uj0dnWiKopOMNbBacKJZ22z85m6+wChhbexgzZrEw=; b=h8sMqOdz5sjE8kRg5dfPIQk2AsX7XBoCYXVZ6TJDRSWJjNV8bZ/izLTJ1fMil3VtIb xATJFe4bEy0bIuxKXIehumCcQL+j7kBo6RYqLoCoSbUJlQ4LdwJfiw6n+ZlWZW01jMC4 5hF9PMHGsGVQEaUjco0DcWEReq+NGOZFKSlBkY0tsH6rxNK/VX/EIcYwgMFDD/RU8EPa OgYwMKkbFTV+F5GZZfwUUVgGcCURjiXluRezJ1gz1b4C1oNRoy/8TQBPKd3KmjyDA0WI HsId+QKgtjatw8Q1OXhqmfw0ieEI6iqKgusr0D5H/Mv6L/aU2/oNXJSpMgkwd8uwVXiN 32Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721309688; x=1721914488; 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=T0uj0dnWiKopOMNbBacKJZ22z85m6+wChhbexgzZrEw=; b=bgSZQqlktxTCOMrkbeIG+2KREK9dhpzbN0Fcl0yykX/fj+DQPvw6D5wy7t3jP3RHUn 34BAJ5+FDUn04Kl8MBtkqjs/8K/xzBCaUYuOgDACWGVUvPBxk4dJZ664Hp+DLxuF4+wn wUk82JARoX5U/JjcUemgmQAM8gwbK2NLvymBlDDU/sikbmE6xP/jQ7+UREH+FYhAloPD Jr+TdhvKbqFYI6pIxY5JxvCtr3EesVr2pUOA7Klg+xmgBuzI6DLdyXx+/5BpeRw+2EWf MVk/7FxmlwrntXCIemms0PNVRUCmhoh3DnojbMQfvf1gRn5BtdTZvfYopuWO/ho4Lm13 Wh6w== X-Forwarded-Encrypted: i=1; AJvYcCWjS//bXg08Rk92x4qjbScvwLjxEqWNXi+oKG68ckdhkbf4wEhyS6RW0/J/SKE3OCVb6XEYeDuIpFssr3DHJaR7YYEgnPw= X-Gm-Message-State: AOJu0YxgsKwxM1aEp9+Yq8lKsIWflxSW5NyJYE6lGAku7ZepKtQczgg/ lyIHB7FdvqCvD9fl7itaCrMHyPjT6hXhhFSoOjUiIXdGv3tMIDJqZcZjsTxepx8= X-Received: by 2002:a05:600c:1c02:b0:426:6eae:6596 with SMTP id 5b1f17b1804b1-427c2d0227fmr37518395e9.25.1721309687921; Thu, 18 Jul 2024 06:34:47 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.113]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427d2b1dfd8sm13891305e9.22.2024.07.18.06.34.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 18 Jul 2024 06:34:47 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Bibo Mao , qemu-devel@nongnu.org, Jiaxun Yang Cc: Song Gao , Paolo Bonzini , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Xiaojuan Yang , Xianglai Li Subject: [PATCH v5 16/19] hw/loongarch/virt: Replace Loongson IPI with LoongArch IPI Date: Thu, 18 Jul 2024 15:33:08 +0200 Message-ID: <20240718133312.10324-17-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240718133312.10324-1-philmd@linaro.org> References: <20240718133312.10324-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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 --- 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