linux-mips
[Top] [All Lists]

RE: linux 3.6.3 mips64 mtd jffs2 unmount issue

To: David Daney <ddaney.cavm@gmail.com>, Jayachandran C. <c.jayachandran@gmail.com>, Ralf Baechle <ralf@linux-mips.org>
Subject: RE: linux 3.6.3 mips64 mtd jffs2 unmount issue
From: Jacob Burkholder <jacob.burkholder@blinqnetworks.com>
Date: Tue, 30 Oct 2012 16:28:04 -0400
Accept-language: en-US
Acceptlanguage: en-US
Cc: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
In-reply-to: <50901027.6090802@gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <14A0B61B8C8EFA4A9F40381A10D219104EEB0F5226@IAD2MBX02.mex02.mlsrvr.com> <CA+7sy7CWkcsg9YffJ-rcdN7D=vZtuees31upGzgUya5puDN0og@mail.gmail.com> <50901027.6090802@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
Thread-index: Ac22xSFQUT2U75hjRAeERV0E5Y++mQAFuJhg
Thread-topic: linux 3.6.3 mips64 mtd jffs2 unmount issue
> On 10/30/2012 01:09 AM, Jayachandran C. wrote:
> [...]
>
> >
> > We had seen the same issue here, and worked around it the same way
> > (i.e use dynamic allocation for the backing dev structures).
> >
> > I ran across a similar issue in using built-in DTB (basically, kernel
> > data address does not work for virt_to_phys/phys_to_virt in 64-bit
> > when the load address is in CKSEG0).  There I did something like this:
> >
> > ptr = phys_to_virt(__pa(kernel_data_ptr));
> >
> > This works since __pa knows about CKSEG0 addresses in 64bit.
> >
> >
>
> Really the proper fix is to make virt_to_phys() work.  This isn't the only 
> case where we have seen failures due to this issue:
>
>
> http://www.linux-mips.org/archives/linux-mips/2011-09/msg00029.html
>
> I fixed it like this...
>
> In io.h:
>
> static inline unsigned long virt_to_phys(volatile const void *address)
> {
>       return __pa(address);
> }
>
> Really this needs to be pushed upstream by somebody.
>
 
Thanks, this makes sense and seems a good fix.  I had some problems with
twisty includes because page.h includes io.h.  Did you move the definition
of __pa also?
 
Anyway, if this can be pushed to master and merged to linux-stable I'll
pick it up.
 
Jake

<Prev in Thread] Current Thread [Next in Thread>