diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2007-02-12 03:52:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:29 -0500 |
commit | be6b026785414033aac36887cb9ea0ee1244254c (patch) | |
tree | b0c792d6d2b7dc037af5a21cf19f5cce6c4ea60d /lib/swiotlb.c | |
parent | 544fc7283cd6902831d660bd8e1181602bd2b4d2 (diff) |
[PATCH] swiotlb uninlinings
Optimise swiotlb.c for size.
text data bss dec hex filename
5009 89 64 5162 142a lib/swiotlb.o-before
4666 89 64 4819 12d3 lib/swiotlb.o-after
For some reason my gcc (4.0.2) doesn't want to tailcall these things.
swiotlb_sync_sg_for_device:
pushq %rbp #
movl $1, %r8d #,
movq %rsp, %rbp #,
call swiotlb_sync_sg #
leave
ret
.size swiotlb_sync_sg_for_device, .-swiotlb_sync_sg_for_device
.section .text.swiotlb_sync_sg_for_cpu,"ax",@progbits
.globl swiotlb_sync_sg_for_cpu
.type swiotlb_sync_sg_for_cpu, @function
swiotlb_sync_sg_for_cpu:
pushq %rbp #
xorl %r8d, %r8d #
movq %rsp, %rbp #,
call swiotlb_sync_sg #
leave
ret
Cc: Jan Beulich <jbeulich@novell.com>
Cc: Andi Kleen <ak@suse.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/swiotlb.c')
-rw-r--r-- | lib/swiotlb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 50a438010182..623a68af8b18 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c | |||
@@ -313,7 +313,7 @@ cleanup1: | |||
313 | #endif | 313 | #endif |
314 | 314 | ||
315 | #ifndef SWIOTLB_ARCH_HAS_NEEDS_MAPPING | 315 | #ifndef SWIOTLB_ARCH_HAS_NEEDS_MAPPING |
316 | static inline int | 316 | static int |
317 | address_needs_mapping(struct device *hwdev, dma_addr_t addr) | 317 | address_needs_mapping(struct device *hwdev, dma_addr_t addr) |
318 | { | 318 | { |
319 | dma_addr_t mask = 0xffffffff; | 319 | dma_addr_t mask = 0xffffffff; |
@@ -672,7 +672,7 @@ swiotlb_unmap_single(struct device *hwdev, dma_addr_t dev_addr, size_t size, | |||
672 | * address back to the card, you must first perform a | 672 | * address back to the card, you must first perform a |
673 | * swiotlb_dma_sync_for_device, and then the device again owns the buffer | 673 | * swiotlb_dma_sync_for_device, and then the device again owns the buffer |
674 | */ | 674 | */ |
675 | static inline void | 675 | static void |
676 | swiotlb_sync_single(struct device *hwdev, dma_addr_t dev_addr, | 676 | swiotlb_sync_single(struct device *hwdev, dma_addr_t dev_addr, |
677 | size_t size, int dir, int target) | 677 | size_t size, int dir, int target) |
678 | { | 678 | { |
@@ -702,7 +702,7 @@ swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr, | |||
702 | /* | 702 | /* |
703 | * Same as above, but for a sub-range of the mapping. | 703 | * Same as above, but for a sub-range of the mapping. |
704 | */ | 704 | */ |
705 | static inline void | 705 | static void |
706 | swiotlb_sync_single_range(struct device *hwdev, dma_addr_t dev_addr, | 706 | swiotlb_sync_single_range(struct device *hwdev, dma_addr_t dev_addr, |
707 | unsigned long offset, size_t size, | 707 | unsigned long offset, size_t size, |
708 | int dir, int target) | 708 | int dir, int target) |
@@ -805,7 +805,7 @@ swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nelems, | |||
805 | * The same as swiotlb_sync_single_* but for a scatter-gather list, same rules | 805 | * The same as swiotlb_sync_single_* but for a scatter-gather list, same rules |
806 | * and usage. | 806 | * and usage. |
807 | */ | 807 | */ |
808 | static inline void | 808 | static void |
809 | swiotlb_sync_sg(struct device *hwdev, struct scatterlist *sg, | 809 | swiotlb_sync_sg(struct device *hwdev, struct scatterlist *sg, |
810 | int nelems, int dir, int target) | 810 | int nelems, int dir, int target) |
811 | { | 811 | { |