From f21ffe9f6da6d3a69c518b7345c198d48d941c34 Mon Sep 17 00:00:00 2001
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date: Thu, 11 Aug 2011 16:50:56 -0400
Subject: swiotlb: Expose swiotlb_nr_tlb function to modules
Patch-mainline: v3.3-rc1

As a mechanism to detect whether SWIOTLB is enabled or not.
We also fix the spelling - it was swioltb instead of
swiotlb.

CC: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
[v1: Ripped out swiotlb_enabled]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Michal Srb <msrb@suse.com>
Automatically created from "patches.drm/0503-swiotlb-expose-swiotlb_nr_tlb-function-to-modules" by xen-port-patches.py

--- sle11sp3.orig/lib/swiotlb-xen.c	2011-07-01 15:19:35.000000000 +0200
+++ sle11sp3/lib/swiotlb-xen.c	2013-02-19 15:47:41.000000000 +0100
@@ -114,10 +114,11 @@ setup_io_tlb_npages(char *str)
 __setup("swiotlb=", setup_io_tlb_npages);
 /* make io_tlb_overflow tunable too? */
 
-unsigned long swioltb_nr_tbl(void)
+unsigned long swiotlb_nr_tbl(void)
 {
 	return io_tlb_nslabs;
 }
+EXPORT_SYMBOL_GPL(swiotlb_nr_tbl);
 
 /* Note that this doesn't work with highmem page */
 static dma_addr_t swiotlb_virt_to_bus(struct device *hwdev,
