Commit 068c38ad authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Jakub Kicinski
Browse files

net: Remove the obsolte u64_stats_fetch_*_irq() users (drivers).



Now that the 32bit UP oddity is gone and 32bit uses always a sequence
count, there is no need for the fetch_irq() variants anymore.

Convert to the regular interface.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 196dd92a
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -292,9 +292,9 @@ do { \
{								\
	unsigned int start;					\
	do {							\
		start = u64_stats_fetch_begin_irq(&(st)->syncp);	\
		start = u64_stats_fetch_begin(&(st)->syncp);	\
		newst = (st)->counter;				\
	} while (u64_stats_fetch_retry_irq(&(st)->syncp, start));	\
	} while (u64_stats_fetch_retry(&(st)->syncp, start));	\
}

struct slic_upr {
+2 −2
Original line number Diff line number Diff line
@@ -118,9 +118,9 @@ static void ena_safe_update_stat(u64 *src, u64 *dst,
	unsigned int start;

	do {
		start = u64_stats_fetch_begin_irq(syncp);
		start = u64_stats_fetch_begin(syncp);
		*(dst) = *src;
	} while (u64_stats_fetch_retry_irq(syncp, start));
	} while (u64_stats_fetch_retry(syncp, start));
}

static void ena_queue_stats(struct ena_adapter *adapter, u64 **data)
+6 −6
Original line number Diff line number Diff line
@@ -3268,10 +3268,10 @@ static void ena_get_stats64(struct net_device *netdev,
		tx_ring = &adapter->tx_ring[i];

		do {
			start = u64_stats_fetch_begin_irq(&tx_ring->syncp);
			start = u64_stats_fetch_begin(&tx_ring->syncp);
			packets = tx_ring->tx_stats.cnt;
			bytes = tx_ring->tx_stats.bytes;
		} while (u64_stats_fetch_retry_irq(&tx_ring->syncp, start));
		} while (u64_stats_fetch_retry(&tx_ring->syncp, start));

		stats->tx_packets += packets;
		stats->tx_bytes += bytes;
@@ -3279,20 +3279,20 @@ static void ena_get_stats64(struct net_device *netdev,
		rx_ring = &adapter->rx_ring[i];

		do {
			start = u64_stats_fetch_begin_irq(&rx_ring->syncp);
			start = u64_stats_fetch_begin(&rx_ring->syncp);
			packets = rx_ring->rx_stats.cnt;
			bytes = rx_ring->rx_stats.bytes;
		} while (u64_stats_fetch_retry_irq(&rx_ring->syncp, start));
		} while (u64_stats_fetch_retry(&rx_ring->syncp, start));

		stats->rx_packets += packets;
		stats->rx_bytes += bytes;
	}

	do {
		start = u64_stats_fetch_begin_irq(&adapter->syncp);
		start = u64_stats_fetch_begin(&adapter->syncp);
		rx_drops = adapter->dev_stats.rx_drops;
		tx_drops = adapter->dev_stats.tx_drops;
	} while (u64_stats_fetch_retry_irq(&adapter->syncp, start));
	} while (u64_stats_fetch_retry(&adapter->syncp, start));

	stats->rx_dropped = rx_drops;
	stats->tx_dropped = tx_drops;
+4 −4
Original line number Diff line number Diff line
@@ -934,7 +934,7 @@ unsigned int aq_ring_fill_stats_data(struct aq_ring_s *self, u64 *data)
		/* This data should mimic aq_ethtool_queue_rx_stat_names structure */
		do {
			count = 0;
			start = u64_stats_fetch_begin_irq(&self->stats.rx.syncp);
			start = u64_stats_fetch_begin(&self->stats.rx.syncp);
			data[count] = self->stats.rx.packets;
			data[++count] = self->stats.rx.jumbo_packets;
			data[++count] = self->stats.rx.lro_packets;
@@ -951,15 +951,15 @@ unsigned int aq_ring_fill_stats_data(struct aq_ring_s *self, u64 *data)
			data[++count] = self->stats.rx.xdp_tx;
			data[++count] = self->stats.rx.xdp_invalid;
			data[++count] = self->stats.rx.xdp_redirect;
		} while (u64_stats_fetch_retry_irq(&self->stats.rx.syncp, start));
		} while (u64_stats_fetch_retry(&self->stats.rx.syncp, start));
	} else {
		/* This data should mimic aq_ethtool_queue_tx_stat_names structure */
		do {
			count = 0;
			start = u64_stats_fetch_begin_irq(&self->stats.tx.syncp);
			start = u64_stats_fetch_begin(&self->stats.tx.syncp);
			data[count] = self->stats.tx.packets;
			data[++count] = self->stats.tx.queue_restarts;
		} while (u64_stats_fetch_retry_irq(&self->stats.tx.syncp, start));
		} while (u64_stats_fetch_retry(&self->stats.tx.syncp, start));
	}

	return ++count;
+2 −2
Original line number Diff line number Diff line
@@ -662,12 +662,12 @@ static void ax88796c_get_stats64(struct net_device *ndev,
		s = per_cpu_ptr(ax_local->stats, cpu);

		do {
			start = u64_stats_fetch_begin_irq(&s->syncp);
			start = u64_stats_fetch_begin(&s->syncp);
			rx_packets = u64_stats_read(&s->rx_packets);
			rx_bytes   = u64_stats_read(&s->rx_bytes);
			tx_packets = u64_stats_read(&s->tx_packets);
			tx_bytes   = u64_stats_read(&s->tx_bytes);
		} while (u64_stats_fetch_retry_irq(&s->syncp, start));
		} while (u64_stats_fetch_retry(&s->syncp, start));

		stats->rx_packets += rx_packets;
		stats->rx_bytes   += rx_bytes;
Loading