The patch titled Subject: lib/dma-debug.c: make locking work for RT has been added to the -mm tree. Its filename is dma-debug-make-locking-to-work-for-rt.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/dma-debug-make-locking-to-work-for-rt.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/dma-debug-make-locking-to-work-for-rt.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Pankaj Gupta <pagupta@xxxxxxxxxx> Subject: lib/dma-debug.c: make locking work for RT Interrupt enable/disabled with spinlock is not a valid operation for RT as it can make executing tasks sleep from a non-sleepable context. So convert it to spin_lock_irq[save, restore]. Link: http://lkml.kernel.org/r/1492065666-3816-1-git-send-email-pagupta@xxxxxxxxxx Signed-off-by: Pankaj Gupta <pagupta@xxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx> Cc: Vinod Koul <vinod.koul@xxxxxxxxx> Cc: Andy Lutomirski <luto@xxxxxxxxxx> Cc: Ville Syrjl <ville.syrjala@xxxxxxxxxxxxxxx> Cc: Miles Chen <miles.chen@xxxxxxxxxxxx> Cc: Marcelo Tosatti <mtosatti@xxxxxxxxxx> Cc: Joerg Roedel <jroedel@xxxxxxx> Cc: Stanislaw Gruszka <sgruszka@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/dma-debug.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff -puN lib/dma-debug.c~dma-debug-make-locking-to-work-for-rt lib/dma-debug.c --- a/lib/dma-debug.c~dma-debug-make-locking-to-work-for-rt +++ a/lib/dma-debug.c @@ -942,21 +942,17 @@ static int device_dma_allocations(struct unsigned long flags; int count = 0, i; - local_irq_save(flags); - for (i = 0; i < HASH_SIZE; ++i) { - spin_lock(&dma_entry_hash[i].lock); + spin_lock_irqsave(&dma_entry_hash[i].lock, flags); list_for_each_entry(entry, &dma_entry_hash[i].list, list) { if (entry->dev == dev) { count += 1; *out_entry = entry; } } - spin_unlock(&dma_entry_hash[i].lock); + spin_unlock_irqrestore(&dma_entry_hash[i].lock, flags); } - local_irq_restore(flags); - return count; } _ Patches currently in -mm which might be from pagupta@xxxxxxxxxx are dma-debug-make-locking-to-work-for-rt.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html