From patchwork Fri Oct 21 08:58:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neeraj Upadhyay X-Patchwork-Id: 9388295 Return-Path: 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 05323607F0 for ; Fri, 21 Oct 2016 09:01:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6E8129F41 for ; Fri, 21 Oct 2016 09:01:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB1AE29F4C; Fri, 21 Oct 2016 09:01:36 +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=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 B02C329F41 for ; Fri, 21 Oct 2016 09:01:32 +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 1bxVgT-0002zn-He; Fri, 21 Oct 2016 09:00:13 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bxVfZ-00025t-8i for linux-arm-kernel@lists.infradead.org; Fri, 21 Oct 2016 08:59:18 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 50D5661C14; Fri, 21 Oct 2016 08:58:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1477040336; bh=bZUTBJnlt1iKALz/HNz+/+dNBbGm2X/9PqxV9a8iyRI=; h=From:To:Cc:Subject:Date:From; b=H8dnZOQHvw1LWc5uRZec9ri0sBfGuO7buwnXehykQv7/R5HxGofvkOY3k+Do9WsNG l64ncKAiadXVsc5xSmO17gao3Drg+Q2bM8kKK+x/a+A6H9XQF6DHGpbeZtdzk6+zkG pUh1Sj5AazrvPXhGm6YodnW1JL+j/iu+VevYUJ64= Received: from neeraju-linux.qualcomm.com (unknown [202.46.23.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: neeraju@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 276946175E; Fri, 21 Oct 2016 08:58:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1477040336; bh=bZUTBJnlt1iKALz/HNz+/+dNBbGm2X/9PqxV9a8iyRI=; h=From:To:Cc:Subject:Date:From; b=H8dnZOQHvw1LWc5uRZec9ri0sBfGuO7buwnXehykQv7/R5HxGofvkOY3k+Do9WsNG l64ncKAiadXVsc5xSmO17gao3Drg+Q2bM8kKK+x/a+A6H9XQF6DHGpbeZtdzk6+zkG pUh1Sj5AazrvPXhGm6YodnW1JL+j/iu+VevYUJ64= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 276946175E Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=neeraju@codeaurora.org From: Neeraj Upadhyay To: Catalin Marinas , Will Deacon , Ard Biesheuvel , Mark Rutland , James Morse , Laura Abbott , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm64: mm: fix __page_to_voff definition Date: Fri, 21 Oct 2016 14:28:46 +0530 Message-Id: <1477040326-21260-1-git-send-email-neeraju@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161021_015917_510512_0FC13590 X-CRM114-Status: GOOD ( 10.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neeraj Upadhyay MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Fix parameter name for __page_to_voff, to match its definition. At present, we don't see any issue, as page_to_virt's caller declares 'page'. Fixes: 9f2875912dac ("arm64: mm: restrict virt_to_page() to the linear mapping") Signed-off-by: Neeraj Upadhyay Acked-by: Mark Rutland Acked-by: Ard Biesheuvel --- arch/arm64/include/asm/memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h index ba62df8..b71086d 100644 --- a/arch/arm64/include/asm/memory.h +++ b/arch/arm64/include/asm/memory.h @@ -217,7 +217,7 @@ static inline void *phys_to_virt(phys_addr_t x) #define _virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) #else #define __virt_to_pgoff(kaddr) (((u64)(kaddr) & ~PAGE_OFFSET) / PAGE_SIZE * sizeof(struct page)) -#define __page_to_voff(kaddr) (((u64)(page) & ~VMEMMAP_START) * PAGE_SIZE / sizeof(struct page)) +#define __page_to_voff(page) (((u64)(page) & ~VMEMMAP_START) * PAGE_SIZE / sizeof(struct page)) #define page_to_virt(page) ((void *)((__page_to_voff(page)) | PAGE_OFFSET)) #define virt_to_page(vaddr) ((struct page *)((__virt_to_pgoff(vaddr)) | VMEMMAP_START))