From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Vadim Pasternak <vadimp@nvidia.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
michaelsh@nvidia.com, crajank@nvidia.com, fradensky@nvidia.com,
oleksandrs@nvidia.com, platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v5 04/12] platform_data/mlxreg: Add capability bit and mask fields
Date: Mon, 3 Feb 2025 15:50:26 +0200 (EET) [thread overview]
Message-ID: <ec31c25f-cbbc-b958-88b0-aa686cd58cd1@linux.intel.com> (raw)
In-Reply-To: <20250124172632.22437-5-vadimp@nvidia.com>
On Fri, 24 Jan 2025, Vadim Pasternak wrote:
> Some 'capability' registers can be shared between different resources.
> Add new fields 'capability_bit' and 'capability_mask' to structs
> 'mlxreg_core_data' and 'mlxreg_core_item' for getting only relevant
> capability bits.
>
> Reviewed-by: Felix Radensky <fradensky@nvidia.com>
> Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
> ---
> include/linux/platform_data/mlxreg.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/linux/platform_data/mlxreg.h b/include/linux/platform_data/mlxreg.h
> index 0b9f81a6f753..d9f679752226 100644
> --- a/include/linux/platform_data/mlxreg.h
> +++ b/include/linux/platform_data/mlxreg.h
> @@ -118,6 +118,8 @@ struct mlxreg_hotplug_device {
> * @mask: attribute access mask;
> * @bit: attribute effective bit;
> * @capability: attribute capability register;
> + * @capability_bit: started bit in attribute capability register;
"started bit" sounds a bit clumsy.
> + * @capability_mask: mask in attribute capability register;
> * @reg_prsnt: attribute presence register;
> * @reg_sync: attribute synch register;
> * @reg_pwr: attribute power register;
> @@ -138,6 +140,8 @@ struct mlxreg_core_data {
> u32 mask;
> u32 bit;
> u32 capability;
> + u32 capability_bit;
> + u32 capability_mask;
> u32 reg_prsnt;
> u32 reg_sync;
> u32 reg_pwr;
> @@ -162,6 +166,8 @@ struct mlxreg_core_data {
> * @reg: group interrupt status register;
> * @mask: group interrupt mask;
> * @capability: group capability register;
> + * @capability_bit: started bit in attribute capability register;
> + * @capability_mask: mask in attribute capability register;
This is probably a bit misleading as you masked with it before shifting
with capability_bit (in patch 5) so the mask seems zeroth-bit based rather
than a "mask in attribute capability register" ?
> * @cache: last status value for elements fro the same group;
> * @count: number of available elements in the group;
> * @ind: element's index inside the group;
> @@ -175,6 +181,8 @@ struct mlxreg_core_item {
> u32 reg;
> u32 mask;
> u32 capability;
> + u32 capability_bit;
> + u32 capability_mask;
> u32 cache;
> u8 count;
> u8 ind;
>
--
i.
next prev parent reply other threads:[~2025-02-03 13:50 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-24 17:26 [PATCH v5 00/12] platform/mellanox: Add support for new systems, amendments, relocate mlx-platform module Vadim Pasternak
2025-01-24 17:26 ` [PATCH v5 01/12] mellanox: Relocate mlx-platform driver Vadim Pasternak
2025-02-04 14:33 ` Ilpo Järvinen
2025-01-24 17:26 ` [PATCH v5 02/12] platform: mellanox: mlx-platform: Cosmetic changes Vadim Pasternak
2025-01-24 17:26 ` [PATCH v5 03/12] platform: mellanox: mlx-platform: Change register name Vadim Pasternak
2025-01-24 17:26 ` [PATCH v5 04/12] platform_data/mlxreg: Add capability bit and mask fields Vadim Pasternak
2025-02-03 13:50 ` Ilpo Järvinen [this message]
2025-02-10 20:30 ` Vadim Pasternak
2025-01-24 17:26 ` [PATCH v5 05/12] platform/mellanox: mlxreg-hotplug: Add support for new flavor of capability registers Vadim Pasternak
2025-02-03 13:47 ` Ilpo Järvinen
2025-02-10 20:30 ` Vadim Pasternak
2025-02-11 14:48 ` Ilpo Järvinen
2025-01-24 17:26 ` [PATCH v5 06/12] platform/mellanox: Rename field to improve code readability Vadim Pasternak
2025-02-03 13:52 ` Ilpo Järvinen
2025-01-24 17:26 ` [PATCH v5 07/12] platform/mellanox: mlxreg-dpu: Add initial support for Nvidia DPU Vadim Pasternak
2025-02-03 14:20 ` Ilpo Järvinen
2025-01-24 17:26 ` [PATCH v5 08/12] platform: mellanox: Introduce support of Nvidia smart switch Vadim Pasternak
2025-02-03 14:32 ` Ilpo Järvinen
2025-01-24 17:26 ` [PATCH v5 09/12] platform: mellanox: Cosmetic changes to improve code style Vadim Pasternak
2025-02-03 14:35 ` Ilpo Järvinen
2025-01-24 17:26 ` [PATCH v5 10/12] platform: mellanox: mlx-platform: Add support for new Nvidia system Vadim Pasternak
2025-02-03 14:38 ` Ilpo Järvinen
2025-01-24 17:26 ` [PATCH v5 11/12] platform: mellanox: nvsw-sn2200: Add support for new system flavour Vadim Pasternak
2025-01-24 17:26 ` [PATCH v5 12/12] Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces Vadim Pasternak
2025-02-03 14:40 ` Ilpo Järvinen
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=ec31c25f-cbbc-b958-88b0-aa686cd58cd1@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=crajank@nvidia.com \
--cc=fradensky@nvidia.com \
--cc=hdegoede@redhat.com \
--cc=michaelsh@nvidia.com \
--cc=oleksandrs@nvidia.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=vadimp@nvidia.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 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.