netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bcm43xx-softmac: optimization of DMA bitfields.]
@ 2006-08-16 15:36 Larry Finger
  2006-08-16 15:42 ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2006-08-16 15:36 UTC (permalink / raw)
  To: John Linville
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Stefano Brivio, Michael Buesch,
	Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w

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.

Signed-off-by: Michael Buesch <mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
Signed-Off-By: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>

Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_dma.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_dma.h	2006-08-16 12:47:27.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_dma.h	2006-08-16 12:49:43.000000000 +0200
@@ -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. */

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

* Re: [PATCH] bcm43xx-softmac: optimization of DMA bitfields.]
  2006-08-16 15:36 [PATCH] bcm43xx-softmac: optimization of DMA bitfields.] Larry Finger
@ 2006-08-16 15:42 ` Johannes Berg
  2006-08-16 15:52   ` Larry Finger
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2006-08-16 15:42 UTC (permalink / raw)
  To: Larry Finger
  Cc: John Linville, netdev, Stefano Brivio, Michael Buesch,
	Bcm43xx-dev

On Wed, 2006-08-16 at 10:36 -0500, Larry Finger wrote:
> +	/* Boolean. Is this a TX ring? */
> +	u8 tx
> +	/* Boolean. 64bit DMA if true, 32bit DMA otherwise. */
> +	u8 dma64;

does that compile?

johannes

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

* Re: [PATCH] bcm43xx-softmac: optimization of DMA bitfields.]
  2006-08-16 15:42 ` Johannes Berg
@ 2006-08-16 15:52   ` Larry Finger
       [not found]     ` <44E33F3E.2000509-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2006-08-16 15:52 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w, netdev-u79uwXL29TY76Z2rM5mHXA,
	John Linville, Michael Buesch, Stefano Brivio

Johannes Berg wrote:
> On Wed, 2006-08-16 at 10:36 -0500, Larry Finger wrote:
>> +	/* 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

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

* Re: [PATCH] bcm43xx-softmac: optimization of DMA bitfields.]
       [not found]     ` <44E33F3E.2000509-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
@ 2006-08-16 15:57       ` Michael Buesch
       [not found]         ` <200608161757.37807.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Buesch @ 2006-08-16 15:57 UTC (permalink / raw)
  To: Larry Finger
  Cc: Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w, netdev-u79uwXL29TY76Z2rM5mHXA,
	Johannes Berg, John Linville, Stefano Brivio

On Wednesday 16 August 2006 17:52, Larry Finger wrote:
> Johannes Berg wrote:
> > On Wed, 2006-08-16 at 10:36 -0500, Larry Finger wrote:
> >> +	/* 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?

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

-- 
Greetings Michael.

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

* Re: [PATCH] bcm43xx-softmac: optimization of DMA bitfields.]
       [not found]         ` <200608161757.37807.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
@ 2006-08-16 16:02           ` Larry Finger
  0 siblings, 0 replies; 6+ messages in thread
From: Larry Finger @ 2006-08-16 16:02 UTC (permalink / raw)
  To: Michael Buesch
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Johannes Berg, Stefano Brivio,
	Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w, John Linville

Michael Buesch wrote:
> On Wednesday 16 August 2006 17:52, Larry Finger wrote:
>> Johannes Berg wrote:
>>> On Wed, 2006-08-16 at 10:36 -0500, Larry Finger wrote:
>>>> +	/* 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?
> 
> 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

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

* [PATCH] bcm43xx-softmac: optimization of DMA bitfields.]
@ 2006-08-16 16:05 Larry Finger
  0 siblings, 0 replies; 6+ messages in thread
From: Larry Finger @ 2006-08-16 16:05 UTC (permalink / raw)
  To: John Linville
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Stefano Brivio, Michael Buesch,
	Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w

John,

Please pull this patch by MB for the wireless-2.6 tree. It
replaces the one sent earlier today. Somehow, I managed to mangle
it by deleting a semicolon.

Larry

========================================================

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.

Signed-off-by: Michael Buesch <mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
Signed-Off-By: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>

Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_dma.h
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_dma.h	2006-08-16 12:47:27.000000000 +0200
+++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_dma.h	2006-08-16 12:49:43.000000000 +0200
@@ -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. */

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

end of thread, other threads:[~2006-08-16 16:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-16 15:36 [PATCH] bcm43xx-softmac: optimization of DMA bitfields.] Larry Finger
2006-08-16 15:42 ` Johannes Berg
2006-08-16 15:52   ` Larry Finger
     [not found]     ` <44E33F3E.2000509-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2006-08-16 15:57       ` Michael Buesch
     [not found]         ` <200608161757.37807.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
2006-08-16 16:02           ` Larry Finger
  -- strict thread matches above, loose matches on Subject: below --
2006-08-16 16:05 Larry Finger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).