qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Artyom Tarasenko <atar4qemu@gmail.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Aleksandar Rikalo <arikalo@wavecomp.com>,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	qemu-devel <qemu-devel@nongnu.org>,
	Aleksandar Markovic <amarkovic@wavecomp.com>,
	Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH 1/9] hw/misc: Move the 'empty_slot' device to hw/misc/
Date: Tue, 25 Jun 2019 09:09:58 +0200	[thread overview]
Message-ID: <CACXAS8Au+qyMgFUhZAT6oOnLinSkT0JF4Ut0ZTw-9vUxs3cQhQ@mail.gmail.com> (raw)
In-Reply-To: <20190624220056.25861-2-f4bug@amsat.org>

On Tue, Jun 25, 2019 at 12:01 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com>

> ---
>  include/hw/empty_slot.h        |  7 -------
>  include/hw/misc/empty_slot.h   | 32 ++++++++++++++++++++++++++++++++
>  hw/mips/mips_malta.c           |  2 +-
>  hw/{core => misc}/empty_slot.c |  2 +-
>  hw/sparc/sun4m.c               |  2 +-
>  hw/core/Makefile.objs          |  1 -
>  hw/misc/Makefile.objs          |  1 +
>  7 files changed, 36 insertions(+), 11 deletions(-)
>  delete mode 100644 include/hw/empty_slot.h
>  create mode 100644 include/hw/misc/empty_slot.h
>  rename hw/{core => misc}/empty_slot.c (98%)
>
> diff --git a/include/hw/empty_slot.h b/include/hw/empty_slot.h
> deleted file mode 100644
> index 123a9f8989..0000000000
> --- a/include/hw/empty_slot.h
> +++ /dev/null
> @@ -1,7 +0,0 @@
> -#ifndef HW_EMPTY_SLOT_H
> -#define HW_EMPTY_SLOT_H
> -
> -/* empty_slot.c */
> -void empty_slot_init(hwaddr addr, uint64_t slot_size);
> -
> -#endif
> diff --git a/include/hw/misc/empty_slot.h b/include/hw/misc/empty_slot.h
> new file mode 100644
> index 0000000000..46483f24c3
> --- /dev/null
> +++ b/include/hw/misc/empty_slot.h
> @@ -0,0 +1,32 @@
> +/*
> + * QEMU Empty Slot
> + *
> + * The empty_slot device emulates known to a bus but not connected devices.
> + *
> + * Copyright (c) 2010 Artyom Tarasenko
> + *
> + * This code is licensed under the GNU GPL v2 or (at your option) any later
> + * version.
> + */
> +
> +#ifndef HW_EMPTY_SLOT_H
> +#define HW_EMPTY_SLOT_H
> +
> +/**
> + * empty_slot_init: create and map a RAZ/WI device
> + * @base: base address of the device's MMIO region
> + * @size: size of the device's MMIO region
> + *
> + * This utility function creates and maps an instance of empty slot,
> + * which is a dummy device which simply read as zero, and ignore writes.
> + * An empty slot sit on a bus, and no bus errors are generated when it is
> + * accessed.
> + * Guest accesses can be traced, using the '-trace empty_slot\*' command
> + * line argument.
> + * The device is mapped at priority -10000, which means that you can
> + * use it to cover a large region and then map other devices on top of it
> + * if necessary.
> + */
> +void empty_slot_init(hwaddr addr, uint64_t slot_size);
> +
> +#endif
> diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
> index 37ec89b07e..7008be2e5b 100644
> --- a/hw/mips/mips_malta.c
> +++ b/hw/mips/mips_malta.c
> @@ -53,7 +53,7 @@
>  #include "sysemu/qtest.h"
>  #include "qapi/error.h"
>  #include "qemu/error-report.h"
> -#include "hw/empty_slot.h"
> +#include "hw/misc/empty_slot.h"
>  #include "sysemu/kvm.h"
>  #include "hw/semihosting/semihost.h"
>  #include "hw/mips/cps.h"
> diff --git a/hw/core/empty_slot.c b/hw/misc/empty_slot.c
> similarity index 98%
> rename from hw/core/empty_slot.c
> rename to hw/misc/empty_slot.c
> index c694532046..0adf7a26dc 100644
> --- a/hw/core/empty_slot.c
> +++ b/hw/misc/empty_slot.c
> @@ -13,7 +13,7 @@
>  #include "hw/hw.h"
>  #include "hw/sysbus.h"
>  #include "qemu/module.h"
> -#include "hw/empty_slot.h"
> +#include "hw/misc/empty_slot.h"
>
>  //#define DEBUG_EMPTY_SLOT
>
> diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
> index 7e4f61fc3e..cc85598d5b 100644
> --- a/hw/sparc/sun4m.c
> +++ b/hw/sparc/sun4m.c
> @@ -41,7 +41,7 @@
>  #include "hw/nvram/chrp_nvram.h"
>  #include "hw/nvram/fw_cfg.h"
>  #include "hw/char/escc.h"
> -#include "hw/empty_slot.h"
> +#include "hw/misc/empty_slot.h"
>  #include "hw/loader.h"
>  #include "elf.h"
>  #include "trace.h"
> diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
> index a799c83815..5122a28a3b 100644
> --- a/hw/core/Makefile.objs
> +++ b/hw/core/Makefile.objs
> @@ -8,7 +8,6 @@ common-obj-y += irq.o
>  common-obj-y += hotplug.o
>  common-obj-$(CONFIG_SOFTMMU) += nmi.o
>
> -common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o
>  common-obj-$(CONFIG_XILINX_AXI) += stream.o
>  common-obj-$(CONFIG_PTIMER) += ptimer.o
>  common-obj-$(CONFIG_SOFTMMU) += sysbus.o
> diff --git a/hw/misc/Makefile.objs b/hw/misc/Makefile.objs
> index 77b9df9796..8ed900f9f5 100644
> --- a/hw/misc/Makefile.objs
> +++ b/hw/misc/Makefile.objs
> @@ -10,6 +10,7 @@ common-obj-$(CONFIG_EDU) += edu.o
>  common-obj-$(CONFIG_PCA9552) += pca9552.o
>
>  common-obj-y += unimp.o
> +common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o
>  common-obj-$(CONFIG_FW_CFG_DMA) += vmcoreinfo.o
>
>  # ARM devices
> --
> 2.19.1
>


