[prev in list] [next in list] [prev in thread] [next in thread]
List: qemu-commits
Subject: [Qemu-commits] [qemu/qemu] 47c4f8: hw/char/serial: Allow disconnected chardevs
From: GitHub <noreply () github ! com>
Date: 2018-04-26 13:55:15
Message-ID: 5ae1da4392c92_29de2ac377453c0050052 () hookshot-fe-31feec6 ! cp1-iad ! github ! net ! mail
[Download RAW message or body]
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 47c4f85a0c27888e12af827471cfef87deb49821
https://github.com/qemu/qemu/commit/47c4f85a0c27888e12af827471cfef8=
7deb49821
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2018-04-26 (Thu, 26 Apr 2018)
Changed paths:
M hw/char/serial.c
Log Message:
-----------
hw/char/serial: Allow disconnected chardevs
Currently the serial.c realize code has an explicit check that it is not
connected to a disconnected backend (ie one with a NULL chardev).
This isn't what we want -- you should be able to create a serial device
even if it isn't attached to anything. Remove the check.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-id: 20180420145249.32435-2-peter.maydell@linaro.org
Commit: c221287f8ff4e46fffad11bb2a6bc99442e845be
https://github.com/qemu/qemu/commit/c221287f8ff4e46fffad11bb2a6bc99=
442e845be
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2018-04-26 (Thu, 26 Apr 2018)
Changed paths:
M hw/arm/fsl-imx25.c
M hw/arm/fsl-imx31.c
M hw/arm/fsl-imx6.c
Log Message:
-----------
hw/arm/fsl-imx*: Don't create "null" chardevs for serial devices
Following commit 12051d82f004024, UART devices should handle
being passed a NULL pointer chardev, so we don't need to
create "null" backends in board code. Remove the code that
does this and updates serial_hds[].
(fsl-imx7.c was already written this way.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-id: 20180420145249.32435-3-peter.maydell@linaro.org
Commit: 87364af8fe0c9def2e9de8e63f6b66135834318c
https://github.com/qemu/qemu/commit/87364af8fe0c9def2e9de8e63f6b661=
35834318c
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2018-04-26 (Thu, 26 Apr 2018)
Changed paths:
M hw/mips/boston.c
Log Message:
-----------
hw/mips/boston.c: Don't create "null" chardevs for serial devices
Following commit 12051d82f004024, UART devices should handle
being passed a NULL pointer chardev, so we don't need to
create "null" backends in board code. Remove the code that
does this and updates serial_hds[].
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Message-id: 20180420145249.32435-4-peter.maydell@linaro.org
Commit: 6afd0e297ff7f16caf879251adcce7b1d07acd05
https://github.com/qemu/qemu/commit/6afd0e297ff7f16caf879251adcce7b=
1d07acd05
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2018-04-26 (Thu, 26 Apr 2018)
Changed paths:
M hw/mips/mips_malta.c
Log Message:
-----------
hw/mips/mips_malta: Don't create "null" chardevs for serial devices
Following commit 12051d82f004024, UART devices should handle
being passed a NULL pointer chardev, so we don't need to
create "null" backends in board code. Remove the code that
does this and updates serial_hds[].
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Message-id: 20180420145249.32435-5-peter.maydell@linaro.org
Commit: b82fcd30325815254eea7197337b3e15e0a46938
https://github.com/qemu/qemu/commit/b82fcd30325815254eea7197337b3e1=
5e0a46938
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2018-04-26 (Thu, 26 Apr 2018)
Changed paths:
M hw/xtensa/xtfpga.c
Log Message:
-----------
hw/xtensa/xtfpga.c: Don't create "null" chardevs for serial devices
Following commit 12051d82f004024, UART devices should handle
being passed a NULL pointer chardev, so we don't need to
create "null" backends in board code. Remove the code that
does this and updates serial_hds[].
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Message-id: 20180420145249.32435-6-peter.maydell@linaro.org
Commit: a8d78cd0ab6204b6ee8897e30d0fbb9c8979ddca
https://github.com/qemu/qemu/commit/a8d78cd0ab6204b6ee8897e30d0fbb9=
c8979ddca
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2018-04-26 (Thu, 26 Apr 2018)
Changed paths:
M include/sysemu/sysemu.h
M vl.c
Log Message:
-----------
vl.c: Provide accessor function serial_hd() for serial_hds[] array
Provide an accessor function serial_hd() to return the Chardev
(if any) associated with the numbered serial port. This will
be used to replace direct accesses to the serial_hds[] array,
so that calling code doesn't need to care about the size of
that array.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Message-id: 20180420145249.32435-7-peter.maydell@linaro.org
Commit: 9bca0edb282de0007a4f068d9d20f3e3c3aadef7
https://github.com/qemu/qemu/commit/9bca0edb282de0007a4f068d9d20f3e=
3c3aadef7
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2018-04-26 (Thu, 26 Apr 2018)
Changed paths:
M hw/arm/allwinner-a10.c
M hw/arm/aspeed_soc.c
M hw/arm/bcm2835_peripherals.c
M hw/arm/digic.c
M hw/arm/fsl-imx25.c
M hw/arm/fsl-imx31.c
M hw/arm/fsl-imx6.c
M hw/arm/fsl-imx7.c
M hw/arm/highbank.c
M hw/arm/integratorcp.c
M hw/arm/kzm.c
M hw/arm/mps2-tz.c
M hw/arm/mps2.c
M hw/arm/msf2-soc.c
M hw/arm/musicpal.c
M hw/arm/omap1.c
M hw/arm/omap2.c
M hw/arm/pxa2xx.c
M hw/arm/realview.c
M hw/arm/stellaris.c
M hw/arm/stm32f205_soc.c
M hw/arm/strongarm.c
M hw/arm/versatilepb.c
M hw/arm/vexpress.c
M hw/arm/virt.c
M hw/arm/xilinx_zynq.c
M hw/arm/xlnx-zynqmp.c
M hw/char/exynos4210_uart.c
M hw/char/serial-isa.c
M hw/char/xen_console.c
M hw/cris/axis_dev88.c
M hw/hppa/machine.c
M hw/isa/isa-superio.c
M hw/lm32/lm32_boards.c
M hw/lm32/milkymist.c
M hw/m68k/mcf5206.c
M hw/m68k/mcf5208.c
M hw/microblaze/petalogix_ml605_mmu.c
M hw/microblaze/petalogix_s3adsp1800_mmu.c
M hw/mips/boston.c
M hw/mips/mips_jazz.c
M hw/mips/mips_malta.c
M hw/mips/mips_mipssim.c
M hw/misc/macio/macio.c
M hw/moxie/moxiesim.c
M hw/nios2/10m50_devboard.c
M hw/openrisc/openrisc_sim.c
M hw/ppc/e500.c
M hw/ppc/ppc405_uc.c
M hw/ppc/ppc440_bamboo.c
M hw/ppc/sam460ex.c
M hw/ppc/spapr.c
M hw/ppc/virtex_ml507.c
M hw/riscv/sifive_e.c
M hw/riscv/sifive_u.c
M hw/riscv/spike.c
M hw/riscv/virt.c
M hw/sh4/r2d.c
M hw/sh4/sh7750.c
M hw/sparc/leon3.c
M hw/sparc/sun4m.c
M hw/sparc64/niagara.c
M hw/sparc64/sun4u.c
M hw/xtensa/sim.c
M hw/xtensa/xtfpga.c
Log Message:
-----------
Change references to serial_hds[] to serial_hd()
Change all the uses of serial_hds[] to go via the new
serial_hd() function. Code change produced with:
find hw -name '*.[ch]' | xargs sed -i -e 's/serial_hds\[\([^]]*\)\]/seri=
al_hd(\1)/g'
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-id: 20180420145249.32435-8-peter.maydell@linaro.org
Commit: fc38a1120c2fabb76546ef8980e6d18b5fb7e843
https://github.com/qemu/qemu/commit/fc38a1120c2fabb76546ef8980e6d18=
b5fb7e843
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2018-04-26 (Thu, 26 Apr 2018)
Changed paths:
M hw/arm/fsl-imx25.c
M hw/arm/fsl-imx31.c
M hw/arm/fsl-imx6.c
M hw/arm/fsl-imx7.c
M hw/arm/mps2-tz.c
M hw/arm/mps2.c
M hw/arm/stm32f205_soc.c
Log Message:
-----------
Remove checks on MAX_SERIAL_PORTS that are just bounds checks
Remove checks on MAX_SERIAL_PORTS that were just checking whether
they were within bounds for the serial_hds[] array and falling
back to NULL if not. This isn't needed with the serial_hd()
function, which returns NULL for all indexes beyond what the
user set up.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Message-id: 20180420145249.32435-9-peter.maydell@linaro.org
Commit: 97274d0c05d45ec8dbddfaac74d8b292ae8154a2
https://github.com/qemu/qemu/commit/97274d0c05d45ec8dbddfaac74d8b29=
2ae8154a2
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2018-04-26 (Thu, 26 Apr 2018)
Changed paths:
M hw/char/exynos4210_uart.c
Log Message:
-----------
hw/char/exynos4210_uart.c: Remove unneeded handling of NULL chardev
The handling of NULL chardevs in exynos4210_uart_create() is now
all unnecessary: we don't need to create 'null' chardevs, and we
don't need to enforce a bounds check on serial_hd().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-id: 20180420145249.32435-10-peter.maydell@linaro.org
Commit: def337ffda34d331404bd7f1a42726b71500df22
https://github.com/qemu/qemu/commit/def337ffda34d331404bd7f1a42726b=
71500df22
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2018-04-26 (Thu, 26 Apr 2018)
Changed paths:
M hw/char/serial-isa.c
M hw/i386/pc.c
M hw/mips/mips_r4k.c
M hw/ppc/pnv.c
M hw/sparc64/sun4u.c
M include/hw/char/serial.h
Log Message:
-----------
serial-isa: Use MAX_ISA_SERIAL_PORTS instead of MAX_SERIAL_PORTS
The ISA serial port handling in serial-isa.c imposes a limit
of 4 serial ports. This is because we only know of 4 IO port
and IRQ settings for them, and is unrelated to the generic
MAX_SERIAL_PORTS limit, though they happen to both be set at
4 currently.
Use a new MAX_ISA_SERIAL_PORTS wherever that is the correct
limit to be checking against.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Message-id: 20180420145249.32435-11-peter.maydell@linaro.org
Commit: 2cd4f8acb0e3416c7431d0e48d03f1a4c4a64cc1
https://github.com/qemu/qemu/commit/2cd4f8acb0e3416c7431d0e48d03f1a=
4c4a64cc1
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2018-04-26 (Thu, 26 Apr 2018)
Changed paths:
M include/hw/isa/superio.h
Log Message:
-----------
superio: Don't use MAX_SERIAL_PORTS for serial port limit
The superio device has a limit on the number of serial
ports it supports which is really only there because
it has a fixed-size array serial[]. This limit isn't
related particularly to the global MAX_SERIAL_PORTS limit,
so use a different #define for it.
(In practice the users of superio only ever want 2 serial ports.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Message-id: 20180420145249.32435-12-peter.maydell@linaro.org
Commit: 6af2692e86f9fdfb3d3d291c2708e81c3125d8e5
https://github.com/qemu/qemu/commit/6af2692e86f9fdfb3d3d291c2708e81=
c3125d8e5
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2018-04-26 (Thu, 26 Apr 2018)
Changed paths:
M include/sysemu/sysemu.h
M vl.c
Log Message:
-----------
vl.c: Remove compile time limit on number of serial ports
Instead of having a fixed sized global serial_hds[] array,
use a local dynamically reallocated one, so we don't have
a compile time limit on how many serial ports a system has.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Message-id: 20180420145249.32435-13-peter.maydell@linaro.org
Commit: b8846a4d6352b2a1d2012f8b3b9115640524aeda
https://github.com/qemu/qemu/commit/b8846a4d6352b2a1d2012f8b3b91156=
40524aeda
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2018-04-26 (Thu, 26 Apr 2018)
Changed paths:
M hw/ppc/spapr.c
M include/sysemu/sysemu.h
M vl.c
Log Message:
-----------
vl.c: new function serial_max_hds()
Create a new function serial_max_hds() which returns the number of
serial ports defined by the user. This is needed only by spapr.
This allows us to remove the MAX_SERIAL_PORTS define.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Philippe Mathieu-Daud=C3=A9 <f4bug@amsat.org>
Message-id: 20180420145249.32435-14-peter.maydell@linaro.org
Compare: https://github.com/qemu/qemu/compare/20b2323edf8d...b8846a4d6352=
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic