Subject: Re: 64 bit kernel for BCM1250

From: Michael Belamina <[email-masked]>
Date: Thu, 26 May 2005 11:59:31 -0700 (PDT)

I have tried the patch on kernel version 2.4.28 and it
seems that the fix is not working for this kernel
version. I used gcc version 2.95.4 and it is working. 

Another questions:

 I am using 32 bit application and 64 bit device
driver that I wrote. ioctl fails with "unknown ioctl"
message. 

1. What is the best way to translate 32 bit ioctl
codes to 64 bit?

2. How 64 bit kernel space buffers will  be used by a
32 bit application (using mmap)? 

3.What is the maximum usable ram out of 2GB I will
have if I am using a 32 bit application and 64 bit
kernel and the kernel is allocating the buffers using
__get_free_pages (I need the buffers for DMA - and I
need them to be physically continuous)?

Thanks,
 Michael

--- "Maciej W. Rozycki" <[email-masked]> wrote:
> On Thu, 19 May 2005, Michael Belamina wrote:
> 
> >    I am still not sure about the following:
> > 
> >    1. Is this problem related only to kernels
> > downloaded from linux-mips.org or it is a more
> general
> > one?
> 
>  The problem is Linux 2.4 is generally in the
> maintenance mode, which 
> means no new development is done on it (although
> still an occasional 
> backport from 2.6 may happen).  As a result
> maintainers are rather 
> hesitant about applying changes unless they fix
> critical bugs.  Bugs 
> revealed by new versions of build tools are not
> usually considered as 
> critical, because you may work them around by using
> an old version of the 
> triggering tool.
> 
>  Still for the MIPS port what you can get from
> linux-mips.org is probably 
> less behind than what there is at kernel.org.
> 
> >    2. Can someone point to a known to work 64 bit
> > versions of gcc and binutil for BCM1250 (the
> problem
> > that started this thread was actually a problem of
> the
> > mip64-linux-ld I was using).
> 
>  For 64-bit builds you probably want to use fairly
> recent versions or you 
> risk hitting serious bugs that used to exist in
> older versions.  Using 
> David's patch (or preferably mine ;-) -- as
> available here: 
>
"http://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=Pine.LNX.4.55.0406281509170.23162%40jurand.ds.pg.gda.pl";
> 
> which I keep using with GCC 4.0.0) is probably the
> lesser evil.
> 
>   Maciej
> 

__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Tue, 31 May 2005 15:57:13 +0100 (BST)

> version. I used gcc version 2.95.4 and it is working. 

 Hmm, you may need additional fixes...  How about just switching to 2.6?  
Currently 2.4 is over 4 years old and it shouldn't be used for new 
development.

> 1. What is the best way to translate 32 bit ioctl

 Use arch/mips64/kernel/ioctl32.c, but in 2.6 there may be a generic 
solution available.

> 32 bit application (using mmap)? 

 As usual.  Except you can't get more than 2GB of them.

> need them to be physically continuous)?

 2GB minus what's used by Linux for other purposes.  Physically 
contiguous?  That sounds like a problem (and broken hardware)...

  Maciej