]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/vas: Report proper error code for address translation failure
authorHaren Myneni <haren@linux.ibm.com>
Fri, 10 Jul 2020 23:47:19 +0000 (16:47 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 15 Jul 2020 13:09:55 +0000 (23:09 +1000)
commit1ec9041e80eb674491414c27b6d4939fcd117867
treef2e6f34ca9144a8a13c597806316ca012e419a7f
parent1b0a45a1cca6b6c2a0f689381bbd2adc6266a6af
powerpc/vas: Report proper error code for address translation failure

P9 DD2 NX workbook (Table 4-36) says DMA controller uses CC=5
internally for translation fault handling. NX reserves CC=250 for
OS to notify user space when NX encounters address translation
failure on the request buffer. Not an issue in earlier releases
as NX does not get faults on kernel addresses.

This patch defines CSB_CC_FAULT_ADDRESS(250) and updates CSB.CC with
this proper error code for user space.

Fixes: 9a1d23e2fdfd ("powerpc/vas: Update CSB and notify process for fault CRBs")
Signed-off-by: Haren Myneni <haren@linux.ibm.com>
[mpe: Added Fixes tag and fix typo in comment]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/019fd53e7538c6f8f332d175df74b1815ef5aa8c.camel@linux.ibm.com
Documentation/powerpc/vas-api.rst
arch/powerpc/include/asm/icswx.h
arch/powerpc/platforms/powernv/vas-fault.c