Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp410240pxu; Tue, 6 Oct 2020 09:15:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRvfDmlxbR/uE3V8VRw//4ALefb8E/L/sfLlGGLnUIQZJT9GCRxOssns0p6VCVKyfRuU0A X-Received: by 2002:a17:906:1484:: with SMTP id x4mr243353ejc.81.1602000928774; Tue, 06 Oct 2020 09:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602000928; cv=none; d=google.com; s=arc-20160816; b=fA66wuc5hnlRvR/+FkQ89ZuFXvXTyb72FaArWCHMC9h+RclSo2+lQFa4THFo7FhMYb 2V0eg6nvBH22viMVaM9X4d4s5L6RjZFN6/1LDKweqpeX4Bqx5kwOS/v3QiTtxk4c+VCk vuMjq9+ZZB0B5dFX72ZkqI4Gcqw2YVcNxwVC2sHiwOITMlxp7hB+ecj856AhDPjsE1CN xHc0CYUquR5shApzIYakW8Ptmj71SBX6wPUtsQFDu/cdtxzSYUeaypoBxJdWRRABlzbH jfk4pgm5e5LOysPy6n/VjYGuJ67wCb58hz2q/lE4EebG76A6MgKc1jOP4UfO5l8Tb6Iq WH3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=NMiSZ3W0OZyoM4JVa5rwXNlq1Q5mn0z7ma8TqMEjVP4=; b=Yu7K/s+o3wJrm3/XZypMu+bSH0qNozrbA+ADu1qqifNvKMnAg56ne/kmCirh7RHtPI 9jKyLCKKFbEyd56BCSNZlRt2iNf4zCsFuqzAQkK4DEfIgcBFn1rILO4UoXGIs2gxaPsf zlpI0Z5lInLIHDacT1D7SFmKlHoXd/6MzY1MH+bDjfAx4JRwZjVMgVAftHyMoRW3esIZ g5JB0losTYTUcO7zURW7jUaQMAX/scQ8DyNih2ExEO440vjIFXnm6bUO7fG2bktXC00n JoUXbIy8THyMU9N6NgpNZT1F01BDIj2A7iu1SExJESCJBLKriTzB7LNP1aMHW8vtvSrL nLDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g15si2445575ejw.477.2020.10.06.09.15.02; Tue, 06 Oct 2020 09:15:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726299AbgJFQOA (ORCPT + 99 others); Tue, 6 Oct 2020 12:14:00 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2962 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725902AbgJFQOA (ORCPT ); Tue, 6 Oct 2020 12:14:00 -0400 Received: from lhreml718-chm.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id 6BD3B50CDA70EDE141E6; Tue, 6 Oct 2020 17:13:56 +0100 (IST) Received: from lhreml715-chm.china.huawei.com (10.201.108.66) by lhreml718-chm.china.huawei.com (10.201.108.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Tue, 6 Oct 2020 17:13:56 +0100 Received: from lhreml715-chm.china.huawei.com ([10.201.108.66]) by lhreml715-chm.china.huawei.com ([10.201.108.66]) with mapi id 15.01.1913.007; Tue, 6 Oct 2020 17:13:56 +0100 From: Shiju Jose To: James Morse CC: Borislav Petkov , "linux-edac@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "tony.luck@intel.com" , "rjw@rjwysocki.net" , "lenb@kernel.org" , Linuxarm , Jonathan Cameron Subject: RE: [RFC PATCH 0/7] RAS/CEC: Extend CEC for errors count check on short time period Thread-Topic: [RFC PATCH 0/7] RAS/CEC: Extend CEC for errors count check on short time period Thread-Index: AQHWmLdPdbyjNlzT0kmpr3mH9sP7namEMSsAgAASuxCAAD4hgIAGP68A Date: Tue, 6 Oct 2020 16:13:56 +0000 Message-ID: <8d826b53a3fc453ba1c468aaf8eb2e75@huawei.com> References: <20201002122235.1280-1-shiju.jose@huawei.com> <20201002124352.GC17436@zn.tnic> <19a8cc62b11c49e9b584857a6a6664e5@huawei.com> <59950d44-906b-684f-c876-e09c76e5f827@arm.com> In-Reply-To: <59950d44-906b-684f-c876-e09c76e5f827@arm.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.47.85.122] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgSmFtZXMsDQoNClRoYW5rcyBmb3IgdGhlIHJlcGx5IGFuZCB0aGUgaW5mb3JtYXRpb24gc2hh cmVkLg0KDQo+LS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj5Gcm9tOiBKYW1lcyBNb3JzZSBb bWFpbHRvOmphbWVzLm1vcnNlQGFybS5jb21dDQo+U2VudDogMDIgT2N0b2JlciAyMDIwIDE4OjMz DQo+VG86IFNoaWp1IEpvc2UgPHNoaWp1Lmpvc2VAaHVhd2VpLmNvbT4NCj5DYzogQm9yaXNsYXYg UGV0a292IDxicEBhbGllbjguZGU+OyBsaW51eC1lZGFjQHZnZXIua2VybmVsLm9yZzsgbGludXgt DQo+YWNwaUB2Z2VyLmtlcm5lbC5vcmc7IGxpbnV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