David Woodhouse | 17 Sep 16:56 1999

mapped helpful functions requiring libgcc.a

I've just noticed that the 'mapped' helper function write_flash(), when 
compiled with 2.3.17, requires __divdi3 and __moddi3 from libgcc.a 

This is because of these two lines (just after line 500, at the beginning of 
flash_write):

      // Compute the page offset and reposition
      base = map->page(map,start/map->pagesize);
      off = start %  map->pagesize;

Given that our map window is always going to be a power of two, I suggest that 
we ought to use shifts instead of div/mod here, and change mapsize to be a 
logarithm instead of the actual size.

Jason?

----                                 ----                                 ----
David Woodhouse        David.Woodhouse <at> mvhi.com       Office: (+44) 1223 810302
 Project Leader,     Process Information Systems      Mobile: (+44) 976 658355
    Axiom (Cambridge) Ltd., Swaffham Bulbeck, Cambridge, CB5 0NA, UK.
             finger dwmw2 <at> ferret.lmh.ox.ac.uk for PGP key.

To unsubscribe, send "unsubscribe mtd" to majordomo <at> imladris.demon.co.uk

Jason Gunthorpe | 18 Sep 00:03 1999

Re: mapped helpful functions requiring libgcc.a


On Fri, 17 Sep 1999, David Woodhouse wrote:

> I've just noticed that the 'mapped' helper function write_flash(), when 
> compiled with 2.3.17, requires __divdi3 and __moddi3 from libgcc.a 

I'm confused why GCC would not just emit code that performed these
operations instead of using these helper functions - there is nothing
special about them. It sounds like a compiler bug really.

Jason
> This is because of these two lines (just after line 500, at the beginning of 
> flash_write):
> 
>       // Compute the page offset and reposition
>       base = map->page(map,start/map->pagesize);
>       off = start %  map->pagesize;
> 
> Given that our map window is always going to be a power of two, I suggest that 
> we ought to use shifts instead of div/mod here, and change mapsize to be a 
> logarithm instead of the actual size.

To unsubscribe, send "unsubscribe mtd" to majordomo <at> imladris.demon.co.uk

David Woodhouse | 21 Sep 21:53 1999

Re: DOC status


 (copied to the MTD list to avoid duplication)

zager <at> post.comstar.ru said:
> Hello, David ? Do you have any progress with DOC2000 since 19990820
> snapshot ? Thanks in advance. 

Some. People have sent me bug fixes, and I've made it compile and run with the
2.3 kernel. 

If you don't actually need to boot off it, it appears to be working reliably 
for read-write operation. But because their driver doesn't understand the 
NFTL after I write to it, you can't boot off the DoC.

My contact in M-Systems has been away for a while, so I've not been able to 
work on the problems with interoperation.

Unfortunately, now he's back from his holiday, I have to get on with some real
work - we have an exhibition in Italy all of next week, and we're running
around like blue-wossname'd flies here at the moment preparing for it. 
I have no time for random Linux hacking - my linux-kernel mail folder hasn't 
even been read.

I'll be back on top of it within two weeks' time, and hope to submit a working
version to Linus as soon as I can, to make sure it gets into 2.4. 

If in the meantime someone wants to convert the PCMCIA bulkmem driver in 2.3.17
to work with the current MTD system, I'll love them for ever.

----                                 ----                                 ----
(Continue reading)


Gmane