All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: allwinner: remove redundant irqsave and irqrestore in hardIRQ
@ 2020-09-22  1:56 Barry Song
  2020-09-22  8:46 ` Maxime Ripard
  2020-09-24  0:34 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Barry Song @ 2020-09-22  1:56 UTC (permalink / raw)
  To: kuba, davem, netdev; +Cc: Barry Song, Maxime Ripard, Chen-Yu Tsai

The comment "holders of db->lock must always block IRQs" and related
code to do irqsave and irqrestore don't make sense since we are in a
IRQ-disabled hardIRQ context.

Cc: Maxime Ripard <mripard@kernel.org>
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
---
 drivers/net/ethernet/allwinner/sun4i-emac.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/allwinner/sun4i-emac.c b/drivers/net/ethernet/allwinner/sun4i-emac.c
index b3b8a8010142..862ea44beea7 100644
--- a/drivers/net/ethernet/allwinner/sun4i-emac.c
+++ b/drivers/net/ethernet/allwinner/sun4i-emac.c
@@ -640,13 +640,11 @@ static irqreturn_t emac_interrupt(int irq, void *dev_id)
 	struct net_device *dev = dev_id;
 	struct emac_board_info *db = netdev_priv(dev);
 	int int_status;
-	unsigned long flags;
 	unsigned int reg_val;
 
 	/* A real interrupt coming */
 
-	/* holders of db->lock must always block IRQs */
-	spin_lock_irqsave(&db->lock, flags);
+	spin_lock(&db->lock);
 
 	/* Disable all interrupts */
 	writel(0, db->membase + EMAC_INT_CTL_REG);
@@ -680,7 +678,7 @@ static irqreturn_t emac_interrupt(int irq, void *dev_id)
 		reg_val |= (0xf << 0) | (0x01 << 8);
 		writel(reg_val, db->membase + EMAC_INT_CTL_REG);
 	}
-	spin_unlock_irqrestore(&db->lock, flags);
+	spin_unlock(&db->lock);
 
 	return IRQ_HANDLED;
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: allwinner: remove redundant irqsave and irqrestore in hardIRQ
  2020-09-22  1:56 [PATCH] net: allwinner: remove redundant irqsave and irqrestore in hardIRQ Barry Song
@ 2020-09-22  8:46 ` Maxime Ripard
  2020-09-24  0:34 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Ripard @ 2020-09-22  8:46 UTC (permalink / raw)
  To: Barry Song; +Cc: kuba, davem, netdev, Chen-Yu Tsai

[-- Attachment #1: Type: text/plain, Size: 445 bytes --]

On Tue, Sep 22, 2020 at 01:56:15PM +1200, Barry Song wrote:
> The comment "holders of db->lock must always block IRQs" and related
> code to do irqsave and irqrestore don't make sense since we are in a
> IRQ-disabled hardIRQ context.
> 
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>

Acked-by: Maxime Ripard <mripard@kernel.org>

Thanks!
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: allwinner: remove redundant irqsave and irqrestore in hardIRQ
  2020-09-22  1:56 [PATCH] net: allwinner: remove redundant irqsave and irqrestore in hardIRQ Barry Song
  2020-09-22  8:46 ` Maxime Ripard
@ 2020-09-24  0:34 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-09-24  0:34 UTC (permalink / raw)
  To: song.bao.hua; +Cc: kuba, netdev, mripard, wens

From: Barry Song <song.bao.hua@hisilicon.com>
Date: Tue, 22 Sep 2020 13:56:15 +1200

> The comment "holders of db->lock must always block IRQs" and related
> code to do irqsave and irqrestore don't make sense since we are in a
> IRQ-disabled hardIRQ context.
> 
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>

Applied to net-next, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-24  0:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22  1:56 [PATCH] net: allwinner: remove redundant irqsave and irqrestore in hardIRQ Barry Song
2020-09-22  8:46 ` Maxime Ripard
2020-09-24  0:34 ` David Miller

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.