aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2008-10-10 15:33:22 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-10-10 15:33:58 -0400
commit5a0d0e65379256b4da2c9092e197a2c761f51c01 (patch)
tree4dbac2b5498ad7ce1bd88d8bdfe6303169b9560c /drivers/s390/cio
parentb2300b9efe1b8174833e17f37e975c9da00c388a (diff)
[S390] Move private simple udelay function to arch/s390/lib/delay.c.
Move cio's private simple udelay function to lib/delay.c and turn it into something much more readable. So we have all implementations at one place. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r--drivers/s390/cio/cio.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index c0cb72547256..3db2c386546f 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -859,19 +859,6 @@ __disable_subchannel_easy(struct subchannel_id schid, struct schib *schib)
859 return -EBUSY; /* uhm... */ 859 return -EBUSY; /* uhm... */
860} 860}
861 861
862/* we can't use the normal udelay here, since it enables external interrupts */
863
864static void udelay_reset(unsigned long usecs)
865{
866 uint64_t start_cc, end_cc;
867
868 asm volatile ("STCK %0" : "=m" (start_cc));
869 do {
870 cpu_relax();
871 asm volatile ("STCK %0" : "=m" (end_cc));
872 } while (((end_cc - start_cc)/4096) < usecs);
873}
874
875static int 862static int
876__clear_io_subchannel_easy(struct subchannel_id schid) 863__clear_io_subchannel_easy(struct subchannel_id schid)
877{ 864{
@@ -887,7 +874,7 @@ __clear_io_subchannel_easy(struct subchannel_id schid)
887 if (schid_equal(&ti.schid, &schid)) 874 if (schid_equal(&ti.schid, &schid))
888 return 0; 875 return 0;
889 } 876 }
890 udelay_reset(100); 877 udelay_simple(100);
891 } 878 }
892 return -EBUSY; 879 return -EBUSY;
893} 880}
@@ -895,7 +882,7 @@ __clear_io_subchannel_easy(struct subchannel_id schid)
895static void __clear_chsc_subchannel_easy(void) 882static void __clear_chsc_subchannel_easy(void)
896{ 883{
897 /* It seems we can only wait for a bit here :/ */ 884 /* It seems we can only wait for a bit here :/ */
898 udelay_reset(100); 885 udelay_simple(100);
899} 886}
900 887
901static int pgm_check_occured; 888static int pgm_check_occured;