From patchwork Mon Jun 24 15:09:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Richter X-Patchwork-Id: 167624 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4349066ilk; Mon, 24 Jun 2019 08:10:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqykOId11XmAHPGui56ESFw7qrcetoctIkJJoInDGXO2PBab8vvjv+cG/Si6nDPD6Jq0jMN7 X-Received: by 2002:a17:90a:a09:: with SMTP id o9mr25372933pjo.95.1561389039858; Mon, 24 Jun 2019 08:10:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561389039; cv=none; d=google.com; s=arc-20160816; b=iDsIybjcAMU9iyV11bM3eHlR8CPtyICks5UH5JHfxNkCYtOvBSHzMRdtbswqrQkX4U /2Cli1nF9TfxIuHDdZiMiQyJ7v3SVsXpNVJh6qhFQUdmSD/dfaZBRjwt4FUyp2hcXidB kgf07vj4jvCrI3vf8Y+HsqdOj0d1aYCd9mflG2kYUPdwic0vdZzunwnDFgQMsESR2X/0 s5Cr5fp/ZX85l/ZO6/N1d8E8zd5pkERECloQqtXE+CJ+K9hvcTuG2PNhb0QrqVjRdgYI ztZDHkqiuIXjR+QFpsecntdINbnvcr0BvmKrmUefccydA4cdFnLHyqNkBUWZXg3mB+Lu sSxw== 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=FklElvgedlxDHmIG/ABCr6f2J/sCXfLx67VSbR25Q5o=; b=y51xYptRw6S6KnjNpaVU9X/Q9M5MmnNckQF/RslSTBDFYbAKgTjEhBzzQ9uDO9edt4 Km60dO11M1e6EGLCjMz8xwVW02oq0GF8kTRFhx8VI24kt+FU9RJcOlnEN9+WTAnchCDK hv+aOoiZFg79rMF+ZwwhALl3EMuAfBEHv4NjpH87euvPYMi7IvaxJzeIhZKmpQGbvNih dXJorLNftYuq+KIOxTnYJKqPSyvI18gHg6f1tonofrMrTA2+ElhNU/g+3SgpFtFBKiWK BQmspp388c1WEFS75xnuyKJWOGNjD7tq4V23RDYlXUKbAw3Z0c8A83AWRhaaSsXUOHWT O0Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0818 header.b=EHawC+34; dkim=pass header.i=@marvell.onmicrosoft.com header.s=selector2-marvell-onmicrosoft-com header.b="f0aML//0"; 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 t17si11531093pjw.99.2019.06.24.08.10.39; Mon, 24 Jun 2019 08:10: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=EHawC+34; dkim=pass header.i=@marvell.onmicrosoft.com header.s=selector2-marvell-onmicrosoft-com header.b="f0aML//0"; 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 S1731117AbfFXPKh (ORCPT + 30 others); Mon, 24 Jun 2019 11:10:37 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:54722 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730364AbfFXPJ3 (ORCPT ); Mon, 24 Jun 2019 11:09:29 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5OF8CWO025874; Mon, 24 Jun 2019 08:09:24 -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=FklElvgedlxDHmIG/ABCr6f2J/sCXfLx67VSbR25Q5o=; b=EHawC+34zHZyx9xY2E33vW2QkorXflFdB/Xk+MElQgmu4KvyLxah/zO9pxlNmpQGSjbT k3+4cyqmup+3Ot6DqM6rDEhXZaENEAOi1szUcKu56PW+buAchcvvzHl0Vt0u8dSis1/I xmmANyNComb5pYC6WtctK5FQ6VsNCFRSOjIH2xB6P2JvLaeT07pBMlMD77qhZY+Kts+E jzsXReRtLHOvYAJQYugaYgARYg63D93+QI2DPfSxR+7XkN/mE5b0T5LH2oUfTYdMJP1n 6BcV/hSwMop6CwIIB5wCpUPSmrmjID3HZXvrm82OBFf8bYkBR5BSD/MoOqkftnFLc3LI AA== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2t9kujf7t7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 24 Jun 2019 08:09:24 -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:09:22 -0700 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (104.47.42.58) 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:09:22 -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=FklElvgedlxDHmIG/ABCr6f2J/sCXfLx67VSbR25Q5o=; b=f0aML//0mcuYNI7tE1UyNsEyDi/jMOU7HayahASor8+9fzTaTk5tkilJtN0c99s9P1QGWQ95V88evLSH92rOCIYIn6IvBVrTuX+PAUyZqwFkU3vz3xUytF713UMCx8C40vesguuDN8lsdImYGKrtyrj+zT3yhDZfJfBa0TtXQs8= Received: from MN2PR18MB3408.namprd18.prod.outlook.com (10.255.238.217) by MN2PR18MB3197.namprd18.prod.outlook.com (10.255.236.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.13; Mon, 24 Jun 2019 15:09:20 +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:09:20 +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 12/24] EDAC, ghes: Use standard kernel macros for page calculations Thread-Topic: [PATCH v2 12/24] EDAC, ghes: Use standard kernel macros for page calculations Thread-Index: AQHVKp7MsQEaEpqGeEG+xGBTWNT6kw== Date: Mon, 24 Jun 2019 15:09:19 +0000 Message-ID: <20190624150758.6695-13-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: 7f0715b6-9e29-4e7b-2e44-08d6f8b5ee71 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:MN2PR18MB3197; x-ms-traffictypediagnostic: MN2PR18MB3197: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1775; x-forefront-prvs: 007814487B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(136003)(396003)(346002)(376002)(199004)(189003)(36756003)(110136005)(107886003)(54906003)(81156014)(81166006)(68736007)(8676002)(4744005)(25786009)(5660300002)(8936002)(305945005)(7736002)(4326008)(1076003)(186003)(6116002)(14454004)(476003)(486006)(2616005)(11346002)(256004)(446003)(3846002)(50226002)(26005)(2906002)(52116002)(76176011)(71200400001)(71190400001)(99286004)(386003)(6506007)(102836004)(478600001)(316002)(86362001)(6512007)(66066001)(53936002)(6486002)(73956011)(66946007)(66476007)(66556008)(64756008)(66446008)(6436002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB3197; H:MN2PR18MB3408.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: c2/rqZ0PLIGnyy06a1C904OAxaeVBVSN2vTZtlq0lMlQS/rebaivybftuwZhd1kgLN4dUMLTgBBqBbSOpZGEyecqkabDBkPBhE4qGzQw8gVPDyc1DpegTSr5QFcaK4qGX/YT8jrGIFaePn5royywHS/ChiWyarJ26tdcVPXSEZfYlv0FJnL0jO67/8i0+nCVVeDU837qbSUCKsQ8XALXatbgOT+6swixCI432H1d9BJI50PwkDw42aQFZG1JDZunfeBkjuRRJqfoeWDEKlUOVCk2X+fwSbUci/MXO4aGXS7g6HwHiFUJdmM2niaon6gQR/9V+qRPcPBRFG1oyBeVike4HoZqt6GzMJUF8cv+VMrO+6V5UINbBeU6ors8ugYFGRggCN3HyColzyEM+XzAa7qdCp1UCHSyTsaqyvYkTwo= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 7f0715b6-9e29-4e7b-2e44-08d6f8b5ee71 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jun 2019 15:09:20.0173 (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: MN2PR18MB3197 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 Use standard macros for page calculations. Signed-off-by: Robert Richter --- drivers/edac/ghes_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 Reviewed-by: James Morse Reviewed-by: tag. Sorry for not adding it, I will do that in the diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c index 786f1b32eee1..746083876b5f 100644 --- a/drivers/edac/ghes_edac.c +++ b/drivers/edac/ghes_edac.c @@ -311,8 +311,8 @@ void ghes_edac_report_mem_error(int sev, struct cper_sec_mem_err *mem_err) /* Error address */ if (mem_err->validation_bits & CPER_MEM_VALID_PA) { - e->page_frame_number = mem_err->physical_addr >> PAGE_SHIFT; - e->offset_in_page = mem_err->physical_addr & ~PAGE_MASK; + e->page_frame_number = PHYS_PFN(mem_err->physical_addr); + e->offset_in_page = offset_in_page(mem_err->physical_addr); } /* Error grain */