From nobody Wed Nov 27 00:34:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703171452; cv=none; d=zohomail.com; s=zohoarc; b=P9fs/Zm5KeXtFnPfOONDnZHLe2Uw6lN1toGqCfKEX1PKKkvrQ8REdD3LgtAgONpiDj5mij3YUuxFrjEBDLDnju22Z0svmOhgIjpkgyYwsHEq70XxQj8vTyGs7JltJIpgz3fsEVczgJM326YYkazHyDAXLcyKDIJa02wXTQQeWoE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703171452; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=wfHRRNWqxD5Cz4yUuf761Ur5xxVpSmPBcVYJl+qexEY=; b=NaNkYpIPf3wW7sUKZwIDWcCLYbVMqcOVpBAFFVl8TVPSmpB+bxjQVoSwwjDCBhRiVAZWljdQUDxO8GPAZKYRgcTkIgyGHW8y5OzLSeSAtHfQgFcmQFAr9LhmEY1mO0mdmpN3SS2GAL5Gha+1B6XTH65T6/Etr5zUM5fisO1KQhY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1703171452886587.2386324271033; Thu, 21 Dec 2023 07:10:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rGKej-00087y-3F; Thu, 21 Dec 2023 10:08:13 -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 1rGKeg-000874-W0; Thu, 21 Dec 2023 10:08:11 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rGKed-0004Iq-Da; Thu, 21 Dec 2023 10:08:10 -0500 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-54cd2281ccbso1035995a12.2; Thu, 21 Dec 2023 07:08:06 -0800 (PST) Received: from archlinux.. (pd95ed842.dip0.t-ipconnect.de. [217.94.216.66]) by smtp.gmail.com with ESMTPSA id t25-20020a056402241900b00553b6b5bb44sm1264264eda.67.2023.12.21.07.08.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 07:08:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703171284; x=1703776084; 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=wfHRRNWqxD5Cz4yUuf761Ur5xxVpSmPBcVYJl+qexEY=; b=BABXFLT+5bTfFvqaz8wYSa0CMcbmOR5JPSbi/2nOxi5zJHtVntaD8MNCelhFZ1+68b IEDlJM9jFBxI0AujFVZHr2r4La/gBd6Vik15xtzJBnruFMru+nFCr57NBji6y/X+LvZP 1Mp7gGvGeaDVJRyo3f7YF+x8drU+sNcGvU8nWIu91Mq43GcJHTJbrg4TtSymOKrF1aOB gd9V+5eMrwTJDvnuJ8lJoEMyxvbiBCPb003mychJOuHM39g2ac7GnO9uoGhKj2iFhCco VqDZXMXGIHXS6YrNDApaNjU/k5GGf/7AJ3AgapA7goSTcLlNY/slTs+fZPOjW9BPFh++ NMlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703171284; x=1703776084; 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=wfHRRNWqxD5Cz4yUuf761Ur5xxVpSmPBcVYJl+qexEY=; b=UnSW2sOwBIj8Jf9xYtPMfY7ayVqOQn5bbykH130CHBZZuLeQP5H+Y3UOHc9eK2vRti Kbl/L4EufOPPcMSmIUZDr/cb0CGdIjBR7uJOOLlCe1Vhs0zfEsbGjLV+L+1IfSrPGL26 43YgSUdvoqWz87IsaG4MdnQS6lLBXpGQ213+Dq6XlYU4aMWZoVo4byiHCMN6OB2fxsGK rguHYhskn460QmogScOJkHjkLhJ9PSg0yggI8BIB88PWnMCL75q3CpEWX7nYzmTCf0km o2Xb+sGeDDCM8+w8qcdLGNhNlJru2eJCRAujS5d45002qxd3/krbgxYjdSJUBL+Y7xRz UAqA== X-Gm-Message-State: AOJu0Yych8pukc2D+G3eLXUziCt8H8vjxtVkI3LSauXMeaOxh5MK1lAW zuyLgCGUPLOflk1Gf1BK9tg3Opi6eGD8tg== X-Google-Smtp-Source: AGHT+IGClyiFwkPSF3jeHox3DxpqMwTGrl5lfTNJt/kx+V42xAaxU0Wb2kxE+/p+ICDkUOF6SDlbTw== X-Received: by 2002:a50:cbcc:0:b0:54c:d2:ea39 with SMTP id l12-20020a50cbcc000000b0054c00d2ea39mr11638269edi.18.1703171284259; Thu, 21 Dec 2023 07:08:04 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Juan Quintela , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Hanna Reitz , Fabiano Rosas , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Mark Cave-Ayland , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , Thomas Huth , Peter Xu , Jiaxun Yang , qemu-ppc@nongnu.org, Kevin Wolf , =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Barrat?= , Sergio Lopez , John Snow , Artyom Tarasenko , David Hildenbrand , Nicholas Piggin , Marcel Apfelbaum , BALATON Zoltan , qemu-block@nongnu.org, Richard Henderson , Leonardo Bras , "Michael S. Tsirkin" , Bernhard Beschow Subject: [PATCH v3 02/11] hw/block/fdc-sysbus: Move iomem from FDCtrl to FDCtrlSysBus Date: Thu, 21 Dec 2023 16:07:41 +0100 Message-ID: <20231221150750.5435-3-shentey@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231221150750.5435-1-shentey@gmail.com> References: <20231221150750.5435-1-shentey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=shentey@gmail.com; helo=mail-ed1-x52f.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1703171454136100005 Content-Type: text/plain; charset="utf-8" FDCtrl::iomem isn't used inside FDCtrl context but only inside FDCtrlSysBus context, so move it there. Signed-off-by: Bernhard Beschow Reviewed-by: BALATON Zoltan --- hw/block/fdc-internal.h | 2 -- hw/block/fdc-sysbus.c | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/block/fdc-internal.h b/hw/block/fdc-internal.h index fef2bfbbf5..e219623dc7 100644 --- a/hw/block/fdc-internal.h +++ b/hw/block/fdc-internal.h @@ -25,7 +25,6 @@ #ifndef HW_BLOCK_FDC_INTERNAL_H #define HW_BLOCK_FDC_INTERNAL_H =20 -#include "exec/memory.h" #include "hw/block/block.h" #include "hw/block/fdc.h" #include "qapi/qapi-types-block.h" @@ -91,7 +90,6 @@ typedef struct FDrive { } FDrive; =20 struct FDCtrl { - MemoryRegion iomem; qemu_irq irq; /* Controller state */ QEMUTimer *result_timer; diff --git a/hw/block/fdc-sysbus.c b/hw/block/fdc-sysbus.c index 86ea51d003..e197b97262 100644 --- a/hw/block/fdc-sysbus.c +++ b/hw/block/fdc-sysbus.c @@ -26,6 +26,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qom/object.h" +#include "exec/memory.h" #include "hw/sysbus.h" #include "hw/block/fdc.h" #include "migration/vmstate.h" @@ -52,6 +53,7 @@ struct FDCtrlSysBus { /*< public >*/ =20 struct FDCtrl state; + MemoryRegion iomem; }; =20 static uint64_t fdctrl_read_mem(void *opaque, hwaddr reg, unsigned ize) @@ -146,11 +148,11 @@ static void sysbus_fdc_common_instance_init(Object *o= bj) =20 qdev_set_legacy_instance_id(dev, 0 /* io */, 2); /* FIXME */ =20 - memory_region_init_io(&fdctrl->iomem, obj, + memory_region_init_io(&sys->iomem, obj, sbdc->use_strict_io ? &fdctrl_mem_strict_ops : &fdctrl_mem_ops, fdctrl, "fdc", 0x08); - sysbus_init_mmio(sbd, &fdctrl->iomem); + sysbus_init_mmio(sbd, &sys->iomem); =20 sysbus_init_irq(sbd, &fdctrl->irq); qdev_init_gpio_in(dev, fdctrl_handle_tc, 1); --=20 2.43.0