> On 12 Jan 2018, at 13:53, Jonathan Gray <[email protected]> wrote: > > When trying to use alloc_page from ttm with radeon on an amd64 > machine with 8GB physmem the system would panic part way through > taking over the console along the lines of > > 'panic: Non dma-reachable buffer at paddr 0x1ef221000(raw)' > > This adds the dma constraints ttm_uvm_alloc_page() has.
ok. > > Index: drm_linux.c > =================================================================== > RCS file: /cvs/src/sys/dev/pci/drm/drm_linux.c,v > retrieving revision 1.15 > diff -u -p -r1.15 drm_linux.c > --- drm_linux.c 12 Jul 2017 20:12:19 -0000 1.15 > +++ drm_linux.c 12 Jan 2018 03:36:20 -0000 > @@ -204,8 +204,8 @@ alloc_pages(unsigned int gfp_mask, unsig > flags |= UVM_PLA_ZERO; > > TAILQ_INIT(&mlist); > - if (uvm_pglistalloc(PAGE_SIZE << order, 0, -1, PAGE_SIZE, 0, > - &mlist, 1, flags)) > + if (uvm_pglistalloc(PAGE_SIZE << order, dma_constraint.ucr_low, > + dma_constraint.ucr_high, PAGE_SIZE, 0, &mlist, 1, flags)) > return NULL; > return TAILQ_FIRST(&mlist); > } >
