All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/13] Drop compile time limit on number of serial ports
@ 2018-04-20 14:52 Peter Maydell
  2018-04-20 14:52 ` [Qemu-devel] [PATCH 01/13] hw/char/serial: Allow disconnected chardevs Peter Maydell
                   ` (14 more replies)
  0 siblings, 15 replies; 50+ messages in thread
From: Peter Maydell @ 2018-04-20 14:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: patches, Michael S . Tsirkin, Paolo Bonzini,
	Philippe Mathieu-Daudé,
	Marc-André Lureau

For many years, QEMU has had a compile time restriction on how
many serial port devices you can create and configure with the
-serial argument. This is 4, largely because for x86 PC the
traditional number of ISA serial devices is 4, and nobody's
ever changed the limit since.

This patchset drops the compile time limit.

The first patch removes an unnecessary check in hw/char/serial
that insisted that it was not talking to a NULL chardev.
Our newly set direction is that we want to allow NULL chardev
pointers, rather than requiring UARTs and boards to create
"null" backends, so drop the check. (I have looked at the code
and it should all be fine with a NULL pointer here, including
the tricky bit where qemu_chr_fe_add_watch() returns 0 and
the required behaviour is "insta-drain the FIFO".)

The next 4 patches drop unnecessary creations of "null" chardevs.
These have to go here because in most cases they were writing
back to the serial_hds[] array, which is about to go away.

Patch 6 implements an accessor function serial_hd() which can
be used to replace direct reads of serial_hds[].

Patch 7 is purely mechanical and replaces serial_hds[x]
with serial_hd(x).

Patches 8 through 11 remove or rename various uses of the
MAX_SERIAL_PORTS #define that shouldn't really be using it.

Patch 12 then makes the serial_hds array be dynamically
reallocated.

Patch 13 adds a "what actually is the highest serial_hds entry"
function for the benefit of spapr, which is the only remaining
user of MAX_SERIAL_PORTS.

Testing: I tested mips-malta and imx6 by hand; others are only
tested via 'make check' (which did find some bugs for me!)

thanks
-- PMM

