diff options
| author | James Bottomley <james.bottomley@steeleye.com> | 2004-07-02 20:04:47 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-07-02 20:04:47 -0700 |
| commit | 4a48e29fb63ba2c370e600f073a37c390bcaf43a (patch) | |
| tree | cae35f855f605fb283e92260b5264aad1cb0c0c3 /include/linux | |
| parent | 5522865913ea1b3248bf241c0305a1d5fae4fddc (diff) | |
[PATCH] dma_get_required_mask() build fix
This new function fails to build on sparc64 due to nasty include
dependencies.
Fix that by uninlining it - it was too big for inlining anyway.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/dma-mapping.h | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index c1620bb06051..43f6c726cd2c 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -19,28 +19,7 @@ enum dma_data_direction { #define dma_sync_single dma_sync_single_for_cpu #define dma_sync_sg dma_sync_sg_for_cpu -#ifndef ARCH_HAS_DMA_GET_REQUIRED_MASK -static inline u64 dma_get_required_mask(struct device *dev) -{ - extern unsigned long max_pfn; /* defined in bootmem.h but may - not be included */ - u32 low_totalram = ((max_pfn - 1) << PAGE_SHIFT); - u32 high_totalram = ((max_pfn - 1) >> (32 - PAGE_SHIFT)); - u64 mask; - - if (!high_totalram) { - /* convert to mask just covering totalram */ - low_totalram = (1 << (fls(low_totalram) - 1)); - low_totalram += low_totalram - 1; - mask = low_totalram; - } else { - high_totalram = (1 << (fls(high_totalram) - 1)); - high_totalram += high_totalram - 1; - mask = (((u64)high_totalram) << 32) + 0xffffffff; - } - return mask & *dev->dma_mask; -} -#endif +extern u64 dma_get_required_mask(struct device *dev); #endif |
