All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: Joel Stanley <joel@jms.id.au>,
	 Peter Maydell <peter.maydell@linaro.org>,
	 Andrew Jeffery <andrew@aj.id.au>,
	qemu-arm@nongnu.org,  qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 08/19] aspeed/timer: Fix behaviour running Linux
Date: Wed, 27 Sep 2023 08:46:47 +0200	[thread overview]
Message-ID: <87sf70f6zs.fsf@pond.sub.org> (raw)
In-Reply-To: <bf0703cb-3626-a3e9-efda-842cd0393f37@kaod.org> ("Cédric Le Goater"'s message of "Wed, 27 Sep 2023 07:44:16 +0200")

Cédric Le Goater <clg@kaod.org> writes:

> On 9/27/23 04:12, Joel Stanley wrote:
>> On Fri, 22 Sept 2023 at 13:21, Cédric Le Goater <clg@kaod.org> wrote:
>> 
>>>> +    t->start = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
>>>> +    return calculate_time(t, MAX(MAX(t->match[0], t->match[1]), 0));
>>>
>>> This MAX(MAX(x, y), 0) looks strange to me. Would you remember where it comes
>>> from ? Thanks,
>> That looks very strange. I think you've sorted it, so I wanted to
>> bring up the MAX macros themselves. It's unfortunate that they create
>> a non-unique local variable. Are we allowed to borrow the kernels
>> macros? They have some infrastructure for creating a unique local
>> variable name, as well as handling the const and non-const variants
>> with the one macro.
>> https://elixir.bootlin.com/linux/v6.5/source/include/linux/minmax.h
>
> I believe that's what Markus does in its own way :
>
>   https://lore.kernel.org/qemu-devel/20230921121312.1301864-8-armbru@redhat.com/

I wasn't aware of the kernel's infrastructure.  We can steal it if
people think it provides additional value.  Make your case :)


  reply	other threads:[~2023-09-27  6:47 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-25 15:12 [Qemu-arm] [PATCH 00/19] aspeed: machine extensions and fixes Cédric Le Goater
2019-05-25 15:12 ` [Qemu-devel] " Cédric Le Goater
2019-05-25 15:12 ` [Qemu-arm] [PATCH 01/19] hw/arm/aspeed: Use object_initialize_child for correct ref. counting Cédric Le Goater
2019-05-25 15:12   ` [Qemu-devel] " Cédric Le Goater
2019-05-25 15:12 ` [Qemu-arm] [PATCH 02/19] aspeed: add a per SoC mapping for the interrupt space Cédric Le Goater
2019-05-25 15:12   ` [Qemu-devel] " Cédric Le Goater
2019-05-25 15:12 ` [Qemu-arm] [PATCH 03/19] aspeed: add a per SoC mapping for the memory space Cédric Le Goater
2019-05-25 15:12   ` [Qemu-devel] " Cédric Le Goater
2019-05-25 15:12 ` [Qemu-arm] [PATCH 04/19] hw: timer: Add ASPEED RTC device Cédric Le Goater
2019-05-25 15:12   ` [Qemu-devel] " Cédric Le Goater
2019-05-25 15:12 ` [Qemu-arm] [PATCH 05/19] hw/arm/aspeed: Add RTC to SoC Cédric Le Goater
2019-05-25 15:12   ` [Qemu-devel] " Cédric Le Goater
2019-05-25 15:12 ` [Qemu-arm] [PATCH 06/19] aspeed: introduce a configurable number of CPU per machine Cédric Le Goater
2019-05-25 15:12   ` [Qemu-devel] " Cédric Le Goater
2019-06-12  1:32   ` Joel Stanley
2019-06-12  8:03     ` Cédric Le Goater
2019-05-25 15:12 ` [Qemu-arm] [PATCH 07/19] aspeed: add support for multiple NICs Cédric Le Goater
2019-05-25 15:12   ` [Qemu-devel] " Cédric Le Goater
2019-05-26  1:01   ` Keno Fischer
2019-05-26 17:10     ` [Qemu-arm] " Cédric Le Goater
2019-05-26 17:10       ` Cédric Le Goater
2019-05-25 15:12 ` [Qemu-devel] [PATCH 08/19] aspeed/timer: Fix behaviour running Linux Cédric Le Goater
2023-09-22 13:21   ` Cédric Le Goater
2023-09-25  7:54     ` Andrew Jeffery
2023-09-25  9:20       ` Cédric Le Goater
2023-09-26  1:37         ` Andrew Jeffery
2023-09-27  2:12     ` Joel Stanley
2023-09-27  5:44       ` Cédric Le Goater
2023-09-27  6:46         ` Markus Armbruster [this message]
2019-05-25 15:12 ` [Qemu-devel] [PATCH 09/19] aspeed/timer: Status register contains reload for stopped timer Cédric Le Goater
2019-05-25 15:12 ` [Qemu-arm] [PATCH 10/19] aspeed/timer: Fix match calculations Cédric Le Goater
2019-05-25 15:12   ` [Qemu-devel] " Cédric Le Goater
2019-05-25 15:12 ` [Qemu-arm] [PATCH 11/19] aspeed/timer: Provide back-pressure information for short periods Cédric Le Goater
2019-05-25 15:12   ` [Qemu-devel] " Cédric Le Goater
2019-05-25 15:12 ` [Qemu-arm] [PATCH 12/19] aspeed/timer: Ensure positive muldiv delta Cédric Le Goater
2019-05-25 15:12   ` [Qemu-devel] " Cédric Le Goater
2019-05-25 15:12 ` [Qemu-arm] [PATCH 13/19] aspeed/smc: add a 'sdram_base' propertie Cédric Le Goater
2019-05-25 15:12   ` [Qemu-devel] " Cédric Le Goater
2019-06-12  1:34   ` [Qemu-arm] " Joel Stanley
2019-06-12  1:34     ` [Qemu-devel] " Joel Stanley
2019-06-13 14:32   ` [Qemu-arm] " Philippe Mathieu-Daudé
2019-06-13 14:32     ` Philippe Mathieu-Daudé
2019-06-14 11:49     ` [Qemu-arm] " Cédric Le Goater
2019-06-14 11:49       ` Cédric Le Goater
2019-05-25 15:12 ` [Qemu-devel] [PATCH 14/19] aspeed: remove the "ram" link Cédric Le Goater
2019-06-12  1:35   ` [Qemu-arm] " Joel Stanley
2019-06-12  1:35     ` [Qemu-devel] " Joel Stanley
2019-05-25 15:12 ` [Qemu-arm] [PATCH 15/19] aspeed: add a RAM memory region container Cédric Le Goater
2019-05-25 15:12   ` [Qemu-devel] " Cédric Le Goater
2019-06-12  1:36   ` Joel Stanley
2019-05-25 15:12 ` [Qemu-arm] [PATCH 16/19] aspeed/smc: add support for DMAs Cédric Le Goater
2019-05-25 15:12   ` [Qemu-devel] " Cédric Le Goater
2019-06-12  1:38   ` [Qemu-arm] " Joel Stanley
2019-06-12  1:38     ` [Qemu-devel] " Joel Stanley
2019-05-25 15:12 ` [Qemu-devel] [PATCH 17/19] aspeed/smc: add DMA calibration settings Cédric Le Goater
2019-06-12  1:40   ` Joel Stanley
2019-05-25 15:12 ` [Qemu-arm] [PATCH 18/19] aspeed/smc: inject errors in DMA checksum Cédric Le Goater
2019-05-25 15:12   ` [Qemu-devel] " Cédric Le Goater
2019-06-12  1:41   ` Joel Stanley
2019-06-13 14:31   ` Philippe Mathieu-Daudé
2019-06-14 12:02     ` Cédric Le Goater
2019-06-14 12:35       ` [Qemu-arm] " Philippe Mathieu-Daudé
2019-06-14 12:35         ` Philippe Mathieu-Daudé
2019-05-25 15:12 ` [Qemu-arm] [PATCH 19/19] aspeed/smc: Calculate checksum on normal DMA Cédric Le Goater
2019-05-25 15:12   ` [Qemu-devel] " Cédric Le Goater
2019-06-12  1:42   ` [Qemu-arm] " Joel Stanley
2019-06-12  1:42     ` [Qemu-devel] " Joel Stanley
2019-06-07 10:10 ` [Qemu-devel] [PATCH 00/19] aspeed: machine extensions and fixes Peter Maydell

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=87sf70f6zs.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=andrew@aj.id.au \
    --cc=clg@kaod.org \
    --cc=joel@jms.id.au \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.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 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.