From: Ian Campbell <ian.campbell@citrix.com>
To: <linux-kernel@vger.kernel.org>
Cc: Ian Campbell <ian.campbell@citrix.com>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Jeremy Fitzhardinge <jeremy@goop.org>, Olaf Kirch <okir@suse.de>,
Greg KH <gregkh@suse.de>, Ingo Molnar <mingo@elte.hu>
Subject: [PATCH 09/11] swiotlb: rename swiotlb_virt_to_bus as virt_to_dma
Date: Mon, 1 Jun 2009 16:33:01 +0100 [thread overview]
Message-ID: <1243870383-12954-10-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1243870383-12954-1-git-send-email-ian.campbell@citrix.com>
Rename swiotlb_virt_to_bus as swiotlb_virt_to_dma for consistency with
phys_to_dma.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Olaf Kirch <okir@suse.de>
Cc: Greg KH <gregkh@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
---
lib/swiotlb.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index d2b296a..ca8009a 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -124,13 +124,13 @@ void * __weak swiotlb_alloc(unsigned order, unsigned long nslabs)
return (void *)__get_free_pages(GFP_DMA | __GFP_NOWARN, order);
}
-static dma_addr_t swiotlb_virt_to_bus(struct device *hwdev,
+static dma_addr_t swiotlb_virt_to_dma(struct device *hwdev,
volatile void *address)
{
return phys_to_dma(hwdev, virt_to_phys(address));
}
-static void *swiotlb_bus_to_virt(struct device *hwdev, dma_addr_t address)
+static void *swiotlb_dma_to_virt(struct device *hwdev, dma_addr_t address)
{
#ifdef CONFIG_HIGHMEM
unsigned long pfn = PFN_DOWN(dma_to_phys(hwdev, address));
@@ -365,7 +365,7 @@ map_single(struct device *hwdev, phys_addr_t phys, size_t size, int dir)
unsigned long max_slots;
mask = dma_get_seg_boundary(hwdev);
- start_dma_addr = swiotlb_virt_to_bus(hwdev, io_tlb_start) & mask;
+ start_dma_addr = swiotlb_virt_to_dma(hwdev, io_tlb_start) & mask;
offset_slots = ALIGN(start_dma_addr, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
@@ -667,7 +667,7 @@ EXPORT_SYMBOL_GPL(swiotlb_map_page);
static void unmap_single(struct device *hwdev, dma_addr_t dev_addr,
size_t size, int dir)
{
- char *dma_addr = swiotlb_bus_to_virt(hwdev, dev_addr);
+ char *dma_addr = swiotlb_dma_to_virt(hwdev, dev_addr);
BUG_ON(dir == DMA_NONE);
@@ -704,7 +704,7 @@ static void
swiotlb_sync_single(struct device *hwdev, dma_addr_t dev_addr,
size_t size, int dir, int target)
{
- char *dma_addr = swiotlb_bus_to_virt(hwdev, dev_addr);
+ char *dma_addr = swiotlb_dma_to_virt(hwdev, dev_addr);
BUG_ON(dir == DMA_NONE);
@@ -892,7 +892,7 @@ EXPORT_SYMBOL(swiotlb_sync_sg_for_device);
int
swiotlb_dma_mapping_error(struct device *hwdev, dma_addr_t dma_addr)
{
- return (dma_addr == swiotlb_virt_to_bus(hwdev, io_tlb_overflow_buffer));
+ return (dma_addr == swiotlb_virt_to_dma(hwdev, io_tlb_overflow_buffer));
}
EXPORT_SYMBOL(swiotlb_dma_mapping_error);
@@ -905,6 +905,6 @@ EXPORT_SYMBOL(swiotlb_dma_mapping_error);
int
swiotlb_dma_supported(struct device *hwdev, u64 mask)
{
- return swiotlb_virt_to_bus(hwdev, io_tlb_end - 1) <= mask;
+ return swiotlb_virt_to_dma(hwdev, io_tlb_end - 1) <= mask;
}
EXPORT_SYMBOL(swiotlb_dma_supported);
--
1.5.6.5
next prev parent reply other threads:[~2009-06-01 15:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-01 15:32 [PATCH 00/11] swiotlb: Introduce architecture-specific APIs to replace __weak functions (v2) Ian Campbell
2009-06-01 15:32 ` [PATCH 01/11] ia64: introduce arch-specific dma-mapping interfaces Ian Campbell
2009-06-02 4:08 ` FUJITA Tomonori
2009-06-02 9:18 ` Ian Campbell
2009-06-01 15:32 ` [PATCH 02/11] x86: introduce arch-specific dma-mapping interface Ian Campbell
2009-06-02 4:08 ` FUJITA Tomonori
2009-06-01 15:32 ` [PATCH 03/11] x86: use dma_map_range when allocating PCI DMA memory Ian Campbell
2009-06-02 22:07 ` Thomas Gleixner
2009-06-01 15:32 ` [PATCH 04/11] x86: use dma_map_range when allocating PCI DMA memory with no IOMMU Ian Campbell
2009-06-01 15:32 ` [PATCH 05/11] x86: use dma_map_range when allocating PCI GART memory Ian Campbell
2009-06-02 22:08 ` Thomas Gleixner
2009-06-01 15:32 ` [PATCH 06/11] swiotlb: use dma_to_phys and phys_to_dma Ian Campbell
2009-06-01 15:32 ` [PATCH 07/11] swiotlb: use dma_map_range Ian Campbell
2009-06-01 15:33 ` [PATCH 08/11] swiotlb: support HIGHMEM in swiotlb_bus_to_virt Ian Campbell
2009-06-01 15:33 ` Ian Campbell [this message]
2009-06-01 15:33 ` [PATCH 10/11] swiotlb: remove __weak swiotlb_alloc* hooks Ian Campbell
2009-06-01 15:33 ` [PATCH 11/11] swiotlb: allow initialisation with pre-allocated bounce-buffer Ian Campbell
2009-06-02 4:08 ` FUJITA Tomonori
2009-06-02 9:27 ` Ian Campbell
2009-07-10 5:55 ` [PATCH 00/11] swiotlb: Introduce architecture-specific APIs to replace __weak functions (v2) Benjamin Herrenschmidt
2009-07-10 14:02 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1243870383-12954-10-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=gregkh@suse.de \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=okir@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®