[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] c8abcc: hw/m68k/next-cube: Make next_irq() fu
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] c8abcc: hw/m68k/next-cube: Make next_irq() function static |
Date: |
Tue, 19 Jan 2021 07:11:55 -0800 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: c8abcc87b1d61d61ca51a3cbe5002fcdee8fa724
https://github.com/qemu/qemu/commit/c8abcc87b1d61d61ca51a3cbe5002fcdee8fa724
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-01-19 (Tue, 19 Jan 2021)
Changed paths:
M hw/m68k/next-cube.c
M include/hw/m68k/next-cube.h
Log Message:
-----------
hw/m68k/next-cube: Make next_irq() function static
The next_irq() function is global, but isn't actually used anywhere
outside next-cube.c. Make it static.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210115201206.17347-2-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Commit: 660bef339043eca5a067d9dc2284c0a9776a600c
https://github.com/qemu/qemu/commit/660bef339043eca5a067d9dc2284c0a9776a600c
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-01-19 (Tue, 19 Jan 2021)
Changed paths:
M hw/m68k/next-cube.c
Log Message:
-----------
hw/m68k/next-cube: Move register/interrupt functionality into a device
Currently the next-cube board code open-codes a lot of handling of
interrupts and some miscellaneous registers. Move this into a proper
QOM device.
In the real hardware this functionality seems to be the
responsibility of the Peripheral Controller (PC) chip, so name the
device that.
There are several different things that will need to be moved into
this device:
* the mmio_iops register set
* the scr_ops register set
* the next_irq IRQ handling
To ease review, we structure the change as a sequence of commits: in
this first commit we create the skeleton of the NeXTPC device with no
content, but with a backdoor pointer to the NeXTState machine's state
struct so we can move parts of the code and still have refactored and
non-refactored code using the same struct data fields. Further
commits will move functionality into the new device piece by piece.
At the end we will be able to remove the backdoor pointer because all
the data fields will be in the NeXTPC struct and not the NeXTState
struct.
We'll add the VMState for the new device at the end of all that; this
is in theory a migration compatibility break but this machine does
not currently support migration at all anyway.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210115201206.17347-3-peter.maydell@linaro.org>
[huth: Add a comment in front of struct NeXTPC]
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Commit: 40831636453403fc8019b5d08670aa9bbb70be1d
https://github.com/qemu/qemu/commit/40831636453403fc8019b5d08670aa9bbb70be1d
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-01-19 (Tue, 19 Jan 2021)
Changed paths:
M hw/m68k/next-cube.c
Log Message:
-----------
hw/m68k/next-cube: Move mmio_ops into NeXTPC device
Move the registers handled by the mmio_ops struct into the NeXTPC
device. This allows us to also move the scr1 and scr2 data fields.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210115201206.17347-4-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Commit: 1dc7aeae614233cc02825a85d129512d29510576
https://github.com/qemu/qemu/commit/1dc7aeae614233cc02825a85d129512d29510576
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-01-19 (Tue, 19 Jan 2021)
Changed paths:
M hw/m68k/next-cube.c
Log Message:
-----------
hw/m68k/next-cube: Move scr_ops into NeXTPC device
Move the registers handled by the scr_ops struct into the NeXTPC
device.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210115201206.17347-5-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Commit: b497f4a1f8ee8aa07d03ed9dac7f4eff5048a949
https://github.com/qemu/qemu/commit/b497f4a1f8ee8aa07d03ed9dac7f4eff5048a949
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-01-19 (Tue, 19 Jan 2021)
Changed paths:
M hw/m68k/next-cube.c
Log Message:
-----------
hw/m68k/next-cube: Make next_irq take NeXTPC* as its opaque
Make the next_irq function take a NeXTPC* as its opaque rather than
the M68kCPU*. This will make it simpler to turn the next_irq
function into a gpio input line of the NeXTPC device in the next
commit.
For this to work we have to pass the CPU to the NeXTPC device via a
link property, in the same way we do in q800.c (and for the same
reason).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210115201206.17347-6-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Commit: ac99317b5f00e8e04f4d8a9d754d17538decd03c
https://github.com/qemu/qemu/commit/ac99317b5f00e8e04f4d8a9d754d17538decd03c
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-01-19 (Tue, 19 Jan 2021)
Changed paths:
M hw/m68k/next-cube.c
Log Message:
-----------
hw/m68k/next-cube: Move int_status and int_mask to NeXTPC struct
All the code which accesses int_status and int_mask is now doing
so via the NeXTPC->NeXTState indirection, so we can move these
fields into the NeXTPC struct where they belong.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210115201206.17347-7-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Commit: d9cd403972f45d0d08b3074cd87dabcf37d4dfcd
https://github.com/qemu/qemu/commit/d9cd403972f45d0d08b3074cd87dabcf37d4dfcd
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-01-19 (Tue, 19 Jan 2021)
Changed paths:
M hw/m68k/next-cube.c
M include/hw/m68k/next-cube.h
Log Message:
-----------
hw/m68k/next-cube: Make next_irq GPIO inputs to NEXT_PC device
Make the next_irq function be GPIO inputs to the NEXT_PC
device, rather than a freestanding set of qemu_irq lines.
This fixes a minor Coverity issue where it correctly points
out the trivial memory leak of the memory allocated in the
call to qemu_allocate_irqs().
Fixes: CID 1421962
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210115201206.17347-8-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Commit: 6f0face74955c076984ecc585c41162b770b5d8d
https://github.com/qemu/qemu/commit/6f0face74955c076984ecc585c41162b770b5d8d
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-01-19 (Tue, 19 Jan 2021)
Changed paths:
M hw/m68k/next-cube.c
Log Message:
-----------
hw/m68k/next-cube: Move rtc into NeXTPC struct
Move the rtc into the NeXTPC struct. Since this is the last
use of the 'backdoor' NextState pointer we can now remove that.
Probably the RTC should be its own device at some point: in hardware
there is a separate MCS1850 RTC chip connected to the Peripheral
Controller via a 1-bit serial interface. That goes beyond the remit
of the current refactoring, though.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210115201206.17347-9-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Commit: 00a43a6be264a12eaa6657aeeb617c96326bb53a
https://github.com/qemu/qemu/commit/00a43a6be264a12eaa6657aeeb617c96326bb53a
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-01-19 (Tue, 19 Jan 2021)
Changed paths:
M hw/m68k/next-cube.c
Log Message:
-----------
hw/m68k/next-cube: Remove unused fields from NeXTState
The fields scsi_irq, scsi_dma, scsi_reset and fd_irq in
NeXTState are all unused, except in commented out
"this should do something like this" code. Remove the
unused fields. As and when the functionality that might
use them is added, we can put in the correct kind of
wiring (which might or might not need to be a qemu_irq,
but which in any case will need to be in the NeXTPC
device, not in NeXTState).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210115201206.17347-10-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Commit: 75ca77ec7b597883cf98ee7c13ee143595de0390
https://github.com/qemu/qemu/commit/75ca77ec7b597883cf98ee7c13ee143595de0390
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-01-19 (Tue, 19 Jan 2021)
Changed paths:
M hw/m68k/next-cube.c
Log Message:
-----------
hw/m68k/next-cube: Add vmstate for NeXTPC device
Add the vmstate for the new NeXTPC devic; this is in theory
a migration compatibility break, but this machine doesn't have
working migration currently anyway.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210115201206.17347-11-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Commit: 41da32471183d7ca4756ad3ed8bb11c1d0c37a32
https://github.com/qemu/qemu/commit/41da32471183d7ca4756ad3ed8bb11c1d0c37a32
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-01-19 (Tue, 19 Jan 2021)
Changed paths:
M include/hw/m68k/next-cube.h
Log Message:
-----------
hw/m68k/next-cube: Add missing header comment to next-cube.h
The next-cube.h file is missing the usual copyright-and-license
header; add it (same as the next-cube.c one).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210115201206.17347-12-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Commit: f1fcb6851aba6dd9838886dc179717a11e344a1c
https://github.com/qemu/qemu/commit/f1fcb6851aba6dd9838886dc179717a11e344a1c
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-01-19 (Tue, 19 Jan 2021)
Changed paths:
M hw/m68k/next-cube.c
M include/hw/m68k/next-cube.h
Log Message:
-----------
Merge remote-tracking branch
'remotes/huth-gitlab/tags/pull-request-2021-01-19' into staging
* Refactor next-cube interrupt and register handling into a proper QOM device
# gpg: Signature made Tue 19 Jan 2021 08:15:39 GMT
# gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg: issuer "huth@tuxfamily.org"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg: aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5
* remotes/huth-gitlab/tags/pull-request-2021-01-19:
hw/m68k/next-cube: Add missing header comment to next-cube.h
hw/m68k/next-cube: Add vmstate for NeXTPC device
hw/m68k/next-cube: Remove unused fields from NeXTState
hw/m68k/next-cube: Move rtc into NeXTPC struct
hw/m68k/next-cube: Make next_irq GPIO inputs to NEXT_PC device
hw/m68k/next-cube: Move int_status and int_mask to NeXTPC struct
hw/m68k/next-cube: Make next_irq take NeXTPC* as its opaque
hw/m68k/next-cube: Move scr_ops into NeXTPC device
hw/m68k/next-cube: Move mmio_ops into NeXTPC device
hw/m68k/next-cube: Move register/interrupt functionality into a device
hw/m68k/next-cube: Make next_irq() function static
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Compare: https://github.com/qemu/qemu/compare/c114af1639d2...f1fcb6851aba