Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752039AbdHaRpy (ORCPT ); Thu, 31 Aug 2017 13:45:54 -0400 Received: from foss.arm.com ([217.140.101.70]:59796 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751622AbdHaRpw (ORCPT ); Thu, 31 Aug 2017 13:45:52 -0400 Message-ID: <59A84AF5.3000104@arm.com> Date: Thu, 31 Aug 2017 18:44:21 +0100 From: James Morse User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: Dongjiu Geng CC: christoffer.dall@linaro.org, marc.zyngier@arm.com, rkrcmar@redhat.com, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, lenb@kernel.org, robert.moore@intel.com, lv.zheng@intel.com, mark.rutland@arm.com, xiexiuqi@huawei.com, cov@codeaurora.org, david.daney@cavium.com, suzuki.poulose@arm.com, stefan@hello-penguin.com, Dave.Martin@arm.com, kristina.martsenko@arm.com, wangkefeng.wang@huawei.com, tbaicar@codeaurora.org, ard.biesheuvel@linaro.org, mingo@kernel.org, bp@suse.de, shiju.jose@huawei.com, zjzhang@codeaurora.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, devel@acpica.org, mst@redhat.com, john.garry@huawei.com, jonathan.cameron@huawei.com, shameerali.kolothum.thodi@huawei.com, huangdaode@hisilicon.com, wangzhou1@hisilicon.com, huangshaoyu@huawei.com, wuquanming@huawei.com, linuxarm@huawei.com, zhengqiang10@huawei.com Subject: Re: [PATCH v6 1/7] arm64: cpufeature: Detect CPU RAS Extentions References: <1503916701-13516-1-git-send-email-gengdongjiu@huawei.com> <1503916701-13516-2-git-send-email-gengdongjiu@huawei.com> In-Reply-To: <1503916701-13516-2-git-send-email-gengdongjiu@huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1788 Lines: 53 Hi Dongjiu Geng, On 28/08/17 11:38, Dongjiu Geng wrote: > From: Xie XiuQi > > ARM's v8.2 Extentions add support for Reliability, Availability and > Serviceability (RAS). On CPUs with these extensions system software > can use additional barriers to isolate errors and determine if faults > are pending. > > Add cpufeature detection and a barrier in the context-switch code. > There is no need to use alternatives for this as CPUs that don't > support this feature will treat the instruction as a nop. > > Platform level RAS support may require additional firmware support. > > Signed-off-by: Xie XiuQi > [Rebased, added esb and config option, reworded commit message] > Signed-off-by: James Morse Nit: when re-posting patches from the list you need to add your signed-off-by. See Documentation/process/submitting-patches.rst 'Developer's Certificate of Origin 1.1' This goes for your patch 2 as well. > diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c > index c845c8c04d95..7a17b4a1bd9e 100644 > --- a/arch/arm64/kernel/process.c > +++ b/arch/arm64/kernel/process.c > @@ -370,6 +370,9 @@ __notrace_funcgraph struct task_struct *__switch_to(struct task_struct *prev, > */ > dsb(ish); > > + /* Deliver any pending SError from prev */ > + esb(); > + This patch was sitting on top of the SError rework. As the cover-letter describes that was all there to make sure SError is unmasked when we execute this esb(). Without it any pending SError will be deferred, its ESR is written to DISR_EL1, which this patch doesn't check. On its own, this patch is actively harmful to systems that don't have firmware-first handling. We probably need to produce a combined series... Thanks, James