GENclear_page falls through into generic_patch_pageops after clearing
its page. The patcher then rewrites kernel text on each invocation.
Return to the caller once the clear loop completes, as GENcopy_page does.
This affects processors using the generic page-operation fallback.

Fixes: 6c70b6fc7b6f ("[SPARC64]: Do not assume sun4v chips have 
load-twin/store-init support.")
Cc: [email protected]

Signed-off-by: Magnus Lindholm <[email protected]>
---
 arch/sparc/lib/GENpage.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/sparc/lib/GENpage.S b/arch/sparc/lib/GENpage.S
index c143c4d1de3f..6ce11108e143 100644
--- a/arch/sparc/lib/GENpage.S
+++ b/arch/sparc/lib/GENpage.S
@@ -48,6 +48,9 @@ GENclear_user_page:
        bne,pt  %xcc, 1b
         add    %o0, 64, %o0
 
+       retl
+        nop
+
 #define BRANCH_ALWAYS  0x10680000
 #define NOP            0x01000000
 #define GEN_DO_PATCH(OLD, NEW) \

Reply via email to