From: Shannon Zhao <shannon.zhao@linaro.org>
To: Michael Tokarev <mjt@tls.msk.ru>,
Shannon Zhao <zhaoshenglong@huawei.com>,
qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH v2 2/7] hw/mips/mips_jazz.c: Store irq array in MachineState to fix memory leak
Date: Thu, 04 Jun 2015 23:23:34 +0800 [thread overview]
Message-ID: <55706D76.9000106@linaro.org> (raw)
In-Reply-To: <55706BF2.2040005@linaro.org>
On 2015/6/4 23:17, Shannon Zhao wrote:
>
>
> On 2015/6/4 22:57, Michael Tokarev wrote:
>> 04.06.2015 17:51, Shannon Zhao wrote:
>>> >Yeah, but I think something like below would work.
>>> >
>>> > cpu_exit_irq = &qemu_allocate_irq(cpu_request_exit, NULL, 0);
>>> > DMA_init(0, cpu_exit_irq);
>> NO!!!:)
>
> Oh, will rethink about it. But I think maybe it's unnecessary to fix it
> as it actually requires a pointer which stores qemu_irq.
And if we want to use qemu_allocate_irq here, it will be something like:
cpu_exit_irq = g_new(qemu_irq, 1);
cpu_exit_irq[0] = qemu_allocate_irq(cpu_request_exit, NULL, 0);
DMA_init(0, cpu_exit_irq);
This is what exactly qemu_allocate_irqs does.
Or we modify the DMA_init to make it take qemu_irq as parameter not
qemu_irq *
--
Shannon
next prev parent reply other threads:[~2015-06-04 15:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-30 7:54 [Qemu-devel] [PATCH v2 0/7] Add a member in MachineState to store irq array Shannon Zhao
2015-05-30 7:54 ` [Qemu-devel] [PATCH v2 1/7] hw/ppc/ppc440_bamboo.c: " Shannon Zhao
2015-06-04 14:12 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2015-06-04 14:19 ` Shannon Zhao
2015-05-30 7:54 ` [Qemu-devel] [PATCH v2 2/7] hw/mips/mips_jazz.c: Store irq array in MachineState to fix memory leak Shannon Zhao
2015-06-04 14:18 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2015-06-04 14:30 ` Shannon Zhao
2015-06-04 14:32 ` [Qemu-devel] " Michael Tokarev
2015-06-04 14:51 ` Shannon Zhao
2015-06-04 14:57 ` Michael Tokarev
2015-06-04 15:09 ` Shannon Zhao
2015-06-04 15:14 ` Michael Tokarev
2015-06-04 15:17 ` Michael Tokarev
2015-06-04 15:17 ` Shannon Zhao
2015-06-04 15:23 ` Shannon Zhao [this message]
2015-05-30 7:54 ` [Qemu-devel] [PATCH v2 3/7] hw/m68k/an5206.c: " Shannon Zhao
2015-05-30 7:54 ` [Qemu-devel] [PATCH v2 4/7] hw/sh4/r2d.c: " Shannon Zhao
2015-05-30 7:54 ` [Qemu-devel] [PATCH v2 5/7] hw/arm/palm.c: " Shannon Zhao
2015-05-30 7:54 ` [Qemu-devel] [PATCH v2 6/7] hw/arm/spitz.c: " Shannon Zhao
2015-05-30 7:54 ` [Qemu-devel] [PATCH v2 7/7] hw/arm/tosa.c: " Shannon Zhao
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=55706D76.9000106@linaro.org \
--to=shannon.zhao@linaro.org \
--cc=mjt@tls.msk.ru \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=zhaoshenglong@huawei.com \
/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).