Skip to contentSkip to conversation

isa-cleanup queue 20170206

GIT PULL Applied David Gibson 3 participants 6 messages Feb 6, 2017

lore
Share & tools
lore
#0 lore raw

The following changes since commit a951316b8a5c3c63254f20a826afeed940dd4cba:

Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2017-02-03 14:41:49 +0000)

are available in the git repository at:

git://github.com/dgibson/qemu.git tags/isa-cleanup-20170206

for you to fetch changes up to c124c4d13bcb19fc866e7f6de075f906fca6af4a:

Split ISA and sysbus versions of m48t59 device (2017-02-06 12:33:21 +1100)

----------------------------------------------------------------
Allow ISA to be disabled on some platforms (v3)

This makes some cleanups that are a start on allowing ISA to be compiled out for platforms which don't use it.

I posted this series last November, and it collected a number of R-bs and no apparent objections. So, I've now rebased it (trivially) and am sending a pull request in the hopes of merge. A lot of the pieces here don't have a clear maintainer, so I'm sending it directly to Peter.

Notes:
* Patch 3/3 triggers a style warning, but that's just because I'm moving a C++ // comment verbatim from one file to another

Changes since v2:
* Trivial rebase

Changes since v1:
* Fixed some silly compile errors in 3/3 exposed by some changes in other headers

----------------------------------------------------------------
David Gibson (3):
Split serial-isa into its own config option Allow ISA bus to be configured out Split ISA and sysbus versions of m48t59 device

 default-configs/alpha-softmmu.mak       |   1 +
 default-configs/arm-softmmu.mak         |   1 +
 default-configs/i386-softmmu.mak        |   1 +
 default-configs/mips-softmmu-common.mak |   1 +
 default-configs/moxie-softmmu.mak       |   2 +
 default-configs/pci.mak                 |   3 +
 default-configs/ppc-softmmu.mak         |   1 +
 default-configs/ppc64-softmmu.mak       |   1 +
 default-configs/ppcemb-softmmu.mak      |   1 +
 default-configs/sh4-softmmu.mak         |   1 +
 default-configs/sh4eb-softmmu.mak       |   1 +
 default-configs/sparc-softmmu.mak       |   1 +
 default-configs/sparc64-softmmu.mak     |   1 +
 default-configs/unicore32-softmmu.mak   |   1 +
 default-configs/x86_64-softmmu.mak      |   1 +
 hw/char/Makefile.objs                   |   3 +-
 hw/isa/Makefile.objs                    |   2 +-
 hw/timer/Makefile.objs                  |   3 +
 hw/timer/m48t59-internal.h              |  82 ++++++++++++
 hw/timer/m48t59-isa.c                   | 181 +++++++++++++++++++++++++
 hw/timer/m48t59.c                       | 228 +++-----------------------------
 21 files changed, 305 insertions(+), 212 deletions(-)
 create mode 100644 hw/timer/m48t59-internal.h
 create mode 100644 hw/timer/m48t59-isa.c
#1 lore raw

[Qemu-devel] [PULL 2/3] Allow ISA bus to be configured out

Currently, the code to handle the legacy ISA bus is always included in qemu. However there are lots of platforms that don't include ISA legacy devies, and quite a few that have never used ISA legacy devices at all.

This patch allows the ISA bus code to be disabled in the configuration for platforms where it doesn't make sense.

For now, the default configs are adjusted to include ISA on all platforms including PCI: anything with PCI can at least in principle add an i82378 PCI->ISA bridge. Also, CONFIG_IDE_CORE which is already in pci.mak requires ISA support.

We also explicitly enable ISA on some other non-PCI platforms which include ISA devices: moxie, sparc and unicore32. We may want to pare this down in future.

The platforms that will lose ISA by default are: cris, lm32, microblazeel, microblaze, openrisc, s390x, tricore, xtensaeb, xtensa. As far as I can tell none of these ever used ISA.

