From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Ninad Palsule <ninad@linux.ibm.com>,
qemu-devel@nongnu.org, clg@kaod.org, peter.maydell@linaro.org,
andrew@codeconstruct.com.au, joel@jms.id.au, pbonzini@redhat.com,
marcandre.lureau@redhat.com, berrange@redhat.com,
thuth@redhat.com, lvivier@redhat.com
Cc: qemu-arm@nongnu.org, Andrew Jeffery <andrew@aj.id.au>
Subject: Re: [PATCH v6 02/10] hw/fsi: Introduce IBM's scratchpad
Date: Tue, 24 Oct 2023 09:08:05 +0200 [thread overview]
Message-ID: <4b2e68dd-db49-4041-ee5a-ae2b836bd255@linaro.org> (raw)
In-Reply-To: <f2a50afd-3fa1-47d2-960e-0aaaf57c7cd2@linux.ibm.com>
On 23/10/23 19:08, Ninad Palsule wrote:
> Hello Philippe,
>
> On 10/23/23 10:00, Philippe Mathieu-Daudé wrote:
>> On 21/10/23 23:17, Ninad Palsule wrote:
>>> This is a part of patchset where scratchpad is introduced.
>>>
>>> The scratchpad provides a set of non-functional registers. The firmware
>>> is free to use them, hardware does not support any special management
>>> support. The scratchpad registers can be read or written from LBUS
>>> slave.
>>>
>>> In this model, The LBUS device is parent for the scratchpad.
>>>
>>> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
>>> Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
>>> ---
>>> v2:
>>> - Incorporated Joel's review comments.
>>> v5:
>>> - Incorporated review comments by Cedric.
>>> v6:
>>> - Incorporated review comments by Daniel.
>>> ---
>>> meson.build | 1 +
>>> hw/fsi/trace.h | 1 +
>>> include/hw/fsi/engine-scratchpad.h | 32 ++++++++++
>>> include/hw/fsi/fsi.h | 16 +++++
>>> hw/fsi/engine-scratchpad.c | 93 ++++++++++++++++++++++++++++++
>>> hw/fsi/Kconfig | 4 ++
>>> hw/fsi/meson.build | 1 +
>>> hw/fsi/trace-events | 2 +
>>> 8 files changed, 150 insertions(+)
>>> create mode 100644 hw/fsi/trace.h
>>> create mode 100644 include/hw/fsi/engine-scratchpad.h
>>> create mode 100644 include/hw/fsi/fsi.h
>>> create mode 100644 hw/fsi/engine-scratchpad.c
>>> create mode 100644 hw/fsi/trace-events
>>
>>
>>> diff --git a/include/hw/fsi/fsi.h b/include/hw/fsi/fsi.h
>>> new file mode 100644
>>> index 0000000000..e65f26f17b
>>> --- /dev/null
>>> +++ b/include/hw/fsi/fsi.h
>>> @@ -0,0 +1,16 @@
>>> +/*
>>> + * SPDX-License-Identifier: GPL-2.0-or-later
>>> + * Copyright (C) 2023 IBM Corp.
>>> + *
>>> + * IBM Flexible Service Interface
>>> + */
>>> +#ifndef FSI_FSI_H
>>> +#define FSI_FSI_H
>>> +
>>> +/* Bitwise operations at the word level. */
>>> +#define BE_BIT(x) BIT(31 - (x))
>>> +#define GENMASK(t, b) \
>>> + (((1ULL << ((t) + 1)) - 1) & ~((1ULL << (b)) - 1))
>>
>> Please use MAKE_64BIT_MASK() from "qemu/bitops.h".
>
> The GENMASK and MAKE_64BIT_MASK macros are invoke differently.
>
> GENMASK is invoked with bit t and bit b (t:b) and it provides the mask and
>
> MAKE_64BIT_MASK uses shift and length.
Don't we have:
#define GENMASK(t, b) MAKE_64BIT_MASK(t, b - t + 1)
?
> Thanks for the review.
>
> Regards,
>
> Ninad
>
>
>>> +#define BE_GENMASK(t, b) GENMASK(BE_BIT(t),
>>> BE_BIT(b))
>>> +
>>> +#endif
>>
next prev parent reply other threads:[~2023-10-24 7:09 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-21 21:17 [PATCH v6 00/10] Introduce model for IBM's FSI Ninad Palsule
2023-10-21 21:17 ` [PATCH v6 01/10] hw/fsi: Introduce IBM's Local bus Ninad Palsule
2023-10-23 14:58 ` Philippe Mathieu-Daudé
2023-10-23 17:10 ` Ninad Palsule
2023-10-21 21:17 ` [PATCH v6 02/10] hw/fsi: Introduce IBM's scratchpad Ninad Palsule
2023-10-23 15:00 ` Philippe Mathieu-Daudé
2023-10-23 17:08 ` Ninad Palsule
2023-10-24 7:08 ` Philippe Mathieu-Daudé [this message]
2023-10-26 15:24 ` Ninad Palsule
2023-10-21 21:17 ` [PATCH v6 03/10] hw/fsi: Introduce IBM's cfam,fsi-slave Ninad Palsule
2023-10-21 21:17 ` [PATCH v6 04/10] hw/fsi: Introduce IBM's FSI Ninad Palsule
2023-10-21 21:17 ` [PATCH v6 05/10] hw/fsi: IBM's On-chip Peripheral Bus Ninad Palsule
2023-10-21 21:17 ` [PATCH v6 06/10] hw/fsi: Aspeed APB2OPB interface Ninad Palsule
2023-10-24 7:46 ` Cédric Le Goater
2023-10-24 15:00 ` Ninad Palsule
2023-10-24 15:21 ` Cédric Le Goater
2023-10-24 18:42 ` Ninad Palsule
2023-10-26 15:27 ` Ninad Palsule
2023-10-27 5:25 ` Andrew Jeffery
2023-10-21 21:17 ` [PATCH v6 07/10] hw/arm: Hook up FSI module in AST2600 Ninad Palsule
2023-10-23 15:03 ` Philippe Mathieu-Daudé
2023-10-21 21:17 ` [PATCH v6 08/10] hw/fsi: Added qtest Ninad Palsule
2023-10-23 6:51 ` Thomas Huth
2023-10-23 15:25 ` Ninad Palsule
2023-10-24 7:34 ` Cédric Le Goater
2023-10-26 15:30 ` Ninad Palsule
2023-10-21 21:17 ` [PATCH v6 09/10] hw/fsi: Added FSI documentation Ninad Palsule
2023-10-24 7:37 ` Cédric Le Goater
2023-10-26 15:32 ` Ninad Palsule
2023-10-21 21:17 ` [PATCH v6 10/10] hw/fsi: Update MAINTAINER list Ninad Palsule
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=4b2e68dd-db49-4041-ee5a-ae2b836bd255@linaro.org \
--to=philmd@linaro.org \
--cc=andrew@aj.id.au \
--cc=andrew@codeconstruct.com.au \
--cc=berrange@redhat.com \
--cc=clg@kaod.org \
--cc=joel@jms.id.au \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=ninad@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.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).