[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <68fa22ebdc896adffe42c0f101339c61f2dce86a.camel@gmail.com>
Date: Sat, 21 Sep 2024 23:43:33 +0200
From: Alexander Sverdlin <alexander.sverdlin@...il.com>
To: Anshumali Gaur <agaur@...vell.com>, conor.dooley@...rochip.com,
ulf.hansson@...aro.org, arnd@...db.de, linus.walleij@...aro.org,
nikita.shubin@...uefel.me, vkoul@...nel.org, cyy@...self.name,
krzysztof.kozlowski@...aro.org, linux-kernel@...r.kernel.org,
sgoutham@...vell.com
Subject: Re: [PATCH 2/4] soc: marvell: rvu-pf: Add PF to AF mailbox
communication support.
Hi Anshumali!
On Fri, 2024-09-20 at 16:53 +0530, Anshumali Gaur wrote:
> Resource provisioning for virtual functions (VFs) is done by RVU admin
> function (AF). RVU PF and AF shares a memory region which can be used
> for communication. This patch adds support for mailbox communication
> between PF and AF, notification of messages is via IRQs.
>
> Example mailbox messages types and structures can be found at
> drivers/net/ethernet/marvell/octeontx2/af/mbox.h
>
> Signed-off-by: Anshumali Gaur <agaur@...vell.com>
>
[]
> +#define M(_name, _id, _fn_name, _req_type, _rsp_type) \
> +static struct _req_type __maybe_unused \
> +*gen_pf_mbox_alloc_msg_ ## _fn_name(struct mbox *mbox) \
> +{ \
> + struct _req_type *req; \
> + u16 id = _id; \
> + \
> + req = (struct _req_type *)otx2_mbox_alloc_msg_rsp( \
> + &mbox->mbox, 0, sizeof(struct _req_type), \
> + sizeof(struct _rsp_type)); \
> + if (!req) \
> + return NULL; \
> + req->hdr.sig = OTX2_MBOX_REQ_SIG; \
> + req->hdr.id = id; \
> + trace_otx2_msg_alloc(mbox->mbox.pdev, id, sizeof(*req)); \
> + return req; \
> +}
> +
> +MBOX_MESSAGES
> +#undef M
While checkpatch is wondering about _name:
WARNING: Argument '_name' is not used in function-like macro
#399: FILE: drivers/soc/marvell/rvu_gen_pf/gen_pf.h:77:
+#define M(_name, _id, _fn_name, _req_type, _rsp_type) \
... I ask myself what actually happens here with "M" and "MBOX_MESSAGES"?
--
Alexander Sverdlin.
Powered by blists - more mailing lists