---
 default-configs/moxie-softmmu.mak     | 1 +
 default-configs/pci.mak               | 2 ++
 default-configs/sparc-softmmu.mak     | 1 +
 default-configs/unicore32-softmmu.mak | 1 +
 hw/isa/Makefile.objs                  | 2 +-
 5 files changed, 6 insertions(+), 1 deletion(-)
default-configs/moxie-softmmu.mak +1 -0
index 7e22863..e00d099 100644
@@ -1,5 +1,6 @@
 # Default configuration for moxie-softmmu
 
+CONFIG_ISA_BUS=y
 CONFIG_MC146818RTC=y
 CONFIG_SERIAL=y
 CONFIG_SERIAL_ISA=y
default-configs/pci.mak +2 -0
index d8d6548..60dc651 100644
@@ -1,4 +1,6 @@
 CONFIG_PCI=y
+# For now, CONFIG_IDE_CORE requires ISA, so we enable it here
+CONFIG_ISA_BUS=y
 CONFIG_VIRTIO_PCI=y
 CONFIG_VIRTIO=y
 CONFIG_USB_UHCI=y
default-configs/sparc-softmmu.mak +1 -0
index ab796b3..004b0f4 100644
@@ -1,5 +1,6 @@
 # Default configuration for sparc-softmmu
 
+CONFIG_ISA_BUS=y
 CONFIG_ECC=y
 CONFIG_ESP=y
 CONFIG_ESCC=y
default-configs/unicore32-softmmu.mak +1 -0
index de38577..5f6c4a8 100644
@@ -1,4 +1,5 @@
 # Default configuration for unicore32-softmmu
+CONFIG_ISA_BUS=y
 CONFIG_PUV3=y
 CONFIG_PTIMER=y
 CONFIG_PCKBD=y
hw/isa/Makefile.objs +1 -1
index 9164556..fb37c55 100644
@@ -1,4 +1,4 @@
-common-obj-y += isa-bus.o
+common-obj-$(CONFIG_ISA_BUS) += isa-bus.o
 common-obj-$(CONFIG_APM) += apm.o
 common-obj-$(CONFIG_I82378) += i82378.o
 common-obj-$(CONFIG_PC87312) += pc87312.o
Signature · 1 line
2.9.3
#2 lore raw

[Qemu-devel] [PULL 1/3] Split serial-isa into its own config option

In reply to David Gibson

At present, the core device model code for 8250-like serial ports (serial.c) and the code for serial ports attached to ISA-style legacy IO (serial-isa.c) are both controlled by the CONFIG_SERIAL variable.

There are lots and lots of embedded platforms that have 8250-like serial ports but have never had anything resembling ISA legacy IO. Therefore, split serial-isa into its own CONFIG_SERIAL_ISA option so it can be disabled for platforms where it's not appropriate.

For now, I enabled CONFIG_SERIAL_ISA in every default-config where CONFIG_SERIAL is enabled, excepting microblaze, or32, and xtensa. As best as I can tell, those platforms never used legacy ISA, and also don't include PCI support (which would allow connection of a PCI->ISA bridge and/or a southbridge including legacy ISA serial ports).

---
 default-configs/alpha-softmmu.mak       | 1 +
 default-configs/arm-softmmu.mak         | 1 +
 default-configs/i386-softmmu.mak        | 1 +
 default-configs/mips-softmmu-common.mak | 1 +
 default-configs/moxie-softmmu.mak       | 1 +
 default-configs/pci.mak                 | 1 +
 default-configs/ppc-softmmu.mak         | 1 +
 default-configs/ppc64-softmmu.mak       | 1 +
 default-configs/ppcemb-softmmu.mak      | 1 +
 default-configs/sh4-softmmu.mak         | 1 +
 default-configs/sh4eb-softmmu.mak       | 1 +
 default-configs/sparc64-softmmu.mak     | 1 +
 default-configs/x86_64-softmmu.mak      | 1 +
 hw/char/Makefile.objs                   | 3 ++-
 14 files changed, 15 insertions(+), 1 deletion(-)
