Skip to contentSkip to conversation

bcm43xx-softmac: optimization of DMA bitfields.]

PATCH In review Larry Finger 3 participants 5 messages Aug 16, 2006 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bcm43xx-softmac: optimization of DMA bitfields.]

John,

Please pull this patch for the wireless-2.6 tree.

This patch depends on the 64bit DMA patch, which is already submitted for inclusion.

Convert the bitfields in the bcm43xx DMA code to properly aligned u8 booleans. These flags are accessed in the DMA hotpath, so it's a good idea to waste a few bytes of memory for the sake of speed by not requiring masking (and probably shifting) of the bitfields.

drivers/net/wireless/bcm43xx/bcm43xx_dma.h +6 -3
Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_dma.h
===================================================================
@@ -235,9 +235,12 @@
 	u16 mmio_base;
 	/* DMA controller index number (0-5). */
 	int index;
-	u8 tx:1,	/* TRUE, if this is a TX ring. */
-	   dma64:1,	/* TRUE, if 64-bit DMA is enabled (FALSE if 32bit). */
-	   suspended:1;	/* TRUE, if transfers are suspended on this ring. */
+	/* Boolean. Is this a TX ring? */
+	u8 tx
+	/* Boolean. 64bit DMA if true, 32bit DMA otherwise. */
+	u8 dma64;
+	/* Boolean. Are transfers suspended on this ring? */
+	u8 suspended;
 	struct bcm43xx_private *bcm;
 #ifdef CONFIG_BCM43XX_DEBUG
 	/* Maximum number of used slots. */
maintainer
#1 lore raw

drivers/net/wireless/bcm43xx/bcm43xx_dma.h line 241

Quoted 4 lines · Larry Finger
drivers/net/wireless/bcm43xx/bcm43xx_dma.h +4 -0
+	/* Boolean. Is this a TX ring? */
+	u8 tx
+	/* Boolean. 64bit DMA if true, 32bit DMA otherwise. */
+	u8 dma64;

does that compile?

johannes

#2 lore raw
Quoted 10 lines · Johannes Berg

drivers/net/wireless/bcm43xx/bcm43xx_dma.h line 241

Quoted 4 lines · Larry Finger
drivers/net/wireless/bcm43xx/bcm43xx_dma.h +4 -0
+	/* Boolean. Is this a TX ring? */
+	u8 tx
+	/* Boolean. 64bit DMA if true, 32bit DMA otherwise. */
+	u8 dma64;

does that compile?

johannes

Yes, it did here. Did you have a problem?

Larry

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 9 lines · Larry Finger
Quoted 8 lines · Johannes Berg

drivers/net/wireless/bcm43xx/bcm43xx_dma.h line 241

Quoted 4 lines · Larry Finger
drivers/net/wireless/bcm43xx/bcm43xx_dma.h +4 -0
+	/* Boolean. Is this a TX ring? */
+	u8 tx
+	/* Boolean. 64bit DMA if true, 32bit DMA otherwise. */
+	u8 dma64;

does that compile?

Quoted 4 lines
Quoted 2 lines

johannes

Yes, it did here. Did you have a problem?

You removed a ; by mistake.
Look, it's there in my original patch (which was compile tested).

Signature · 1 line
Greetings Michael.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw
Quoted 9 lines · Michael Buesch
Quoted 8 lines · Larry Finger
Quoted 7 lines · Johannes Berg

drivers/net/wireless/bcm43xx/bcm43xx_dma.h line 241

Quoted 4 lines · Larry Finger
drivers/net/wireless/bcm43xx/bcm43xx_dma.h +4 -0
+	/* Boolean. Is this a TX ring? */
+	u8 tx
+	/* Boolean. 64bit DMA if true, 32bit DMA otherwise. */
+	u8 dma64;

does that compile?

Quoted 7 lines
Quoted 3 lines
Quoted 2 lines

johannes

Yes, it did here. Did you have a problem?

You removed a ; by mistake.
Look, it's there in my original patch (which was compile tested).

I saw that just after I sent the response to Johannes. I don't know how that ; got deleted, but a revised version will be on to John soon.

Larry