Date: Fri, 10 Sep 2010 13:12:31 +0530 From: "Jayachandran C." <c.jayachandran@gmail.com> To: Juli Mallett <jmallett@freebsd.org> Cc: gonzo@freebsd.org, freebsd-mips@freebsd.org Subject: Re: busdma_machdep.c with more than 512M memory Message-ID: <AANLkTi=t%2B%2BGNiD2_0B98s8tgtw_k4A-Cahjt_uKcCixU@mail.gmail.com> In-Reply-To: <AANLkTimqCLHbqFS90wyp6h_xueV8=NnU07q28=SRK=z5@mail.gmail.com> References: <AANLkTimjmpOBOAncY9K9AhCodvp27t=XTQ9qZp4q8%2Bvv@mail.gmail.com> <AANLkTim2gqj=cbgM35rD5oyMD43rWFY1cjyY4A4CoR99@mail.gmail.com> <AANLkTim7zDxy9bYYvPT31t-mRB37NPpONsBHhouBPpG_@mail.gmail.com> <AANLkTikOKU8KOaw6aFd1dMqpcZW%2BcMkU72mrDBcUncVq@mail.gmail.com> <AANLkTimcUdL5gg6e-f3M7QLoMEP93V8TE_9HTzBYPGC8@mail.gmail.com> <AANLkTimqCLHbqFS90wyp6h_xueV8=NnU07q28=SRK=z5@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 10, 2010 at 12:36 PM, Juli Mallett <jmallett@freebsd.org> wrote= : > On Fri, Sep 10, 2010 at 00:00, Jayachandran C. <c.jayachandran@gmail.com>= wrote: >> On Fri, Sep 10, 2010 at 11:22 AM, Neel Natu <neelnatu@gmail.com> wrote: >>> This assumes that pmap_mapdev() always returns an uncached mapping >>> which is true for n64 kernels but not for o32 kernels with memory >>> beyond 512MB. >> >> I think my original patch was incorrect, pmap_mapdev() should not be >> used to map physical memory uncached. It may be just for mapping >> device address space uncached, and that may be why it checks if the >> physical address is cacheable. > > I think that's a wrong inference from the brokenness of pmap_mapdev > because of using the general-purpose pmap_kenter. =A0pmap_mapdev is > implicitly uncacheable -- check i386 pmap for confirmation. =A0Neel's > patch is right. Ok. My point was using pmap_mapdev() on physical memory to remap it uncached may not be its intended usage - and I did not notice this when I used it in busdma_machdep.c. But looks like it is the easiest way of doing this. My suggestion of using pmap_kenter_attr() in busdma_machdep.c would imply duplicating the whole pmap_mapdev code there, which is not good either. So as it stands, all I can say is that a comment in busdma_machdep.c on pmap_mapdev() use would be useful :) JC.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=t%2B%2BGNiD2_0B98s8tgtw_k4A-Cahjt_uKcCixU>