aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386
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-i386
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-i386')
-rw-r--r--include/asm-i386/io.h27
1 files changed, 0 insertions, 27 deletions
diff --git a/include/asm-i386/io.h b/include/asm-i386/io.h
index b3724fe93ff1..68df0dc3ab8f 100644
--- a/include/asm-i386/io.h
+++ b/include/asm-i386/io.h
@@ -224,33 +224,6 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int
224 224
225#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(b),(c),(d)) 225#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(b),(c),(d))
226 226
227/**
228 * check_signature - find BIOS signatures
229 * @io_addr: mmio address to check
230 * @signature: signature block
231 * @length: length of signature
232 *
233 * Perform a signature comparison with the mmio address io_addr. This
234 * address should have been obtained by ioremap.
235 * Returns 1 on a match.
236 */
237
238static inline int check_signature(volatile void __iomem * io_addr,
239 const unsigned char *signature, int length)
240{
241 int retval = 0;
242 do {
243 if (readb(io_addr) != *signature)
244 goto out;
245 io_addr++;
246 signature++;
247 length--;
248 } while (length);
249 retval = 1;
250out:
251 return retval;
252}
253
254/* 227/*
255 * Cache management 228 * Cache management
256 * 229 *