From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>,
Peter Maydell <peter.maydell@linaro.org>,
Guenter Roeck <linux@roeck-us.net>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
Igor Mitsyanko <i.mitsyanko@gmail.com>,
Alistair Francis <alistair@alistair23.me>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/3] hw/dma/pl330: Factor out pl330_init() from hw/arm/xilinx_zynq.c
Date: Tue, 30 Oct 2018 09:35:25 +0100 [thread overview]
Message-ID: <e0ce22e6-7a71-98f2-abbc-ec430fda5178@redhat.com> (raw)
In-Reply-To: <d3a957a8-754a-5d25-b776-d1ab9583c93a@linaro.org>
On 30/10/18 9:18, Richard Henderson wrote:
> On 10/29/18 11:20 PM, Philippe Mathieu-Daudé wrote:
>> +static inline void pl330_init(uint32_t base, qemu_irq irq, int nreq)
>> +{
>> + SysBusDevice *busdev;
>> + DeviceState *dev;
>> +
>> + dev = qdev_create(NULL, TYPE_PL330);
>> + qdev_prop_set_uint8(dev, "num_chnls", 8);
>> + qdev_prop_set_uint8(dev, "num_periph_req", nreq);
>> + qdev_prop_set_uint8(dev, "num_events", 16);
>> + qdev_prop_set_uint8(dev, "data_width", 64);
>> + qdev_prop_set_uint8(dev, "wr_cap", 8);
>> + qdev_prop_set_uint8(dev, "wr_q_dep", 16);
>> + qdev_prop_set_uint8(dev, "rd_cap", 8);
>> + qdev_prop_set_uint8(dev, "rd_q_dep", 16);
>> + qdev_prop_set_uint16(dev, "data_buffer_dep", 256);
>> + qdev_init_nofail(dev);
>> +
>> + busdev = SYS_BUS_DEVICE(dev);
>> + sysbus_mmio_map(busdev, 0, base);
>> + sysbus_connect_irq(busdev, 0, irq);
>> +}
>
> Why is this inline instead of in hw/dma/pl300.c?
> There should be nothing performance sensative here...
Yeah I didn't like it much neither and wondered the same :)
I was looking a examples in hw/char:
[phil@x1w qemu]$ git grep -hA 2 'static inline' include/hw/char/
52:static inline DeviceState *cadence_uart_create(hwaddr addr,
53- qemu_irq irq,
54- Chardev *chr)
--
52:static inline DeviceState *cmsdk_apb_uart_create(hwaddr addr,
53- qemu_irq txint,
54- qemu_irq rxint,
--
18:static inline DeviceState *pl011_create(hwaddr addr,
19- qemu_irq irq,
20- Chardev *chr)
--
35:static inline DeviceState *pl011_luminary_create(hwaddr addr,
36- qemu_irq irq,
37- Chardev *chr)
--
18:static inline DeviceState *xilinx_uartlite_create(hwaddr addr,
19- qemu_irq irq,
20- Chardev *chr)
I'll clean it and add a docstring.
Thanks for the review,
Phil.
next prev parent reply other threads:[~2018-10-30 8:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-29 23:20 [Qemu-devel] [PATCH 0/3] hw/arm/exynos4: Add DMA support for SMDKC210 board Philippe Mathieu-Daudé
2018-10-29 23:20 ` [Qemu-devel] [PATCH 1/3] hw/arm/xilinx_zynq: Use the ARRAY_SIZE macro Philippe Mathieu-Daudé
2018-10-29 23:47 ` Alistair Francis
2018-10-30 8:16 ` Richard Henderson
2018-10-29 23:20 ` [Qemu-devel] [PATCH 2/3] hw/dma/pl330: Factor out pl330_init() from hw/arm/xilinx_zynq.c Philippe Mathieu-Daudé
2018-10-29 23:49 ` Alistair Francis
2018-10-30 8:18 ` Richard Henderson
2018-10-30 8:35 ` Philippe Mathieu-Daudé [this message]
2018-10-30 9:36 ` Peter Maydell
2018-10-30 11:28 ` Philippe Mathieu-Daudé
2018-10-30 12:42 ` Peter Maydell
2018-10-30 13:01 ` Philippe Mathieu-Daudé
2018-10-30 11:26 ` Philippe Mathieu-Daudé
2018-10-29 23:21 ` [Qemu-devel] [PATCH 3/3] arm: exynos4: Add dma support for smdkc210 Philippe Mathieu-Daudé
2018-10-29 23:47 ` Alistair Francis
2018-10-31 4:06 ` [Qemu-devel] [PATCH 0/3] hw/arm/exynos4: Add DMA support for SMDKC210 board no-reply
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=e0ce22e6-7a71-98f2-abbc-ec430fda5178@redhat.com \
--to=philmd@redhat.com \
--cc=alistair@alistair23.me \
--cc=edgar.iglesias@gmail.com \
--cc=i.mitsyanko@gmail.com \
--cc=linux@roeck-us.net \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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 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.