Lines Matching full:count

275  * Read COUNT 8-bit bytes from port PORT into memory starting at SRC.
277 void ioread8_rep(const void __iomem *port, void *dst, unsigned long count) in ioread8_rep() argument
280 if (!count) in ioread8_rep()
282 count--; in ioread8_rep()
287 while (count >= 4) { in ioread8_rep()
289 count -= 4; in ioread8_rep()
298 while (count) { in ioread8_rep()
299 --count; in ioread8_rep()
305 void insb(unsigned long port, void *dst, unsigned long count) in insb() argument
307 ioread8_rep(ioport_map(port, 1), dst, count); in insb()
314 * Read COUNT 16-bit words from port PORT into memory starting at
320 void ioread16_rep(const void __iomem *port, void *dst, unsigned long count) in ioread16_rep() argument
323 if (!count) in ioread16_rep()
326 count--; in ioread16_rep()
331 while (count >= 2) { in ioread16_rep()
333 count -= 2; in ioread16_rep()
340 if (count) { in ioread16_rep()
345 void insw(unsigned long port, void *dst, unsigned long count) in insw() argument
347 ioread16_rep(ioport_map(port, 2), dst, count); in insw()
355 * Read COUNT 32-bit words from port PORT into memory starting at
360 void ioread32_rep(const void __iomem *port, void *dst, unsigned long count) in ioread32_rep() argument
363 while (count--) { in ioread32_rep()
370 while (count--) { in ioread32_rep()
377 void insl(unsigned long port, void *dst, unsigned long count) in insl() argument
379 ioread32_rep(ioport_map(port, 4), dst, count); in insl()
392 void iowrite8_rep(void __iomem *port, const void *xsrc, unsigned long count) in iowrite8_rep() argument
395 while (count--) in iowrite8_rep()
399 void outsb(unsigned long port, const void *src, unsigned long count) in outsb() argument
401 iowrite8_rep(ioport_map(port, 1), src, count); in outsb()
414 void iowrite16_rep(void __iomem *port, const void *src, unsigned long count) in iowrite16_rep() argument
417 if (!count) in iowrite16_rep()
422 --count; in iowrite16_rep()
425 while (count >= 2) { in iowrite16_rep()
427 count -= 2; in iowrite16_rep()
434 if (count) { in iowrite16_rep()
439 void outsw(unsigned long port, const void *src, unsigned long count) in outsw() argument
441 iowrite16_rep(ioport_map(port, 2), src, count); in outsw()
454 void iowrite32_rep(void __iomem *port, const void *src, unsigned long count) in iowrite32_rep() argument
457 while (count--) { in iowrite32_rep()
464 while (count--) { in iowrite32_rep()
471 void outsl(unsigned long port, const void *src, unsigned long count) in outsl() argument
473 iowrite32_rep(ioport_map(port, 4), src, count); in outsl()
484 void memcpy_fromio(void *to, const volatile void __iomem *from, long count) in memcpy_fromio() argument
489 if (count >= 8 && ((u64)to & 7) == ((u64)from & 7)) { in memcpy_fromio()
490 count -= 8; in memcpy_fromio()
493 count -= 8; in memcpy_fromio()
496 } while (count >= 0); in memcpy_fromio()
497 count += 8; in memcpy_fromio()
500 if (count >= 4 && ((u64)to & 3) == ((u64)from & 3)) { in memcpy_fromio()
501 count -= 4; in memcpy_fromio()
504 count -= 4; in memcpy_fromio()
507 } while (count >= 0); in memcpy_fromio()
508 count += 4; in memcpy_fromio()
511 if (count >= 2 && ((u64)to & 1) == ((u64)from & 1)) { in memcpy_fromio()
512 count -= 2; in memcpy_fromio()
515 count -= 2; in memcpy_fromio()
518 } while (count >= 0); in memcpy_fromio()
519 count += 2; in memcpy_fromio()
522 while (count > 0) { in memcpy_fromio()
524 count--; in memcpy_fromio()
538 void memcpy_toio(volatile void __iomem *to, const void *from, long count) in memcpy_toio() argument
544 if (count >= 8 && ((u64)to & 7) == ((u64)from & 7)) { in memcpy_toio()
545 count -= 8; in memcpy_toio()
548 count -= 8; in memcpy_toio()
551 } while (count >= 0); in memcpy_toio()
552 count += 8; in memcpy_toio()
555 if (count >= 4 && ((u64)to & 3) == ((u64)from & 3)) { in memcpy_toio()
556 count -= 4; in memcpy_toio()
559 count -= 4; in memcpy_toio()
562 } while (count >= 0); in memcpy_toio()
563 count += 4; in memcpy_toio()
566 if (count >= 2 && ((u64)to & 1) == ((u64)from & 1)) { in memcpy_toio()
567 count -= 2; in memcpy_toio()
570 count -= 2; in memcpy_toio()
573 } while (count >= 0); in memcpy_toio()
574 count += 2; in memcpy_toio()
577 while (count > 0) { in memcpy_toio()
579 count--; in memcpy_toio()
592 void _memset_c_io(volatile void __iomem *to, unsigned long c, long count) in _memset_c_io() argument
595 if (count > 0 && ((u64)to & 1)) { in _memset_c_io()
598 count--; in _memset_c_io()
602 if (count >= 2 && ((u64)to & 2)) { in _memset_c_io()
605 count -= 2; in _memset_c_io()
609 if (count >= 4 && ((u64)to & 4)) { in _memset_c_io()
612 count -= 4; in _memset_c_io()
616 (or have a small count) */ in _memset_c_io()
617 count -= 8; in _memset_c_io()
618 if (count >= 0) { in _memset_c_io()
622 count -= 8; in _memset_c_io()
623 } while (count >= 0); in _memset_c_io()
625 count += 8; in _memset_c_io()
627 /* The tail is word-aligned if we still have count >= 4 */ in _memset_c_io()
628 if (count >= 4) { in _memset_c_io()
631 count -= 4; in _memset_c_io()
634 /* The tail is half-word aligned if we have count >= 2 */ in _memset_c_io()
635 if (count >= 2) { in _memset_c_io()
638 count -= 2; in _memset_c_io()
642 if (count) { in _memset_c_io()
658 scr_memcpyw(u16 *d, const u16 *s, unsigned int count) in scr_memcpyw() argument
670 count /= 2; in scr_memcpyw()
671 while (count--) { in scr_memcpyw()
677 memcpy_fromio(d, ios, count); in scr_memcpyw()
680 memcpy_toio(iod, s, count); in scr_memcpyw()
682 memcpy(d, s, count); in scr_memcpyw()
688 void scr_memmovew(u16 *d, const u16 *s, unsigned int count) in scr_memmovew() argument
691 scr_memcpyw(d, s, count); in scr_memmovew()
693 count /= 2; in scr_memmovew()
694 d += count; in scr_memmovew()
695 s += count; in scr_memmovew()
696 while (count--) in scr_memmovew()