Peter Maydell (13):
  hw/char/serial: Allow disconnected chardevs
  hw/arm/fsl-imx*: Don't create "null" chardevs for serial devices
  hw/mips/boston.c: Don't create "null" chardevs for serial devices
  hw/mips/mips_malta: Don't create "null" chardevs for serial devices
  hw/xtensa/xtfpga.c: Don't create "null" chardevs for serial devices
  vl.c: Provide accessor function serial_hd() for serial_hds[] array
  Change references to serial_hds[] to serial_hd()
  Remove checks on MAX_SERIAL_PORTS that are just bounds checks
  hw/char/exynos4210_uart.c: Remove unneeded handling of NULL chardev
  serial-isa: Use MAX_ISA_SERIAL_PORTS instead of MAX_SERIAL_PORTS
  superio: Don't use MAX_SERIAL_PORTS for serial port limit
  vl.c: Remove compile time limit on number of serial ports
  vl.c: new function max_serial_hds()

 include/hw/char/serial.h                 |  3 +++
 include/hw/isa/superio.h                 |  4 +++-
 include/sysemu/sysemu.h                  |  9 +++++---
 hw/arm/allwinner-a10.c                   |  4 ++--
 hw/arm/aspeed_soc.c                      |  4 ++--
 hw/arm/bcm2835_peripherals.c             |  4 ++--
 hw/arm/digic.c                           |  2 +-
 hw/arm/fsl-imx25.c                       | 14 +-----------
 hw/arm/fsl-imx31.c                       | 14 +-----------
 hw/arm/fsl-imx6.c                        | 17 ++-------------
 hw/arm/fsl-imx7.c                        |  4 +---
 hw/arm/highbank.c                        |  2 +-
 hw/arm/integratorcp.c                    |  4 ++--
 hw/arm/kzm.c                             |  4 ++--
 hw/arm/mps2-tz.c                         |  3 +--
 hw/arm/mps2.c                            |  6 ++----
 hw/arm/msf2-soc.c                        |  4 ++--
 hw/arm/musicpal.c                        |  8 +++----
 hw/arm/omap1.c                           |  6 +++---
 hw/arm/omap2.c                           | 10 ++++-----
 hw/arm/pxa2xx.c                          | 16 +++++++-------
 hw/arm/realview.c                        |  8 +++----
 hw/arm/stellaris.c                       |  2 +-
 hw/arm/stm32f205_soc.c                   |  3 +--
 hw/arm/strongarm.c                       |  2 +-
 hw/arm/versatilepb.c                     |  8 +++----
 hw/arm/vexpress.c                        |  8 +++----
 hw/arm/virt.c                            |  4 ++--
 hw/arm/xilinx_zynq.c                     |  4 ++--
 hw/arm/xlnx-zynqmp.c                     |  2 +-
 hw/char/exynos4210_uart.c                | 20 ------------------
 hw/char/serial-isa.c                     | 14 ++++++------
 hw/char/serial.c                         |  5 -----
 hw/char/xen_console.c                    |  2 +-
 hw/cris/axis_dev88.c                     |  2 +-
 hw/hppa/machine.c                        |  4 ++--
 hw/i386/pc.c                             |  2 +-
 hw/isa/isa-superio.c                     |  4 ++--
 hw/lm32/lm32_boards.c                    |  8 +++----
 hw/lm32/milkymist.c                      |  4 ++--
 hw/m68k/mcf5206.c                        |  4 ++--
 hw/m68k/mcf5208.c                        |  6 +++---
 hw/microblaze/petalogix_ml605_mmu.c      |  2 +-
 hw/microblaze/petalogix_s3adsp1800_mmu.c |  2 +-
 hw/mips/boston.c                         |  6 +-----
 hw/mips/mips_jazz.c                      |  8 +++----
 hw/mips/mips_malta.c                     |  7 +-----
 hw/mips/mips_mipssim.c                   |  4 ++--
 hw/mips/mips_r4k.c                       |  2 +-
 hw/misc/macio/macio.c                    |  4 ++--
 hw/moxie/moxiesim.c                      |  4 ++--
 hw/nios2/10m50_devboard.c                |  2 +-
 hw/openrisc/openrisc_sim.c               |  2 +-
 hw/ppc/e500.c                            | 12 +++++------
 hw/ppc/pnv.c                             |  2 +-
 hw/ppc/ppc405_uc.c                       | 16 +++++++-------
 hw/ppc/ppc440_bamboo.c                   |  8 +++----
 hw/ppc/sam460ex.c                        |  8 +++----
 hw/ppc/spapr.c                           |  6 +++---
 hw/ppc/virtex_ml507.c                    |  2 +-
 hw/riscv/sifive_e.c                      |  4 ++--
 hw/riscv/sifive_u.c                      |  4 ++--
 hw/riscv/spike.c                         |  4 ++--
 hw/riscv/virt.c                          |  2 +-
 hw/sh4/r2d.c                             |  2 +-
 hw/sh4/sh7750.c                          |  4 ++--
 hw/sparc/leon3.c                         |  4 ++--
 hw/sparc/sun4m.c                         |  4 ++--
 hw/sparc64/niagara.c                     |  4 ++--
 hw/sparc64/sun4u.c                       |  4 ++--
 hw/xtensa/sim.c                          |  4 ++--
 hw/xtensa/xtfpga.c                       |  6 +-----
 vl.c                                     | 27 ++++++++++++++++++------
 73 files changed, 184 insertions(+), 244 deletions(-)

-- 
2.17.0

