]> git.baikalelectronics.ru Git - kernel.git/commit
swiotlb: Add swiotlb_free() function
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tue, 10 Nov 2009 10:46:18 +0000 (19:46 +0900)
committerIngo Molnar <mingo@elte.hu>
Tue, 10 Nov 2009 11:31:52 +0000 (12:31 +0100)
commite6ecd338dc842f493bb43cf69af6e8e80636bc87
tree82f87512446607118d48b0e6db9f011abd5e1124
parent9f2224fa33010abed90d19290e2a8f498105f82a
swiotlb: Add swiotlb_free() function

swiotlb_free() function frees all allocated memory for swiotlb.

We need to initialize swiotlb before IOMMU initialization (x86
and powerpc needs to allocate memory from bootmem allocator). If
IOMMU initialization is successful, we need to free swiotlb
resource (don't want to waste 64MB).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: chrisw@sous-sol.org
Cc: dwmw2@infradead.org
Cc: joerg.roedel@amd.com
Cc: muli@il.ibm.com
LKML-Reference: <1257849980-22640-8-git-send-email-fujita.tomonori@lab.ntt.co.jp>
[ -v2: build fix for the !CONFIG_SWIOTLB case ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/swiotlb.h
lib/swiotlb.c