diff options
Diffstat (limited to 'drivers/s390/cio/cio.c')
-rw-r--r-- | drivers/s390/cio/cio.c | 17 |
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 | |||
864 | static 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 | |||
875 | static int | 862 | static 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) | |||
895 | static void __clear_chsc_subchannel_easy(void) | 882 | static 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 | ||
901 | static int pgm_check_occured; | 888 | static int pgm_check_occured; |