default-configs/alpha-softmmu.mak +1 -0
index 7f6161e..e0d75e3 100644
@@ -3,6 +3,7 @@
 include pci.mak
 include usb.mak
 CONFIG_SERIAL=y
+CONFIG_SERIAL_ISA=y
 CONFIG_I8254=y
 CONFIG_PCKBD=y
 CONFIG_VGA_CIRRUS=y
default-configs/arm-softmmu.mak +1 -0
index 6f2a180..824fa71 100644
@@ -6,6 +6,7 @@ CONFIG_VGA=y
 CONFIG_NAND=y
 CONFIG_ECC=y
 CONFIG_SERIAL=y
+CONFIG_SERIAL_ISA=y
 CONFIG_PTIMER=y
 CONFIG_SD=y
 CONFIG_MAX7310=y
default-configs/i386-softmmu.mak +1 -0
index 384cefb..48b07a4 100644
@@ -15,6 +15,7 @@ CONFIG_IPMI_EXTERN=y
 CONFIG_ISA_IPMI_KCS=y
 CONFIG_ISA_IPMI_BT=y
 CONFIG_SERIAL=y
+CONFIG_SERIAL_ISA=y
 CONFIG_PARALLEL=y
 CONFIG_I8254=y
 CONFIG_PCSPK=y
default-configs/mips-softmmu-common.mak +1 -0
index f0676f5..7d8f5db 100644
@@ -9,6 +9,7 @@ CONFIG_VGA_ISA_MM=y
 CONFIG_VGA_CIRRUS=y
 CONFIG_VMWARE_VGA=y
 CONFIG_SERIAL=y
+CONFIG_SERIAL_ISA=y
 CONFIG_PARALLEL=y
 CONFIG_I8254=y
 CONFIG_PCSPK=y
default-configs/moxie-softmmu.mak +1 -0
index 1a95476..7e22863 100644
@@ -2,4 +2,5 @@
 
 CONFIG_MC146818RTC=y
 CONFIG_SERIAL=y
+CONFIG_SERIAL_ISA=y
 CONFIG_VGA=y
default-configs/pci.mak +1 -0
index fff7ce3..d8d6548 100644
@@ -27,6 +27,7 @@ CONFIG_AHCI=y
 CONFIG_ESP=y
 CONFIG_ESP_PCI=y
 CONFIG_SERIAL=y
+CONFIG_SERIAL_ISA=y
 CONFIG_SERIAL_PCI=y
 CONFIG_IPACK=y
 CONFIG_WDT_IB6300ESB=y
default-configs/ppc-softmmu.mak +1 -0
index 7dd004e..09c1d45 100644
@@ -46,6 +46,7 @@ CONFIG_PLATFORM_BUS=y
 CONFIG_ETSEC=y
 CONFIG_LIBDECNUMBER=y
 # For PReP
+CONFIG_SERIAL_ISA=y
 CONFIG_MC146818RTC=y
 CONFIG_ISA_TESTDEV=y
 CONFIG_RS6000_MC=y
default-configs/ppc64-softmmu.mak +1 -0
index 9ae6563..05c8335 100644
@@ -52,6 +52,7 @@ CONFIG_XICS=$(CONFIG_PSERIES)
 CONFIG_XICS_SPAPR=$(CONFIG_PSERIES)
 CONFIG_XICS_KVM=$(and $(CONFIG_PSERIES),$(CONFIG_KVM))
 # For PReP
+CONFIG_SERIAL_ISA=y
 CONFIG_MC146818RTC=y
 CONFIG_ISA_TESTDEV=y
 CONFIG_MEM_HOTPLUG=y
default-configs/ppcemb-softmmu.mak +1 -0
index 54acc4d..7f56004 100644
@@ -5,6 +5,7 @@ include sound.mak
 include usb.mak
 CONFIG_M48T59=y
 CONFIG_SERIAL=y
