Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80b60fa8 authored by Larry Finger's avatar Larry Finger Committed by John W. Linville
Browse files

[PATCH] bcm43xx: optimization of DMA bitfields



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.

Signed-off-by: default avatarMichael Buesch <mb@bu3sch.de>
Signed-Off-By: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9c974fb1
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -235,9 +235,12 @@ struct bcm43xx_dmaring {
	u16 mmio_base;
	u16 mmio_base;
	/* DMA controller index number (0-5). */
	/* DMA controller index number (0-5). */
	int index;
	int index;
	u8 tx:1,	/* TRUE, if this is a TX ring. */
	/* Boolean. Is this a TX ring? */
	   dma64:1,	/* TRUE, if 64-bit DMA is enabled (FALSE if 32bit). */
	u8 tx;
	   suspended:1;	/* TRUE, if transfers are suspended on this ring. */
	/* Boolean. 64bit DMA if true, 32bit DMA otherwise. */
	u8 dma64;
	/* Boolean. Are transfers suspended on this ring? */
	u8 suspended;
	struct bcm43xx_private *bcm;
	struct bcm43xx_private *bcm;
#ifdef CONFIG_BCM43XX_DEBUG
#ifdef CONFIG_BCM43XX_DEBUG
	/* Maximum number of used slots. */
	/* Maximum number of used slots. */