Allow ISA bus support to be configured out
cover Allow ISA bus support to be configured out
At the moment isa-bus.c is compiled unconditionally for all targets. However, some targets have never used legacy ISA devices. Many more targets have at least some machine types without ISA.
These patches allow ISA bus to be disabled in the configuration, thus allowing cut down configurations for targets and machine types that don't have ISA.
In addition to creating the CONFIG_ISA_BUS config option itself, this involves breaking some non-obvious dependencies on the ISA code.
David Gibson (4):
Split serial-isa into its own config option Allow ISA bus to be configured out
Split ISA and sysbus versions of m48t59 device Disable "info irq" and "info pic" for target-ppc
default-configs/alpha-softmmu.mak | 1 + default-configs/arm-softmmu.mak | 1 + default-configs/i386-softmmu.mak | 1 + default-configs/mips-softmmu.mak | 1 + default-configs/mips64-softmmu.mak | 1 + default-configs/mips64el-softmmu.mak | 1 + default-configs/mipsel-softmmu.mak | 1 + default-configs/moxie-softmmu.mak | 2 + 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/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 | 180 +++++++++++++++++++++++++++ hw/timer/m48t59.c | 228 +++------------------------------- monitor.c | 2 +- 25 files changed, 306 insertions(+), 213 deletions(-) create mode 100644 hw/timer/m48t59-internal.h create mode 100644 hw/timer/m48t59-isa.c
Signature · 1 line
2.4.3
PATCH 1/4 Split serial-isa into its own config option
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, xtensa and or32. Those platforms have technically lost functionality, but since they have no other PCI or ISA devices, it's fairly clear they never actually used leagacy IO stuff.
--- default-configs/alpha-softmmu.mak | 1 + default-configs/arm-softmmu.mak | 1 + default-configs/i386-softmmu.mak | 1 + default-configs/mips-softmmu.mak | 1 + default-configs/mips64-softmmu.mak | 1 + default-configs/mips64el-softmmu.mak | 1 + default-configs/mipsel-softmmu.mak | 1 + default-configs/moxie-softmmu.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 ++- 16 files changed, 17 insertions(+), 1 deletion(-)
default-configs/alpha-softmmu.mak +1 -0
@@ -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
@@ -7,6 +7,7 @@ CONFIG_ISA_MMIO=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
@@ -9,6 +9,7 @@ CONFIG_VGA_CIRRUS=y CONFIG_VMWARE_VGA=y CONFIG_VMMOUSE=y CONFIG_SERIAL=y +CONFIG_SERIAL_ISA=y CONFIG_PARALLEL=y CONFIG_I8254=y CONFIG_PCSPK=y
default-configs/mips-softmmu.mak +1 -0
@@ -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/mips64-softmmu.mak +1 -0
@@ -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/mips64el-softmmu.mak +1 -0
@@ -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/mipsel-softmmu.mak +1 -0
@@ -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
@@ -2,4 +2,5 @@ CONFIG_MC146818RTC=y CONFIG_SERIAL=y +CONFIG_SERIAL_ISA=y CONFIG_VGA=y
default-configs/ppc-softmmu.mak +1 -0
@@ -46,5 +46,6 @@ CONFIG_PLATFORM_BUS=y CONFIG_ETSEC=y CONFIG_LIBDECNUMBER=y # For PReP +CONFIG_SERIAL_ISA=y CONFIG_MC146818RTC=y CONFIG_ISA_TESTDEV=y
default-configs/ppc64-softmmu.mak +1 -0
@@ -50,5 +50,6 @@ CONFIG_LIBDECNUMBER=y CONFIG_XICS=$(CONFIG_PSERIES) CONFIG_XICS_KVM=$(and $(CONFIG_PSERIES),$(CONFIG_KVM)) # For PReP +CONFIG_SERIAL_ISA=y CONFIG_MC146818RTC=y CONFIG_ISA_TESTDEV=y
default-configs/ppcemb-softmmu.mak +1 -0
@@ -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
@@ -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
@@ -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
@@ -6,6 +6,7 @@ CONFIG_ISA_MMIO=y 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
@@ -10,6 +10,7 @@ CONFIG_VMWARE_VGA=y CONFIG_VIRTIO_VGA=y CONFIG_VMMOUSE=y CONFIG_SERIAL=y +CONFIG_SERIAL_ISA=y CONFIG_PARALLEL=y CONFIG_I8254=y CONFIG_PCSPK=y
hw/char/Makefile.objs +2 -1
@@ -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.4.3
Re: [Qemu-devel] [PATCH 1/4] Split serial-isa into its own config option
Am 29.06.2015 um 07:36 schrieb David Gibson:
Quoted 9 lines
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 theCONFIG_SERIALvariable.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_ISAoption so it can be disabled for platforms where it's not appropriate.
Quoted 5 lines
For now, I enabled
CONFIG_SERIAL_ISAin every default-config whereCONFIG_SERIALis enabled, excepting microblaze, xtensa and or32. Those platforms have technically lost functionality, but since they have no other PCI or ISA devices, it's fairly clear they never actually used leagacy IO stuff.
I think we can add moxie to that list, I'd be very surprised if it uses ISA. Applies also to 2/4. CC'ing the maintainer.
Which arm machines use ISA?
Regards,
Andreas
Quoted 20 lines
Signed-off-by David Gibson <[email protected]>--- default-configs/alpha-softmmu.mak | 1 + default-configs/arm-softmmu.mak | 1 + default-configs/i386-softmmu.mak | 1 + default-configs/mips-softmmu.mak | 1 + default-configs/mips64-softmmu.mak | 1 + default-configs/mips64el-softmmu.mak | 1 + default-configs/mipsel-softmmu.mak | 1 + default-configs/moxie-softmmu.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 ++- 16 files changed, 17 insertions(+), 1 deletion(-)
[snip]
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg)
Re: [Qemu-devel] [PATCH 1/4] Split serial-isa into its own config option
Quoted 10 lines · Andreas Färber
Am 29.06.2015 um 07:36 schrieb David Gibson:
Quoted 9 lines
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 theCONFIG_SERIALvariable.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_ISAoption so it can be disabled for platforms where it's not appropriate.
Quoted 8 lines
Quoted 5 lines
For now, I enabled
CONFIG_SERIAL_ISAin every default-config whereCONFIG_SERIALis enabled, excepting microblaze, xtensa and or32. Those platforms have technically lost functionality, but since they have no other PCI or ISA devices, it's fairly clear they never actually used leagacy IO stuff.I think we can add moxie to that list, I'd be very surprised if it uses ISA. Applies also to 2/4. CC'ing the maintainer.
Right. I'm being deliberately conservative in what I removed here. With this patch in place it's easy for boards to remove ISA serial support in future, but that seems like a change best made by the people who actually know the boards.
Quoted 1 line
Which arm machines use ISA?
I don't know, but the point was I couldn't quickly convince myself that none did.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Re: [Qemu-devel] [PATCH 1/4] Split serial-isa into its own config option
In reply to David GibsonQuoted 9 lines · 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 theCONFIG_SERIALvariable.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_ISAoption so it can be disabled for platforms where it's not appropriate.
Quoted 5 lines
For now, I enabled
CONFIG_SERIAL_ISAin every default-config whereCONFIG_SERIALis enabled, excepting microblaze, xtensa and or32. Those platforms have technically lost functionality, but since they have no other PCI or ISA devices, it's fairly clear they never actually used leagacy IO stuff.
s/leagacy/legacy/
Is it worth having a default-configs/isa.mak along the lines of our current pci.mak and usb.mak, for putting CONFIG_ defines for all ISA devices?
A quick grep suggests you can knock arm, moxie, sh4 and sh4eb off your list of things with CONFIG_SERIAL_ISA (no hits for ISABus).
I notice in passing that we still have a handful of config files which set CONFIG_ISA_MMIO, despite that having been deleted in commit 61fcb628627ea4 two years ago.
thanks
-- PMM
Re: [Qemu-devel] [PATCH 1/4] Split serial-isa into its own config option
Quoted 16 lines · Peter Maydell
Quoted 9 lines · 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 theCONFIG_SERIALvariable.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_ISAoption so it can be disabled for platforms where it's not appropriate.Quoted 5 lines
For now, I enabled
CONFIG_SERIAL_ISAin every default-config whereCONFIG_SERIALis enabled, excepting microblaze, xtensa and or32. Those platforms have technically lost functionality, but since they have no other PCI or ISA devices, it's fairly clear they never actually used leagacy IO stuff.
Quoted 5 lines
s/leagacy/legacy/
Is it worth having a default-configs/isa.mak along the lines of our current pci.mak and usb.mak, for putting
CONFIG_defines for all ISA devices?
I considered it, but there were enough variations in exactly what ISA options were selected in the existing configs for different targets that it seemed like a substantial distraction from what I'm trying to accomplish.
Quoted 11 lines
A quick grep suggests you can knock arm, moxie, sh4 and sh4eb off your list of things with
CONFIG_SERIAL_ISA(no hits for ISABus).I notice in passing that we still have a handful of config files which set
CONFIG_ISA_MMIO, despite that having been deleted in commit61fcb628627ea4two years ago.thanks
-- PMM
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Re: [Qemu-devel] [PATCH 1/4] Split serial-isa into its own config option
In reply to Peter MaydellQuoted 18 lines · Peter Maydell
Quoted 9 lines · 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 theCONFIG_SERIALvariable.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_ISAoption so it can be disabled for platforms where it's not appropriate.Quoted 5 lines
For now, I enabled
CONFIG_SERIAL_ISAin every default-config whereCONFIG_SERIALis enabled, excepting microblaze, xtensa and or32. Those platforms have technically lost functionality, but since they have no other PCI or ISA devices, it's fairly clear they never actually used leagacy IO stuff.s/leagacy/legacy/
Quoted 7 lines
Is it worth having a default-configs/isa.mak along the lines of our current pci.mak and usb.mak, for putting
CONFIG_defines for all ISA devices?A quick grep suggests you can knock arm, moxie, sh4 and sh4eb off your list of things with
CONFIG_SERIAL_ISA(no hits for ISABus).
I'll remove moxie, sh4 and sh4eb in my next spin.
I'm not so comfortable about ARM. I get the impression that there are so many x86 people now working in the ARM space, that it wouldn't surprise me at all if some vendors go and stick legacy stuff on there. So I'd prefer to leave it to the ARM people themselves to turn it off if I'm wrong.
Quoted 3 lines
I notice in passing that we still have a handful of config files which set
CONFIG_ISA_MMIO, despite that having been deleted in commit61fcb628627ea4two years ago.
Hm, I'll add a patch to clean that up, why not.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Re: [Qemu-devel] [PATCH 1/4] Split serial-isa into its own config option
Quoted 5 lines · David Gibson
Quoted 3 lines · Peter Maydell
A quick grep suggests you can knock arm, moxie, sh4 and sh4eb off your list of things with
CONFIG_SERIAL_ISA(no hits for ISABus).
Quoted 7 lines
I'll remove moxie, sh4 and sh4eb in my next spin.
I'm not so comfortable about ARM. I get the impression that there are so many x86 people now working in the ARM space, that it wouldn't surprise me at all if some vendors go and stick legacy stuff on there. So I'd prefer to leave it to the ARM people themselves to turn it off if I'm wrong.
I'm an ARM person :-)
I'm happy to turn ISA off for ARM, except for the case of generic PCI-to-ISA devices which IIRC you're handling by having pci.mak set CONFIG_ISA ?
(In practice that means ARM will still compile in the ISA code, but hey.)
-- PMM
Re: [Qemu-devel] [PATCH 1/4] Split serial-isa into its own config option
Quoted 14 lines · Peter Maydell
Quoted 5 lines · David Gibson
Quoted 3 lines · Peter Maydell
A quick grep suggests you can knock arm, moxie, sh4 and sh4eb off your list of things with
CONFIG_SERIAL_ISA(no hits for ISABus).Quoted 7 lines
I'll remove moxie, sh4 and sh4eb in my next spin.
I'm not so comfortable about ARM. I get the impression that there are so many x86 people now working in the ARM space, that it wouldn't surprise me at all if some vendors go and stick legacy stuff on there. So I'd prefer to leave it to the ARM people themselves to turn it off if I'm wrong.
Quoted 8 lines
I'm an ARM person :-)
I'm happy to turn ISA off for ARM, except for the case of generic PCI-to-ISA devices which IIRC you're handling by having pci.mak set
CONFIG_ISA?(In practice that means ARM will still compile in the ISA code, but hey.)
So that makes sense for the patch in this series which allows deconfiguration of the ISA bus itself. But this patch is just about ISA serial ports - given that ARM does have ISA for now, and will still be able to with a bridge it seems odd to disable ISA serial specifically.
Come to think of it, the same applies to SH4, since it has PCI. So I've put SERIAL_ISA back in for SH4, and updated the commit message to explain that for now I'm only taking out SERIAL_ISA support for things that clearly have neither ISA nor PCI support.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
PATCH 2/4 Allow ISA bus to be configured out
In reply to David GibsonCurrently, 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 (since CONFIG_IDE_CORE which is in pci.mak requires ISA support) and also several others which include ISA devices. We may want to pare this down in future.
This patch becomes more useful since b19c1c0 "isa: remove isa_mem_base variable." since that removes a dependency on isa-bus.c from vga.c.
--- default-configs/moxie-softmmu.mak | 1 + default-configs/pci.mak | 1 + default-configs/sparc-softmmu.mak | 1 + default-configs/unicore32-softmmu.mak | 1 + hw/isa/Makefile.objs | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-)
default-configs/moxie-softmmu.mak +1 -0
@@ -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 +1 -0
@@ -1,4 +1,5 @@ CONFIG_PCI=y +CONFIG_ISA_BUS=y CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO=y CONFIG_USB_UHCI=y
default-configs/sparc-softmmu.mak +1 -0
@@ -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
@@ -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
@@ -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.4.3
Re: [Qemu-devel] [PATCH 2/4] Allow ISA bus to be configured out
Am 29.06.2015 um 07:36 schrieb David Gibson:
Quoted 9 lines
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 (since
CONFIG_IDE_COREwhich is in pci.mak requires ISA support) and also several others which include ISA devices. We may want to pare this down in future.
PCI also allows to have a PCI-ISA bridge such as the i82378, which means that all PCI platforms can potentially obtain an actual ISA bus. So at least the commit message could use a makeover to avoid someone touching IDE to blindly disable the dependency.
You'd also need to think about the qtests then:
$ git grep i82378 -- tests/
tests/endianness-test.c: { "ppc", "g3beige", 0xfe000000, .bswap =
true, .superio = "i82378" },
tests/endianness-test.c: { "ppc", "bamboo", 0xe8000000, .bswap =
true, .superio = "i82378" },
tests/endianness-test.c: { "ppc64", "mac99", 0xf2000000, .bswap =
true, .superio = "i82378" },
tests/endianness-test.c: .bswap = true, .superio = "i82378" },
tests/endianness-test.c: { "sh4", "r2d", 0xfe240000, .superio =
"i82378" },
tests/endianness-test.c: { "sh4eb", "r2d", 0xfe240000, .bswap = true,
.superio = "i82378" },Quoted 18 lines
This patch becomes more useful since b19c1c0 "isa: remove
isa_mem_basevariable." since that removes a dependency onisa-bus.cfromvga.c.Signed-off-by David Gibson <[email protected]>--- default-configs/moxie-softmmu.mak | 1 + default-configs/pci.mak | 1 + default-configs/sparc-softmmu.mak | 1 + default-configs/unicore32-softmmu.mak | 1 + hw/isa/Makefile.objs | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-)default-configs/moxie-softmmu.mak +0
-0
default-configs/moxie-softmmu.mak line 6
Quoted 6 lines
default-configs/moxie-softmmu.mak +1
-0@@ -1,5 +1,6 @@ # Default configuration for moxie-softmmu +CONFIG_ISA_BUS=y CONFIG_MC146818RTC=y CONFIG_SERIAL=y CONFIG_SERIAL_ISA=y
I guess we can drop it for moxie ...
Quoted 26 lines
default-configs/pci.mak +1
-0@@ -1,4 +1,5 @@ CONFIG_PCI=y +CONFIG_ISA_BUS=y CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO=y CONFIG_USB_UHCI=ydefault-configs/sparc-softmmu.mak +1
-0@@ -1,5 +1,6 @@ # Default configuration for sparc-softmmu +CONFIG_ISA_BUS=y CONFIG_ECC=y CONFIG_ESP=y CONFIG_ESCC=ydefault-configs/unicore32-softmmu.mak +0
-0
default-configs/unicore32-softmmu.mak line 5
Quoted 5 lines
default-configs/unicore32-softmmu.mak +1
-0@@ -1,4 +1,5 @@ # Default configuration for unicore32-softmmu +CONFIG_ISA_BUS=y CONFIG_PUV3=y CONFIG_PTIMER=y CONFIG_PCKBD=y
... and for unicore32?
Regards,
Andreas
Quoted 10 lines
hw/isa/Makefile.objs +1
-1@@ -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 · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg)
Re: [Qemu-devel] [PATCH 2/4] Allow ISA bus to be configured out
Quoted 11 lines · Andreas Färber
Am 29.06.2015 um 07:36 schrieb David Gibson:
Quoted 9 lines
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 (since
CONFIG_IDE_COREwhich is in pci.mak requires ISA support) and also several others which include ISA devices. We may want to pare this down in future.
Quoted 4 lines
PCI also allows to have a PCI-ISA bridge such as the i82378, which means that all PCI platforms can potentially obtain an actual ISA bus. So at least the commit message could use a makeover to avoid someone touching IDE to blindly disable the dependency.
Sorry, I'm not quite following what you're getting at here.
Quoted 14 lines
You'd also need to think about the qtests then:
$ git grep i82378 -- tests/ tests/endianness-test.c: { "ppc", "g3beige", 0xfe000000, .bswap = true, .superio = "i82378" }, tests/endianness-test.c: { "ppc", "bamboo", 0xe8000000, .bswap = true, .superio = "i82378" }, tests/endianness-test.c: { "ppc64", "mac99", 0xf2000000, .bswap = true, .superio = "i82378" }, tests/endianness-test.c: .bswap = true, .superio = "i82378" }, tests/endianness-test.c: { "sh4", "r2d", 0xfe240000, .superio = "i82378" }, tests/endianness-test.c: { "sh4eb", "r2d", 0xfe240000, .bswap = true, .superio = "i82378" },
Ah, good point. I'll need to rework for that,
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Re: [Qemu-devel] [PATCH 2/4] Allow ISA bus to be configured out
Quoted 34 lines · David Gibson
Quoted 11 lines · Andreas Färber
Am 29.06.2015 um 07:36 schrieb David Gibson:
Quoted 9 lines
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 (since
CONFIG_IDE_COREwhich is in pci.mak requires ISA support) and also several others which include ISA devices. We may want to pare this down in future.Quoted 4 lines
PCI also allows to have a PCI-ISA bridge such as the i82378, which means that all PCI platforms can potentially obtain an actual ISA bus. So at least the commit message could use a makeover to avoid someone touching IDE to blindly disable the dependency.
Sorry, I'm not quite following what you're getting at here.
Quoted 14 lines
You'd also need to think about the qtests then:
$ git grep i82378 -- tests/ tests/endianness-test.c: { "ppc", "g3beige", 0xfe000000, .bswap = true, .superio = "i82378" }, tests/endianness-test.c: { "ppc", "bamboo", 0xe8000000, .bswap = true, .superio = "i82378" }, tests/endianness-test.c: { "ppc64", "mac99", 0xf2000000, .bswap = true, .superio = "i82378" }, tests/endianness-test.c: .bswap = true, .superio = "i82378" }, tests/endianness-test.c: { "sh4", "r2d", 0xfe240000, .superio = "i82378" }, tests/endianness-test.c: { "sh4eb", "r2d", 0xfe240000, .bswap = true, .superio = "i82378" },
Quoted 1 line
Ah, good point. I'll need to rework for that,
Actually.. on second thoughts..
CONFIG_I82378 already exists, and will break those tests of disabled.
So while making the tests more robust against config changes would be a good thing in general, I don't think it's in the scope of what I'm trying to do here - making ISA configurable won't make these tests any more broken with nonstandard configs than they already are.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Re: [Qemu-devel] [PATCH 2/4] Allow ISA bus to be configured out
Am 30.06.2015 um 06:48 schrieb David Gibson:
Quoted 37 lines · David Gibson
Quoted 34 lines · Andreas Färber
Quoted 11 lines
Am 29.06.2015 um 07:36 schrieb David Gibson:
Quoted 9 lines
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 (since
CONFIG_IDE_COREwhich is in pci.mak requires ISA support) and also several others which include ISA devices. We may want to pare this down in future.Quoted 4 lines
PCI also allows to have a PCI-ISA bridge such as the i82378, which means that all PCI platforms can potentially obtain an actual ISA bus. So at least the commit message could use a makeover to avoid someone touching IDE to blindly disable the dependency.
Sorry, I'm not quite following what you're getting at here.
Quoted 14 lines
You'd also need to think about the qtests then:
$ git grep i82378 -- tests/ tests/endianness-test.c: { "ppc", "g3beige", 0xfe000000, .bswap = true, .superio = "i82378" }, tests/endianness-test.c: { "ppc", "bamboo", 0xe8000000, .bswap = true, .superio = "i82378" }, tests/endianness-test.c: { "ppc64", "mac99", 0xf2000000, .bswap = true, .superio = "i82378" }, tests/endianness-test.c: .bswap = true, .superio = "i82378" }, tests/endianness-test.c: { "sh4", "r2d", 0xfe240000, .superio = "i82378" }, tests/endianness-test.c: { "sh4eb", "r2d", 0xfe240000, .bswap = true, .superio = "i82378" },Quoted 1 line
Ah, good point. I'll need to rework for that,
Quoted 8 lines
Actually.. on second thoughts..
CONFIG_I82378already exists, and will break those tests of disabled.So while making the tests more robust against config changes would be a good thing in general, I don't think it's in the scope of what I'm trying to do here - making ISA configurable won't make these tests any more broken with nonstandard configs than they already are.
I am mainly saying that your commit message is misleading.
CONFIG_IDE_CORE is not the only reason that pci.mak needs CONFIG_ISA_BUS=y, as you make it sound. The other problem is that we don't have Kconfig yet, so we have no way of modeling that I82378 depends on ISA_BUS, therefore either pci.mak (as done here) or ppc-softmmu.mak and ppc64-softmmu.mak need CONFIG_ISA_BUS=y. And due to the qtest either sh4/sh4eb need that same dependency too, or the test needs to be changed.
So please either revise the commit message when you resend, or you'll need to repeat CONFIG_ISA_BUS=y for ppc, ppc64, sh4, sh4eb.
Regards,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg)
PATCH 3/4 Split ISA and sysbus versions of m48t59 device
In reply to David GibsonThe 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 | 180 +++++++++++++++++++++++++++++++++++ hw/timer/m48t59.c | 228 ++++----------------------------------------- 4 files changed, 283 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
@@ -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 +180 -0
180 lines not on this page · raw message
hw/timer/m48t59.c +18 -210
341 lines not on this page · raw message
Signature · 1 line
2.4.3
PATCH 4/4 Disable "info irq" and "info pic" for target-ppc
In reply to David GibsonThe "info irq" and "info pic" HMP commands are available on some, but not all targets, and what they do isn't terribly consistent. For SPARC and LM32 they do something platform specific, but for x86, powerpc, and MIPS they print some information from the i8259 (and only the i8259) interrupt controller.
It's debatable whether these commands are any use at all, and we should probably make better, qdev aware ways of getting information from a machines PICs. However, those don't exist yet, so on x86 it's at least potentially useful to have these HMP commands. I can't speak for MIPS.
For ppc, though, the i8259, if it exists at all, is usually just a secondary controller for legacy ISA. The only case where i8259 is the main system PIC on ppc is for the ancient and little-used PReP platform.
So, even without QOM-ish replacement, the info pic and info irq HMP commands have no value on ppc.
This patch, therefore, disables these commands for ppc targets. This will allow ppc builds which don't include PReP to not include ISA bus support either.
--- monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
monitor.c +1 -1
@@ -2573,7 +2573,7 @@ static mon_cmd_t info_cmds[] = { .help = "show the command line history", .mhandler.cmd = hmp_info_history, }, -#if defined(TARGET_I386 ) || defined(TARGET_PPC ) || defined(TARGET_MIPS ) || \ +#if defined(TARGET_I386 ) || defined(TARGET_MIPS ) || \ defined(TARGET_LM32 ) || (defined(TARGET_SPARC ) && !defined(TARGET_SPARC64 )) { .name = "irq",
Signature · 1 line
2.4.3
Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc
Quoted 33 lines · David Gibson
The "info irq" and "info pic" HMP commands are available on some, but not all targets, and what they do isn't terribly consistent. For SPARC and LM32 they do something platform specific, but for x86, powerpc, and MIPS they print some information from the i8259 (and only the i8259) interrupt controller.
It's debatable whether these commands are any use at all, and we should probably make better, qdev aware ways of getting information from a machines PICs. However, those don't exist yet, so on x86 it's at least potentially useful to have these HMP commands. I can't speak for MIPS.
For ppc, though, the i8259, if it exists at all, is usually just a secondary controller for legacy ISA. The only case where i8259 is the main system PIC on ppc is for the ancient and little-used PReP platform.
So, even without QOM-ish replacement, the info pic and info irq HMP commands have no value on ppc.
This patch, therefore, disables these commands for ppc targets. This will allow ppc builds which don't include PReP to not include ISA bus support either.
Signed-off-by David Gibson <[email protected]>--- monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)monitor.c +0
-0
monitor.c static mon_cmd_t info_cmds[] = { · line 2579
Quoted 8 lines
monitor.c +1
-1@@ -2573,7 +2573,7 @@ static mon_cmd_t info_cmds[] = { .help = "show the command line history", .mhandler.cmd = hmp_info_history, }, -#if defined(TARGET_I386 ) || defined(TARGET_PPC ) || defined(TARGET_MIPS ) || \ +#if defined(TARGET_I386 ) || defined(TARGET_MIPS ) || \ defined(TARGET_LM32 ) || (defined(TARGET_SPARC ) && !defined(TARGET_SPARC64 )) { .name = "irq",
Perhaps we can a use a "#if defined(CONFIG_I8259) || defined(CONFIG_LM32) || (defined(TARGE_SPARC) && !defined(TARGET_SPARC64))" instead, so we keep the command for PReP ?
Laurent
Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc
Quoted 40 lines · On Mon, 29 Jun 2015 09:52:56 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 37 lines · David Gibson
The "info irq" and "info pic" HMP commands are available on some, but not all targets, and what they do isn't terribly consistent. For SPARC and LM32 they do something platform specific, but for x86, powerpc, and MIPS they print some information from the i8259 (and only the i8259) interrupt controller.
It's debatable whether these commands are any use at all, and we should probably make better, qdev aware ways of getting information from a machines PICs. However, those don't exist yet, so on x86 it's at least potentially useful to have these HMP commands. I can't speak for MIPS.
For ppc, though, the i8259, if it exists at all, is usually just a secondary controller for legacy ISA. The only case where i8259 is the main system PIC on ppc is for the ancient and little-used PReP platform.
So, even without QOM-ish replacement, the info pic and info irq HMP commands have no value on ppc.
This patch, therefore, disables these commands for ppc targets. This will allow ppc builds which don't include PReP to not include ISA bus support either.
Signed-off-by David Gibson <[email protected]>--- monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)monitor.c +1
-1@@ -2573,7 +2573,7 @@ static mon_cmd_t info_cmds[] = { .help = "show the command line history", .mhandler.cmd = hmp_info_history, }, -#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_MIPS) || \ +#if defined(TARGET_I386) || defined(TARGET_MIPS) || \
Quoted 8 lines
monitor.c static mon_cmd_t info_cmds[] = { · line 2579
Quoted 4 lines
monitor.c +0
-0defined (TARGET_LM32 ) || (defined (TARGET_SPARC ) && !defined (TARGET_SPARC64 )) { .name = "irq",Perhaps we can a use a "#if
defined(CONFIG_I8259)||defined(CONFIG_LM32)|| (defined(TARGE_SPARC)&& !defined(TARGET_SPARC64))" instead, so we keep the command for PReP ?
AFAIK this currently won't work since CONFIG_I8259 is only defined for the Makefiles, but not for the C pre-processor :-(
So unless somebody fixes that first, I think David's approach is the only practicable solution right now.
Thomas
Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc
Quoted 52 lines · Thomas Huth
Quoted 40 lines · On Mon, 29 Jun 2015 09:52:56 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 37 lines · David Gibson
The "info irq" and "info pic" HMP commands are available on some, but not all targets, and what they do isn't terribly consistent. For SPARC and LM32 they do something platform specific, but for x86, powerpc, and MIPS they print some information from the i8259 (and only the i8259) interrupt controller.
It's debatable whether these commands are any use at all, and we should probably make better, qdev aware ways of getting information from a machines PICs. However, those don't exist yet, so on x86 it's at least potentially useful to have these HMP commands. I can't speak for MIPS.
For ppc, though, the i8259, if it exists at all, is usually just a secondary controller for legacy ISA. The only case where i8259 is the main system PIC on ppc is for the ancient and little-used PReP platform.
So, even without QOM-ish replacement, the info pic and info irq HMP commands have no value on ppc.
This patch, therefore, disables these commands for ppc targets. This will allow ppc builds which don't include PReP to not include ISA bus support either.
Signed-off-by David Gibson <[email protected]>--- monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)monitor.c +1
-1@@ -2573,7 +2573,7 @@ static mon_cmd_t info_cmds[] = { .help = "show the command line history", .mhandler.cmd = hmp_info_history, }, -#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_MIPS) || \ +#if defined(TARGET_I386) || defined(TARGET_MIPS) || \Quoted 8 lines
monitor.c static mon_cmd_t info_cmds[] = { · line 2579
Quoted 4 lines
monitor.c +0
-0defined (TARGET_LM32 ) || (defined (TARGET_SPARC ) && !defined (TARGET_SPARC64 )) { .name = "irq",Perhaps we can a use a "#if
defined(CONFIG_I8259)||defined(CONFIG_LM32)|| (defined(TARGE_SPARC)&& !defined(TARGET_SPARC64))" instead, so we keep the command for PReP ?
Quoted 2 lines
AFAIK this currently won't work since
CONFIG_I8259is only defined for the Makefiles, but not for the C pre-processor :-(
Yes, I see that afterward, but ...
Quoted 2 lines
So unless somebody fixes that first, I think David's approach is the only practicable solution right now.
if you add "config-devices.h" in GENERATED_HEADERS in Makefile.target, and include "config-devices.h" in monitor.c, it works (all PREP dependencies in default-configs/ppc64-softmmu.mak must be removed too)
But does this change acceptable for a tiny improvement ?
Laurent
Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc
Quoted 60 lines · Laurent Vivier
Quoted 52 lines · Thomas Huth
Quoted 40 lines · On Mon, 29 Jun 2015 09:52:56 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 37 lines · David Gibson
The "info irq" and "info pic" HMP commands are available on some, but not all targets, and what they do isn't terribly consistent. For SPARC and LM32 they do something platform specific, but for x86, powerpc, and MIPS they print some information from the i8259 (and only the i8259) interrupt controller.
It's debatable whether these commands are any use at all, and we should probably make better, qdev aware ways of getting information from a machines PICs. However, those don't exist yet, so on x86 it's at least potentially useful to have these HMP commands. I can't speak for MIPS.
For ppc, though, the i8259, if it exists at all, is usually just a secondary controller for legacy ISA. The only case where i8259 is the main system PIC on ppc is for the ancient and little-used PReP platform.
So, even without QOM-ish replacement, the info pic and info irq HMP commands have no value on ppc.
This patch, therefore, disables these commands for ppc targets. This will allow ppc builds which don't include PReP to not include ISA bus support either.
Signed-off-by David Gibson <[email protected]>--- monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)monitor.c +1
-1@@ -2573,7 +2573,7 @@ static mon_cmd_t info_cmds[] = { .help = "show the command line history", .mhandler.cmd = hmp_info_history, }, -#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_MIPS) || \ +#if defined(TARGET_I386) || defined(TARGET_MIPS) || \Quoted 8 lines
monitor.c static mon_cmd_t info_cmds[] = { · line 2579
Quoted 4 lines
monitor.c +0
-0defined (TARGET_LM32 ) || (defined (TARGET_SPARC ) && !defined (TARGET_SPARC64 )) { .name = "irq",Perhaps we can a use a "#if
defined(CONFIG_I8259)||defined(CONFIG_LM32)|| (defined(TARGE_SPARC)&& !defined(TARGET_SPARC64))" instead, so we keep the command for PReP ?Quoted 2 lines
AFAIK this currently won't work since
CONFIG_I8259is only defined for the Makefiles, but not for the C pre-processor :-(Yes, I see that afterward, but ...
Quoted 8 lines
Quoted 2 lines
So unless somebody fixes that first, I think David's approach is the only practicable solution right now.
if you add "
config-devices.h" inGENERATED_HEADERSin Makefile.target, and include "config-devices.h" inmonitor.c, it works (all PREP dependencies in default-configs/ppc64-softmmu.mak must be removed too)But does this change acceptable for a tiny improvement ?
In fine, I think we can also do like for sparc:
defined(TARGET_PPC) && !defined(TARGET_PPC64)
Laurent
Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc
Am 29.06.2015 um 11:55 schrieb Laurent Vivier:
Quoted 36 lines · Laurent Vivier
Quoted 35 lines · Thomas Huth
Quoted 22 lines
Quoted 11 lines · On Mon, 29 Jun 2015 09:52:56 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 10 lines · David Gibson
monitor.c +1
-1@@ -2573,7 +2573,7 @@ static mon_cmd_t info_cmds[] = { .help = "show the command line history", .mhandler.cmd = hmp_info_history, }, -#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_MIPS) || \ +#if defined(TARGET_I386) || defined(TARGET_MIPS) || \Quoted 8 lines
monitor.c static mon_cmd_t info_cmds[] = { · line 2579
Quoted 4 lines
monitor.c +0
-0defined (TARGET_LM32 ) || (defined (TARGET_SPARC ) && !defined (TARGET_SPARC64 )) { .name = "irq",Perhaps we can a use a "#if
defined(CONFIG_I8259)||defined(CONFIG_LM32)|| (defined(TARGE_SPARC)&& !defined(TARGET_SPARC64))" instead, so we keep the command for PReP ?Quoted 2 lines
AFAIK this currently won't work since
CONFIG_I8259is only defined for the Makefiles, but not for the C pre-processor :-(Yes, I see that afterward, but ...
Quoted 2 lines
So unless somebody fixes that first, I think David's approach is the only practicable solution right now.
if you add "
config-devices.h" inGENERATED_HEADERSin Makefile.target, and include "config-devices.h" inmonitor.c, it works (all PREP dependencies in default-configs/ppc64-softmmu.mak must be removed too)
Quoted 5 lines
Quoted 1 line
But does this change acceptable for a tiny improvement ?
In fine, I think we can also do like for sparc:
defined(TARGET_PPC)&& !defined(TARGET_PPC64)
Alex specifically requested PReP to be made available in ppc64, too.
Regards,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg)
Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc
Quoted 37 lines · Andreas Färber
Am 29.06.2015 um 11:55 schrieb Laurent Vivier:
Quoted 36 lines · Laurent Vivier
Quoted 35 lines · Thomas Huth
Quoted 22 lines
Quoted 11 lines · On Mon, 29 Jun 2015 09:52:56 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 10 lines · David Gibson
monitor.c +1
-1@@ -2573,7 +2573,7 @@ static mon_cmd_t info_cmds[] = { .help = "show the command line history", .mhandler.cmd = hmp_info_history, }, -#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_MIPS) || \ +#if defined(TARGET_I386) || defined(TARGET_MIPS) || \Quoted 8 lines
monitor.c static mon_cmd_t info_cmds[] = { · line 2579
Quoted 4 lines
monitor.c +0
-0defined (TARGET_LM32 ) || (defined (TARGET_SPARC ) && !defined (TARGET_SPARC64 )) { .name = "irq",Perhaps we can a use a "#if
defined(CONFIG_I8259)||defined(CONFIG_LM32)|| (defined(TARGE_SPARC)&& !defined(TARGET_SPARC64))" instead, so we keep the command for PReP ?Quoted 2 lines
AFAIK this currently won't work since
CONFIG_I8259is only defined for the Makefiles, but not for the C pre-processor :-(Yes, I see that afterward, but ...
Quoted 2 lines
So unless somebody fixes that first, I think David's approach is the only practicable solution right now.
if you add "
config-devices.h" inGENERATED_HEADERSin Makefile.target, and include "config-devices.h" inmonitor.c, it works (all PREP dependencies in default-configs/ppc64-softmmu.mak must be removed too)
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
But does this change acceptable for a tiny improvement ?
In fine, I think we can also do like for sparc:
defined(TARGET_PPC)&& !defined(TARGET_PPC64)Alex specifically requested PReP to be made available in ppc64, too.
Thank you Andreas.
But why ? (I didn't find the answer with google, a link can be helpful).
Is there any 64bit PReP ?
BTW using CONFIG_I8259 cannot enable it only for PReP and not for other PPC64. So the solution from David is the best.
Laurent
Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc
Am 29.06.2015 um 12:22 schrieb Laurent Vivier:
Quoted 46 lines · Andreas Färber
Quoted 37 lines
Am 29.06.2015 um 11:55 schrieb Laurent Vivier:
Quoted 36 lines · Laurent Vivier
Quoted 35 lines · Thomas Huth
Quoted 22 lines
Quoted 11 lines · On Mon, 29 Jun 2015 09:52:56 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 10 lines · David Gibson
monitor.c +1
-1@@ -2573,7 +2573,7 @@ static mon_cmd_t info_cmds[] = { .help = "show the command line history", .mhandler.cmd = hmp_info_history, }, -#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_MIPS) || \ +#if defined(TARGET_I386) || defined(TARGET_MIPS) || \Quoted 8 lines
monitor.c static mon_cmd_t info_cmds[] = { · line 2579
Quoted 4 lines
monitor.c +0
-0defined (TARGET_LM32 ) || (defined (TARGET_SPARC ) && !defined (TARGET_SPARC64 )) { .name = "irq",Perhaps we can a use a "#if
defined(CONFIG_I8259)||defined(CONFIG_LM32)|| (defined(TARGE_SPARC)&& !defined(TARGET_SPARC64))" instead, so we keep the command for PReP ?Quoted 2 lines
AFAIK this currently won't work since
CONFIG_I8259is only defined for the Makefiles, but not for the C pre-processor :-(Yes, I see that afterward, but ...
Quoted 2 lines
So unless somebody fixes that first, I think David's approach is the only practicable solution right now.
if you add "
config-devices.h" inGENERATED_HEADERSin Makefile.target, and include "config-devices.h" inmonitor.c, it works (all PREP dependencies in default-configs/ppc64-softmmu.mak must be removed too)Quoted 7 lines
Quoted 5 lines
Quoted 1 line
But does this change acceptable for a tiny improvement ?
In fine, I think we can also do like for sparc:
defined(TARGET_PPC)&& !defined(TARGET_PPC64)Alex specifically requested PReP to be made available in ppc64, too.
Quoted 8 lines
Thank you Andreas.
But why ? (I didn't find the answer with google, a link can be helpful).
Is there any 64bit PReP ?
BTW using
CONFIG_I8259cannot enable it only for PReP and not for other PPC64. So the solution from David is the best.
For all newer targets (excluding sparc64 etc.) the 64-bit target is expected to deliver all 32-bit targets as well, for use with KVM in that bitness or for convenience of installing just one executable.
Alex is on CC and if you ping him hard enough he might reply himself. ;)
So, generating a header file, like you proposed above, seems like the most elegant solution to me here.
That won't help the qtest issue I raised on the other patch though, which would need a QMP lookup as discussed in the ivshmem context. I rebased that patch on Friday and can look into factoring that out into libqtest.[ch].
Regards,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg)
Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc
Am 29.06.2015 um 12:36 schrieb Andreas Färber:
Quoted 50 lines
Am 29.06.2015 um 12:22 schrieb Laurent Vivier:
Quoted 49 lines · Andreas Färber
Quoted 37 lines
Am 29.06.2015 um 11:55 schrieb Laurent Vivier:
Quoted 36 lines · Laurent Vivier
Quoted 35 lines · Thomas Huth
Quoted 22 lines
Quoted 11 lines · On Mon, 29 Jun 2015 09:52:56 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 10 lines · David Gibson
monitor.c +1
-1@@ -2573,7 +2573,7 @@ static mon_cmd_t info_cmds[] = { .help = "show the command line history", .mhandler.cmd = hmp_info_history, }, -#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_MIPS) || \ +#if defined(TARGET_I386) || defined(TARGET_MIPS) || \Quoted 8 lines
monitor.c static mon_cmd_t info_cmds[] = { · line 2579
Quoted 4 lines
monitor.c +0
-0defined (TARGET_LM32 ) || (defined (TARGET_SPARC ) && !defined (TARGET_SPARC64 )) { .name = "irq",Perhaps we can a use a "#if
defined(CONFIG_I8259)||defined(CONFIG_LM32)|| (defined(TARGE_SPARC)&& !defined(TARGET_SPARC64))" instead, so we keep the command for PReP ?Quoted 2 lines
AFAIK this currently won't work since
CONFIG_I8259is only defined for the Makefiles, but not for the C pre-processor :-(Yes, I see that afterward, but ...
Quoted 2 lines
So unless somebody fixes that first, I think David's approach is the only practicable solution right now.
if you add "
config-devices.h" inGENERATED_HEADERSin Makefile.target, and include "config-devices.h" inmonitor.c, it works (all PREP dependencies in default-configs/ppc64-softmmu.mak must be removed too)Quoted 7 lines
Quoted 5 lines
Quoted 1 line
But does this change acceptable for a tiny improvement ?
In fine, I think we can also do like for sparc:
defined(TARGET_PPC)&& !defined(TARGET_PPC64)Alex specifically requested PReP to be made available in ppc64, too.
Thank you Andreas.
But why ? (I didn't find the answer with google, a link can be helpful).
http://git.qemu-project.org/?p=qemu.git;a=commit;h=acbb090b2400f627a801074c4e3e006c7501bb26
(found by looking at the ppc64-softmmu.mak Git history)
Judging by Markus as the reporter, I assume it was a tree-wide analysis that came up with this inconsistency, which I was then asked to fix this way.
Andreas
Quoted 22 lines
Quoted 5 lines
Is there any 64bit PReP ?
BTW using
CONFIG_I8259cannot enable it only for PReP and not for other PPC64. So the solution from David is the best.For all newer targets (excluding sparc64 etc.) the 64-bit target is expected to deliver all 32-bit targets as well, for use with KVM in that bitness or for convenience of installing just one executable.
Alex is on CC and if you ping him hard enough he might reply himself. ;)
So, generating a header file, like you proposed above, seems like the most elegant solution to me here.
That won't help the qtest issue I raised on the other patch though, which would need a QMP lookup as discussed in the ivshmem context. I rebased that patch on Friday and can look into factoring that out into libqtest.[ch].Regards,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg)
Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc
Quoted 43 lines · Andreas Färber
Am 29.06.2015 um 12:36 schrieb Andreas Färber:
Quoted 42 lines
Am 29.06.2015 um 12:22 schrieb Laurent Vivier:
Quoted 41 lines · Andreas Färber
Quoted 33 lines
Am 29.06.2015 um 11:55 schrieb Laurent Vivier:
Quoted 32 lines · Laurent Vivier
Quoted 31 lines · Thomas Huth
Quoted 20 lines
Quoted 10 lines · On Mon, 29 Jun 2015 09:52:56 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 9 lines · David Gibson
monitor.c +0
-1@@ -2573,7 +2573,7 @@ static mon_cmd_t info_cmds[] = { .help = "show the command line history", .mhandler.cmd = hmp_info_history, }, -#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_MIPS) || \Quoted 8 lines
monitor.c static mon_cmd_t info_cmds[] = { · line 2579
Quoted 5 lines
monitor.c +1
-0+#if defined(TARGET_I386 ) || defined(TARGET_MIPS ) || \ defined(TARGET_LM32 ) || (defined(TARGET_SPARC ) && !defined(TARGET_SPARC64 )) { .name = "irq",Perhaps we can a use a "#if
defined(CONFIG_I8259)||defined(CONFIG_LM32)|| (defined(TARGE_SPARC)&& !defined(TARGET_SPARC64))" instead, so we keep the command for PReP ?Quoted 2 lines
AFAIK this currently won't work since
CONFIG_I8259is only defined for the Makefiles, but not for the C pre-processor :-(Yes, I see that afterward, but ...
Quoted 2 lines
So unless somebody fixes that first, I think David's approach is the only practicable solution right now.
if you add "
config-devices.h" inGENERATED_HEADERSin Makefile.target, and include "config-devices.h" inmonitor.c, it works (all PREP dependencies in default-configs/ppc64-softmmu.mak must be removed too)Quoted 5 lines
Quoted 4 lines
Quoted 1 line
But does this change acceptable for a tiny improvement ?
In fine, I think we can also do like for sparc:
defined(TARGET_PPC)&& !defined(TARGET_PPC64)Alex specifically requested PReP to be made available in ppc64, too.
Thank you Andreas.
Quoted 8 lines
Quoted 1 line
Quoted 1 line
But why ? (I didn't find the answer with google, a link can be helpful).
http://git.qemu-project.org/?p=qemu.git;a=commit;h=acbb090b2400f627a801074c4e3e006c7501bb26
(found by looking at the ppc64-softmmu.mak Git history)
Judging by Markus as the reporter, I assume it was a tree-wide analysis that came up with this inconsistency, which I was then asked to fix this way.
Yes, it's consistency. All 64bit targets allow to run their 32bit machine types as well. Whether this is a sensible thing to do or not is a different discussion that (if we want to) we need to do outside of the scope of this mail thread.
As far as this patch goes, you get a clear nack from me, as it's a regression for the prep target. Please just QOM'ify the interrupt controller, add an interfact that allows you to query the irq stats and then loop through all devices searching for that interface in the object tree. That way we should be able to get rid of all #ifdefs in that particular code and enable new irq controllers to expose their stats easily.
Alex
Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc
Quoted 53 lines · Alexander Graf
Quoted 43 lines · Andreas Färber
Am 29.06.2015 um 12:36 schrieb Andreas Färber:
Quoted 42 lines
Am 29.06.2015 um 12:22 schrieb Laurent Vivier:
Quoted 41 lines · Andreas Färber
Quoted 33 lines
Am 29.06.2015 um 11:55 schrieb Laurent Vivier:
Quoted 32 lines · Laurent Vivier
Quoted 31 lines · Thomas Huth
Quoted 20 lines
Quoted 10 lines · On Mon, 29 Jun 2015 09:52:56 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 9 lines · David Gibson
monitor.c +0
-1@@ -2573,7 +2573,7 @@ static mon_cmd_t info_cmds[] = { .help = "show the command line history", .mhandler.cmd = hmp_info_history, }, -#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_MIPS) || \Quoted 8 lines
monitor.c static mon_cmd_t info_cmds[] = { · line 2579
Quoted 5 lines
monitor.c +1
-0+#if defined(TARGET_I386 ) || defined(TARGET_MIPS ) || \ defined(TARGET_LM32 ) || (defined(TARGET_SPARC ) && !defined(TARGET_SPARC64 )) { .name = "irq",Perhaps we can a use a "#if
defined(CONFIG_I8259)||defined(CONFIG_LM32)|| (defined(TARGE_SPARC)&& !defined(TARGET_SPARC64))" instead, so we keep the command for PReP ?Quoted 2 lines
AFAIK this currently won't work since
CONFIG_I8259is only defined for the Makefiles, but not for the C pre-processor :-(Yes, I see that afterward, but ...
Quoted 2 lines
So unless somebody fixes that first, I think David's approach is the only practicable solution right now.
if you add "
config-devices.h" inGENERATED_HEADERSin Makefile.target, and include "config-devices.h" inmonitor.c, it works (all PREP dependencies in default-configs/ppc64-softmmu.mak must be removed too)Quoted 5 lines
Quoted 4 lines
Quoted 1 line
But does this change acceptable for a tiny improvement ?
In fine, I think we can also do like for sparc:
defined(TARGET_PPC)&& !defined(TARGET_PPC64)Alex specifically requested PReP to be made available in ppc64, too.
Thank you Andreas.
Quoted 8 lines
Quoted 1 line
Quoted 1 line
But why ? (I didn't find the answer with google, a link can be helpful).
http://git.qemu-project.org/?p=qemu.git;a=commit;h=acbb090b2400f627a801074c4e3e006c7501bb26
(found by looking at the ppc64-softmmu.mak Git history)
Judging by Markus as the reporter, I assume it was a tree-wide analysis that came up with this inconsistency, which I was then asked to fix this way.
Quoted 7 lines
Yes, it's consistency. All 64bit targets allow to run their 32bit machine types as well. Whether this is a sensible thing to do or not is a different discussion that (if we want to) we need to do outside of the scope of this mail thread.
As far as this patch goes, you get a clear nack from me, as it's a regression for the prep target. Please just QOM'ify the interrupt
"just"!?!
Quoted 4 lines
controller, add an interfact that allows you to query the irq stats and then loop through all devices searching for that interface in the object tree. That way we should be able to get rid of all #ifdefs in that particular code and enable new irq controllers to expose their stats easily.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc
In reply to Laurent VivierQuoted 70 lines · On Mon, 29 Jun 2015 11:55:08 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 67 lines · Laurent Vivier
Quoted 52 lines · Thomas Huth
Quoted 40 lines · On Mon, 29 Jun 2015 09:52:56 +0200 Laurent Vivier <[email protected]> wrote:
Quoted 37 lines · David Gibson
The "info irq" and "info pic" HMP commands are available on some, but not all targets, and what they do isn't terribly consistent. For SPARC and LM32 they do something platform specific, but for x86, powerpc, and MIPS they print some information from the i8259 (and only the i8259) interrupt controller.
It's debatable whether these commands are any use at all, and we should probably make better, qdev aware ways of getting information from a machines PICs. However, those don't exist yet, so on x86 it's at least potentially useful to have these HMP commands. I can't speak for MIPS.
For ppc, though, the i8259, if it exists at all, is usually just a secondary controller for legacy ISA. The only case where i8259 is the main system PIC on ppc is for the ancient and little-used PReP platform.
So, even without QOM-ish replacement, the info pic and info irq HMP commands have no value on ppc.
This patch, therefore, disables these commands for ppc targets. This will allow ppc builds which don't include PReP to not include ISA bus support either.
Signed-off-by David Gibson <[email protected]>--- monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)monitor.c +1
-1@@ -2573,7 +2573,7 @@ static mon_cmd_t info_cmds[] = { .help = "show the command line history", .mhandler.cmd = hmp_info_history, }, -#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_MIPS) || \ +#if defined(TARGET_I386) || defined(TARGET_MIPS) || \Quoted 8 lines
monitor.c static mon_cmd_t info_cmds[] = { · line 2579
Quoted 4 lines
monitor.c +0
-0defined (TARGET_LM32 ) || (defined (TARGET_SPARC ) && !defined (TARGET_SPARC64 )) { .name = "irq",Perhaps we can a use a "#if
defined(CONFIG_I8259)||defined(CONFIG_LM32)|| (defined(TARGE_SPARC)&& !defined(TARGET_SPARC64))" instead, so we keep the command for PReP ?Quoted 2 lines
AFAIK this currently won't work since
CONFIG_I8259is only defined for the Makefiles, but not for the C pre-processor :-(Yes, I see that afterward, but ...
Quoted 2 lines
So unless somebody fixes that first, I think David's approach is the only practicable solution right now.
if you add "
config-devices.h" inGENERATED_HEADERSin Makefile.target, and include "config-devices.h" inmonitor.c, it works (all PREP dependencies in default-configs/ppc64-softmmu.mak must be removed too)
Quoted 5 lines
Quoted 1 line
But does this change acceptable for a tiny improvement ?
In fine, I think we can also do like for sparc:
defined(TARGET_PPC)&& !defined(TARGET_PPC64)
+1
I like that idea, sounds like a good compromise.
Thomas