]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/cmf: get rid of register asm
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 22 Jun 2021 12:07:23 +0000 (14:07 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 28 Jun 2021 09:18:28 +0000 (11:18 +0200)
Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/s390/cio/cmf.c

index b7b590646d58007f3537eddf1073c3355457f953..5584aa46c94e159dd5368b061c38b196199e5a71 100644 (file)
@@ -163,13 +163,14 @@ static inline u64 time_to_avg_nsec(u32 value, u32 count)
  */
 static inline void cmf_activate(void *area, unsigned int onoff)
 {
-       register void * __gpr2 asm("2");
-       register long __gpr1 asm("1");
-
-       __gpr2 = area;
-       __gpr1 = onoff;
        /* activate channel measurement */
-       asm("schm" : : "d" (__gpr2), "d" (__gpr1) );
+       asm volatile(
+               "       lgr     1,%[r1]\n"
+               "       lgr     2,%[mbo]\n"
+               "       schm\n"
+               :
+               : [r1] "d" ((unsigned long)onoff), [mbo] "d" (area)
+               : "1", "2");
 }
 
 static int set_schib(struct ccw_device *cdev, u32 mme, int mbfc,