On Wed, Apr 25, 2012 at 5:53 PM, Luca Tettamanti <kronos.it at gmail.com> wrote: > Hi Jerome, > > On Wed, Apr 25, 2012 at 9:03 PM, ?<j.glisse at gmail.com> wrote: >> From: Jerome Glisse <jglisse at redhat.com> >> >> This add a command buffer dumping facilities, that will >> dump command buffer and all associated bo that most likely >> triggered a lockup. > [cut] > > I spotted this: > >> +void radeon_fence_blob_faulty_ib(struct radeon_device *rdev, int ring) >> +{ >> + ? ? ? struct radeon_fence *fence; >> + ? ? ? struct list_head *i; >> + ? ? ? unsigned long irq_flags; >> + ? ? ? uint32_t seq; >> + >> + ? ? ? write_lock_irqsave(&rdev->fence_lock, irq_flags); >> + ? ? ? seq = radeon_fence_read(rdev, ring); >> + ? ? ? list_for_each(i, &rdev->fence_drv[ring].emitted) { >> + ? ? ? ? ? ? ? fence = list_entry(i, struct radeon_fence, list); >> + ? ? ? ? ? ? ? if (fence->seq != seq && fence->ib) { >> + ? ? ? ? ? ? ? ? ? ? ? radeon_lockup_build_blob(rdev, fence->ib); > > radeon_lockup_build_blob() will take a mutex and call vmalloc() inside > an atomic context. > > Luca
Yeah, you right, i only compile tested, i haven't checked if it works ok on lockup. Thought solution for this is easy. Cheers, Jerome