^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2018-04-26 13:57 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-20 14:52 [Qemu-devel] [PATCH 00/13] Drop compile time limit on number of serial ports Peter Maydell
2018-04-20 14:52 ` [Qemu-devel] [PATCH 01/13] hw/char/serial: Allow disconnected chardevs Peter Maydell
2018-04-20 16:28   ` Philippe Mathieu-Daudé
2018-04-25 14:37   ` Thomas Huth
2018-04-20 14:52 ` [Qemu-devel] [PATCH 02/13] hw/arm/fsl-imx*: Don't create "null" chardevs for serial devices Peter Maydell
2018-04-20 16:48   ` Philippe Mathieu-Daudé
2018-04-25 14:34   ` Thomas Huth
2018-04-25 14:36   ` Thomas Huth
2018-04-26 12:53     ` Peter Maydell
2018-04-20 14:52 ` [Qemu-devel] [PATCH 03/13] hw/mips/boston.c: " Peter Maydell
2018-04-21  2:50   ` Philippe Mathieu-Daudé
2018-04-25 14:36   ` Thomas Huth
2018-04-20 14:52 ` [Qemu-devel] [PATCH 04/13] hw/mips/mips_malta: " Peter Maydell
2018-04-20 16:30   ` Philippe Mathieu-Daudé
2018-04-25 14:38   ` Thomas Huth
2018-04-20 14:52 ` [Qemu-devel] [PATCH 05/13] hw/xtensa/xtfpga.c: " Peter Maydell
2018-04-21 22:26   ` Philippe Mathieu-Daudé
2018-04-25 14:39   ` Thomas Huth
2018-04-20 14:52 ` [Qemu-devel] [PATCH 06/13] vl.c: Provide accessor function serial_hd() for serial_hds[] array Peter Maydell
2018-04-25 14:39   ` Philippe Mathieu-Daudé
2018-04-25 14:43   ` Thomas Huth
2018-04-20 14:52 ` [Qemu-devel] [PATCH 07/13] Change references to serial_hds[] to serial_hd() Peter Maydell
2018-04-25 14:52   ` Thomas Huth
2018-04-25 14:54   ` Philippe Mathieu-Daudé
2018-04-25 15:44     ` Peter Maydell
2018-04-20 14:52 ` [Qemu-devel] [PATCH 08/13] Remove checks on MAX_SERIAL_PORTS that are just bounds checks Peter Maydell
2018-04-25 14:56   ` Thomas Huth
2018-04-25 14:59   ` Philippe Mathieu-Daudé
2018-04-20 14:52 ` [Qemu-devel] [PATCH 09/13] hw/char/exynos4210_uart.c: Remove unneeded handling of NULL chardev Peter Maydell
2018-04-25 14:59   ` Philippe Mathieu-Daudé
2018-04-25 15:05   ` Thomas Huth
2018-04-25 15:23     ` Philippe Mathieu-Daudé
2018-04-20 14:52 ` [Qemu-devel] [PATCH 10/13] serial-isa: Use MAX_ISA_SERIAL_PORTS instead of MAX_SERIAL_PORTS Peter Maydell
2018-04-20 16:57   ` Philippe Mathieu-Daudé
2018-04-25 15:09   ` Thomas Huth
2018-04-20 14:52 ` [Qemu-devel] [PATCH 11/13] superio: Don't use MAX_SERIAL_PORTS for serial port limit Peter Maydell
2018-04-20 17:58   ` Philippe Mathieu-Daudé
2018-04-20 14:52 ` [Qemu-devel] [PATCH 12/13] vl.c: Remove compile time limit on number of serial ports Peter Maydell
2018-04-20 16:58   ` Paolo Bonzini
2018-04-20 17:06     ` Peter Maydell
2018-04-20 17:55       ` Paolo Bonzini
2018-04-20 17:01   ` Philippe Mathieu-Daudé
2018-04-25 15:16   ` Thomas Huth
2018-04-20 14:52 ` [Qemu-devel] [PATCH 13/13] vl.c: new function max_serial_hds() Peter Maydell
2018-04-20 17:50   ` Philippe Mathieu-Daudé
2018-04-26 13:00     ` Peter Maydell
2018-04-25 15:19   ` Thomas Huth
2018-04-20 15:10 ` [Qemu-devel] [PATCH 00/13] Drop compile time limit on number of serial ports no-reply
2018-04-20 15:12   ` Peter Maydell
2018-04-26 13:56 ` Peter Maydell

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.