Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2541866ybd; Mon, 24 Jun 2019 08:11:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKn/MrnIEA1tPRtXd7MW89rySSOQonqdG6MqI4rixcYeEtVvUvGuunqo4NIYqvOWR1XfO6 X-Received: by 2002:a17:902:724:: with SMTP id 33mr145019355pli.49.1561389099633; Mon, 24 Jun 2019 08:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561389099; cv=none; d=google.com; s=arc-20160816; b=bk2RZM2AyLJgpTXoLJTB+yhB6MpFgJ4kuqOdVT3UFJzA1SMk0cXRpp4+7w/SIo8Ri/ 5pyL7K87HtUjRtv0eddjbS/bKExeZbhf/OnHBbP7jsBALEeJYtJkcXtAaekNalv0vDAN YFhH+jkwS7O2T7SQfgE9Eb0vuTS7/Kpt0mVe3ISjR1ag9pVC4m+9IGp14tK9dmQpLgus 3gNeT5ByCSUO1pf5n/aGbTnhLZLkWZe0tFwrE4mD99jve8z2QIYl950dVi8CCRRUSfwi SvSMEKlIlpEaUPMSb8bWk99/u2JiNYm/l8GLH+GXVwiFqgsD58A8MZP/g24NQtwsmGHc F5DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :dkim-signature; bh=6/A5zqX04PLpyB5bKH4TTNu46QmN6tpzA0tBihV9SZc=; b=lSYCZr7nox8F+7JxmXE+ZHkHmvvSlTY2tWXK6XEBD0h4xKX6lX1fz8JI32i+1dgGLc jUmTV7WwH+w0//HovU2CLppOAXTrflRUfRZHqwFkfQ4AlZOHtLxtKAdPYHtUJj+XEmXJ 8XMFDjdCmyLmndrI/lZoiuOt8UWYoPqan/HDXH82RNxTqmFZQbEibShwlnV6Ec3q0QhM 8fWDpc2rOjcYk6hj/XQYtkXWBIzg7G3zVx1rkR/OyUjJhWAGJ18HF+f4MgZnpB7zVvrn p/frdCuSZTZHLe/3HiH8akvO+MYk0Hw9HIFnYregV5sl7z98G/Ca/E11entdCFR54YK+ adww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0818 header.b=R3cFoapQ; dkim=pass header.i=@marvell.onmicrosoft.com header.s=selector2-marvell-onmicrosoft-com header.b=Y2Pb7rnt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=marvell.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 205si10568957pgb.424.2019.06.24.08.11.23; Mon, 24 Jun 2019 08:11:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0818 header.b=R3cFoapQ; dkim=pass header.i=@marvell.onmicrosoft.com header.s=selector2-marvell-onmicrosoft-com header.b=Y2Pb7rnt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730391AbfFXPJK (ORCPT + 99 others); Mon, 24 Jun 2019 11:09:10 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:62614 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730309AbfFXPJI (ORCPT ); Mon, 24 Jun 2019 11:09:08 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5OF053e018453; Mon, 24 Jun 2019 08:08:59 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=6/A5zqX04PLpyB5bKH4TTNu46QmN6tpzA0tBihV9SZc=; b=R3cFoapQluu9/y7C66MCYJ/CPBU6RCu5vy0r8QXVeeZi9kq8CgJBCnRwaXsTghWD/lUz WQwxMH8sTPnOYnHT0uk0Xw14xq+gEV8AWzJvAEULTzulqDs92HWlffk+5RAEqoj7iTCZ joM0s0eh18xqtu5p37mLHHRU1FvXRXu7r1GsCURXOxt77uKfzQEaZiuqvl7OVgazpvs0 7lR7Llklwbu0JplEwAffs+DxaEnNk4BLHO1aczTmhL69Bagi/77H1L+Dx4xILcTGzhvc 8jLINZaLw0kuvAY+m606yz10hir9iqBnyYJB8wqjIkgoEMt47Jv0HXtsoF/8hmusdN7K BQ== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2tarxr9t94-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 24 Jun 2019 08:08:59 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 24 Jun 2019 08:08:58 -0700 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (104.47.42.52) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Mon, 24 Jun 2019 08:08:58 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6/A5zqX04PLpyB5bKH4TTNu46QmN6tpzA0tBihV9SZc=; b=Y2Pb7rntMAGdBB+PZGq7Z4Ln0y8QJwWZ97S4xWmuqiNTUBmTpGn0ntuD6Q/oykSnnzjz2pTL9HZzoRQqDtnvIGBvWgK7Ebo+sagifx9dm+jiNaA5MrIkWnL/jnrdAHa/iDonYuJL13dhWtiNnVYZuAfiUMM2pgQQawuyhsiUMuQ= Received: from MN2PR18MB3408.namprd18.prod.outlook.com (10.255.238.217) by MN2PR18MB2589.namprd18.prod.outlook.com (20.179.82.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16; Mon, 24 Jun 2019 15:08:57 +0000 Received: from MN2PR18MB3408.namprd18.prod.outlook.com ([fe80::d3:794c:1b94:cf3]) by MN2PR18MB3408.namprd18.prod.outlook.com ([fe80::d3:794c:1b94:cf3%4]) with mapi id 15.20.2008.014; Mon, 24 Jun 2019 15:08:57 +0000 From: Robert Richter To: Borislav Petkov , James Morse , "Mauro Carvalho Chehab" CC: "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Robert Richter Subject: [PATCH v2 02/24] EDAC, ghes: Fix grain calculation Thread-Topic: [PATCH v2 02/24] EDAC, ghes: Fix grain calculation Thread-Index: AQHVKp6+pL7VEIGXA0Cki9BKQoDoyg== Date: Mon, 24 Jun 2019 15:08:57 +0000 Message-ID: <20190624150758.6695-3-rrichter@marvell.com> References: <20190624150758.6695-1-rrichter@marvell.com> In-Reply-To: <20190624150758.6695-1-rrichter@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1P190CA0035.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:52::24) To MN2PR18MB3408.namprd18.prod.outlook.com (2603:10b6:208:16c::25) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 x-originating-ip: [92.254.182.202] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5758b553-24b4-4664-22fd-08d6f8b5e11b x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:MN2PR18MB2589; x-ms-traffictypediagnostic: MN2PR18MB2589: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2733; x-forefront-prvs: 007814487B x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(39860400002)(346002)(376002)(366004)(136003)(189003)(199004)(2906002)(2616005)(486006)(476003)(52116002)(256004)(5660300002)(66446008)(73956011)(66946007)(1076003)(14454004)(6116002)(86362001)(3846002)(99286004)(6486002)(68736007)(81166006)(81156014)(6436002)(4326008)(305945005)(50226002)(53936002)(7736002)(8676002)(8936002)(478600001)(64756008)(66556008)(66476007)(6512007)(107886003)(71190400001)(71200400001)(36756003)(26005)(102836004)(386003)(186003)(11346002)(76176011)(6506007)(110136005)(316002)(54906003)(446003)(25786009)(66066001);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR18MB2589;H:MN2PR18MB3408.namprd18.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: tbo/VAI2B/p24PGKxYVgzIBKsL0E3YWUMNHVXZcpE7t3zb/KCapIvEMw1/Q3JfMpiDt/Xd6zvsQf8+VBNvRCS9wjP97aL0U2FRdl4yZiohCMFwPbb56xyZCJrYUsJwBY7h/UnjAdAqd1Zlfrp5ZfQtj+7JXnFp847T8fokQvRZ8CYbe0qW2DFYblRVQR9Ab5YYSXkz1rJjUPZWJY/sTOvi4eNXRivdq1+WxRPBfl6zhha2yKoLaM7c2+jf/0OF87CVbnN+HUEitzDvEuxyb0IAIzJkVsfhpzPRahRz2yN+l6rZnE5bFEC9erepDI0Xb64crmbvV8SedRnIWsAxQMBw0c5mHk8AvziEib7L8/Vm8RXPuubmRneLDVW7gtwgN560m7KnZ6hKLiDMgMft83lUcV6hmBOjddOBTWahPDmko= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 5758b553-24b4-4664-22fd-08d6f8b5e11b X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jun 2019 15:08:57.2322 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: rrichter@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2589 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-24_10:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VGhlIGNvbnZlcnNpb24gZnJvbSB0aGUgcGh5c2ljYWwgYWRkcmVzcyBtYXNrIHRvIGEgZ3JhaW4g KGRlZmluZWQgYXMNCmdyYW51bGFyaXR5IGluIGJ5dGVzKSBpcyBicm9rZW46DQoNCgllLT5ncmFp biA9IH4obWVtX2Vyci0+cGh5c2ljYWxfYWRkcl9tYXNrICYgflBBR0VfTUFTSyk7DQoNCkUuZy4s IGEgcGh5c2ljYWwgYWRkcmVzcyBtYXNrIG9mIH4weGZmZiBzaG91bGQgZ2l2ZSBhIGdyYWluIG9m IDB4MTAwMCwNCmluc3RlYWQgdGhlIGdyYWluIGlzIHdyb25nIHdpdGggdGhlIHVwcGVyIGJpdHMg YWx3YXlzIHNldC4gV2UgYWxzbw0KcmVtb3ZlIHRoZSBsaW1pdGF0aW9uIHRvIHRoZSBwYWdlIHNp emUgYXMgdGhlIGdyYW51bGFyaXR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