From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754935AbcJUKTD (ORCPT ); Fri, 21 Oct 2016 06:19:03 -0400 Received: from mail-it0-f54.google.com ([209.85.214.54]:35376 "EHLO mail-it0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754310AbcJUKTC (ORCPT ); Fri, 21 Oct 2016 06:19:02 -0400 MIME-Version: 1.0 In-Reply-To: <1477040326-21260-1-git-send-email-neeraju@codeaurora.org> References: <1477040326-21260-1-git-send-email-neeraju@codeaurora.org> From: Ard Biesheuvel Date: Fri, 21 Oct 2016 11:18:55 +0100 Message-ID: Subject: Re: [PATCH] arm64: mm: fix __page_to_voff definition To: Neeraj Upadhyay Cc: Catalin Marinas , Will Deacon , Mark Rutland , James Morse , Laura Abbott , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21 October 2016 at 09:58, Neeraj Upadhyay wrote: > 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 > --- > 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)) Acked-by: Ard Biesheuvel From mboxrd@z Thu Jan 1 00:00:00 1970 From: ard.biesheuvel@linaro.org (Ard Biesheuvel) Date: Fri, 21 Oct 2016 11:18:55 +0100 Subject: [PATCH] arm64: mm: fix __page_to_voff definition In-Reply-To: <1477040326-21260-1-git-send-email-neeraju@codeaurora.org> References: <1477040326-21260-1-git-send-email-neeraju@codeaurora.org> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 21 October 2016 at 09:58, Neeraj Upadhyay wrote: > 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 > --- > 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)) Acked-by: Ard Biesheuvel