]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/iova: Consolidate code for adding new node to iovad domain rbtree
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 24 Feb 2017 11:13:37 +0000 (12:13 +0100)
committerJoerg Roedel <jroedel@suse.de>
Tue, 21 Mar 2017 13:58:18 +0000 (14:58 +0100)
commitd7fe15d3e42ff77085c43c03a8c6e9069a85b9ff
treeb5ed3a1536a8e0418dd738a17ad356d0eba882e7
parent972bf42af2e0540797254b6ac6cecd7495749afd
iommu/iova: Consolidate code for adding new node to iovad domain rbtree

This patch consolidates almost the same code used in iova_insert_rbtree()
and __alloc_and_insert_iova_range() functions. While touching this code,
replace BUG() with WARN_ON(1) to avoid taking down the whole system in
case of corrupted iova tree or incorrect calls.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iova.c