06 Dec, 2011
1 commit
-
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
[v1: Ripped out swiotlb_enabled]
Signed-off-by: Konrad Rzeszutek Wilk
07 Jun, 2011
1 commit
-
By default the io_tlb_nslabs is set to zero, and gets set to
whatever value is passed in via swiotlb_init_with_tbl function.
The default value passed in is 64MB. However, if the user provides
the 'swiotlb=' the default value is ignored and
the value provided by the user is used... Except when the SWIOTLB
is used under Xen - there the default value of 64MB is used and
the Xen-SWIOTLB has no mechanism to get the 'io_tlb_nslabs' filled
out by setup_io_tlb_npages functions. This patch provides a function
for the Xen-SWIOTLB to call to see if the io_tlb_nslabs is set
and if so use that value.Signed-off-by: FUJITA Tomonori
Signed-off-by: Konrad Rzeszutek Wilk
07 Jun, 2010
3 commits
-
We put the functions dealing with the operations on
the SWIOTLB buffer in the header and make those functions non-static.
And also make the functions exported via EXPORT_SYMBOL_GPL.See "swiotlb: swiotlb: add swiotlb_tbl_map_single library function" for
full description of patchset.[v2: swiotlb_sync_single_range_for_* no more. Remove usage.]
Signed-off-by: Konrad Rzeszutek Wilk
Acked-by: FUJITA Tomonori
Tested-by: Albert Herranz -
.. to catch anybody doing something funky.
See "swiotlb: swiotlb: add swiotlb_tbl_map_single library function" for
full description of patchset.[v2: swiotlb_sync_single_range_* no more - removed usage]
[v3: enum dma_data_direction direction -> enum dma_data_direction dir]Signed-off-by: Konrad Rzeszutek Wilk
Acked-by: FUJITA Tomonori
Tested-by: Albert Herranz -
This enables the caller to initialize swiotlb with its own iotlb
memory.See "swiotlb: swiotlb: add swiotlb_tbl_map_single library function" for
full description of patchset.[v2: changed ..with_tlb to ..with_tbl]
Signed-off-by: FUJITA Tomonori
Reviewed-by: Konrad Rzeszutek Wilk
Tested-by: Albert Herranz
28 May, 2010
1 commit
-
swiotlb_sync_single_range_for_cpu and swiotlb_sync_single_range_for_device
are unnecessary because swiotlb_sync_single_for_cpu and
swiotlb_sync_single_for_device can be used instead.Signed-off-by: FUJITA Tomonori
Reviewed-by: Konrad Rzeszutek Wilk
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Nov, 2009
1 commit
-
Signed-off-by: FUJITA Tomonori
Cc: tony.luck@intel.com
LKML-Reference:
Signed-off-by: Ingo Molnar
10 Nov, 2009
2 commits
-
This enables us to avoid printing swiotlb memory info when we
initialize swiotlb. After swiotlb initialization, we could find
that we don't need swiotlb.This patch removes the code to print swiotlb memory info in
swiotlb_init() and exports the function to do that.Signed-off-by: FUJITA Tomonori
Cc: chrisw@sous-sol.org
Cc: dwmw2@infradead.org
Cc: joerg.roedel@amd.com
Cc: muli@il.ibm.com
Cc: tony.luck@intel.com
Cc: benh@kernel.crashing.org
LKML-Reference:
[ -v2: merge up conflict ]
Signed-off-by: Ingo Molnar -
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
Cc: chrisw@sous-sol.org
Cc: dwmw2@infradead.org
Cc: joerg.roedel@amd.com
Cc: muli@il.ibm.com
LKML-Reference:
[ -v2: build fix for the !CONFIG_SWIOTLB case ]
Signed-off-by: Ingo Molnar
28 Jul, 2009
4 commits
-
This converts swiotlb to use phys_to_dma and dma_to_phys instead of
swiotlb_phys_to_bus() and swiotlb_bus_to_phys().swiotlb_phys_to_bus() and swiotlb_bus_to_phys() are not necessary so
this patch also removes them.Signed-off-by: FUJITA Tomonori
Acked-by: Becky Bruce -
Nobody uses swiotlb_arch_range_needs_mapping().
Signed-off-by: FUJITA Tomonori
Acked-by: Becky Bruce -
Nobody uses swiotlb_alloc().
Signed-off-by: FUJITA Tomonori
Acked-by: Becky Bruce -
Nobody uses swiotlb_alloc_boot().
Signed-off-by: FUJITA Tomonori
Acked-by: Becky Bruce
08 Apr, 2009
1 commit
-
Add a hwdev argument that is needed on some architectures
in order to access a per-device offset that is taken into
account when producing a physical address (also needed to
get from bus address to virtual address because the physical
address is an intermediate step).Also make swiotlb_bus_to_virt weak so architectures can
override it.Signed-off-by: Becky Bruce
Acked-by: FUJITA Tomonori
Signed-off-by: Kumar Gala
Cc: jeremy@goop.org
Cc: ian.campbell@citrix.com
LKML-Reference:
Signed-off-by: Ingo Molnar
11 Jan, 2009
1 commit
-
The swiotlb_arch_range_needs_mapping() hook should take a physical
address rather than a virtual address in order to support highmem pages.Signed-off-by: Ian Campbell
Signed-off-by: Ingo Molnar
06 Jan, 2009
2 commits
-
This adds swiotlb_map_page and swiotlb_unmap_page to lib/swiotlb.c and
remove IA64 and X86's swiotlb_map_page and swiotlb_unmap_page.This also removes unnecessary swiotlb_map_single, swiotlb_map_single_attrs,
swiotlb_unmap_single and swiotlb_unmap_single_attrs.Signed-off-by: FUJITA Tomonori
Acked-by: Tony Luck
Signed-off-by: Ingo Molnar -
This converts X86 and IA64 to use include/linux/dma-mapping.h.
It's a bit large but pretty boring. The major change for X86 is
converting 'int dir' to 'enum dma_data_direction dir' in DMA mapping
operations. The major changes for IA64 is using map_page and
unmap_page instead of map_single and unmap_single.Signed-off-by: FUJITA Tomonori
Acked-by: Tony Luck
Signed-off-by: Ingo Molnar
28 Dec, 2008
1 commit
-
Impact: extend functions with a (yet unused) parameter, update callsites
Some architectures need it - in preparation for highmem swiotlb.
Signed-off-by: Jeremy Fitzhardinge
Signed-off-by: Ingo Molnar
18 Dec, 2008
2 commits
-
Impact: generalize the sw-IOTLB range checks
Some architectures require special rules to determine whether a range
needs mapping or not. This adds a weak function for architectures to
override.Signed-off-by: Ian Campbell
Signed-off-by: Jeremy Fitzhardinge
Signed-off-by: Ingo Molnar -
Impact: generalize physbusphys conversions in the swiotlb code
Architectures may need to override these conversions. Implement a
__weak hook point containing the default implementation.Signed-off-by: Ian Campbell
Signed-off-by: Jeremy Fitzhardinge
Signed-off-by: Ingo Molnar
17 Dec, 2008
2 commits
-
Impact: cleanup
Signed-off-by: Ian Campbell
Signed-off-by: Jeremy Fitzhardinge
Signed-off-by: Ingo Molnar -
Impact: generalize swiotlb allocation code
Architectures may need to allocate memory specially for use with
the swiotlb. Create the weak function swiotlb_alloc_boot() and
swiotlb_alloc() defaulting to the current behaviour.Signed-off-by: Jeremy Fitzhardinge
Signed-off-by: Ian Campbell
Signed-off-by: Ingo Molnar
17 Oct, 2008
1 commit
-
A series of patches introduce a generic header file for the software
IO/TLB implementation in lib/swiotlb.c. Currently each architecture using
this code defines the prototypes itself. The prototypes are moved to
include/linux/swiotlb.h and this file is included in architecture specific
code for X86 and IA64.This patch:
Create include/linux/swiotlb.h file which contains all function prototypes
for the lib/swiotlb.c file.(akpm: the dependent patches will be trickled through arch trees)
Signed-off-by: Joerg Roedel
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: "Luck, Tony"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds