]> git.baikalelectronics.ru Git - kernel.git/commit
cxl: Fix memory page not handled
authorChristophe Lombard <clombard@linux.vnet.ibm.com>
Tue, 26 Sep 2017 08:15:21 +0000 (10:15 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 29 Sep 2017 04:19:44 +0000 (14:19 +1000)
commit6c4a066506703cfa65a8cb12f14f3f20a9784b01
tree8158b9a7dff59c19adef53198ecd7f89dc8ac4ed
parentfba6840ec9a1a0881c300c89f6bfc70255b546a4
cxl: Fix memory page not handled

The in-kernel 'library' API can be called by drivers to help
interaction with an IBM XSL on a POWER9 system.

The cxllib_handle_fault() API is used to handle memory fault. All memory
pages of the specified buffer have to be handled but under certain
conditions,the last page may not be touched, and the address the
adapter is trying to access is never sent to the kernel for resolution.

This patch reworks start address of the loop with an address aligned on
the page size. In this context, the last page is not missed.

Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
Acked-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Fixes: f4e64f9c95c2 ("cxl: Export library to support IBM XSL");
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/misc/cxl/cxllib.c