Re: Linux-2.6.12

Hugh Dickins
2005-06-20T16:01:11Z

On Mon, 20 Jun 2005, Richard B. Johnson wrote:
> On Mon, 20 Jun 2005, Hugh Dickins wrote:
> > On Mon, 20 Jun 2005, Richard B. Johnson wrote:
> > > On Mon, 20 Jun 2005, Hugh Dickins wrote:
> > > >
> > > > It's the BUG_ON(!pte_none(*pte)) in remap_pte_range. Maybe your
> > > > page
> > > > table is corrupt, maybe your driver is trying to remap_pfn_range
> > > > on
> > > > top of something already mapped.
>
> Well there is no existing 'populated mapping' whatever that means.
> I think the logic in the header is wrong.

Then perhaps your page table is corrupt. But my guess would be
that for some reason you're mapping it into userspace twice,
and the second attempt is BUGing.

> The driver gets contiguous DMA RAM by telling the kernel that ...
> [ snipped because which pages you are mapping is irrelevant to this problem ]
> ... These pages will be subsequently mapped into
> user-space when the user calls mmap().
>
> Previous to 2.6.12, there was no problem memory-mapping and using
> this data-area. Now there is some artificial constraint.

Strange. We don't know of any new artificial constraint there.
You'd better do some debugging e.g. print out what's in the pte
that isn't pte_none, and what is pte you want to replace it by.

Hugh