+CONFIG_SERIAL_ISA=y
 CONFIG_I8257=y
 CONFIG_OPENPIC=y
 CONFIG_PFLASH_CFI01=y
default-configs/sh4-softmmu.mak +1 -0
index 8e00390..546d855 100644
@@ -3,6 +3,7 @@
 include pci.mak
 include usb.mak
 CONFIG_SERIAL=y
+CONFIG_SERIAL_ISA=y
 CONFIG_PTIMER=y
 CONFIG_PFLASH_CFI02=y
 CONFIG_SH4=y
default-configs/sh4eb-softmmu.mak +1 -0
index efdd058..2d3fd49 100644
@@ -3,6 +3,7 @@
 include pci.mak
 include usb.mak
 CONFIG_SERIAL=y
+CONFIG_SERIAL_ISA=y
 CONFIG_PTIMER=y
 CONFIG_PFLASH_CFI02=y
 CONFIG_SH4=y
default-configs/sparc64-softmmu.mak +1 -0
index c581e61..d07876a 100644
@@ -5,6 +5,7 @@ include usb.mak
 CONFIG_M48T59=y
 CONFIG_PTIMER=y
 CONFIG_SERIAL=y
+CONFIG_SERIAL_ISA=y
 CONFIG_PARALLEL=y
 CONFIG_PCKBD=y
 CONFIG_FDC=y
default-configs/x86_64-softmmu.mak +1 -0
index 491a191..fd96345 100644
@@ -15,6 +15,7 @@ CONFIG_IPMI_EXTERN=y
 CONFIG_ISA_IPMI_KCS=y
 CONFIG_ISA_IPMI_BT=y
 CONFIG_SERIAL=y
+CONFIG_SERIAL_ISA=y
 CONFIG_PARALLEL=y
 CONFIG_I8254=y
 CONFIG_PCSPK=y
hw/char/Makefile.objs +2 -1
index 69a553c..6ea76fe 100644
@@ -2,7 +2,8 @@ common-obj-$(CONFIG_IPACK) += ipoctal232.o
 common-obj-$(CONFIG_ESCC) += escc.o
 common-obj-$(CONFIG_PARALLEL) += parallel.o
 common-obj-$(CONFIG_PL011) += pl011.o
-common-obj-$(CONFIG_SERIAL) += serial.o serial-isa.o
+common-obj-$(CONFIG_SERIAL) += serial.o
+common-obj-$(CONFIG_SERIAL_ISA) += serial-isa.o
 common-obj-$(CONFIG_SERIAL_PCI) += serial-pci.o
 common-obj-$(CONFIG_VIRTIO) += virtio-console.o
 common-obj-$(CONFIG_XILINX) += xilinx_uartlite.o
Signature · 1 line
2.9.3
#3 lore raw

[Qemu-devel] [PULL 3/3] Split ISA and sysbus versions of m48t59 device

In reply to David Gibson

The m48t59 device supports both ISA and direct sysbus attached versions of the device in the one .c file. This can be awkward for some embedded machine types which need the sysbus M48T59, but don't want to pull in the ISA bus code and its other dependencies.

Therefore, this patch splits out the code for the ISA attached M48T59 into its own C file. It will be built when both CONFIG_M48T59 and CONFIG_ISA_BUS are enabled.

---
 hw/timer/Makefile.objs     |   3 +
 hw/timer/m48t59-internal.h |  82 ++++++++++++++++
 hw/timer/m48t59-isa.c      | 181 +++++++++++++++++++++++++++++++++++
 hw/timer/m48t59.c          | 228 ++++-----------------------------------------
 4 files changed, 284 insertions(+), 210 deletions(-)
 create mode 100644 hw/timer/m48t59-internal.h
 create mode 100644 hw/timer/m48t59-isa.c
