* drivers/net/wireless/b43legacy/ on mips
@ 2008-03-04 7:36 Andrew Morton
2008-03-04 9:02 ` Ralf Baechle
2008-03-04 15:26 ` Michael Buesch
0 siblings, 2 replies; 4+ messages in thread
From: Andrew Morton @ 2008-03-04 7:36 UTC (permalink / raw)
To: linux-wireless; +Cc: Ralf Baechle
ERROR: "__ucmpdi2" [drivers/net/wireless/b43legacy/b43legacy.ko] undefined!
ERROR: "__ucmpdi2" [drivers/net/wireless/b43/b43.ko] undefined!
int b43legacy_dma_init(struct b43legacy_wldev *dev)
{
struct b43legacy_dma *dma = &dev->dma;
struct b43legacy_dmaring *ring;
int err;
u64 dmamask;
enum b43legacy_dmatype type;
dmamask = supported_dma_mask(dev);
switch (dmamask) {
default:
B43legacy_WARN_ON(1);
case DMA_30BIT_MASK:
type = B43legacy_DMA_30BIT;
break;
case DMA_32BIT_MASK:
type = B43legacy_DMA_32BIT;
break;
case DMA_64BIT_MASK:
type = B43legacy_DMA_64BIT;
break;
}
because some versions of gcc emit a __ucmpdi2 call for switch statements.
It might be fixable by switching to an open-coded if/compare/else sequence.
Or maybe my mips compiler (gcc-3.4.5) is just too old..
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/net/wireless/b43legacy/ on mips
2008-03-04 7:36 drivers/net/wireless/b43legacy/ on mips Andrew Morton
@ 2008-03-04 9:02 ` Ralf Baechle
2008-03-04 9:19 ` Andrew Morton
2008-03-04 15:26 ` Michael Buesch
1 sibling, 1 reply; 4+ messages in thread
From: Ralf Baechle @ 2008-03-04 9:02 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-wireless, linux-kernel, linux-mips
On Mon, Mar 03, 2008 at 11:36:51PM -0800, Andrew Morton wrote:
> ERROR: "__ucmpdi2" [drivers/net/wireless/b43legacy/b43legacy.ko] undefined!
> ERROR: "__ucmpdi2" [drivers/net/wireless/b43/b43.ko] undefined!
>
> int b43legacy_dma_init(struct b43legacy_wldev *dev)
> {
> struct b43legacy_dma *dma = &dev->dma;
> struct b43legacy_dmaring *ring;
> int err;
> u64 dmamask;
> enum b43legacy_dmatype type;
>
> dmamask = supported_dma_mask(dev);
> switch (dmamask) {
> default:
> B43legacy_WARN_ON(1);
> case DMA_30BIT_MASK:
> type = B43legacy_DMA_30BIT;
> break;
> case DMA_32BIT_MASK:
> type = B43legacy_DMA_32BIT;
> break;
> case DMA_64BIT_MASK:
> type = B43legacy_DMA_64BIT;
> break;
> }
>
> because some versions of gcc emit a __ucmpdi2 call for switch statements.
Was this when optimizing for size btw? It seems gcc is emitting alot more
calls to libgcc when optimizing for size.
> It might be fixable by switching to an open-coded if/compare/else sequence.
It was just a EXPORT_SYMBOL(__ucmpdi2) missing.
> Or maybe my mips compiler (gcc-3.4.5) is just too old..
I'm trying to keep the tools requirements the same as for x86. So for
32-bit kernels gcc 3.2 is the minimum but 3.2 is broken beyond recovery
for 64-bit code so there a minimum of 3.3 is required.
In practive it is ages that I've last seen a compiler older than gcc 3.4
being used to build a modern kernel for any architecture and 3.2 and 3.3
are a sufficient special case that maybe we should think about deprecating
3.2 and 3.3?
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/net/wireless/b43legacy/ on mips
2008-03-04 9:02 ` Ralf Baechle
@ 2008-03-04 9:19 ` Andrew Morton
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2008-03-04 9:19 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-wireless, linux-kernel, linux-mips
On Tue, 4 Mar 2008 09:02:20 +0000 Ralf Baechle <ralf@linux-mips.org> wrote:
> On Mon, Mar 03, 2008 at 11:36:51PM -0800, Andrew Morton wrote:
>
> > ERROR: "__ucmpdi2" [drivers/net/wireless/b43legacy/b43legacy.ko] undefined!
> > ERROR: "__ucmpdi2" [drivers/net/wireless/b43/b43.ko] undefined!
> >
> > int b43legacy_dma_init(struct b43legacy_wldev *dev)
> > {
> > struct b43legacy_dma *dma = &dev->dma;
> > struct b43legacy_dmaring *ring;
> > int err;
> > u64 dmamask;
> > enum b43legacy_dmatype type;
> >
> > dmamask = supported_dma_mask(dev);
> > switch (dmamask) {
> > default:
> > B43legacy_WARN_ON(1);
> > case DMA_30BIT_MASK:
> > type = B43legacy_DMA_30BIT;
> > break;
> > case DMA_32BIT_MASK:
> > type = B43legacy_DMA_32BIT;
> > break;
> > case DMA_64BIT_MASK:
> > type = B43legacy_DMA_64BIT;
> > break;
> > }
> >
> > because some versions of gcc emit a __ucmpdi2 call for switch statements.
>
> Was this when optimizing for size btw?
mips allmodconfig. So: yes.
> It seems gcc is emitting alot more
> calls to libgcc when optimizing for size.
>
> > It might be fixable by switching to an open-coded if/compare/else sequence.
>
> It was just a EXPORT_SYMBOL(__ucmpdi2) missing.
doh.
> > Or maybe my mips compiler (gcc-3.4.5) is just too old..
>
> I'm trying to keep the tools requirements the same as for x86. So for
> 32-bit kernels gcc 3.2 is the minimum but 3.2 is broken beyond recovery
> for 64-bit code so there a minimum of 3.3 is required.
>
> In practive it is ages that I've last seen a compiler older than gcc 3.4
> being used to build a modern kernel for any architecture and 3.2 and 3.3
> are a sufficient special case that maybe we should think about deprecating
> 3.2 and 3.3?
That would make life easier for us. I don't know what the downstream
implications would be. I'd need a new cross-compiler, for a start ;)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/net/wireless/b43legacy/ on mips
2008-03-04 7:36 drivers/net/wireless/b43legacy/ on mips Andrew Morton
2008-03-04 9:02 ` Ralf Baechle
@ 2008-03-04 15:26 ` Michael Buesch
1 sibling, 0 replies; 4+ messages in thread
From: Michael Buesch @ 2008-03-04 15:26 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-wireless, Ralf Baechle
On Tuesday 04 March 2008 08:36:51 Andrew Morton wrote:
>
> ERROR: "__ucmpdi2" [drivers/net/wireless/b43legacy/b43legacy.ko] undefined!
> ERROR: "__ucmpdi2" [drivers/net/wireless/b43/b43.ko] undefined!
>
> int b43legacy_dma_init(struct b43legacy_wldev *dev)
> {
> struct b43legacy_dma *dma = &dev->dma;
> struct b43legacy_dmaring *ring;
> int err;
> u64 dmamask;
> enum b43legacy_dmatype type;
>
> dmamask = supported_dma_mask(dev);
> switch (dmamask) {
> default:
> B43legacy_WARN_ON(1);
> case DMA_30BIT_MASK:
> type = B43legacy_DMA_30BIT;
> break;
> case DMA_32BIT_MASK:
> type = B43legacy_DMA_32BIT;
> break;
> case DMA_64BIT_MASK:
> type = B43legacy_DMA_64BIT;
> break;
> }
>
> because some versions of gcc emit a __ucmpdi2 call for switch statements.
> It might be fixable by switching to an open-coded if/compare/else sequence.
I guess that's only done for a 64bit data type, right?
> Or maybe my mips compiler (gcc-3.4.5) is just too old..
Well yeah. b43 uses exactly the same code and we use that in openwrt
on the bcm47xx mips platform with some 4.x compiler.
Can we switch off the generation of the __ucmpdi2 call somehow?
Or can we insert an implementation for it? Probably #ifdefed by the
compiler version.
--
Greetings Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-03-04 15:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-04 7:36 drivers/net/wireless/b43legacy/ on mips Andrew Morton
2008-03-04 9:02 ` Ralf Baechle
2008-03-04 9:19 ` Andrew Morton
2008-03-04 15:26 ` Michael Buesch
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).