Message ID | 1478583879-14654-3-git-send-email-shijie.huang@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 512996022E for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 8 Nov 2016 05:48:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FAED28B65 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 8 Nov 2016 05:48:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3432C28BCC; Tue, 8 Nov 2016 05:48:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A77F128B65 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 8 Nov 2016 05:48:45 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c3zFi-0007i9-VE; Tue, 08 Nov 2016 05:47:22 +0000 Received: from mail-eopbgr40087.outbound.protection.outlook.com ([40.107.4.87] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c3zFK-0007eT-Bb for linux-arm-kernel@lists.infradead.org; Tue, 08 Nov 2016 05:47:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=tGfg3J5pg1XDm2eIhCNg3nMK2lnZY1+IF7V7Bw9IPVU=; b=Ab03VSq6V4pdN/mFycG1mVQFR6gqilSn0/INjJdjB8LnvA8yIQ4Ohh2FQtJhE/kKtJKw0cXNb3zw1glcbHizUMgor/DJ+bAGNTj3E8wVXiqo9Sp+90ZU9CHc+fsYfltRvrfL2S+Mzyl5iAanLxUOZRD23WJV8IRdRj0/bNdPhTc= Received: from AM3PR08CA0004.eurprd08.prod.outlook.com (10.160.207.142) by DB5PR08MB0565.eurprd08.prod.outlook.com (10.161.246.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Tue, 8 Nov 2016 05:46:35 +0000 Received: from AM1FFO11FD029.protection.gbl (2a01:111:f400:7e00::163) by AM3PR08CA0004.outlook.office365.com (2a01:111:e400:8840::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6 via Frontend Transport; Tue, 8 Nov 2016 05:46:35 +0000 Authentication-Results: spf=pass (sender IP is 217.140.96.140) smtp.mailfrom=arm.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 217.140.96.140 as permitted sender) receiver=protection.outlook.com; client-ip=217.140.96.140; helo=nebula.arm.com; Received: from nebula.arm.com (217.140.96.140) by AM1FFO11FD029.mail.protection.outlook.com (10.174.64.218) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.707.3 via Frontend Transport; Tue, 8 Nov 2016 05:46:34 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:938; Count:13 Received: from sha-win-210.shanghai.arm.com (10.1.2.79) by mail.arm.com (10.1.105.66) with Microsoft SMTP Server id 14.3.294.0; Tue, 8 Nov 2016 05:46:24 +0000 From: Huang Shijie <shijie.huang@arm.com> To: <catalin.marinas@arm.com> Subject: [PATCH v2 2/2] arm64: hugetlb: fix the wrong address for several functions Date: Tue, 8 Nov 2016 13:44:39 +0800 Message-ID: <1478583879-14654-3-git-send-email-shijie.huang@arm.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1478583879-14654-1-git-send-email-shijie.huang@arm.com> References: <1478583879-14654-1-git-send-email-shijie.huang@arm.com> MIME-Version: 1.0 X-IncomingHeaderCount: 13 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:217.140.96.140; IPV:CAL; SCL:-1; CTRY:GB; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(199003)(189002)(6666003)(6636002)(110136003)(2950100002)(47776003)(189998001)(5003940100001)(48376002)(626004)(8936002)(5660300001)(50466002)(8676002)(50226002)(2906002)(586003)(305945005)(4326007)(36756003)(7846002)(106466001)(229853001)(246002)(2351001)(50986999)(356003)(104016004)(76176999)(575784001)(77096005)(26826002)(92566002)(33646002)(86362001)(87936001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR08MB0565; H:nebula.arm.com; FPR:; SPF:Pass; PTR:fw-tnat.cambridge.arm.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD029; 1:AjP4RyJiwGLAGfMxhkyCd9Pq5fuRPSsGstkIcNvF33VGfspLI0dv7vy2glMkuXKuMJg1CNr8H5Tkm386keg/+db4gI97mf6o6kng9KqiP6/d7H382jBXOVt0fafqvEFPsLwfF6jR9n3KhzDDKXqcPANyXVJRKo3OBKRb6DGznrC59qYM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NfsDR//tIyVdT7txD/qW/EU= X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:DB5PR08MB0565; X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0565; 25:63S2GvNZMeRQbC7GkDLJm2tWLJXEollbmqpYMrPfvTDIw47o6d/sOQw2wKY+Xs+ZTDWM5wCc/i1vU+K4RIv2yFDBtnJ6E67I0EMFXE94XDnISZSsmbOjRCw3Pmo/3C4QfnxkFA9GQO2msYeLJLhCQjHxrZOevvLMfUnwJT00qqqoFiZwm9rRYmeoK/0LhkFOv3a2JTqdr3yfUzYH3htaAp9TQMGrAVgq9e/bpKxQLtWad2qZJBF4tV7WeNAOxl2I2F8q939VrGCUBiJQwCiWe0FmIefeXKgDXGPi2y7+o6Ft5rYTZ7jTwWM22KRUhviNi7PCIYs2B4uq15HklPdxM8422MfOVBXgzc3IB5yZdE2knBAMaWOU0vzj9X6YDJ4CqQcFBXuv98tN5up6q4t7i/KGdneFAhffdR3XSnp/Ebv9OGTy+vo/zJcp1QH5MaotKnYV0gPuXiqJNoK6axyJL99ItZAX8wnf2hTtbuR8cQ24UsLj3vdksoHKM0P0bcTAYc5/rdAJl6PFwajxmTM6e/EU2lBL/h3C3ek8JlGK59C6XKKZu4Fy5hxHnQZYjAOleGM9QK24bolOgdhRh+e6BtaU639ysFYS08YeLF3naEv/O4mQ77ulGsG3cvPThwipmd/gDNQePQGrVbY7lcFftYFR9L6HLHA/4bHXw0rLjlGLaRFwRrRbkwXPSCg/3rWgxeynUD/JK8urZEmkOZ8cGd5DXTUYkskm/pjACE0gGHhIYkOUBpJR1YJyUwHUIw7K X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0565; 31:6zi5RGChJQ3DVgCX0JDkaboWAHBDNL4lmOek0YRja2A6qBu99vLCaH9GXGQX/wDJfaDFqutv52p7qpRaDeDkswFzwEp444klL3b2o3rX29PcKIEcHZLdeKOCgzVx2O5i0XNLxiCgPLG8MKPZHDhem8M4QLOW1pGVPJm8M03AzpErd77tTu+fQcZ1XDApeNlFYxsBusHNV5lJJXqQAKkhJECQbz0l78DyN0LHK4+mvrOGur764e4pYOgq+z+MHvKC; 20:T5i6xzpQyl5HtjP5mMDmhcBLs7zlr+/eDCUAGBNSKUbTXs+PwjZc2YLlM5um4CS3odnZo132isFuiSns40IYBWp5oc6YEnrMfMDeBf/1YqzzNVH8zI8UuaJCxg4BhOVPeyf8FaJmO7y4c1j1jsgGat76aHSETTvaDd04oLQaLRiBcdTl5vnN3JWohNtZ37tyZbUVwQ5E66+DwR5olmIBTJQ8uK/5/l01ieTmNGJ3+h8QuqcuKa5JyVkH0+HZ+/1R NoDisclaimer: True X-Microsoft-Antispam-PRVS: <DB5PR08MB05650D95E6BCBC74B8CC943384A60@DB5PR08MB0565.eurprd08.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(13024025)(13023025)(13020025)(13013025)(8121501046)(10201501046)(3002001)(6055026); SRVR:DB5PR08MB0565; BCL:0; PCL:0; RULEID:; SRVR:DB5PR08MB0565; X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0565; 4:oI7Ju/qdW/jCbxBiF5hvl8tliDRfjwgoKUKAr2z+TwKim6XwvgJqEiphfTZoivC6J8BRuwHm9GyV7HZlI2m2FM+4r0Q0k7sbf8PG8KagtVL1QTWNmOXmjMMKP+YTnOly0Snffp4n69WsM8l6vcsSDSB9al6Rk/b7pFwvFA9jGr0PUVH2bPAf+7FRPXOBq6WhXOjeGayVDLcA/SCSX5x+eGPfSQyFQD2uj5A9VMqeU6VGjlI3uDZ5tB6ScIT40xIB7C4qvL005dyrtnQB3JADbT0XXdgCrTcGOM0o5maEEsVol2S1zbXikh+TOXJoKGl3ZwpH4hHCjrDj73bRe+puHWVkQlim5xhpUSMLqBjih3zAwfc8dprOFv1fhEQ7KYZFCM36UDwwaFjo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put: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0565; 7:QGpouyP/2TrtQLyo/spaoBAaaPkAiK2bZf9/7WXOyu64RTDjIoQlGISNaz/mQlq/CxekonmNXwR1pHNlBnoTSPU5Jg2FeExSuBsVVUQ2fAG+cIzIkmxUmoc7sd67rozxbYNlsjoRTqFW/qx8YE1Ll/XBsJglnDCNOsHDQZ7yKvI9UclSvrGzLTinKj6APqaxMx1JaLTc1E23RRvCszg4gq2SgtClu49ioK1a0X0z2+4yR2K2DJSo/VXq6/lrByaIMOif54FMqzD1unjpNBrlq/rLRaMbDUs6xhGB5QFA5f5lZ48c47+B4hzbyT9XT7JWSnS8Vt6pPh07cm/9FL2sdTsl2PiAQj+qCnbOBX4IrD4= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2016 05:46:34.5434 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[217.140.96.140]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR08MB0565 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161107_214658_800871_C02C74EF X-CRM114-Status: UNSURE ( 9.32 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: dwoods@mellanox.com, steve.capper@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, kaly.xin@arm.com, Huang Shijie <shijie.huang@arm.com>, akpm@linux-foundation.org, nd@arm.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c index b0d3f8b..fd96ba7 100644 --- a/arch/arm64/mm/hugetlbpage.c +++ b/arch/arm64/mm/hugetlbpage.c @@ -200,7 +200,7 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, ncontig = find_num_contig(mm, addr, cpte, *cpte, &pgsize); /* save the 1st pte to return */ pte = ptep_get_and_clear(mm, addr, cpte); - for (i = 1; i < ncontig; ++i) { + for (i = 1, addr += pgsize; i < ncontig; ++i, addr += pgsize) { /* * If HW_AFDBM is enabled, then the HW could * turn on the dirty bit for any of the page @@ -238,7 +238,7 @@ int huge_ptep_set_access_flags(struct vm_area_struct *vma, pfn = pte_pfn(*cpte); ncontig = find_num_contig(vma->vm_mm, addr, cpte, *cpte, &pgsize); - for (i = 0; i < ncontig; ++i, ++cpte) { + for (i = 0; i < ncontig; ++i, ++cpte, addr += pgsize) { changed = ptep_set_access_flags(vma, addr, cpte, pfn_pte(pfn, hugeprot), @@ -261,7 +261,7 @@ void huge_ptep_set_wrprotect(struct mm_struct *mm, cpte = huge_pte_offset(mm, addr); ncontig = find_num_contig(mm, addr, cpte, *cpte, &pgsize); - for (i = 0; i < ncontig; ++i, ++cpte) + for (i = 0; i < ncontig; ++i, ++cpte, addr += pgsize) ptep_set_wrprotect(mm, addr, cpte); } else { ptep_set_wrprotect(mm, addr, ptep); @@ -279,7 +279,7 @@ void huge_ptep_clear_flush(struct vm_area_struct *vma, cpte = huge_pte_offset(vma->vm_mm, addr); ncontig = find_num_contig(vma->vm_mm, addr, cpte, *cpte, &pgsize); - for (i = 0; i < ncontig; ++i, ++cpte) + for (i = 0; i < ncontig; ++i, ++cpte, addr += pgsize) ptep_clear_flush(vma, addr, cpte); } else { ptep_clear_flush(vma, addr, ptep);
The libhugetlbfs meets several failures since the following functions do not use the correct address: huge_ptep_get_and_clear() huge_ptep_set_access_flags() huge_ptep_set_wrprotect() huge_ptep_clear_flush() This patch fixes the wrong address for them. Signed-off-by: Huang Shijie <shijie.huang@arm.com> --- arch/arm64/mm/hugetlbpage.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)