+2
-3
arch/powerpc/include/asm/plpks.h
+2
-3
arch/powerpc/include/asm/plpks.h
···
44
44
#define PLPKS_MAX_DATA_SIZE 4000
45
45
46
46
// Timeouts for PLPKS operations
47
-
#define PLPKS_MAX_TIMEOUT 5000 // msec
48
-
#define PLPKS_FLUSH_SLEEP 10 // msec
49
-
#define PLPKS_FLUSH_SLEEP_RANGE 400
47
+
#define PLPKS_MAX_TIMEOUT (5 * USEC_PER_SEC)
48
+
#define PLPKS_FLUSH_SLEEP 10000 // usec
50
49
51
50
struct plpks_var {
52
51
char *component;
+8
arch/powerpc/platforms/pseries/iommu.c
+8
arch/powerpc/platforms/pseries/iommu.c
···
786
786
* parent bus. During reboot, there will be ibm,dma-window property to
787
787
* define DMA window. For kdump, there will at least be default window or DDW
788
788
* or both.
789
+
* There is an exception to the above. In case the PE goes into frozen
790
+
* state, firmware may not provide ibm,dma-window property at the time
791
+
* of LPAR boot up.
789
792
*/
793
+
794
+
if (!pdn) {
795
+
pr_debug(" no ibm,dma-window property !\n");
796
+
return;
797
+
}
790
798
791
799
ppci = PCI_DN(pdn);
792
800
+5
-5
arch/powerpc/platforms/pseries/plpks.c
+5
-5
arch/powerpc/platforms/pseries/plpks.c
···
415
415
break;
416
416
}
417
417
418
-
usleep_range(PLPKS_FLUSH_SLEEP,
419
-
PLPKS_FLUSH_SLEEP + PLPKS_FLUSH_SLEEP_RANGE);
418
+
fsleep(PLPKS_FLUSH_SLEEP);
420
419
timeout = timeout + PLPKS_FLUSH_SLEEP;
421
420
} while (timeout < PLPKS_MAX_TIMEOUT);
422
421
···
463
464
464
465
continuetoken = retbuf[0];
465
466
if (pseries_status_to_err(rc) == -EBUSY) {
466
-
int delay_ms = get_longbusy_msecs(rc);
467
-
mdelay(delay_ms);
468
-
timeout += delay_ms;
467
+
int delay_us = get_longbusy_msecs(rc) * 1000;
468
+
469
+
fsleep(delay_us);
470
+
timeout += delay_us;
469
471
}
470
472
rc = pseries_status_to_err(rc);
471
473
} while (rc == -EBUSY && timeout < PLPKS_MAX_TIMEOUT);