public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* brcm80211 build busted on big-endian
@ 2011-06-22  2:36 David Miller
  2011-06-22 15:40 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2011-06-22  2:36 UTC (permalink / raw)
  To: greg; +Cc: linux-kernel


It tries to do "xor" operations on pointers because of how the
R_REG() and W_REG() macros are defined.

====================
#define R_REG(r) (\
        SELECT_BUS_READ( \
                ({ \
                        __typeof(*(r)) __osl_v; \
				       		switch (sizeof(*(r))) { \
                        case sizeof(u8): \
                                __osl_v = \
                                readb((volatile u8*)((r)^3)); \
                                break; \
                        case sizeof(u16): \
                                __osl_v = \
                                readw((volatile u16*)((r)^2)); \
                                break; \
                        case sizeof(u32): \
                                __osl_v = readl((volatile u32*)(r)); \
                                break; \
                        } \
                        __osl_v; \
                }), \
                OSL_READ_REG(r)) \
)
====================

This driver is a crap fest of volatile pointers and not-compile-tested
code.

I think turning on staging like this should have been done in the
-next tree so that things like this could be shaken out before it hit
Linus's tree.  Very few people were doing the necessary forced enable
of this stuff.

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

* Re: brcm80211 build busted on big-endian
  2011-06-22  2:36 brcm80211 build busted on big-endian David Miller
@ 2011-06-22 15:40 ` Greg KH
  2011-06-22 20:23   ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2011-06-22 15:40 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel

On Tue, Jun 21, 2011 at 07:36:41PM -0700, David Miller wrote:
> 
> It tries to do "xor" operations on pointers because of how the
> R_REG() and W_REG() macros are defined.
> 
> ====================
> #define R_REG(r) (\
>         SELECT_BUS_READ( \
>                 ({ \
>                         __typeof(*(r)) __osl_v; \
> 				       		switch (sizeof(*(r))) { \
>                         case sizeof(u8): \
>                                 __osl_v = \
>                                 readb((volatile u8*)((r)^3)); \
>                                 break; \
>                         case sizeof(u16): \
>                                 __osl_v = \
>                                 readw((volatile u16*)((r)^2)); \
>                                 break; \
>                         case sizeof(u32): \
>                                 __osl_v = readl((volatile u32*)(r)); \
>                                 break; \
>                         } \
>                         __osl_v; \
>                 }), \
>                 OSL_READ_REG(r)) \
> )
> ====================
> 
> This driver is a crap fest of volatile pointers and not-compile-tested
> code.

For big endian, I agree, which is why I thought I fixed this up so it
wouldn't build on other arches than MIPS for the moment.

Is this blowing up in -next or in Linus's tree right now?

thanks,

greg k-h

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

* Re: brcm80211 build busted on big-endian
  2011-06-22 15:40 ` Greg KH
@ 2011-06-22 20:23   ` David Miller
  2011-06-23  1:29     ` Stephen Rothwell
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2011-06-22 20:23 UTC (permalink / raw)
  To: greg; +Cc: linux-kernel

From: Greg KH <greg@kroah.com>
Date: Wed, 22 Jun 2011 08:40:22 -0700

> For big endian, I agree, which is why I thought I fixed this up so it
> wouldn't build on other arches than MIPS for the moment.
> 
> Is this blowing up in -next or in Linus's tree right now?

Yes, on sparc64.

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

* Re: brcm80211 build busted on big-endian
  2011-06-22 20:23   ` David Miller
@ 2011-06-23  1:29     ` Stephen Rothwell
  2011-06-27 21:36       ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2011-06-23  1:29 UTC (permalink / raw)
  To: Greg KH; +Cc: David Miller, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 634 bytes --]

Hi Greg,

On Wed, 22 Jun 2011 13:23:01 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>
> From: Greg KH <greg@kroah.com>
> Date: Wed, 22 Jun 2011 08:40:22 -0700
> 
> > For big endian, I agree, which is why I thought I fixed this up so it
> > wouldn't build on other arches than MIPS for the moment.
> > 
> > Is this blowing up in -next or in Linus's tree right now?
> 
> Yes, on sparc64.

Yesterday's linux-next allmodconfig build on sparc64:

http://kisskb.ellerman.id.au/kisskb/buildresult/4241857/

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: brcm80211 build busted on big-endian
  2011-06-23  1:29     ` Stephen Rothwell
@ 2011-06-27 21:36       ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2011-06-27 21:36 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: David Miller, linux-kernel

On Thu, Jun 23, 2011 at 11:29:03AM +1000, Stephen Rothwell wrote:
> Hi Greg,
> 
> On Wed, 22 Jun 2011 13:23:01 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
> >
> > From: Greg KH <greg@kroah.com>
> > Date: Wed, 22 Jun 2011 08:40:22 -0700
> > 
> > > For big endian, I agree, which is why I thought I fixed this up so it
> > > wouldn't build on other arches than MIPS for the moment.
> > > 
> > > Is this blowing up in -next or in Linus's tree right now?
> > 
> > Yes, on sparc64.
> 
> Yesterday's linux-next allmodconfig build on sparc64:
> 
> http://kisskb.ellerman.id.au/kisskb/buildresult/4241857/

Ok, I've hopefully fixed this in the staging-linus branch now, thanks
for your patience.

greg k-h

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

end of thread, other threads:[~2011-06-27 21:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-22  2:36 brcm80211 build busted on big-endian David Miller
2011-06-22 15:40 ` Greg KH
2011-06-22 20:23   ` David Miller
2011-06-23  1:29     ` Stephen Rothwell
2011-06-27 21:36       ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox