Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754270AbbFKQJB (ORCPT ); Thu, 11 Jun 2015 12:09:01 -0400 Received: from foss.arm.com ([217.140.101.70]:56763 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752358AbbFKQJA (ORCPT ); Thu, 11 Jun 2015 12:09:00 -0400 Date: Thu, 11 Jun 2015 17:08:56 +0100 From: Catalin Marinas To: Chunyan Zhang Cc: will.deacon@arm.com, janet.liu@spreadtrum.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, xiongshan.an@spreadtrum.com Subject: Re: [PATCH] arm64: fix bug for reloading FPSIMD state after CPU hotplug. Message-ID: <20150611160856.GC29305@e104818-lin.cambridge.arm.com> References: <1433995365-6043-1-git-send-email-chunyan.zhang@spreadtrum.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433995365-6043-1-git-send-email-chunyan.zhang@spreadtrum.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1222 Lines: 26 On Thu, Jun 11, 2015 at 12:02:45PM +0800, Chunyan Zhang wrote: > From: Janet Liu > > Now FPSIMD don't handle HOTPLUG_CPU. This introduces bug after cpu down/up process. > > After cpu down/up process, the FPSMID hardware register is default value, not any > process's fpsimd context. when CPU_DEAD set cpu's fpsimd_state to NULL, it will force > to load the fpsimd context for the thread, to avoid the chance to skip to load the context. > If process A is the last user process on CPU N before cpu down, and the first user process > on the same CPU N after cpu up, A's fpsimd_state.cpu is the current cpu id, > and per_cpu(fpsimd_last_state) points A's fpsimd_state, so kernel will not reload the > context during it return to user space. > > Signed-off-by: Janet Liu > Signed-off-by: Xiongshan An > Signed-off-by: Chunyan Zhang Applied. Thanks. -- Catalin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/