From: Simon Horman <horms@kernel.org>
To: Diogo Ivo <diogo.ivo@siemens.com>
Cc: MD Danish Anwar <danishanwar@ti.com>,
Roger Quadros <rogerq@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
Tero Kristo <kristo@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jan Kiszka <jan.kiszka@siemens.com>,
Jacob Keller <jacob.e.keller@intel.com>,
linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v3 2/4] net: ti: icss-iep: Remove spinlock-based synchronization
Date: Fri, 7 Jun 2024 19:24:14 +0100 [thread overview]
Message-ID: <20240607182414.GH27689@kernel.org> (raw)
In-Reply-To: <20240607-iep-v3-2-4824224105bc@siemens.com>
On Fri, Jun 07, 2024 at 02:02:43PM +0100, Diogo Ivo wrote:
> As all sources of concurrency in hardware register access occur in
> non-interrupt context eliminate spinlock-based synchronization and
> rely on the mutex-based synchronization that is already present.
>
> Signed-off-by: Diogo Ivo <diogo.ivo@siemens.com>
> ---
> drivers/net/ethernet/ti/icssg/icss_iep.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/drivers/net/ethernet/ti/icssg/icss_iep.c b/drivers/net/ethernet/ti/icssg/icss_iep.c
> index 3025e9c18970..1d6ccdf2583f 100644
> --- a/drivers/net/ethernet/ti/icssg/icss_iep.c
> +++ b/drivers/net/ethernet/ti/icssg/icss_iep.c
> @@ -110,7 +110,6 @@ struct icss_iep {
> struct ptp_clock_info ptp_info;
> struct ptp_clock *ptp_clock;
> struct mutex ptp_clk_mutex; /* PHC access serializer */
> - spinlock_t irq_lock; /* CMP IRQ vs icss_iep_ptp_enable access */
> u32 def_inc;
> s16 slow_cmp_inc;
> u32 slow_cmp_count;
> @@ -199,7 +198,6 @@ static void icss_iep_settime(struct icss_iep *iep, u64 ns)
> return;
> }
>
> - spin_lock_irqsave(&iep->irq_lock, flags);
> if (iep->pps_enabled || iep->perout_enabled)
> writel(0, iep->base + iep->plat_data->reg_offs[ICSS_IEP_SYNC_CTRL_REG]);
>
> @@ -210,7 +208,6 @@ static void icss_iep_settime(struct icss_iep *iep, u64 ns)
> writel(IEP_SYNC_CTRL_SYNC_N_EN(0) | IEP_SYNC_CTRL_SYNC_EN,
> iep->base + iep->plat_data->reg_offs[ICSS_IEP_SYNC_CTRL_REG]);
> }
> - spin_unlock_irqrestore(&iep->irq_lock, flags);
> }
>
> /**
Hi Diogo,
This is not a full review, but flags is now unused in icss_iep_settime()
and should be removed. Likewise in icss_iep_perout_enable() and
icss_iep_pps_enable().
Flagged by W=1 builds with gcc-13 and clang-18.
...
--
pw-bot: changes-requested
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Diogo Ivo <diogo.ivo@siemens.com>
Cc: MD Danish Anwar <danishanwar@ti.com>,
Roger Quadros <rogerq@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
Tero Kristo <kristo@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jan Kiszka <jan.kiszka@siemens.com>,
Jacob Keller <jacob.e.keller@intel.com>,
linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v3 2/4] net: ti: icss-iep: Remove spinlock-based synchronization
Date: Fri, 7 Jun 2024 19:24:14 +0100 [thread overview]
Message-ID: <20240607182414.GH27689@kernel.org> (raw)
In-Reply-To: <20240607-iep-v3-2-4824224105bc@siemens.com>
On Fri, Jun 07, 2024 at 02:02:43PM +0100, Diogo Ivo wrote:
> As all sources of concurrency in hardware register access occur in
> non-interrupt context eliminate spinlock-based synchronization and
> rely on the mutex-based synchronization that is already present.
>
> Signed-off-by: Diogo Ivo <diogo.ivo@siemens.com>
> ---
> drivers/net/ethernet/ti/icssg/icss_iep.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/drivers/net/ethernet/ti/icssg/icss_iep.c b/drivers/net/ethernet/ti/icssg/icss_iep.c
> index 3025e9c18970..1d6ccdf2583f 100644
> --- a/drivers/net/ethernet/ti/icssg/icss_iep.c
> +++ b/drivers/net/ethernet/ti/icssg/icss_iep.c
> @@ -110,7 +110,6 @@ struct icss_iep {
> struct ptp_clock_info ptp_info;
> struct ptp_clock *ptp_clock;
> struct mutex ptp_clk_mutex; /* PHC access serializer */
> - spinlock_t irq_lock; /* CMP IRQ vs icss_iep_ptp_enable access */
> u32 def_inc;
> s16 slow_cmp_inc;
> u32 slow_cmp_count;
> @@ -199,7 +198,6 @@ static void icss_iep_settime(struct icss_iep *iep, u64 ns)
> return;
> }
>
> - spin_lock_irqsave(&iep->irq_lock, flags);
> if (iep->pps_enabled || iep->perout_enabled)
> writel(0, iep->base + iep->plat_data->reg_offs[ICSS_IEP_SYNC_CTRL_REG]);
>
> @@ -210,7 +208,6 @@ static void icss_iep_settime(struct icss_iep *iep, u64 ns)
> writel(IEP_SYNC_CTRL_SYNC_N_EN(0) | IEP_SYNC_CTRL_SYNC_EN,
> iep->base + iep->plat_data->reg_offs[ICSS_IEP_SYNC_CTRL_REG]);
> }
> - spin_unlock_irqrestore(&iep->irq_lock, flags);
> }
>
> /**
Hi Diogo,
This is not a full review, but flags is now unused in icss_iep_settime()
and should be removed. Likewise in icss_iep_perout_enable() and
icss_iep_pps_enable().
Flagged by W=1 builds with gcc-13 and clang-18.
...
--
pw-bot: changes-requested
next prev parent reply other threads:[~2024-06-07 18:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 13:02 [PATCH net-next v3 0/4] Enable PTP timestamping/PPS for AM65x SR1.0 devices Diogo Ivo
2024-06-07 13:02 ` Diogo Ivo
2024-06-07 13:02 ` [PATCH net-next v3 1/4] net: ti: icssg-prueth: Enable PTP timestamping support for " Diogo Ivo
2024-06-07 13:02 ` Diogo Ivo
2024-06-07 13:02 ` [PATCH net-next v3 2/4] net: ti: icss-iep: Remove spinlock-based synchronization Diogo Ivo
2024-06-07 13:02 ` Diogo Ivo
2024-06-07 18:24 ` Simon Horman [this message]
2024-06-07 18:24 ` Simon Horman
2024-06-07 13:02 ` [PATCH net-next v3 3/4] net: ti: icss-iep: Enable compare events Diogo Ivo
2024-06-07 13:02 ` Diogo Ivo
2024-06-07 13:02 ` [PATCH net-next v3 4/4] arm64: dts: ti: iot2050: Add IEP interrupts for SR1.0 devices Diogo Ivo
2024-06-07 13:02 ` Diogo Ivo
2024-06-12 8:53 ` Vignesh Raghavendra
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=20240607182414.GH27689@kernel.org \
--to=horms@kernel.org \
--cc=conor+dt@kernel.org \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=diogo.ivo@siemens.com \
--cc=edumazet@google.com \
--cc=jacob.e.keller@intel.com \
--cc=jan.kiszka@siemens.com \
--cc=kristo@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nm@ti.com \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=robh@kernel.org \
--cc=rogerq@kernel.org \
--cc=vigneshr@ti.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.