hw/timer/Makefile.objs +3 -0
index 71994f2..fc99668 100644
@@ -6,6 +6,9 @@ common-obj-$(CONFIG_DS1338) += ds1338.o
 common-obj-$(CONFIG_HPET) += hpet.o
 common-obj-$(CONFIG_I8254) += i8254_common.o i8254.o
 common-obj-$(CONFIG_M48T59) += m48t59.o
+ifeq ($(CONFIG_ISA_BUS),y)
+common-obj-$(CONFIG_M48T59) += m48t59-isa.o
+endif
 common-obj-$(CONFIG_PL031) += pl031.o
 common-obj-$(CONFIG_PUV3) += puv3_ost.o
 common-obj-$(CONFIG_TWL92230) += twl92230.o
hw/timer/m48t59-internal.h new file +82 -0

82 lines not on this page · raw message

hw/timer/m48t59-isa.c new file +181 -0

181 lines not on this page · raw message

hw/timer/m48t59.c +18 -210

342 lines not on this page · raw message

Signature · 1 line
2.9.3
#4 lore raw
In reply to David Gibson
Your series seems to have some coding style problems. See output below for more information:

Hi,

Your series seems to have some coding style problems. See output below for more information:

Type: series
Subject: [Qemu-devel] [PULL 0/3] isa-cleanup queue 20170206
Message-id: [email protected]

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)" for c in $commits; do

    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))

done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu

 - [tag update]      patchew/[email protected] -> patchew/[email protected]
 - [tag update]      patchew/[email protected] -> patchew/[email protected]
 - [tag update]      patchew/[email protected] -> patchew/[email protected]
 - [tag update]      patchew/[email protected] -> patchew/[email protected]
 - [tag update]      patchew/[email protected] -> patchew/[email protected]
 - [tag update]      patchew/[email protected] -> patchew/[email protected]
 * [new tag]         patchew/[email protected] -> patchew/[email protected]

Switched to a new branch 'test'
55da952 Split ISA and sysbus versions of m48t59 device b58cd33 Allow ISA bus to be configured out 0782c85 Split serial-isa into its own config option

=== OUTPUT BEGIN ===
Checking PATCH 1/3: Split serial-isa into its own config option... Checking PATCH 2/3: Allow ISA bus to be configured out... Checking PATCH 3/3: Split ISA and sysbus versions of m48t59 device...
ERROR: do not use C99 // comments
#67: FILE: hw/timer/m48t59-internal.h:28:
+//#define DEBUG_NVRAM

total: 1 errors, 0 warnings, 614 lines checked

Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1

---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]

#5 lore raw
In reply to David Gibson
Quoted 28 lines · David Gibson

The following changes since commit a951316b8a5c3c63254f20a826afeed940dd4cba:

Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2017-02-03 14:41:49 +0000)

are available in the git repository at:

git://github.com/dgibson/qemu.git tags/isa-cleanup-20170206

for you to fetch changes up to c124c4d13bcb19fc866e7f6de075f906fca6af4a:

Split ISA and sysbus versions of m48t59 device (2017-02-06 12:33:21 +1100)

----------------------------------------------------------------
Allow ISA to be disabled on some platforms (v3)

This makes some cleanups that are a start on allowing ISA to be compiled out for platforms which don't use it.

I posted this series last November, and it collected a number of R-bs and no apparent objections. So, I've now rebased it (trivially) and am sending a pull request in the hopes of merge. A lot of the pieces here don't have a clear maintainer, so I'm sending it directly to Peter.

Notes:
* Patch 3/3 triggers a style warning, but that's just because I'm moving a C++ // comment verbatim from one file to another

Quoted 6 lines

Changes since v2:
* Trivial rebase

Changes since v1:
* Fixed some silly compile errors in 3/3 exposed by some changes in other headers

I think one or two platforms have appeared since (notably nios) but they don't need CONFIG_SERIAL_ISA so that's ok.

Applied, thanks.

-- PMM