[LEDE-DEV] [PATCH 1/7] ag71xx: Reorder some more structs based on warmth.

Rosen Penev rosenp at gmail.com
Thu Dec 7 18:37:11 PST 2017


Should help slightly.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h  | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
index 5ead6b3..f9ef17d 100644
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
@@ -106,13 +106,16 @@ struct ag71xx_buf {
 };
 
 struct ag71xx_ring {
+	/* "Hot" fields in the data path. */
+	unsigned int		curr;
+	unsigned int		dirty;
+
+	/* "Cold" fields - not used in the data path. */
 	struct ag71xx_buf	*buf;
 	u8			*descs_cpu;
 	dma_addr_t		descs_dma;
 	u16			desc_split;
 	u16			order;
-	unsigned int		curr;
-	unsigned int		dirty;
 };
 
 struct ag71xx_mdio {
@@ -166,14 +169,15 @@ struct ag71xx {
 
 	struct net_device	*dev;
 	struct platform_device  *pdev;
+	/* Serialises access to regs */
 	spinlock_t		lock;
 	struct napi_struct	napi;
-	u32			msg_enable;
 
 	/*
 	 * From this point onwards we're not looking at per-packet fields.
 	 */
 	void __iomem		*mac_base;
+	u32                     msg_enable;
 
 	struct ag71xx_desc	*stop_desc;
 	dma_addr_t		stop_desc_dma;
-- 
2.7.4




More information about the Lede-dev mailing list