1
0
Fork 0

powerpc/powernv: copy/paste - Mask SO bit in CR

NX can set the 3rd bit in CR register for XER[SO] (Summary overflow)
which is not related to paste request. The current paste function
returns failure for a successful request when this bit is set. So mask
this bit and check the proper return status.

Fixes: 2392c8c8c0 ("powerpc/powernv/vas: Define copy/paste interfaces")
Cc: stable@vger.kernel.org # v4.14+
Signed-off-by: Haren Myneni <haren@us.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
hifive-unleashed-5.1
Haren Myneni 2018-06-04 18:33:38 +10:00 committed by Michael Ellerman
parent 04debf21fa
commit 7574364906
1 changed files with 2 additions and 1 deletions

View File

@ -41,5 +41,6 @@ static inline int vas_paste(void *paste_address, int offset)
: "b" (offset), "b" (paste_address)
: "memory", "cr0");
return (cr >> CR0_SHIFT) & CR0_MASK;
/* We mask with 0xE to ignore SO */
return (cr >> CR0_SHIFT) & 0xE;
}