All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: John Snow <jsnow@redhat.com>, qemu-devel@nongnu.org
Cc: "Thomas Huth" <thuth@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PATCH v6 1/5] hw/isa/Kconfig: Fix missing dependency ISA_SUPERIO -> FDC
Date: Wed, 19 May 2021 18:34:44 +0200	[thread overview]
Message-ID: <20210519163448.2154339-2-philmd@redhat.com> (raw)
In-Reply-To: <20210519163448.2154339-1-philmd@redhat.com>

isa_superio_realize() calls isa_fdc_init_drives(), which is defined
in hw/block/fdc.c, so ISA_SUPERIO needs to select the FDC symbol.

Add a isa_fdc_init_drives() stub for when FDC is not selected.

Reported-by: John Snow <jsnow@redhat.com>
Suggested-by: Thomas Huth <thuth@redhat.com>
Fixes: c0ff3795143 ("Introduce a CONFIG_ISA_SUPERIO switch for isa-superio.c")
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/block/fdc-isa-stubs.c | 22 ++++++++++++++++++++++
 MAINTAINERS              |  1 +
 hw/block/meson.build     |  5 ++++-
 hw/isa/Kconfig           |  1 +
 4 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 hw/block/fdc-isa-stubs.c

diff --git a/hw/block/fdc-isa-stubs.c b/hw/block/fdc-isa-stubs.c
new file mode 100644
index 00000000000..60180531e11
--- /dev/null
+++ b/hw/block/fdc-isa-stubs.c
@@ -0,0 +1,22 @@
+/*
+ * QEMU Floppy disk emulator (Intel 82078) stubs
+ *
+ * Copyright (c) 2021 Red Hat, Inc.
+ *
+ * Author:
+ *   Philippe Mathieu-Daudé <philmd@redhat.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include "qemu/osdep.h"
+#include "hw/block/fdc.h"
+#include "hw/isa/isa.h"
+
+void isa_fdc_init_drives(ISADevice *fdc, DriveInfo **fds)
+{
+    g_assert_not_reached();
+}
diff --git a/MAINTAINERS b/MAINTAINERS
index eab178aeee5..8fa85e40a52 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1659,6 +1659,7 @@ M: John Snow <jsnow@redhat.com>
 L: qemu-block@nongnu.org
 S: Supported
 F: hw/block/fdc.c
+F: hw/block/fdc-isa-stubs.c
 F: include/hw/block/fdc.h
 F: tests/qtest/fdc-test.c
 T: git https://gitlab.com/jsnow/qemu.git ide
diff --git a/hw/block/meson.build b/hw/block/meson.build
index 8b0de54db1f..bb5b331d86a 100644
--- a/hw/block/meson.build
+++ b/hw/block/meson.build
@@ -4,7 +4,8 @@
   'hd-geometry.c'
 ))
 softmmu_ss.add(when: 'CONFIG_ECC', if_true: files('ecc.c'))
-softmmu_ss.add(when: 'CONFIG_FDC', if_true: files('fdc.c'))
+softmmu_ss.add(when: 'CONFIG_FDC', if_true: files('fdc.c'),
+                                       if_false: files('fdc-isa-stubs.c'))
 softmmu_ss.add(when: 'CONFIG_NAND', if_true: files('nand.c'))
 softmmu_ss.add(when: 'CONFIG_ONENAND', if_true: files('onenand.c'))
 softmmu_ss.add(when: 'CONFIG_PFLASH_CFI01', if_true: files('pflash_cfi01.c'))
@@ -18,3 +19,5 @@
 specific_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-user-blk.c'))
 
 subdir('dataplane')
+
+softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('fdc-isa-stubs.c'))
diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig
index 55e0003ce40..7216f66a54a 100644
--- a/hw/isa/Kconfig
+++ b/hw/isa/Kconfig
@@ -17,6 +17,7 @@ config ISA_SUPERIO
     bool
     select ISA_BUS
     select PCKBD
+    select FDC
 
 config PC87312
     bool
-- 
2.26.3



  reply	other threads:[~2021-05-19 16:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 16:34 [PATCH v6 0/5] hw/block/fdc: Allow Kconfig-selecting ISA bus/SysBus floppy controllers Philippe Mathieu-Daudé
2021-05-19 16:34 ` Philippe Mathieu-Daudé [this message]
2021-05-20  7:14   ` [PATCH v6 1/5] hw/isa/Kconfig: Fix missing dependency ISA_SUPERIO -> FDC Thomas Huth
2021-05-19 16:34 ` [PATCH v6 2/5] hw/block/fdc: Replace disabled fprintf() by trace event Philippe Mathieu-Daudé
2021-05-19 16:34 ` [PATCH v6 3/5] hw/block/fdc: Declare shared prototypes in fdc-internal.h Philippe Mathieu-Daudé
2021-05-19 16:34 ` [PATCH v6 4/5] hw/block/fdc: Extract ISA floppy controllers to fdc-isa.c Philippe Mathieu-Daudé
2021-05-19 16:34 ` [PATCH v6 5/5] hw/block/fdc: Extract SysBus floppy controllers to fdc-sysbus.c Philippe Mathieu-Daudé
2021-05-19 21:39 ` [PATCH v6 0/5] hw/block/fdc: Allow Kconfig-selecting ISA bus/SysBus floppy controllers John Snow
2021-05-20  9:59   ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210519163448.2154339-2-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.