From nobody Tue Nov 26 22:34:52 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=1704575216; cv=none; d=zohomail.com; s=zohoarc; b=fddioKoJd7U11KqPkcweEB1vzTiI7pOjMa1RQ+6D1iGsuUXgCcj9X3tZDxjVN1jBMg6xnpDLStkpe/+XPWObfB6X8+tngD3vQ+FFkCq9BZwNVt408SPICrd6tPpHLl0xStXb5/xION7ucSh3VTeitGQT0w35jP/w57Rbx14+3fs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704575216; 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=5+9ZapGs110KfVKNFzaiA44RoY0VoVZdYmH4JCjTMrQ=; b=nJEzBOnsrBii9wMx+1It68fdta1/xuhQPYmoF0TAH8xaratkXBl5wTqpA6d5B6MXHDKVFM/53x70AIWv23of591cyg4n622I3ppnWILgo0oI/pWIfbVytG+1yd1Il4r55uJ3vUKqksp+F90hfijdj5qb90gyd8FLMVnA3dmnOB4= 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 1704575216829227.3940924152222; Sat, 6 Jan 2024 13:06:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMDre-0005aG-Km; Sat, 06 Jan 2024 16:05:54 -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 1rMDrd-0005YT-CJ; Sat, 06 Jan 2024 16:05:53 -0500 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMDrb-00018a-Kn; Sat, 06 Jan 2024 16:05:53 -0500 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2cd17a979bcso5594581fa.0; Sat, 06 Jan 2024 13:05:50 -0800 (PST) Received: from archlinux.. (dynamic-077-011-174-094.77.11.pool.telefonica.de. [77.11.174.94]) by smtp.gmail.com with ESMTPSA id f20-20020a056402195400b005576f4471besm624922edz.42.2024.01.06.13.05.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 13:05:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704575148; x=1705179948; 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=5+9ZapGs110KfVKNFzaiA44RoY0VoVZdYmH4JCjTMrQ=; b=ibqzl6xOqzXDApHiCdM4mwO3Tlg/v1oZzfSzY+YI4UFyFkyMOA7ApCwpic3LJkByD6 msrsZMJvupHxyjlzq4ksTg3OfW+mOMkl89Fqkv6LE9hBjp7w1pLvnIt3n94wjlCx2OIQ l/7KSXNn8qyg6XfJ70QtMb3hYCWotPKX2bNyGHbT+HhUMMBg2GMTXsYXfsk0fyahuj7j M19DCmD1yEYbUbel37/1wMALyHECsu93EwdK9G4V7vPlwxcWHGM1J77vA4PyAvpIU6+i BkZtip2RyevsdJs1T3ehRz8hAy13wHSsAFtI6a7L3Ts0Vy71/7x5uHFQHI9pkQHQZncU xyDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704575148; x=1705179948; 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=5+9ZapGs110KfVKNFzaiA44RoY0VoVZdYmH4JCjTMrQ=; b=aOERpy0V1v1N21Q2zqmSPQ1nnqPrrgHegTU46MlBFljOuL+Hn2+LDnHHUL1TYDEFe2 Mcoc83qhfskDXXgFTTZT76TW9/Q8ZbSVLyUAtmZf+MjUoGeIDJp6mnz8NrWE4ZglNoJ2 1fmLIXzGJWLj5YNuDPbSgQG9afzODZeKM2C822jN8FDvEqo5SuNDhmRpHryXkdSakRpc qASjF5UVtA6p7QwrfVwWHjqCHV9VbkVjJo7lN/7ZvlhUgNqnhkaVIKy/ntzGaukcW6t1 SBeCC8agNNqCfQlscT6hXXHPogvgXoZDtQRcA/uVvZ35G6nKNxFQ0iMf0x0RFXNKqGGb 5dmQ== X-Gm-Message-State: AOJu0YzTXg7Co9b+vifeRtnYMo1k/8eM7BfRxpHNuzZTqsa0GWL++4Ik krPrKPOlGajsJsrtmT/jlhImISFO0D8= X-Google-Smtp-Source: AGHT+IHzE4IeiJR+Q85AjXB2FVM0Gdzjh6JaEkHPuINONpCi1dNx01zUuHHd21CoyijjkXT5rW5Aeg== X-Received: by 2002:a05:6512:e91:b0:50e:6202:dad6 with SMTP id bi17-20020a0565120e9100b0050e6202dad6mr287912lfb.142.1704575147700; Sat, 06 Jan 2024 13:05:47 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Artyom Tarasenko , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Fabiano Rosas , Jiaxun Yang , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Barrat?= , John Snow , qemu-block@nongnu.org, Kevin Wolf , Thomas Huth , Richard Henderson , Nicholas Piggin , Aleksandar Rikalo , Peter Xu , BALATON Zoltan , Leonardo Bras , Paolo Bonzini , "Michael S. Tsirkin" , Juan Quintela , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-ppc@nongnu.org, David Hildenbrand , Marcel Apfelbaum , Sergio Lopez , Hanna Reitz , Mark Cave-Ayland , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Bernhard Beschow Subject: [PATCH v4 02/11] hw/block/fdc-sysbus: Move iomem from FDCtrl to FDCtrlSysBus Date: Sat, 6 Jan 2024 22:05:22 +0100 Message-ID: <20240106210531.140542-3-shentey@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240106210531.140542-1-shentey@gmail.com> References: <20240106210531.140542-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::22b; envelope-from=shentey@gmail.com; helo=mail-lj1-x22b.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: 1704575218399100010 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 266bc4d145..035bc08975 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