From patchwork Thu Dec 10 09:04:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Blanchard X-Patchwork-Id: 555072 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 79C34140FD9 for ; Thu, 10 Dec 2015 20:05:52 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=samba.org header.i=@samba.org header.b=sPhrNPLD; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 5500E1A11BD for ; Thu, 10 Dec 2015 20:05:52 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=samba.org header.i=@samba.org header.b=sPhrNPLD; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from hr2.samba.org (hr2.samba.org [IPv6:2a01:4f8:192:486::147:1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 840C31A113E for ; Thu, 10 Dec 2015 20:04:36 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=samba.org header.i=@samba.org header.b=sPhrNPLD; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42627210; h=Message-ID:Cc:To:From:Date; bh=PgLSiDWX5XZx3pzQEGXDWL/t1Nlq9U7VlNe/Xfp4SaI=; b=sPhrNPLDJ1fC0Yl7b7H70jhFPcDrgl+tq2bRAXRa6EwUhBuDtYvU+AZMMgoDuC5gqDxjLdf0rWcmuhaDEWdE8IShNDUNdasjMx8UJFGDBKP4jhYMy/I5sygsnJBLv4/zDVtJKqmBPLO644FZAt+tQxo7UmrGhG57PGTjrbSclW0=; Received: from [127.0.0.2] (localhost [127.0.0.1]) by hr2.samba.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim) id 1a6x9C-00054d-SY; Thu, 10 Dec 2015 09:04:23 +0000 Date: Thu, 10 Dec 2015 20:04:05 +1100 From: Anton Blanchard To: Rashmica , Michael Ellerman , Michael Neuling , benh@kernel.crashing.org, paulus@samba.org, cyrilbur@gmail.com, scottwood@freescale.com Subject: [PATCH] powerpc: Call check_if_tm_restore_required() in enable_kernel_*() Message-ID: <20151210200405.4779b7df@kryten> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Commit a0e72cf12b1a ("powerpc: Create msr_check_and_{set,clear}()") removed a call to check_if_tm_restore_required() in the enable_kernel_*() functions. Add them back in. Fixes: a0e72cf12b1a ("powerpc: Create msr_check_and_{set,clear}()") Reported-by: Rashmica Gupta Signed-off-by: Anton Blanchard --- arch/powerpc/kernel/process.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index fffc2d2..0cffb2c 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -181,8 +181,10 @@ void enable_kernel_fp(void) msr_check_and_set(MSR_FP); - if (current->thread.regs && (current->thread.regs->msr & MSR_FP)) + if (current->thread.regs && (current->thread.regs->msr & MSR_FP)) { + check_if_tm_restore_required(current); __giveup_fpu(current); + } } EXPORT_SYMBOL(enable_kernel_fp); #endif /* CONFIG_PPC_FPU */ @@ -204,8 +206,10 @@ void enable_kernel_altivec(void) msr_check_and_set(MSR_VEC); - if (current->thread.regs && (current->thread.regs->msr & MSR_VEC)) + if (current->thread.regs && (current->thread.regs->msr & MSR_VEC)) { + check_if_tm_restore_required(current); __giveup_altivec(current); + } } EXPORT_SYMBOL(enable_kernel_altivec); @@ -249,6 +253,7 @@ void enable_kernel_vsx(void) msr_check_and_set(MSR_FP|MSR_VEC|MSR_VSX); if (current->thread.regs && (current->thread.regs->msr & MSR_VSX)) { + check_if_tm_restore_required(current); if (current->thread.regs->msr & MSR_FP) __giveup_fpu(current); if (current->thread.regs->msr & MSR_VEC) @@ -289,8 +294,10 @@ void enable_kernel_spe(void) msr_check_and_set(MSR_SPE); - if (current->thread.regs && (current->thread.regs->msr & MSR_SPE)) + if (current->thread.regs && (current->thread.regs->msr & MSR_SPE)) { + check_if_tm_restore_required(current); __giveup_spe(current); + } } EXPORT_SYMBOL(enable_kernel_spe);