From: Ninad Palsule <ninad@linux.ibm.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, clg@kaod.org, peter.maydell@linaro.org,
andrew@aj.id.au, joel@jms.id.au, pbonzini@redhat.com,
marcandre.lureau@redhat.com, thuth@redhat.com, philmd@linaro.org,
lvivier@redhat.com, qemu-arm@nongnu.org
Subject: Re: [PATCH v5 01/10] hw/fsi: Introduce IBM's Local bus
Date: Sat, 21 Oct 2023 15:22:51 -0500 [thread overview]
Message-ID: <26b21483-357e-4382-beb3-7356b445196b@linux.ibm.com> (raw)
In-Reply-To: <ZTFUx/YiaCKHxwf7@redhat.com>
Hello Daniel,
On 10/19/23 11:09, Daniel P. Berrangé wrote:
> On Thu, Oct 19, 2023 at 10:34:52AM -0500, Ninad Palsule wrote:
>> Hello Daniel,
>>
>> On 10/19/23 03:14, Daniel P. Berrangé wrote:
>>> On Wed, Oct 11, 2023 at 10:13:30AM -0500, Ninad Palsule wrote:
>>>> This is a part of patchset where IBM's Flexible Service Interface is
>>>> introduced.
>>>>
>>>> The LBUS is modelled to maintain the qdev bus hierarchy and to take
>>>> advantage of the object model to automatically generate the CFAM
>>>> configuration block. The configuration block presents engines in the
>>>> order they are attached to the CFAM's LBUS. Engine implementations
>>>> should subclass the LBusDevice and set the 'config' member of
>>>> LBusDeviceClass to match the engine's type.
>>>>
>>>> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
>>>> Signed-off-by: Cédric Le Goater <clg@kaod.org>
>>>> Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
>>>> ---
>>>> v2:
>>>> - Incorporated Joel's review comments.
>>>> v5:
>>>> - Incorporated review comments by Cedric.
>>>> ---
>>>> include/hw/fsi/lbus.h | 51 +++++++++++++++++++++++++
>>>> include/qemu/bitops.h | 6 +++
>>>> hw/fsi/lbus.c | 87 +++++++++++++++++++++++++++++++++++++++++++
>>>> hw/Kconfig | 1 +
>>>> hw/fsi/Kconfig | 2 +
>>>> hw/fsi/meson.build | 1 +
>>>> hw/meson.build | 1 +
>>>> 7 files changed, 149 insertions(+)
>>>> create mode 100644 include/hw/fsi/lbus.h
>>>> create mode 100644 hw/fsi/lbus.c
>>>> create mode 100644 hw/fsi/Kconfig
>>>> create mode 100644 hw/fsi/meson.build
>>>> +DeviceState *lbus_create_device(FSILBus *bus, const char *type, uint32_t addr)
>>>> +{
>>>> + DeviceState *dev;
>>>> + FSILBusNode *node;
>>>> + BusState *state = BUS(bus);
>>>> +
>>>> + dev = qdev_new(type);
>>>> + qdev_prop_set_uint8(dev, "address", addr);
>>>> + qdev_realize_and_unref(dev, state, &error_fatal);
>>>> +
>>>> + /* Move to post_load */
>>>> + node = g_malloc(sizeof(struct FSILBusNode));
>>> This allocation pattern is discouraged in favour of:
>>>
>>> node = g_new0(FSILBusNode, 1);
>> I am using g_malloc() because I want program to terminate. I don't think
>> g_new0 provide this functionality. Please let me know.
> All the glib memory allocation functions terminate on OOM, except
> for the ones with '_try_' in their name.
Sorry, you are right. I have removed this function as per Cedric's comment.
Thanks for the review.
Regards,
Ninad
>
> With regards,
> Daniel
next prev parent reply other threads:[~2023-10-21 20:23 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-11 15:13 [PATCH v5 00/10] Introduce model for IBM's FSI Ninad Palsule
2023-10-11 15:13 ` [PATCH v5 01/10] hw/fsi: Introduce IBM's Local bus Ninad Palsule
2023-10-19 8:03 ` Cédric Le Goater
2023-10-21 20:20 ` Ninad Palsule
2023-10-19 8:08 ` Cédric Le Goater
2023-10-21 20:21 ` Ninad Palsule
2023-10-19 8:14 ` Daniel P. Berrangé
2023-10-19 15:34 ` Ninad Palsule
2023-10-19 16:09 ` Daniel P. Berrangé
2023-10-21 20:22 ` Ninad Palsule [this message]
2023-10-11 15:13 ` [PATCH v5 02/10] hw/fsi: Introduce IBM's scratchpad Ninad Palsule
2023-10-19 8:20 ` Daniel P. Berrangé
2023-10-21 20:27 ` Ninad Palsule
2023-10-11 15:13 ` [PATCH v5 03/10] hw/fsi: Introduce IBM's cfam,fsi-slave Ninad Palsule
2023-10-19 8:00 ` Cédric Le Goater
2023-10-21 20:33 ` Ninad Palsule
2023-10-19 8:26 ` Daniel P. Berrangé
2023-10-21 20:34 ` Ninad Palsule
2023-10-19 17:28 ` Cédric Le Goater
2023-10-21 20:35 ` Ninad Palsule
2023-10-11 15:13 ` [PATCH v5 04/10] hw/fsi: Introduce IBM's FSI Ninad Palsule
2023-10-19 7:44 ` Cédric Le Goater
2023-10-21 20:36 ` Ninad Palsule
2023-10-19 8:28 ` Daniel P. Berrangé
2023-10-21 20:37 ` Ninad Palsule
2023-10-11 15:13 ` [PATCH v5 05/10] hw/fsi: IBM's On-chip Peripheral Bus Ninad Palsule
2023-10-19 7:26 ` Cédric Le Goater
2023-10-21 20:40 ` Ninad Palsule
2023-10-19 8:30 ` Daniel P. Berrangé
2023-10-21 20:42 ` Ninad Palsule
2023-10-11 15:13 ` [PATCH v5 06/10] hw/fsi: Aspeed APB2OPB interface Ninad Palsule
2023-10-19 7:16 ` Cédric Le Goater
2023-10-21 20:43 ` Ninad Palsule
2023-10-11 15:13 ` [PATCH v5 07/10] hw/arm: Hook up FSI module in AST2600 Ninad Palsule
2023-10-11 15:13 ` [PATCH v5 08/10] hw/fsi: Added qtest Ninad Palsule
2023-10-11 15:35 ` Thomas Huth
2023-10-11 16:54 ` Ninad Palsule
2023-10-11 15:13 ` [PATCH v5 09/10] hw/fsi: Added FSI documentation Ninad Palsule
2023-10-11 15:13 ` [PATCH v5 10/10] hw/fsi: Update MAINTAINER list Ninad Palsule
2023-10-19 8:16 ` [PATCH v5 00/10] Introduce model for IBM's FSI Cédric Le Goater
2023-10-21 20:45 ` 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=26b21483-357e-4382-beb3-7356b445196b@linux.ibm.com \
--to=ninad@linux.ibm.com \
--cc=andrew@aj.id.au \
--cc=berrange@redhat.com \
--cc=clg@kaod.org \
--cc=joel@jms.id.au \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@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).