diff options
author | Jan Glauber <jang@linux.vnet.ibm.com> | 2012-12-05 14:43:25 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-12-05 09:12:51 -0500 |
commit | c59b9f92653f102856ca7802af551788c143a3a3 (patch) | |
tree | b850ff52a2ac92b258ef6ac51e614dd0d5fd708e /arch/s390 | |
parent | bafff1743f2b1bda24daba29c59f755aa2d505b7 (diff) | |
download | op-kernel-dev-c59b9f92653f102856ca7802af551788c143a3a3.zip op-kernel-dev-c59b9f92653f102856ca7802af551788c143a3a3.tar.gz |
s390/pci: no msleep in potential IRQ context
The PCI instructions may be used in IRQ context so scheduling is forbidden.
Use udelay and shorten the delay since we are now polling.
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/include/asm/pci_insn.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/s390/include/asm/pci_insn.h b/arch/s390/include/asm/pci_insn.h index 15b88b9..1486a98 100644 --- a/arch/s390/include/asm/pci_insn.h +++ b/arch/s390/include/asm/pci_insn.h @@ -3,7 +3,7 @@ #include <linux/delay.h> -#define ZPCI_INSN_BUSY_DELAY 1 /* 1 millisecond */ +#define ZPCI_INSN_BUSY_DELAY 1 /* 1 microsecond */ /* Load/Store status codes */ #define ZPCI_PCI_ST_FUNC_NOT_ENABLED 4 @@ -138,7 +138,7 @@ static inline int rpcit_instr(u64 fn, u64 addr, u64 range) do { cc = __rpcit(fn, addr, range, &status); if (cc == 2) - msleep(ZPCI_INSN_BUSY_DELAY); + udelay(ZPCI_INSN_BUSY_DELAY); } while (cc == 2); if (cc) @@ -198,7 +198,7 @@ static inline int pcilg_instr(u64 *data, u64 req, u64 offset) do { cc = __pcilg(data, req, offset, &status); if (cc == 2) - msleep(ZPCI_INSN_BUSY_DELAY); + udelay(ZPCI_INSN_BUSY_DELAY); } while (cc == 2); if (cc) { @@ -236,7 +236,7 @@ static inline int pcistg_instr(u64 data, u64 req, u64 offset) do { cc = __pcistg(data, req, offset, &status); if (cc == 2) - msleep(ZPCI_INSN_BUSY_DELAY); + udelay(ZPCI_INSN_BUSY_DELAY); } while (cc == 2); if (cc) @@ -268,7 +268,7 @@ static inline int pcistb_instr(const u64 *data, u64 req, u64 offset) do { cc = __pcistb(data, req, offset, &status); if (cc == 2) - msleep(ZPCI_INSN_BUSY_DELAY); + udelay(ZPCI_INSN_BUSY_DELAY); } while (cc == 2); if (cc) |