aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64/io.h
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2006-10-11 04:22:02 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-11 14:14:23 -0400
commite50190a8341485b413f599033cb74649f849d939 (patch)
treec45e165f8167dd95f3b5d4163433b91c8b7afd55 /include/asm-x86_64/io.h
parent53d5ed627df852ba8bab7f70df25290bd733792c (diff)
[PATCH] Consolidate check_signature
There's nothing arch-specific about check_signature(), so move it to <linux/io.h>. Use a cross between the Alpha and i386 implementations as the generic one. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-x86_64/io.h')
-rw-r--r--include/asm-x86_64/io.h27
1 files changed, 0 insertions, 27 deletions
diff --git a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h
index 70e91fe76344..6ee9fadaaacb 100644
--- a/include/asm-x86_64/io.h
+++ b/include/asm-x86_64/io.h
@@ -254,33 +254,6 @@ void memset_io(volatile void __iomem *a, int b, size_t c);
254 254
255#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(b),(c),(d)) 255#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(b),(c),(d))
256 256
257/**
258 * check_signature - find BIOS signatures
259 * @io_addr: mmio address to check
260 * @signature: signature block
261 * @length: length of signature
262 *
263 * Perform a signature comparison with the mmio address io_addr. This
264 * address should have been obtained by ioremap.
265 * Returns 1 on a match.
266 */
267
268static inline int check_signature(void __iomem *io_addr,
269 const unsigned char *signature, int length)
270{
271 int retval = 0;
272 do {
273 if (readb(io_addr) != *signature)
274 goto out;
275 io_addr++;
276 signature++;
277 length--;
278 } while (length);
279 retval = 1;
280out:
281 return retval;
282}
283
284/* Nothing to do */ 257/* Nothing to do */
285 258
286#define dma_cache_inv(_start,_size) do { } while (0) 259#define dma_cache_inv(_start,_size) do { } while (0)