summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2016-09-20 17:58:20 -0700
committerMax Filippov <jcmvbkbc@gmail.com>2016-09-20 20:43:22 -0700
commit549409b4b584604f8eb225ebbb19be74204fe789 (patch)
treec85182b622a33bed1b69d4bccd34118c2e8156ba
parentfeec273a2b4d98f8aa76c5d83f24053b211c8525 (diff)
downloadop-kernel-dev-549409b4b584604f8eb225ebbb19be74204fe789.zip
op-kernel-dev-549409b4b584604f8eb225ebbb19be74204fe789.tar.gz
xtensa: ISS: allow simdisk to use high memory buffers
ISS kernel by default has only low memory. But it may be configured to support high memory and started in a simulator with more than 128M of RAM. Simdisk driver in such configuration can get IO request with a high memory page. There may be no TLB entry for that page, only page table entry. However simulators don't do pagewalking, so such IO request will fail. Touch IO buffer in the buffer read/write loop so that a TLB entry is likely there when read or write simcall is invoked. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
-rw-r--r--arch/xtensa/platforms/iss/simdisk.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/xtensa/platforms/iss/simdisk.c b/arch/xtensa/platforms/iss/simdisk.c
index f58a4e6..ede04cc 100644
--- a/arch/xtensa/platforms/iss/simdisk.c
+++ b/arch/xtensa/platforms/iss/simdisk.c
@@ -86,6 +86,7 @@ static void simdisk_transfer(struct simdisk *dev, unsigned long sector,
unsigned long io;
simc_lseek(dev->fd, offset, SEEK_SET);
+ READ_ONCE(*buffer);
if (write)
io = simc_write(dev->fd, buffer, nbytes);
else
OpenPOWER on IntegriCloud