[PATCH][MTD] mtdpart.c: allow other drivers to get physical address of partition

Carsten Otte cotte at de.ibm.com
Thu Aug 2 03:53:45 EDT 2007


Jared Hulbert wrote:
> References to what? pages? pfn's?
Currently we use struct page in our address space operation, but 
moving to pfn seems advisable to me.

> Assume we need to erase a block, this definately requires that all
> pages in that block be 'zapped'.
True.

> With most flashes the erase operation takes chunks of the array larger
> than the effected block offline temporarily.  Right now XIP support in
> MTD just spins waiting for an interrupt.  When one is recieved the
> erase is suspended and normal execution continues with just the block
> being erased in an unknown state.  Then when the coast is clear the
> erase is resumed.
That does'nt work on smp machines, does it? Sounds like a hack to me.

> So we have a large number of pages that are not being changed but that
> are not availiable for some time.  I think it would be much better to
> identify those pages that will be taken offline and change the page
> tables such that a fault can be directed to the FS and then to the MTD
> to do the suspend.
> 
> The reason would be fault avoidance.  See once the erase completes all
> the old valid pages should be mapped back as they were.  Why not allow
> the kernel to continue (assuming it isn't taken offline!) executing as
> normal and why interrupt the erase until you know for sure you need to
> access effected pages?
How do you know a user app that has a valid pte to your flash media 
accesses it? Userspace may do so at any time it wants, and as far as I 
understand Joerns and Davids explanations on flash it will just see 
invalid data rather than raising a page fault.




More information about the linux-mtd mailing list