diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-30 19:10:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-30 19:10:19 -0500 |
commit | 5f34fe1cfc1bdd8b4711bbe37421fba4ed0d1ed4 (patch) | |
tree | 85b21c8bb0e53005bd970d648ca093acfd0584a3 /arch/x86/kernel/pci-dma.c | |
parent | eca1bf5b4fab56d2feb1572d34d59fcd92ea7df3 (diff) | |
parent | 6638101c1124c19c8a65b1645e4ecd09e0572f3e (diff) |
Merge branch 'core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (63 commits)
stacktrace: provide save_stack_trace_tsk() weak alias
rcu: provide RCU options on non-preempt architectures too
printk: fix discarding message when recursion_bug
futex: clean up futex_(un)lock_pi fault handling
"Tree RCU": scalable classic RCU implementation
futex: rename field in futex_q to clarify single waiter semantics
x86/swiotlb: add default swiotlb_arch_range_needs_mapping
x86/swiotlb: add default phys<->bus conversion
x86: unify pci iommu setup and allow swiotlb to compile for 32 bit
x86: add swiotlb allocation functions
swiotlb: consolidate swiotlb info message printing
swiotlb: support bouncing of HighMem pages
swiotlb: factor out copy to/from device
swiotlb: add arch hook to force mapping
swiotlb: allow architectures to override phys<->bus<->phys conversions
swiotlb: add comment where we handle the overflow of a dma mask on 32 bit
rcu: fix rcutorture behavior during reboot
resources: skip sanity check of busy resources
swiotlb: move some definitions to header
swiotlb: allow architectures to override swiotlb pool allocation
...
Fix up trivial conflicts in
arch/x86/kernel/Makefile
arch/x86/mm/init_32.c
include/linux/hardirq.h
as per Ingo's suggestions.
Diffstat (limited to 'arch/x86/kernel/pci-dma.c')
-rw-r--r-- | arch/x86/kernel/pci-dma.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 7a3dfceb90e4..19a1044a0cd9 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
@@ -101,11 +101,15 @@ static void __init dma32_free_bootmem(void) | |||
101 | dma32_bootmem_ptr = NULL; | 101 | dma32_bootmem_ptr = NULL; |
102 | dma32_bootmem_size = 0; | 102 | dma32_bootmem_size = 0; |
103 | } | 103 | } |
104 | #endif | ||
104 | 105 | ||
105 | void __init pci_iommu_alloc(void) | 106 | void __init pci_iommu_alloc(void) |
106 | { | 107 | { |
108 | #ifdef CONFIG_X86_64 | ||
107 | /* free the range so iommu could get some range less than 4G */ | 109 | /* free the range so iommu could get some range less than 4G */ |
108 | dma32_free_bootmem(); | 110 | dma32_free_bootmem(); |
111 | #endif | ||
112 | |||
109 | /* | 113 | /* |
110 | * The order of these functions is important for | 114 | * The order of these functions is important for |
111 | * fall-back/fail-over reasons | 115 | * fall-back/fail-over reasons |
@@ -121,15 +125,6 @@ void __init pci_iommu_alloc(void) | |||
121 | pci_swiotlb_init(); | 125 | pci_swiotlb_init(); |
122 | } | 126 | } |
123 | 127 | ||
124 | unsigned long iommu_nr_pages(unsigned long addr, unsigned long len) | ||
125 | { | ||
126 | unsigned long size = roundup((addr & ~PAGE_MASK) + len, PAGE_SIZE); | ||
127 | |||
128 | return size >> PAGE_SHIFT; | ||
129 | } | ||
130 | EXPORT_SYMBOL(iommu_nr_pages); | ||
131 | #endif | ||
132 | |||
133 | void *dma_generic_alloc_coherent(struct device *dev, size_t size, | 128 | void *dma_generic_alloc_coherent(struct device *dev, size_t size, |
134 | dma_addr_t *dma_addr, gfp_t flag) | 129 | dma_addr_t *dma_addr, gfp_t flag) |
135 | { | 130 | { |