From nobody Mon Feb 9 18:19:59 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621375004; cv=none; d=zohomail.com; s=zohoarc; b=mudXuSgpMZYjwQyz/gnc2ZJi0fBbKLT36XAb2uaZqOcXMV80DzEBQaEi/JppI3j4Ei0cuRAKN87B5yms4i7hQ0yr2RCr+3OmfJJHKcNohOjQr2RHJ+GHnRTA3SsbNdIL68DRGD+EB76xm57XWeTQYxZ856d+Dqo7KCMxS9DfeVw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621375004; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=SA3xLaeZ2FwOXvV1CNVXzUH12bBqCIlfWoPhxP84IQI=; b=HtGu+E5Jipxbp2g9unkc51VXXTDv//JXoKWzGxE9NNtTgd8vucsSuBpnGGjhgW0+aYaT9dzPksrCyuU3u22ht+d0ngE1vw+JKOMvODGwreKwwiFyzn99PVk1Qn8OSRvH59/6xsSH3mnJ8A+63VoyNQEggaDDtSIEhPUlejQ3SW4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1621375004899878.17185696874; Tue, 18 May 2021 14:56:44 -0700 (PDT) Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-64-G0BYlBBAOzCQWqDzDQkifQ-1; Tue, 18 May 2021 17:56:41 -0400 Received: by mail-ed1-f69.google.com with SMTP id cn20-20020a0564020cb4b029038d0b0e183fso6492811edb.22 for ; Tue, 18 May 2021 14:56:41 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id jt11sm10868407ejb.83.2021.05.18.14.56.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 14:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621375003; 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=SA3xLaeZ2FwOXvV1CNVXzUH12bBqCIlfWoPhxP84IQI=; b=dXcHohBhdYHfEtGJd5c/5BovnavxzVQkqOJFKh5IzAdImr7rrm98IWeUoOKLRG4UC4dcQX 4D8XLg01Yz54f50hy7D+zc/2RdgQBARdsakstTE9UhJKvGi7hzsK58twjQMAGd3vZwKzMy WPlTJopaeAMTsIg/zP8O+yxwTdfjX5A= X-MC-Unique: G0BYlBBAOzCQWqDzDQkifQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SA3xLaeZ2FwOXvV1CNVXzUH12bBqCIlfWoPhxP84IQI=; b=l1ClLLuIzklw/7Vv7CWJeUmg9aRNmmk5LCOcqQUJnRhdhViTObKpMNxMkWkO5LkHN2 FlYLLA8p01TVQ0qQXGsyPrrNLoOuW25WYUve5utpCOivYyEcMqJJZzlTPeFi5vs4OF1l S+wD+rpCmALNRn7V8tHXOcXSszS6S1WxhyY+rh032nZIK5aYxepHcpCHJWQkUcmxvNFL /YYHOi9QYqcDQkdirK7rgT7eKkzXPYiZng29zhXxONc73//yqRmHdxWITrbrIvIqAPpt ohhHSPDR77k1VGul8R93IJvT87cyMwsFBPzfJp6VZ925NPfttDttlAFhNJsHKTC3g0ve 5DDg== X-Gm-Message-State: AOAM530YdSVwRQSa3KFeo2jPhiDzSftVtzchyg2k88TMreny0Dj478Vw L07kebjRgnopx1VHmdahwzb+tflUcUYoKgXx9y9tFgDkxwjqHyWHILdI4AWW1zHctzb66+TRbRt OXNskMyi2e9oJYA== X-Received: by 2002:a17:906:4806:: with SMTP id w6mr8075538ejq.180.1621375000808; Tue, 18 May 2021 14:56:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIQhd3LfebpiOisU4PBvm0zr/zBYoZN4wHTN01wT0PnsApruV3LJ2lfBYIHz4J9PTSqRC+jw== X-Received: by 2002:a17:906:4806:: with SMTP id w6mr8075532ejq.180.1621375000697; Tue, 18 May 2021 14:56:40 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: John Snow , qemu-devel@nongnu.org Cc: Elena Ufimtseva , Markus Armbruster , Mark Cave-Ayland , Stefan Hajnoczi , Jagannathan Raman , Thomas Huth , John G Johnson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [RFC PATCH 11/11] hw/isa: Rename isabus singleton as 'g_isabus' Date: Tue, 18 May 2021 23:55:45 +0200 Message-Id: <20210518215545.1793947-12-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210518215545.1793947-1-philmd@redhat.com> References: <20210518215545.1793947-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) To make explicit the isabus singleton isn't used anywhere else, move it's static declaration locally to isa_bus_new() and rename it as 'g_isabus'. Unfortunately we provide the get_system_io() call which expose an unique I/O bus to a machine, and the ISA bus rely on this I/O bus, so we can not remove the ISA bus singleton until we remove the get_system_io() API. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/isa-bus.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index a19e3688c28..422eb9615f4 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -26,8 +26,6 @@ #include "sysemu/sysemu.h" #include "hw/isa/isa.h" =20 -static ISABus *isabus; - static void isabus_dev_print(Monitor *mon, DeviceState *dev, int indent); static char *isabus_get_fw_dev_path(DeviceState *dev); =20 @@ -55,7 +53,10 @@ static const TypeInfo isa_bus_info =3D { ISABus *isa_bus_new(DeviceState *dev, MemoryRegion* address_space, MemoryRegion *address_space_io, Error **errp) { - if (isabus) { + static ISABus *g_isabus; + ISABus *isabus; + + if (g_isabus) { error_setg(errp, "Can't create a second ISA bus"); return NULL; } @@ -67,6 +68,7 @@ ISABus *isa_bus_new(DeviceState *dev, MemoryRegion* addre= ss_space, isabus =3D ISA_BUS(qbus_create(TYPE_ISA_BUS, dev, NULL)); isabus->address_space =3D address_space; isabus->address_space_io =3D address_space_io; + g_isabus =3D isabus; return isabus; } =20 --=20 2.26.3