[{"id":1833740,"web_url":"http://patchwork.ozlabs.org/comment/1833740/","msgid":"<20180108025410.GA2131@umbus.fritz.box>","list_archive_url":null,"date":"2018-01-08T02:54:10","subject":"Re: [Qemu-devel] [PATCH 05/29] hw/input/i8042: extract declarations\n\tfrom i386/pc.h into input/i8042.h","submitter":{"id":47,"url":"http://patchwork.ozlabs.org/api/people/47/","name":"David Gibson","email":"david@gibson.dropbear.id.au"},"content":"On Sun, Jan 07, 2018 at 11:45:34PM -0300, Philippe Mathieu-Daudé wrote:\n> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n\nppc parts\n\nAcked-by: David Gibson <david@gibson.dropbear.id.au>\n\n> ---\n>  include/hw/i386/pc.h     |  9 ---------\n>  include/hw/input/i8042.h | 25 +++++++++++++++++++++++++\n>  hw/alpha/dp264.c         |  3 ++-\n>  hw/i386/pc.c             |  1 +\n>  hw/i386/vmmouse.c        |  1 +\n>  hw/i386/vmport.c         |  1 +\n>  hw/input/pckbd.c         |  2 +-\n>  hw/mips/mips_fulong2e.c  |  3 ++-\n>  hw/mips/mips_jazz.c      |  1 +\n>  hw/mips/mips_malta.c     |  3 ++-\n>  hw/mips/mips_r4k.c       |  3 ++-\n>  hw/ppc/prep.c            |  5 +++--\n>  hw/sparc64/sun4u.c       |  3 ++-\n>  hw/unicore32/puv3.c      |  1 +\n>  MAINTAINERS              |  1 +\n>  15 files changed, 45 insertions(+), 17 deletions(-)\n>  create mode 100644 include/hw/input/i8042.h\n> \n> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h\n> index 87a377011b..103c7a9916 100644\n> --- a/include/hw/i386/pc.h\n> +++ b/include/hw/i386/pc.h\n> @@ -188,15 +188,6 @@ void vmport_register(unsigned char command, VMPortReadFunc *func, void *opaque);\n>  void vmmouse_get_data(uint32_t *data);\n>  void vmmouse_set_data(const uint32_t *data);\n>  \n> -/* pckbd.c */\n> -#define I8042_A20_LINE \"a20\"\n> -\n> -void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,\n> -                   MemoryRegion *region, ram_addr_t size,\n> -                   hwaddr mask);\n> -void i8042_isa_mouse_fake_event(void *opaque);\n> -void i8042_setup_a20_line(ISADevice *dev, qemu_irq a20_out);\n> -\n>  /* pc.c */\n>  extern int fd_bootchk;\n>  \n> diff --git a/include/hw/input/i8042.h b/include/hw/input/i8042.h\n> new file mode 100644\n> index 0000000000..15115004a3\n> --- /dev/null\n> +++ b/include/hw/input/i8042.h\n> @@ -0,0 +1,25 @@\n> +/*\n> + * QEMU PS/2 Controller\n> + *\n> + * Copyright (c) 2003 Fabrice Bellard\n> + *\n> + * This work is licensed under the terms of the GNU GPL, version 2 or later.\n> + * See the COPYING file in the top-level directory.\n> + */\n> +#ifndef HW_INPUT_I8042_H\n> +#define HW_INPUT_I8042_H\n> +\n> +#include \"hw/hw.h\"\n> +#include \"hw/isa/isa.h\"\n> +\n> +#define TYPE_I8042 \"i8042\"\n> +\n> +#define I8042_A20_LINE \"a20\"\n> +\n> +void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,\n> +                   MemoryRegion *region, ram_addr_t size,\n> +                   hwaddr mask);\n> +void i8042_isa_mouse_fake_event(void *opaque);\n> +void i8042_setup_a20_line(ISADevice *dev, qemu_irq a20_out);\n> +\n> +#endif /* HW_INPUT_I8042_H */\n> diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c\n> index 766373eec7..e13cb576fd 100644\n> --- a/hw/alpha/dp264.c\n> +++ b/hw/alpha/dp264.c\n> @@ -19,6 +19,7 @@\n>  #include \"hw/timer/mc146818rtc.h\"\n>  #include \"hw/ide.h\"\n>  #include \"hw/timer/i8254.h\"\n> +#include \"hw/input/i8042.h\"\n>  #include \"hw/char/serial.h\"\n>  #include \"qemu/cutils.h\"\n>  \n> @@ -81,7 +82,7 @@ static void clipper_init(MachineState *machine)\n>      mc146818_rtc_init(isa_bus, 1900, rtc_irq);\n>  \n>      i8254_pit_init(isa_bus, 0x40, 0, NULL);\n> -    isa_create_simple(isa_bus, \"i8042\");\n> +    isa_create_simple(isa_bus, TYPE_I8042);\n>  \n>      /* VGA setup.  Don't bother loading the bios.  */\n>      pci_vga_init(pci_bus);\n> diff --git a/hw/i386/pc.c b/hw/i386/pc.c\n> index e39af3d48c..e5c4e48ebb 100644\n> --- a/hw/i386/pc.c\n> +++ b/hw/i386/pc.c\n> @@ -42,6 +42,7 @@\n>  #include \"hw/timer/mc146818rtc.h\"\n>  #include \"hw/dma/i8257.h\"\n>  #include \"hw/timer/i8254.h\"\n> +#include \"hw/input/i8042.h\"\n>  #include \"hw/audio/pcspk.h\"\n>  #include \"hw/pci/msi.h\"\n>  #include \"hw/sysbus.h\"\n> diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c\n> index 65ef55329e..5d2d278be4 100644\n> --- a/hw/i386/vmmouse.c\n> +++ b/hw/i386/vmmouse.c\n> @@ -25,6 +25,7 @@\n>  #include \"hw/hw.h\"\n>  #include \"ui/console.h\"\n>  #include \"hw/i386/pc.h\"\n> +#include \"hw/input/i8042.h\"\n>  #include \"hw/qdev.h\"\n>  \n>  /* debug only vmmouse */\n> diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c\n> index 116aa09819..3bf8cfe041 100644\n> --- a/hw/i386/vmport.c\n> +++ b/hw/i386/vmport.c\n> @@ -25,6 +25,7 @@\n>  #include \"hw/hw.h\"\n>  #include \"hw/isa/isa.h\"\n>  #include \"hw/i386/pc.h\"\n> +#include \"hw/input/i8042.h\"\n>  #include \"sysemu/hw_accel.h\"\n>  #include \"hw/qdev.h\"\n>  #include \"qemu/log.h\"\n> diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c\n> index c479f827b6..f17f18e51b 100644\n> --- a/hw/input/pckbd.c\n> +++ b/hw/input/pckbd.c\n> @@ -26,6 +26,7 @@\n>  #include \"hw/isa/isa.h\"\n>  #include \"hw/i386/pc.h\"\n>  #include \"hw/input/ps2.h\"\n> +#include \"hw/input/i8042.h\"\n>  #include \"sysemu/sysemu.h\"\n>  \n>  /* debug PC keyboard */\n> @@ -480,7 +481,6 @@ void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,\n>      qemu_register_reset(kbd_reset, s);\n>  }\n>  \n> -#define TYPE_I8042 \"i8042\"\n>  #define I8042(obj) OBJECT_CHECK(ISAKBDState, (obj), TYPE_I8042)\n>  \n>  typedef struct ISAKBDState {\n> diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c\n> index cbe159034d..8660d078c8 100644\n> --- a/hw/mips/mips_fulong2e.c\n> +++ b/hw/mips/mips_fulong2e.c\n> @@ -44,6 +44,7 @@\n>  #include \"hw/isa/vt82c686.h\"\n>  #include \"hw/timer/mc146818rtc.h\"\n>  #include \"hw/timer/i8254.h\"\n> +#include \"hw/input/i8042.h\"\n>  #include \"sysemu/blockdev.h\"\n>  #include \"exec/address-spaces.h\"\n>  #include \"sysemu/qtest.h\"\n> @@ -365,7 +366,7 @@ static void mips_fulong2e_init(MachineState *machine)\n>      i8257_dma_init(isa_bus, 0);\n>  \n>      /* Super I/O */\n> -    isa_create_simple(isa_bus, \"i8042\");\n> +    isa_create_simple(isa_bus, TYPE_I8042);\n>  \n>      mc146818_rtc_init(isa_bus, 2000, NULL);\n>  \n> diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c\n> index 6ed4b83f40..7a83009059 100644\n> --- a/hw/mips/mips_jazz.c\n> +++ b/hw/mips/mips_jazz.c\n> @@ -43,6 +43,7 @@\n>  #include \"hw/timer/i8254.h\"\n>  #include \"hw/display/vga.h\"\n>  #include \"hw/audio/pcspk.h\"\n> +#include \"hw/input/i8042.h\"\n>  #include \"sysemu/block-backend.h\"\n>  #include \"hw/sysbus.h\"\n>  #include \"exec/address-spaces.h\"\n> diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c\n> index 0a9e3dedf4..28cc37ee08 100644\n> --- a/hw/mips/mips_malta.c\n> +++ b/hw/mips/mips_malta.c\n> @@ -47,6 +47,7 @@\n>  #include \"hw/loader.h\"\n>  #include \"elf.h\"\n>  #include \"hw/timer/mc146818rtc.h\"\n> +#include \"hw/input/i8042.h\"\n>  #include \"hw/timer/i8254.h\"\n>  #include \"sysemu/blockdev.h\"\n>  #include \"exec/address-spaces.h\"\n> @@ -1214,7 +1215,7 @@ void mips_malta_init(MachineState *machine)\n>      i8257_dma_init(isa_bus, 0);\n>  \n>      /* Super I/O */\n> -    isa_create_simple(isa_bus, \"i8042\");\n> +    isa_create_simple(isa_bus, TYPE_I8042);\n>  \n>      mc146818_rtc_init(isa_bus, 2000, NULL);\n>      serial_hds_isa_init(isa_bus, 0, 2);\n> diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c\n> index 244bd41813..92acae149d 100644\n> --- a/hw/mips/mips_r4k.c\n> +++ b/hw/mips/mips_r4k.c\n> @@ -28,6 +28,7 @@\n>  #include \"hw/loader.h\"\n>  #include \"elf.h\"\n>  #include \"hw/timer/mc146818rtc.h\"\n> +#include \"hw/input/i8042.h\"\n>  #include \"hw/timer/i8254.h\"\n>  #include \"sysemu/block-backend.h\"\n>  #include \"exec/address-spaces.h\"\n> @@ -288,7 +289,7 @@ void mips_r4k_init(MachineState *machine)\n>                       hd[MAX_IDE_DEVS * i],\n>  \t\t     hd[MAX_IDE_DEVS * i + 1]);\n>  \n> -    isa_create_simple(isa_bus, \"i8042\");\n> +    isa_create_simple(isa_bus, TYPE_I8042);\n>  }\n>  \n>  static void mips_machine_init(MachineClass *mc)\n> diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c\n> index af08ac319a..4304e93ada 100644\n> --- a/hw/ppc/prep.c\n> +++ b/hw/ppc/prep.c\n> @@ -41,6 +41,7 @@\n>  #include \"hw/ide.h\"\n>  #include \"hw/loader.h\"\n>  #include \"hw/timer/mc146818rtc.h\"\n> +#include \"hw/input/i8042.h\"\n>  #include \"hw/isa/pc87312.h\"\n>  #include \"hw/net/ne2000-isa.h\"\n>  #include \"sysemu/block-backend.h\"\n> @@ -641,7 +642,7 @@ static void ppc_prep_init(MachineState *machine)\n>                       hd[2 * i],\n>  \t\t     hd[2 * i + 1]);\n>      }\n> -    isa_create_simple(isa_bus, \"i8042\");\n> +    isa_create_simple(isa_bus, TYPE_I8042);\n>  \n>      cpu = POWERPC_CPU(first_cpu);\n>      sysctrl->reset_irq = cpu->env.irq_inputs[PPC6xx_INPUT_HRESET];\n> @@ -771,7 +772,7 @@ static void ibm_40p_init(MachineState *machine)\n>  \n>      /* add some more devices */\n>      if (defaults_enabled()) {\n> -        isa_create_simple(isa_bus, \"i8042\");\n> +        isa_create_simple(isa_bus, TYPE_I8042);\n>          m48t59 = NVRAM(isa_create_simple(isa_bus, \"isa-m48t59\"));\n>  \n>          dev = DEVICE(isa_create(isa_bus, \"cs4231a\"));\n> diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c\n> index 135f8088ca..2a60f5c1d6 100644\n> --- a/hw/sparc64/sun4u.c\n> +++ b/hw/sparc64/sun4u.c\n> @@ -33,6 +33,7 @@\n>  #include \"hw/char/serial.h\"\n>  #include \"hw/char/parallel.h\"\n>  #include \"hw/timer/m48t59.h\"\n> +#include \"hw/input/i8042.h\"\n>  #include \"hw/block/fdc.h\"\n>  #include \"net/net.h\"\n>  #include \"qemu/timer.h\"\n> @@ -513,7 +514,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,\n>      qdev_init_nofail(&pci_dev->qdev);\n>      pci_ide_create_devs(pci_dev, hd);\n>  \n> -    isa_create_simple(isa_bus, \"i8042\");\n> +    isa_create_simple(isa_bus, TYPE_I8042);\n>  \n>      /* Floppy */\n>      for(i = 0; i < MAX_FD; i++) {\n> diff --git a/hw/unicore32/puv3.c b/hw/unicore32/puv3.c\n> index db26959a1d..830fe3face 100644\n> --- a/hw/unicore32/puv3.c\n> +++ b/hw/unicore32/puv3.c\n> @@ -20,6 +20,7 @@\n>  \n>  #undef DEBUG_PUV3\n>  #include \"hw/unicore32/puv3.h\"\n> +#include \"hw/input/i8042.h\"\n>  \n>  #define KERNEL_LOAD_ADDR        0x03000000\n>  #define KERNEL_MAX_SIZE         0x00800000 /* Just a guess */\n> diff --git a/MAINTAINERS b/MAINTAINERS\n> index 89810df375..7f9e98a046 100644\n> --- a/MAINTAINERS\n> +++ b/MAINTAINERS\n> @@ -885,6 +885,7 @@ F: include/hw/display/vga.h\n>  F: include/hw/char/parallel.h\n>  F: include/hw/dma/i8257.h\n>  F: include/hw/i2c/pm_smbus.h\n> +F: include/hw/input/i8042.h\n>  F: include/hw/timer/hpet.h\n>  F: include/hw/timer/i8254*\n>  F: include/hw/timer/mc146818rtc*","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"oTYXplkM\"; \n\tdkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3zFLBy1ppsz9s74\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon,  8 Jan 2018 14:20:58 +1100 (AEDT)","from localhost ([::1]:32895 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1eYNzc-0006l0-CQ\n\tfor incoming@patchwork.ozlabs.org; Sun, 07 Jan 2018 22:20:56 -0500","from eggs.gnu.org ([2001:4830:134:3::10]:32811)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1eYNz7-0006kh-8g\n\tfor qemu-devel@nongnu.org; Sun, 07 Jan 2018 22:20:27 -0500","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1eYNz5-0004T0-2U\n\tfor qemu-devel@nongnu.org; Sun, 07 Jan 2018 22:20:25 -0500","from ozlabs.org ([2401:3900:2:1::2]:56357)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgibson@ozlabs.org>)\n\tid 1eYNz3-0004Qd-PB; Sun, 07 Jan 2018 22:20:22 -0500","by ozlabs.org (Postfix, from userid 1007)\n\tid 3zFLB61dpqz9s7n; Mon,  8 Jan 2018 14:20:14 +1100 (AEDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=gibson.dropbear.id.au; s=201602; t=1515381614;\n\tbh=Cqd6kScP90veU8aaSvg9el9J9EYTfxgexv2YYkL5QJw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=oTYXplkME0VQ0Gwpyvk1eFpi4iZ1iwwLNReY8fvTeCw6Lj7VlFD8AP4J5PU1GpI0G\n\t7ZUyQdgU2tFywWa6FUAcZrJdIlRej/Z5i+LEPeAfn0k+IqY6DBE+wVK9TMYGvJ3w6c\n\tPm0UqpM48aboTzVa+et3lHeJhxGPU+4RcFRZAKlM=","Date":"Mon, 8 Jan 2018 13:54:10 +1100","From":"David Gibson <david@gibson.dropbear.id.au>","To":"Philippe =?iso-8859-1?q?Mathieu-Daud=E9?= <f4bug@amsat.org>","Message-ID":"<20180108025410.GA2131@umbus.fritz.box>","References":"<20180108024558.17983-1-f4bug@amsat.org>\n\t<20180108024558.17983-6-f4bug@amsat.org>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"tKW2IUtsqtDRztdT\"","Content-Disposition":"inline","In-Reply-To":"<20180108024558.17983-6-f4bug@amsat.org>","User-Agent":"Mutt/1.9.1 (2017-09-22)","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2401:3900:2:1::2","Subject":"Re: [Qemu-devel] [PATCH 05/29] hw/input/i8042: extract declarations\n\tfrom i386/pc.h into input/i8042.h","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"\"open list:PReP\" <qemu-ppc@nongnu.org>, Eduardo Habkost\n\t<ehabkost@redhat.com>, \t\"Michael S. Tsirkin\" <mst@redhat.com>,\n\tMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, qemu-devel@nongnu.org,\n\tAlexander Graf <agraf@suse.de>, =?iso-8859-1?q?Herv=E9?=\n\tPoussineau <hpoussin@reactos.org>,\n\tArtyom Tarasenko <atar4qemu@gmail.com>, Igor Mammedov\n\t<imammedo@redhat.com>, Marcel Apfelbaum <marcel@redhat.com>, Paolo\n\tBonzini <pbonzini@redhat.com>, Guan Xuetao <gxt@mprc.pku.edu.cn>, \n\tYongbok Kim <yongbok.kim@mips.com>,\n\tAurelien Jarno <aurelien@aurel32.net>, Richard Henderson\n\t<rth@twiddle.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]