-- 
Regards,
Artyom Tarasenko

SPARC and PPC PReP under qemu blog: http://tyom.blogspot.com/search/label/qemu


  reply	other threads:[~2019-06-25  7:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24 22:00 [Qemu-devel] [PATCH 0/9] hw/misc: Clean the empty_slot device Philippe Mathieu-Daudé
2019-06-24 22:00 ` [Qemu-devel] [PATCH 1/9] hw/misc: Move the 'empty_slot' device to hw/misc/ Philippe Mathieu-Daudé
2019-06-25  7:09   ` Artyom Tarasenko [this message]
2019-06-24 22:00 ` [Qemu-devel] [RFC PATCH 2/9] MAINTAINERS: Add the 'empty_slot' device with the 'unimp' one Philippe Mathieu-Daudé
2019-06-25  7:06   ` Artyom Tarasenko
2019-06-24 22:00 ` [Qemu-devel] [PATCH 3/9] hw/misc/empty_slot: Allow overide by device with higher priority Philippe Mathieu-Daudé
2019-06-25  7:08   ` Artyom Tarasenko
2019-06-24 22:00 ` [Qemu-devel] [PATCH 4/9] hw/misc/empty_slot: Add a qdev property 'size' Philippe Mathieu-Daudé
2019-06-25  7:09   ` Artyom Tarasenko
2019-06-24 22:00 ` [Qemu-devel] [PATCH 5/9] hw/misc/empty_slot: Add a qdev property 'name' Philippe Mathieu-Daudé
2019-06-25  7:05   ` Artyom Tarasenko
2019-06-24 22:00 ` [Qemu-devel] [PATCH 6/9] hw/misc/empty_slot: Convert debug printf()s to trace events Philippe Mathieu-Daudé
2019-06-25  7:04   ` Artyom Tarasenko
2019-06-24 22:00 ` [Qemu-devel] [PATCH 7/9] hw/sparc/sun4m: Mark some devices as 'unimplemented' Philippe Mathieu-Daudé
2019-06-25  7:16   ` Artyom Tarasenko
2019-06-24 22:00 ` [Qemu-devel] [PATCH 8/9] hw/sparc/sun4m: Simplify the RAM creation Philippe Mathieu-Daudé
2019-06-25  7:14   ` Artyom Tarasenko
2019-06-25  8:14     ` Philippe Mathieu-Daudé
2019-06-24 22:00 ` [Qemu-devel] [PATCH 9/9] hw/misc/empty_slot: Pass the slot name as argument Philippe Mathieu-Daudé
2019-06-25  7:03   ` Artyom Tarasenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACXAS8Au+qyMgFUhZAT6oOnLinSkT0JF4Ut0ZTw-9vUxs3cQhQ@mail.gmail.com \
    --to=atar4qemu@gmail.com \
    --cc=amarkovic@wavecomp.com \
    --cc=arikalo@wavecomp.com \
    --cc=aurelien@aurel32.net \
    --cc=f4bug@amsat.org \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).