From patchwork Mon Jan 30 20:19:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 648573 Delivered-To: patch@linaro.org Received: by 2002:a17:522:d8c:b0:4be:c3dc:14d8 with SMTP id d12csp1358306pva; Mon, 30 Jan 2023 12:20:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXtRWQlxOrN3Gv6zI+GeGQcwuWPt4xTHaZEQA7UVuLZpUuDcMhQy7HcoUgto4HmSuhh536Ak X-Received: by 2002:ac8:4758:0:b0:3b6:36a0:adbe with SMTP id k24-20020ac84758000000b003b636a0adbemr66404446qtp.6.1675110020825; Mon, 30 Jan 2023 12:20:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675110020; cv=none; d=google.com; s=arc-20160816; b=Nq4Pcmq2p7j0HWq49i1wUGv0hJotYYb968EvizNPCctYiaDM3aU1Iv01R9Gy7R/si5 HOEAiDikXbqjHBzoK9nPU4s8cvF8IvzIU5S1esFG+y7ITbJf+/2l0PzRPPalcS1kqWyo /7zOh42eWrGzio3vshoP+3GltXUp1sWv7snsozusU6+ICMuJgV/j7y+2U5gfzBiyBnC/ wt2wfKc2LmreFlpsfZACuM+AHgGnVbn/kDwTA9q+39osx6VRDnBH+49nn9NtkqoJ4J3y 4jcctEEphFmzk3X4bMns7Kx0M859tT6gJP99UJf/ZvQF1B1i1bhGawizwWNwe7wFTdD5 80gQ== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2g5ysF7CAHTyvaXDtnVWs2/BqxrqcBQDQxiGugZ8DgE=; b=Ll3wOUZYZVp7hTcQzOuQp+eCiW+cevtV4EDHkXmOd70mZVwhIfXZuVxxOMf6+p4q5W uRYX6zklKd8KyI3xkezJSv7tj5DYKR3oYwXeiwf4qpzLSN5nQZHctfzv3+eZIKSQnMGM w0SNsYe2aQZTOROaWfOXdTTuaOq21+rc59n7SIWrJDYp6JskGYCgoJe7UOJ3ZGPbIBOx 2ogpfIsB989iqtO3cqO8FPXhV44Fynrcmr4rlJd7tU3DQqS6Szm2SbTewnNbJqBm3Ivx HnASY7QdHoxBbiiDnHtrwaCxiZlVuohRJ73tIqAmbq50EzfmwluWANvlDfXc9T5Yv2P6 t+iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DFZ3Zeyw; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x6-20020ac85f06000000b003b86b6c1515si1621505qta.240.2023.01.30.12.20.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Jan 2023 12:20:20 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=DFZ3Zeyw; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMace-0002Ic-Er; Mon, 30 Jan 2023 15:19:24 -0500 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 1pMacX-0002GY-4u for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:19:17 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMacU-0006pT-6a for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:19:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675109950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2g5ysF7CAHTyvaXDtnVWs2/BqxrqcBQDQxiGugZ8DgE=; b=DFZ3ZeywGTK5FOOBaG2N/aqibmK9/R2Nnw/hdVGq8XWJnm5rc7MI9NcrrcojltyiUWoJdJ Badw93P+kAz/Rk6e9B3Zl4MkKsFRfTkHUgVjUui11XGf3XlnYIkSGee4R46dBPeCqi6mHw 4AHS40h/YUqQ9t6XuyIoUOC4k1csuAA= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-331-xspxYTnaNTemFkosYEZZ1w-1; Mon, 30 Jan 2023 15:19:09 -0500 X-MC-Unique: xspxYTnaNTemFkosYEZZ1w-1 Received: by mail-ej1-f71.google.com with SMTP id d14-20020a170906c20e00b00889f989d8deso1895516ejz.15 for ; Mon, 30 Jan 2023 12:19:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2g5ysF7CAHTyvaXDtnVWs2/BqxrqcBQDQxiGugZ8DgE=; b=B4YGBXlG8RPMNWPNrEEtV4nboLfQ4ylLIB80QwDQJ0ZLL+1bwGdw5GYVuHcJkBFi3l aWBil2BaljBRpCaJ55Qm2YPFA34Ltx1rfD4i2mGLdXjJed7t/f/YDXjfD2BsXrDzrT8w QBZrZoJtuvQjRUxYB1UqlcF3uEX6tlEl9sTqo+uylhQvAgJvy+AoJCu574ZS1iGPhg/R y/IcjJzR5GAR+6/X0NToCEnf82d4+8TTDnwMbjLDrH806tOytt5Fd/+glMW1OzXugrv2 BkAj+cPGTeFcCK4w85n+49JDa2arQvVfn4ZE0KxzzU54ZANWZO7cLNILY3EEq06Qc46w vcWg== X-Gm-Message-State: AO0yUKXTxHjt38Fv6mcREwQqkMEhwh2jd+wtF1AoIhbCC1APYgIVg0rR NQHV+384ZlvE+k5THOok99BBrTd+jTsQ75cWICY21SMp+exQCkGPW//cu6b4dcupToBCquRP8eK QdVwAOhzktwGL3VmDM+jDRAoX6/Lt2nXzO4GwNognAdhr+DhoFbGRVkTW4I/k X-Received: by 2002:a17:906:ee8a:b0:884:c6d8:e291 with SMTP id wt10-20020a170906ee8a00b00884c6d8e291mr12007732ejb.57.1675109947530; Mon, 30 Jan 2023 12:19:07 -0800 (PST) X-Received: by 2002:a17:906:ee8a:b0:884:c6d8:e291 with SMTP id wt10-20020a170906ee8a00b00884c6d8e291mr12007699ejb.57.1675109947240; Mon, 30 Jan 2023 12:19:07 -0800 (PST) Received: from redhat.com ([2.52.144.173]) by smtp.gmail.com with ESMTPSA id k2-20020a170906970200b008775b8a5a5fsm7247292ejx.198.2023.01.30.12.19.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 12:19:06 -0800 (PST) Date: Mon, 30 Jan 2023 15:19:04 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Philippe =?utf-8?q?Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , BALATON Zoltan , Richard Henderson , Bernhard Beschow , Mark Cave-Ayland , =?utf-8?b?SGVydsOp?= Poussineau , qemu-ppc@nongnu.org Subject: [PULL 07/56] hw/pci-host: Use register definitions from PCI standard Message-ID: <20230130201810.11518-8-mst@redhat.com> References: <20230130201810.11518-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230130201810.11518-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Philippe Mathieu-Daudé No need to document magic values when the definition names from "standard-headers/linux/pci_regs.h" are self-explicit. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230105173702.56610-1-philmd@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: BALATON Zoltan Reviewed-by: Richard Henderson Reviewed-by: Bernhard Beschow --- hw/pci-host/grackle.c | 2 +- hw/pci-host/raven.c | 6 +++--- hw/pci-host/uninorth.c | 33 +++++++++++---------------------- 3 files changed, 15 insertions(+), 26 deletions(-) diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c index 8cf318cb80..8e589ff2c9 100644 --- a/hw/pci-host/grackle.c +++ b/hw/pci-host/grackle.c @@ -91,7 +91,7 @@ static void grackle_init(Object *obj) static void grackle_pci_realize(PCIDevice *d, Error **errp) { - d->config[0x09] = 0x01; + d->config[PCI_CLASS_PROG] = 0x01; } static void grackle_pci_class_init(ObjectClass *klass, void *data) diff --git a/hw/pci-host/raven.c b/hw/pci-host/raven.c index 5b00b4e462..cdfb62ac2e 100644 --- a/hw/pci-host/raven.c +++ b/hw/pci-host/raven.c @@ -330,9 +330,9 @@ static void raven_realize(PCIDevice *d, Error **errp) char *filename; int bios_size = -1; - d->config[0x0C] = 0x08; // cache_line_size - d->config[0x0D] = 0x10; // latency_timer - d->config[0x34] = 0x00; // capabilities_pointer + d->config[PCI_CACHE_LINE_SIZE] = 0x08; + d->config[PCI_LATENCY_TIMER] = 0x10; + d->config[PCI_CAPABILITY_LIST] = 0x00; memory_region_init_rom_nomigrate(&s->bios, OBJECT(s), "bios", BIOS_SIZE, &error_fatal); diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c index e3abe3c0f9..e4c1abd871 100644 --- a/hw/pci-host/uninorth.c +++ b/hw/pci-host/uninorth.c @@ -276,12 +276,9 @@ static void pci_unin_internal_init(Object *obj) static void unin_main_pci_host_realize(PCIDevice *d, Error **errp) { - /* cache_line_size */ - d->config[0x0C] = 0x08; - /* latency_timer */ - d->config[0x0D] = 0x10; - /* capabilities_pointer */ - d->config[0x34] = 0x00; + d->config[PCI_CACHE_LINE_SIZE] = 0x08; + d->config[PCI_LATENCY_TIMER] = 0x10; + d->config[PCI_CAPABILITY_LIST] = 0x00; /* * Set kMacRISCPCIAddressSelect (0x48) register to indicate PCI @@ -296,30 +293,22 @@ static void unin_main_pci_host_realize(PCIDevice *d, Error **errp) static void unin_agp_pci_host_realize(PCIDevice *d, Error **errp) { - /* cache_line_size */ - d->config[0x0C] = 0x08; - /* latency_timer */ - d->config[0x0D] = 0x10; - /* capabilities_pointer - d->config[0x34] = 0x80; */ + d->config[PCI_CACHE_LINE_SIZE] = 0x08; + d->config[PCI_LATENCY_TIMER] = 0x10; + /* d->config[PCI_CAPABILITY_LIST] = 0x80; */ } static void u3_agp_pci_host_realize(PCIDevice *d, Error **errp) { - /* cache line size */ - d->config[0x0C] = 0x08; - /* latency timer */ - d->config[0x0D] = 0x10; + d->config[PCI_CACHE_LINE_SIZE] = 0x08; + d->config[PCI_LATENCY_TIMER] = 0x10; } static void unin_internal_pci_host_realize(PCIDevice *d, Error **errp) { - /* cache_line_size */ - d->config[0x0C] = 0x08; - /* latency_timer */ - d->config[0x0D] = 0x10; - /* capabilities_pointer */ - d->config[0x34] = 0x00; + d->config[PCI_CACHE_LINE_SIZE] = 0x08; + d->config[PCI_LATENCY_TIMER] = 0x10; + d->config[PCI_CAPABILITY_LIST] = 0x00; } static void unin_main_pci_host_class_init(ObjectClass *klass, void *data) From patchwork Mon Jan 30 20:21:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 648574 Delivered-To: patch@linaro.org Received: by 2002:a17:906:c198:b0:888:9ecf:6623 with SMTP id g24csp881111ejz; Mon, 30 Jan 2023 12:31:09 -0800 (PST) X-Google-Smtp-Source: AK7set/zInvt5J4XP0g/brufLxQ7VoeL/11GhxJIE2BEAM0+XqYa1aHhlSyo0nC8iQQcSUJf+sI6 X-Received: by 2002:ac8:7c4e:0:b0:3b5:4aae:cb0b with SMTP id o14-20020ac87c4e000000b003b54aaecb0bmr14585544qtv.22.1675110669332; Mon, 30 Jan 2023 12:31:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675110669; cv=none; d=google.com; s=arc-20160816; b=A7IcG11WWNEBDnpODwYZ0E18ZzMpaw7C2ObUKEJbpX41hXViTmTSlm3WAjc+ldy7yp GP6xkNfyvr2K00h9ZslSZ0WbfCCvQvFKOvdH/twhfcx90vOkfttrgUyMtK6wXCWIW28D jo9CoARXxqisKXgFDz11il0/819R5v9tquYUUI4WDV/ywCRFZW28pC++3sJViPJ7YX4G mq7pYhfwCNsTxIpGNYiDn2SS9VQ5CbtHc8cKJNOc/3ofeVWV1DYqsfR3NdrPz4bEcCf8 afkplREn1zuHYXmR20usza/6/0NtPjZj3AIE41NByCo/9GlyU5fmtxbLyaHUmQP7kL3j Q6vQ== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=r+Cb3vXl1fpQEI2y2/OxkPT/k9MpHs9866vAhPGYmTs=; b=vRM1TeaCV165mjUgfCKIMq+5kmxwPjM6J4nFMOpRFbJF7GAH7jgvbra1MGa5H5vwFw pkQ4vS+SZ+6yysz3L4UqTMRnFeN+aQeANIdtWsxPFBfOPD9eUo1yao3i+vqHDKItYFJK YurX+xQgJwzjVJBoJE6VTHV8TJvEocDg24pYy9BERJ3j5gTEzpREY0fKpB5nkXEekhCj DGkEfIdWm8SCZewUqC+OXp+Rk14mkDeP3NU1Z9PB4CQwL2pcuNsfV2Z2RZLxvsc3lPIu ADAHyND9drID7oTn0WEiWUZAkW5l+KYkQHPE7k/N9K/5TxLLh5O/tENtK2YuuDs2nuYv kcYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=f3BtcfUZ; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z8-20020a05622a060800b003b63f045aafsi7261464qta.291.2023.01.30.12.31.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Jan 2023 12:31:09 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=f3BtcfUZ; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMaiW-0003r1-JG; Mon, 30 Jan 2023 15:25:28 -0500 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 1pMaeu-0007Ka-Tx for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:21:57 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMaep-0007TQ-NF for qemu-devel@nongnu.org; Mon, 30 Jan 2023 15:21:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675110099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r+Cb3vXl1fpQEI2y2/OxkPT/k9MpHs9866vAhPGYmTs=; b=f3BtcfUZ5dgPCkmvnEF0xQObqe+HM9FODM2qyt63FLwLvwB0Nyb5Y7+mWU7X4duyTApZrH TCzcISDUJxxDwg7m/8c6maJDARhOXmHrK30T91/zxLj+oyrevDW6pi1lWRfNiaTZz1dQqZ h4Xw2bgsyyt0fzjGQOHBtw0DFLrX1Mo= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-194-I2phwKpnOVW6HkM0P7G0WA-1; Mon, 30 Jan 2023 15:21:38 -0500 X-MC-Unique: I2phwKpnOVW6HkM0P7G0WA-1 Received: by mail-ed1-f70.google.com with SMTP id o21-20020aa7dd55000000b004a245f58006so2756226edw.12 for ; Mon, 30 Jan 2023 12:21:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=r+Cb3vXl1fpQEI2y2/OxkPT/k9MpHs9866vAhPGYmTs=; b=GQKtPSDC96S0jDk7N0aT5bt63vpZahCnzPDK6J3Lul0eoILy97NOx0P9JHJVCQ97yr O3Bz19FVOarW5FgzL+SRRlZ4WQNxUqCcKSiJOP305Y9Q0WWXhB71N1mnGytkdbqAg5+R dHsTs97NF1SMQl4wcSZo5vaAC7j0HDVrvCOLqvnX6ayK8OUaijgpK0akzZ8HJBqdFUtc 0O5zXuKVmH3onIuVRl2BJ18ESjFHqxHgSXGICA2gbPiev4phcQhI5Wg/Nq1mBicaYTOp belfhic4nEK4WNKKcMyomulYEPfBwDYQrPmj7Ydg0x2eoe4HZ9yj412JoGdPCYQXys6e 2ZXQ== X-Gm-Message-State: AO0yUKVuVMLZ8QldWG5PHvCMKyNmYFv46mbRCXDnDUVaOVQX9LnCUqG2 vZOCKMYfjNR5+f2TqFwIpFzvLW/b2cDOsrhFJLpe4o/dSOf6Z6SgsM9uV5k5PdjIvqf+1I2caGl dAKPnBWzUhg/J8sGz108t+m8tdA52TLdmHwCe+nrZ9BAr++qBc8vOOhdqOSfL X-Received: by 2002:a17:906:c350:b0:888:33a:e359 with SMTP id ci16-20020a170906c35000b00888033ae359mr5793585ejb.38.1675110096308; Mon, 30 Jan 2023 12:21:36 -0800 (PST) X-Received: by 2002:a17:906:c350:b0:888:33a:e359 with SMTP id ci16-20020a170906c35000b00888033ae359mr5793570ejb.38.1675110096025; Mon, 30 Jan 2023 12:21:36 -0800 (PST) Received: from redhat.com ([2.52.144.173]) by smtp.gmail.com with ESMTPSA id v18-20020a1709064e9200b0084c7f96d023sm7408399eju.147.2023.01.30.12.21.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 12:21:35 -0800 (PST) Date: Mon, 30 Jan 2023 15:21:33 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Philippe =?utf-8?q?Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Eric Auger , qemu-arm@nongnu.org Subject: [PULL 52/56] hw: Use TYPE_PCI_BUS definition where appropriate Message-ID: <20230130201810.11518-53-mst@redhat.com> References: <20230130201810.11518-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230130201810.11518-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Philippe Mathieu-Daudé Use the proper QOM type definition instead of magic string. This also helps during eventual refactor while using git-grep. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230117193014.83502-1-philmd@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Eric Auger --- hw/arm/smmu-common.c | 3 ++- hw/virtio/virtio-iommu.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c index 54186f31cb..733c964778 100644 --- a/hw/arm/smmu-common.c +++ b/hw/arm/smmu-common.c @@ -535,7 +535,8 @@ static void smmu_base_reset_hold(Object *obj) static Property smmu_dev_properties[] = { DEFINE_PROP_UINT8("bus_num", SMMUState, bus_num, 0), - DEFINE_PROP_LINK("primary-bus", SMMUState, primary_bus, "PCI", PCIBus *), + DEFINE_PROP_LINK("primary-bus", SMMUState, primary_bus, + TYPE_PCI_BUS, PCIBus *), DEFINE_PROP_END_OF_LIST(), }; diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c index 23c470977e..1cd258135d 100644 --- a/hw/virtio/virtio-iommu.c +++ b/hw/virtio/virtio-iommu.c @@ -1366,7 +1366,8 @@ static const VMStateDescription vmstate_virtio_iommu = { }; static Property virtio_iommu_properties[] = { - DEFINE_PROP_LINK("primary-bus", VirtIOIOMMU, primary_bus, "PCI", PCIBus *), + DEFINE_PROP_LINK("primary-bus", VirtIOIOMMU, primary_bus, + TYPE_PCI_BUS, PCIBus *), DEFINE_PROP_BOOL("boot-bypass", VirtIOIOMMU, boot_bypass, true), DEFINE_PROP_END_OF_LIST(), };