From: "John W. Linville" <linville@tuxdriver.com>
To: Andrew Morton <akpm@osdl.org>,
Christoph Hellwig <hch@infradead.org>,
davej@redhat.com, linux-kernel@vger.kernel.org
Subject: [patch 2.6.14] ia64: re-implement dma_get_cache_alignment to avoid EXPORT_SYMBOL
Date: Fri, 4 Nov 2005 23:37:35 -0500 [thread overview]
Message-ID: <20051105043735.GD21567@tuxdriver.com> (raw)
In-Reply-To: <20051105043527.GC21567@tuxdriver.com>
The current ia64 implementation of dma_get_cache_alignment does not
work for modules because it relies on a symbol which is not exported.
Direct access to a global is a little ugly anyway, so this patch
re-implements dma_get_cache_alignment in a manner similar to what is
currently used for x86_64.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
This patch replaces the patch at the link below:
http://www.ussg.iu.edu/hypermail/linux/kernel/0509.1/1365.html
arch/ia64/kernel/setup.c | 7 +++++++
include/asm-ia64/dma-mapping.h | 7 +------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index fc56ca2..3af6de3 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -92,6 +92,13 @@ extern void efi_initialize_iomem_resourc
extern char _text[], _end[], _etext[];
unsigned long ia64_max_cacheline_size;
+
+int dma_get_cache_alignment(void)
+{
+ return ia64_max_cacheline_size;
+}
+EXPORT_SYMBOL(dma_get_cache_alignment);
+
unsigned long ia64_iobase; /* virtual address for I/O accesses */
EXPORT_SYMBOL(ia64_iobase);
struct io_space io_space[MAX_IO_SPACES];
diff --git a/include/asm-ia64/dma-mapping.h b/include/asm-ia64/dma-mapping.h
index 6347c98..df67d40 100644
--- a/include/asm-ia64/dma-mapping.h
+++ b/include/asm-ia64/dma-mapping.h
@@ -48,12 +48,7 @@ dma_set_mask (struct device *dev, u64 ma
return 0;
}
-static inline int
-dma_get_cache_alignment (void)
-{
- extern int ia64_max_cacheline_size;
- return ia64_max_cacheline_size;
-}
+extern int dma_get_cache_alignment(void);
static inline void
dma_cache_sync (void *vaddr, size_t size, enum dma_data_direction dir)
--
John W. Linville
linville@tuxdriver.com
prev parent reply other threads:[~2005-11-05 4:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-04 22:07 [PATCH] export ia64_max_cacheline_size Dave Jones
2005-11-04 22:34 ` Christoph Hellwig
2005-11-04 22:55 ` Andrew Morton
2005-11-04 23:52 ` Christoph Hellwig
2005-11-05 0:05 ` Andrew Morton
2005-11-05 4:35 ` John W. Linville
2005-11-05 4:37 ` John W. Linville [this message]
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=20051105043735.GD21567@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=akpm@osdl.org \
--cc=davej@redhat.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.