From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: BALATON Zoltan <balaton@eik.bme.hu>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v2 07/14] ppc/sam460ex: Remove address_space_mem local variable
Date: Wed, 5 Jul 2023 21:46:13 -0300 [thread overview]
Message-ID: <f82474d1-c442-451b-b800-c89d062e60cf@gmail.com> (raw)
In-Reply-To: <d134d64f13258d1f157b445fedb1e86cf3abb606.1688586835.git.balaton@eik.bme.hu>
On 7/5/23 17:12, BALATON Zoltan wrote:
> Some places already use get_system_memory() directly so replace the
> remaining uses and drop the local variable.
>
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
> hw/ppc/sam460ex.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
> index aaa8d2f4a5..f098226974 100644
> --- a/hw/ppc/sam460ex.c
> +++ b/hw/ppc/sam460ex.c
> @@ -266,7 +266,6 @@ static void main_cpu_reset(void *opaque)
>
> static void sam460ex_init(MachineState *machine)
> {
> - MemoryRegion *address_space_mem = get_system_memory();
> MemoryRegion *isa = g_new(MemoryRegion, 1);
> MemoryRegion *l2cache_ram = g_new(MemoryRegion, 1);
> DeviceState *uic[4];
> @@ -406,7 +405,8 @@ static void sam460ex_init(MachineState *machine)
> /* FIXME: remove this after fixing l2sram mapping in ppc440_uc.c? */
> memory_region_init_ram(l2cache_ram, NULL, "ppc440.l2cache_ram", 256 * KiB,
> &error_abort);
> - memory_region_add_subregion(address_space_mem, 0x400000000LL, l2cache_ram);
> + memory_region_add_subregion(get_system_memory(), 0x400000000LL,
> + l2cache_ram);
>
> /* USB */
> sysbus_create_simple(TYPE_PPC4xx_EHCI, 0x4bffd0400,
> @@ -444,13 +444,13 @@ static void sam460ex_init(MachineState *machine)
> /* SoC has 4 UARTs
> * but board has only one wired and two are present in fdt */
> if (serial_hd(0) != NULL) {
> - serial_mm_init(address_space_mem, 0x4ef600300, 0,
> + serial_mm_init(get_system_memory(), 0x4ef600300, 0,
> qdev_get_gpio_in(uic[1], 1),
> PPC_SERIAL_MM_BAUDBASE, serial_hd(0),
> DEVICE_BIG_ENDIAN);
> }
> if (serial_hd(1) != NULL) {
> - serial_mm_init(address_space_mem, 0x4ef600400, 0,
> + serial_mm_init(get_system_memory(), 0x4ef600400, 0,
> qdev_get_gpio_in(uic[0], 1),
> PPC_SERIAL_MM_BAUDBASE, serial_hd(1),
> DEVICE_BIG_ENDIAN);
next prev parent reply other threads:[~2023-07-06 0:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 20:12 [PATCH v2 00/14] PPC440 devices misc clean up BALATON Zoltan
2023-07-05 20:12 ` [PATCH v2 01/14] ppc440: Change ppc460ex_pcie_init() parameter type BALATON Zoltan
2023-07-05 20:12 ` [PATCH v2 02/14] ppc440: Add cpu link property to PCIe controller model BALATON Zoltan
2023-07-05 20:12 ` [PATCH v2 03/14] ppc440: Add a macro to shorten PCIe controller DCR registration BALATON Zoltan
2023-07-05 20:12 ` [PATCH v2 04/14] ppc440: Rename parent field of PPC460EXPCIEState to match code style BALATON Zoltan
2023-07-05 20:12 ` [PATCH v2 05/14] ppc440: Rename local variable in dcr_read_pcie() BALATON Zoltan
2023-07-05 20:12 ` [PATCH v2 06/14] ppc440: Stop using system io region for PCIe buses BALATON Zoltan
2023-07-05 20:31 ` Philippe Mathieu-Daudé
2023-07-05 20:12 ` [PATCH v2 07/14] ppc/sam460ex: Remove address_space_mem local variable BALATON Zoltan
2023-07-06 0:46 ` Daniel Henrique Barboza [this message]
2023-07-05 20:12 ` [PATCH v2 08/14] ppc440: Add busnum property to PCIe controller model BALATON Zoltan
2023-07-05 20:12 ` [PATCH v2 09/14] ppc440: Remove ppc460ex_pcie_init legacy init function BALATON Zoltan
2023-07-05 20:12 ` [PATCH v2 10/14] ppc4xx_pci: Rename QOM type name define BALATON Zoltan
2023-07-05 20:12 ` [PATCH v2 11/14] ppc4xx_pci: Add define for ppc4xx-host-bridge type name BALATON Zoltan
2023-07-05 20:12 ` [PATCH v2 12/14] ppc440_pcix: Rename QOM type define abd move it to common header BALATON Zoltan
2023-07-05 20:12 ` [PATCH v2 13/14] ppc440_pcix: Don't use iomem for regs BALATON Zoltan
2023-07-05 20:28 ` Philippe Mathieu-Daudé
2023-07-05 20:12 ` [PATCH v2 14/14] ppc440_pcix: Stop using system io region for PCI bus BALATON Zoltan
2023-07-05 20:20 ` [PATCH v2 00/14] PPC440 devices misc clean up BALATON Zoltan
2023-07-06 0:48 ` Daniel Henrique Barboza
2023-07-06 1:09 ` BALATON Zoltan
2023-07-06 7:13 ` Daniel Henrique Barboza
2023-07-06 11:19 ` BALATON Zoltan
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=f82474d1-c442-451b-b800-c89d062e60cf@gmail.com \
--to=danielhb413@gmail.com \
--cc=balaton@eik.bme.hu \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).