QEMU-Devel Archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>,
	QEMU devel <qemu-devel@nongnu.org>
Cc: Huacai Chen <chenhuacai@kernel.org>, Eric Blake <eblake@redhat.com>
Subject: Re: [PATCH] hw/mips/loongson3_virt: Emulate suspend function
Date: Wed, 8 May 2024 23:56:17 +0200	[thread overview]
Message-ID: <bbc97d72-fdc3-4a9b-ac7a-99810b2a6538@linaro.org> (raw)
In-Reply-To: <64758a2f-87f9-4bd1-a85b-51055592aab1@linaro.org>

On 8/5/24 23:54, Philippe Mathieu-Daudé wrote:
> On 8/5/24 19:28, Jiaxun Yang wrote:
>> 在2024年5月8日五月 下午5:48,Philippe Mathieu-Daudé写道:
>>> On 8/5/24 17:35, Philippe Mathieu-Daudé wrote:
>>>> On 8/5/24 11:31, Jiaxun Yang wrote:
>>>>> Suspend function is emulated as what hardware actually do.
>>>>> Doorbell register fields are updates to include suspend value,
>>>>> suspend vector is encoded in firmware blob and fw_cfg is updated
>>>>> to include S3 bits as what x86 did.
>>>>>
>>>>> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
>>>>> ---
>>>>>    hw/mips/loongson3_bootp.c |  1 +
>>>>>    hw/mips/loongson3_virt.c  | 19 +++++++++++++++++++
>>>>>    2 files changed, 20 insertions(+)
>>>>
>>>> Thanks, patch queued.
>>>
>>> Fixed:
>>>
>>> ERROR: use g_memdup2() instead of unsafe g_memdup()
>>> #76: FILE: hw/mips/loongson3_virt.c:293:
>>> +    fw_cfg_add_file(fw_cfg, "etc/system-states", g_memdup(suspend, 
>>> 6), 6);
>>
>> Thanks, I omitted this one as it is copied from hw/acpi/core.c
>>
>> Should we fix that one as well?
> 
> Sadly for me I did the cleanup 3 years ago:
> https://lore.kernel.org/qemu-devel/20210903110702.588291-10-philmd@redhat.com/
> but neglected to address the comment from Eric:
> https://lore.kernel.org/qemu-devel/20210903211057.kvn6r5pvx7iuwf5a@redhat.com/
> so the patch never got merged. I might revisit...

That said it is recommended to run checkpatch.pl before posting a patch:
https://www.qemu.org/docs/master/devel/submitting-a-patch.html#use-the-qemu-coding-style
This can be automatized, see "Automate a checkpatch run on commit" in
this chapter :)



      reply	other threads:[~2024-05-08 21:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08  9:31 [PATCH] hw/mips/loongson3_virt: Emulate suspend function Jiaxun Yang
2024-05-08 15:35 ` Philippe Mathieu-Daudé
2024-05-08 16:48   ` Philippe Mathieu-Daudé
2024-05-08 17:28     ` Jiaxun Yang
2024-05-08 21:54       ` Philippe Mathieu-Daudé
2024-05-08 21:56         ` Philippe Mathieu-Daudé [this message]

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=bbc97d72-fdc3-4a9b-ac7a-99810b2a6538@linaro.org \
    --to=philmd@linaro.org \
    --cc=chenhuacai@kernel.org \
    --cc=eblake@redhat.com \
    --cc=jiaxun.yang@flygoat.com \
    --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 read-only IMAP folder(s) and NNTP newsgroup(s).